]> git.sur5r.net Git - u-boot/commitdiff
Merge branch 'master' of git://git.denx.de/u-boot-samsung
authorWolfgang Denk <wd@denx.de>
Fri, 29 Oct 2010 19:47:48 +0000 (21:47 +0200)
committerWolfgang Denk <wd@denx.de>
Fri, 29 Oct 2010 19:47:48 +0000 (21:47 +0200)
947 files changed:
.gitignore
MAINTAINERS
MAKEALL
Makefile
README
arch/arm/config.mk
arch/arm/cpu/arm1136/mx31/generic.c
arch/arm/cpu/arm1136/start.S
arch/arm/cpu/arm1136/u-boot.lds
arch/arm/cpu/arm1176/start.S
arch/arm/cpu/arm1176/u-boot.lds
arch/arm/cpu/arm720t/start.S
arch/arm/cpu/arm920t/start.S
arch/arm/cpu/arm925t/start.S
arch/arm/cpu/arm926ejs/at91/clock.c
arch/arm/cpu/arm926ejs/at91/timer.c
arch/arm/cpu/arm926ejs/kirkwood/dram.c
arch/arm/cpu/arm926ejs/orion5x/dram.c
arch/arm/cpu/arm926ejs/start.S
arch/arm/cpu/arm926ejs/u-boot.lds
arch/arm/cpu/arm946es/start.S
arch/arm/cpu/arm_intcm/start.S
arch/arm/cpu/armv7/mx5/Makefile [new file with mode: 0644]
arch/arm/cpu/armv7/mx5/clock.c [new file with mode: 0644]
arch/arm/cpu/armv7/mx5/iomux.c [new file with mode: 0644]
arch/arm/cpu/armv7/mx5/lowlevel_init.S [new file with mode: 0644]
arch/arm/cpu/armv7/mx5/soc.c [new file with mode: 0644]
arch/arm/cpu/armv7/mx5/speed.c [new file with mode: 0644]
arch/arm/cpu/armv7/mx5/timer.c [new file with mode: 0644]
arch/arm/cpu/armv7/mx5/u-boot.lds [new file with mode: 0644]
arch/arm/cpu/armv7/mx51/Makefile [deleted file]
arch/arm/cpu/armv7/mx51/clock.c [deleted file]
arch/arm/cpu/armv7/mx51/iomux.c [deleted file]
arch/arm/cpu/armv7/mx51/lowlevel_init.S [deleted file]
arch/arm/cpu/armv7/mx51/soc.c [deleted file]
arch/arm/cpu/armv7/mx51/speed.c [deleted file]
arch/arm/cpu/armv7/mx51/timer.c [deleted file]
arch/arm/cpu/armv7/mx51/u-boot.lds [deleted file]
arch/arm/cpu/armv7/omap3/emif4.c
arch/arm/cpu/armv7/omap3/sdrc.c
arch/arm/cpu/armv7/omap4/board.c
arch/arm/cpu/armv7/start.S
arch/arm/cpu/armv7/u-boot.lds
arch/arm/cpu/ixp/start.S
arch/arm/cpu/lh7a40x/start.S
arch/arm/cpu/pxa/cpu.c
arch/arm/cpu/pxa/i2c.c
arch/arm/cpu/pxa/pxafb.c
arch/arm/cpu/pxa/start.S
arch/arm/cpu/pxa/timer.c
arch/arm/cpu/pxa/u-boot.lds
arch/arm/cpu/pxa/usb.c
arch/arm/cpu/s3c44b0/start.S
arch/arm/cpu/sa1100/start.S
arch/arm/include/asm/arch-at91/hardware.h
arch/arm/include/asm/arch-mx31/mx31.h
arch/arm/include/asm/arch-mx5/asm-offsets.h [new file with mode: 0644]
arch/arm/include/asm/arch-mx5/clock.h [new file with mode: 0644]
arch/arm/include/asm/arch-mx5/crm_regs.h [new file with mode: 0644]
arch/arm/include/asm/arch-mx5/imx-regs.h [new file with mode: 0644]
arch/arm/include/asm/arch-mx5/iomux.h [new file with mode: 0644]
arch/arm/include/asm/arch-mx5/mx5x_pins.h [new file with mode: 0644]
arch/arm/include/asm/arch-mx5/sys_proto.h [new file with mode: 0644]
arch/arm/include/asm/arch-mx51/asm-offsets.h [deleted file]
arch/arm/include/asm/arch-mx51/clock.h [deleted file]
arch/arm/include/asm/arch-mx51/crm_regs.h [deleted file]
arch/arm/include/asm/arch-mx51/imx-regs.h [deleted file]
arch/arm/include/asm/arch-mx51/iomux.h [deleted file]
arch/arm/include/asm/arch-mx51/mx51_pins.h [deleted file]
arch/arm/include/asm/arch-mx51/sys_proto.h [deleted file]
arch/arm/include/asm/arch-pxa/hardware.h
arch/arm/include/asm/arch-pxa/macro.h [deleted file]
arch/arm/include/asm/arch-pxa/pxa-regs.h
arch/arm/include/asm/config.h
arch/arm/include/asm/global_data.h
arch/arm/include/asm/u-boot-arm.h
arch/arm/lib/board.c
arch/arm/lib/bootm.c
arch/arm/lib/cache-cp15.c
arch/arm/lib/cache.c
arch/arm/lib/interrupts.c
arch/avr32/cpu/start.S
arch/avr32/include/asm/config.h
arch/avr32/include/asm/global_data.h
arch/avr32/lib/board.c
arch/blackfin/config.mk
arch/blackfin/include/asm/config.h
arch/blackfin/include/asm/global_data.h
arch/blackfin/lib/board.c
arch/i386/include/asm/config.h
arch/i386/include/asm/global_data.h
arch/m68k/cpu/mcf5227x/start.S
arch/m68k/cpu/mcf523x/start.S
arch/m68k/cpu/mcf52x2/start.S
arch/m68k/cpu/mcf532x/start.S
arch/m68k/cpu/mcf5445x/start.S
arch/m68k/cpu/mcf547x_8x/start.S
arch/m68k/include/asm/config.h
arch/m68k/include/asm/global_data.h
arch/m68k/lib/board.c
arch/microblaze/cpu/start.S
arch/microblaze/include/asm/config.h
arch/microblaze/include/asm/global_data.h
arch/microblaze/lib/board.c
arch/mips/cpu/cache.S
arch/mips/cpu/start.S
arch/mips/include/asm/config.h
arch/mips/include/asm/global_data.h
arch/mips/lib/board.c
arch/nios2/cpu/start.S
arch/nios2/include/asm/config.h
arch/nios2/lib/board.c
arch/powerpc/cpu/74xx_7xx/start.S
arch/powerpc/cpu/mpc512x/start.S
arch/powerpc/cpu/mpc5xx/start.S
arch/powerpc/cpu/mpc5xxx/start.S
arch/powerpc/cpu/mpc8220/start.S
arch/powerpc/cpu/mpc824x/start.S
arch/powerpc/cpu/mpc8260/start.S
arch/powerpc/cpu/mpc83xx/cpu_init.c
arch/powerpc/cpu/mpc83xx/start.S
arch/powerpc/cpu/mpc85xx/config.mk
arch/powerpc/cpu/mpc85xx/cpu.c
arch/powerpc/cpu/mpc85xx/fdt.c
arch/powerpc/cpu/mpc85xx/mp.c
arch/powerpc/cpu/mpc85xx/mp.h
arch/powerpc/cpu/mpc85xx/release.S
arch/powerpc/cpu/mpc85xx/start.S
arch/powerpc/cpu/mpc85xx/tlb.c
arch/powerpc/cpu/mpc85xx/u-boot.lds
arch/powerpc/cpu/mpc86xx/config.mk
arch/powerpc/cpu/mpc86xx/start.S
arch/powerpc/cpu/mpc86xx/u-boot.lds [new file with mode: 0644]
arch/powerpc/cpu/mpc8xx/start.S
arch/powerpc/cpu/mpc8xxx/ddr/ctrl_regs.c
arch/powerpc/cpu/mpc8xxx/fdt.c
arch/powerpc/cpu/mpc8xxx/pci_cfg.c
arch/powerpc/cpu/ppc4xx/cpu_init.c
arch/powerpc/cpu/ppc4xx/interrupts.c
arch/powerpc/cpu/ppc4xx/start.S
arch/powerpc/cpu/ppc4xx/traps.c
arch/powerpc/include/asm/config.h
arch/powerpc/include/asm/fsl_ddr_sdram.h
arch/powerpc/include/asm/fsl_enet.h [new file with mode: 0644]
arch/powerpc/include/asm/global_data.h
arch/powerpc/lib/board.c
arch/sh/config.mk
arch/sh/cpu/sh2/start.S
arch/sh/cpu/sh3/start.S
arch/sh/cpu/sh4/start.S
arch/sh/include/asm/config.h
arch/sh/lib/board.c
arch/sh/lib/bootm.c
arch/sparc/cpu/leon2/start.S
arch/sparc/cpu/leon3/start.S
arch/sparc/include/asm/byteorder.h
arch/sparc/include/asm/config.h
arch/sparc/include/asm/global_data.h
arch/sparc/include/asm/unaligned.h [new file with mode: 0644]
arch/sparc/lib/board.c
board/BuS/eb_cpux9k2/config.mk [deleted file]
board/BuS/eb_cpux9k2/cpux9k2.c
board/LaCie/edminiv2/config.mk
board/a4m072/a4m072.c
board/a4m072/config.mk [deleted file]
board/amcc/bamboo/init.S
board/amcc/bluestone/init.S
board/amcc/canyonlands/init.S
board/amcc/sequoia/init.S
board/amcc/sequoia/sequoia.c
board/amcc/yosemite/init.S
board/atmel/at91rm9200ek/Makefile
board/atmel/at91rm9200ek/at91rm9200ek.c
board/atmel/at91rm9200ek/config.mk
board/atmel/at91rm9200ek/led.c
board/atmel/at91rm9200ek/misc.c [deleted file]
board/atmel/at91rm9200ek/mux.c [deleted file]
board/atmel/at91rm9200ek/partition.c [deleted file]
board/balloon3/Makefile [new file with mode: 0644]
board/balloon3/balloon3.c [new file with mode: 0644]
board/barco/early_init.S
board/bct-brettl2/cled.c
board/cerf250/Makefile
board/cerf250/cerf250.c
board/cerf250/config.mk [deleted file]
board/cerf250/lowlevel_init.S [deleted file]
board/colibri_pxa270/Makefile
board/colibri_pxa270/colibri_pxa270.c
board/colibri_pxa270/config.mk [deleted file]
board/colibri_pxa270/lowlevel_init.S [deleted file]
board/cradle/Makefile
board/cradle/config.mk [deleted file]
board/cradle/cradle.c
board/cradle/lowlevel_init.S [deleted file]
board/csb226/Makefile
board/csb226/config.mk [deleted file]
board/csb226/csb226.c
board/csb226/lowlevel_init.S [deleted file]
board/davedenx/qong/fpga.c
board/davinci/common/misc.c
board/davinci/da8xxevm/config.mk [deleted file]
board/delta/Makefile [deleted file]
board/delta/config.mk [deleted file]
board/delta/delta.c [deleted file]
board/delta/lowlevel_init.S [deleted file]
board/delta/nand.c [deleted file]
board/eNET/u-boot.lds
board/esd/du440/init.S
board/esd/pmc440/init.S
board/fads/fads.h
board/freescale/corenet_ds/Makefile
board/freescale/corenet_ds/corenet_ds.c
board/freescale/corenet_ds/ddr.c
board/freescale/corenet_ds/p4080ds_ddr.c [new file with mode: 0644]
board/freescale/mpc8360emds/mpc8360emds.c
board/freescale/mpc837xemds/mpc837xemds.c
board/freescale/mpc8569mds/mpc8569mds.c
board/freescale/mpc8610hpcd/u-boot.lds [deleted file]
board/freescale/mpc8641hpcn/mpc8641hpcn.c
board/freescale/mpc8641hpcn/u-boot.lds [deleted file]
board/freescale/mx51evk/mx51evk.c
board/gdsys/405ep/405ep.c [new file with mode: 0644]
board/gdsys/405ep/Makefile [new file with mode: 0644]
board/gdsys/405ep/io.c [new file with mode: 0644]
board/gdsys/405ep/iocon.c [new file with mode: 0644]
board/gdsys/common/Makefile [new file with mode: 0644]
board/gdsys/common/fpga.h [new file with mode: 0644]
board/gdsys/common/miiphybb.c [new file with mode: 0644]
board/gdsys/common/osd.c [new file with mode: 0644]
board/gdsys/common/osd.h [new file with mode: 0644]
board/gdsys/gdppc440etx/init.S
board/gdsys/intip/init.S
board/hidden_dragon/early_init.S
board/icecube/icecube.c
board/innokom/Makefile
board/innokom/config.mk [deleted file]
board/innokom/innokom.c
board/innokom/lowlevel_init.S [deleted file]
board/isee/igep0030/config.mk
board/jornada/Makefile [new file with mode: 0644]
board/jornada/jornada.c [new file with mode: 0644]
board/jornada/setup.S [new file with mode: 0644]
board/jornada/u-boot.lds [new file with mode: 0644]
board/karo/tx25/config.mk
board/keymile/km_arm/km_arm.c
board/korat/init.S
board/logicpd/imx27lite/config.mk
board/logicpd/imx31_litekit/config.mk
board/logicpd/imx31_litekit/imx31_litekit.c
board/lubbock/Makefile
board/lubbock/config.mk [deleted file]
board/lubbock/lowlevel_init.S [deleted file]
board/lubbock/lubbock.c
board/lwmon5/init.S
board/nc650/Makefile [deleted file]
board/nc650/flash.c [deleted file]
board/nc650/nand.c [deleted file]
board/nc650/nc650.c [deleted file]
board/nc650/u-boot.lds [deleted file]
board/nc650/u-boot.lds.debug [deleted file]
board/netstal/hcu4/Makefile
board/netstal/hcu5/Makefile
board/netstal/mcu25/Makefile
board/palmld/Makefile [new file with mode: 0644]
board/palmld/palmld.c [new file with mode: 0644]
board/palmtc/Makefile [new file with mode: 0644]
board/palmtc/palmtc.c [new file with mode: 0644]
board/pcs440ep/init.S
board/pleb2/Makefile
board/pleb2/config.mk [deleted file]
board/pleb2/lowlevel_init.S [deleted file]
board/pleb2/pleb2.c
board/prodrive/alpr/init.S
board/pxa255_idp/Makefile
board/pxa255_idp/config.mk [deleted file]
board/pxa255_idp/lowlevel_init.S [deleted file]
board/pxa255_idp/pxa_idp.c
board/renesas/sh7785lcr/config.mk
board/sandpoint/early_init.S
board/sbc8641d/sbc8641d.c
board/sbc8641d/u-boot.lds [deleted file]
board/t3corp/init.S
board/tqc/tqm85xx/law.c
board/tqc/tqm85xx/tlb.c
board/tqc/tqm85xx/tqm85xx.c
board/trizepsiv/Makefile
board/trizepsiv/config.mk [deleted file]
board/trizepsiv/conxs.c
board/trizepsiv/lowlevel_init.S [deleted file]
board/trizepsiv/pxavoltage.S [deleted file]
board/ttcontrol/vision2/vision2.c
board/vpac270/Makefile
board/vpac270/config.mk [deleted file]
board/vpac270/lowlevel_init.S [deleted file]
board/vpac270/u-boot.lds [deleted file]
board/vpac270/vpac270.c
board/wepep250/Makefile [deleted file]
board/wepep250/config.mk [deleted file]
board/wepep250/flash.c [deleted file]
board/wepep250/intel.h [deleted file]
board/wepep250/lowlevel_init.S [deleted file]
board/wepep250/wepep250.c [deleted file]
board/xaeniax/Makefile
board/xaeniax/config.mk [deleted file]
board/xaeniax/lowlevel_init.S [deleted file]
board/xaeniax/xaeniax.c
board/xes/common/Makefile
board/xes/common/board.c [new file with mode: 0644]
board/xes/common/fsl_8xxx_clk.c
board/xes/common/fsl_8xxx_misc.c [new file with mode: 0644]
board/xes/common/fsl_8xxx_misc.h [new file with mode: 0644]
board/xes/common/fsl_8xxx_pci.c
board/xes/xpedite5170/Makefile [deleted file]
board/xes/xpedite5170/ddr.c [deleted file]
board/xes/xpedite5170/law.c [deleted file]
board/xes/xpedite5170/u-boot.lds [deleted file]
board/xes/xpedite5170/xpedite5170.c [deleted file]
board/xes/xpedite517x/Makefile [new file with mode: 0644]
board/xes/xpedite517x/ddr.c [new file with mode: 0644]
board/xes/xpedite517x/law.c [new file with mode: 0644]
board/xes/xpedite517x/xpedite517x.c [new file with mode: 0644]
board/xes/xpedite5200/Makefile [deleted file]
board/xes/xpedite5200/ddr.c [deleted file]
board/xes/xpedite5200/law.c [deleted file]
board/xes/xpedite5200/tlb.c [deleted file]
board/xes/xpedite5200/xpedite5200.c [deleted file]
board/xes/xpedite520x/Makefile [new file with mode: 0644]
board/xes/xpedite520x/ddr.c [new file with mode: 0644]
board/xes/xpedite520x/law.c [new file with mode: 0644]
board/xes/xpedite520x/tlb.c [new file with mode: 0644]
board/xes/xpedite520x/xpedite520x.c [new file with mode: 0644]
board/xes/xpedite5370/Makefile [deleted file]
board/xes/xpedite5370/ddr.c [deleted file]
board/xes/xpedite5370/law.c [deleted file]
board/xes/xpedite5370/tlb.c [deleted file]
board/xes/xpedite5370/xpedite5370.c [deleted file]
board/xes/xpedite537x/Makefile [new file with mode: 0644]
board/xes/xpedite537x/ddr.c [new file with mode: 0644]
board/xes/xpedite537x/law.c [new file with mode: 0644]
board/xes/xpedite537x/tlb.c [new file with mode: 0644]
board/xes/xpedite537x/xpedite537x.c [new file with mode: 0644]
board/xes/xpedite550x/Makefile [new file with mode: 0644]
board/xes/xpedite550x/ddr.c [new file with mode: 0644]
board/xes/xpedite550x/law.c [new file with mode: 0644]
board/xes/xpedite550x/tlb.c [new file with mode: 0644]
board/xes/xpedite550x/xpedite550x.c [new file with mode: 0644]
board/xm250/Makefile
board/xm250/config.mk [deleted file]
board/xm250/lowlevel_init.S [deleted file]
board/xm250/xm250.c
board/xsengine/Makefile [deleted file]
board/xsengine/config.mk [deleted file]
board/xsengine/flash.c [deleted file]
board/xsengine/lowlevel_init.S [deleted file]
board/xsengine/xsengine.c [deleted file]
board/zipitz2/Makefile
board/zipitz2/config.mk [deleted file]
board/zipitz2/lowlevel_init.S [deleted file]
board/zipitz2/zipitz2.c
board/zylonite/nand.c
boards.cfg
common/cmd_bdinfo.c
common/cmd_bmp.c
common/cmd_bootm.c
common/cmd_date.c
common/cmd_fpga.c
common/cmd_i2c.c
common/cmd_nvedit.c
common/cmd_onenand.c
common/cmd_pci.c
common/command.c
common/dlmalloc.c
common/env_common.c
common/env_flash.c
common/env_sf.c
common/fdt_support.c
common/hush.c
common/hwconfig.c
common/image.c
common/serial.c
common/stdio.c
common/usb_storage.c
disk/part.c
doc/README.LED_display
doc/README.POST
doc/README.arm-relocation
doc/README.fsl-ddr
doc/README.scrapyard [new file with mode: 0644]
doc/README.ubi [new file with mode: 0644]
doc/feature-removal-schedule.txt
drivers/fpga/lattice.c
drivers/i2c/omap24xx_i2c.c
drivers/mmc/mmc.c
drivers/mmc/omap_hsmmc.c
drivers/mmc/pxa_mmc.c
drivers/mtd/cfi_flash.c
drivers/mtd/nand/nand.c
drivers/net/fec_mxc.c
drivers/net/phy/miiphybb.c
drivers/net/uli526x.c
drivers/pci/fsl_pci_init.c
drivers/pci/pci.c
drivers/qe/uec.c
drivers/qe/uec.h
drivers/qe/uec_phy.c
drivers/rtc/ftrtc010.c
drivers/serial/atmel_usart.h
drivers/serial/serial_pxa.c
drivers/usb/gadget/config.c
drivers/usb/gadget/epautoconf.c
drivers/usb/gadget/ether.c
drivers/usb/gadget/usbstring.c
drivers/usb/host/ehci-hcd.c
drivers/usb/host/ehci-mxc.c
drivers/usb/host/ehci-pci.c
drivers/usb/host/ehci.h
drivers/usb/musb/musb_core.c
drivers/usb/musb/musb_core.h
drivers/usb/musb/musb_hcd.c
drivers/video/Makefile
drivers/video/ipu.h [new file with mode: 0644]
drivers/video/ipu_common.c [new file with mode: 0644]
drivers/video/ipu_disp.c [new file with mode: 0644]
drivers/video/ipu_regs.h [new file with mode: 0644]
drivers/video/mxc_ipuv3_fb.c [new file with mode: 0644]
drivers/video/mxcfb.h [new file with mode: 0644]
fs/fat/fat.c
fs/ubifs/ubifs.c
include/asm-offsets.h [new file with mode: 0644]
include/command.h
include/common.h
include/configs/A3000.h
include/configs/ADCIOP.h
include/configs/AMX860.h
include/configs/AP1000.h
include/configs/APC405.h
include/configs/AR405.h
include/configs/ASH405.h
include/configs/ATUM8548.h
include/configs/Adder.h
include/configs/Alaska8220.h
include/configs/B2.h
include/configs/BAB7xx.h
include/configs/BC3450.h
include/configs/BMW.h
include/configs/CANBT.h
include/configs/CATcenter.h
include/configs/CMS700.h
include/configs/CPC45.h
include/configs/CPCI2DP.h
include/configs/CPCI405.h
include/configs/CPCI4052.h
include/configs/CPCI405AB.h
include/configs/CPCI405DT.h
include/configs/CPCI750.h
include/configs/CPCIISER4.h
include/configs/CPU86.h
include/configs/CPU87.h
include/configs/CRAYL1.h
include/configs/CU824.h
include/configs/DASA_SIM.h
include/configs/DB64360.h
include/configs/DB64460.h
include/configs/DP405.h
include/configs/DU405.h
include/configs/DU440.h
include/configs/EB+MCF-EV123.h
include/configs/ELPPC.h
include/configs/ELPT860.h
include/configs/EP88x.h
include/configs/ERIC.h
include/configs/ESTEEM192E.h
include/configs/ETX094.h
include/configs/EVB64260.h
include/configs/EXBITGEN.h
include/configs/FADS823.h
include/configs/FADS850SAR.h
include/configs/FLAGADM.h
include/configs/FPS850L.h
include/configs/FPS860L.h
include/configs/G2000.h
include/configs/GEN860T.h
include/configs/GENIETV.h
include/configs/HH405.h
include/configs/HIDDEN_DRAGON.h
include/configs/HUB405.h
include/configs/IAD210.h
include/configs/ICU862.h
include/configs/IDS8247.h
include/configs/IP860.h
include/configs/IPHASE4539.h
include/configs/ISPAN.h
include/configs/IVML24.h
include/configs/IVMS8.h
include/configs/IceCube.h
include/configs/JSE.h
include/configs/KAREF.h
include/configs/KUP4K.h
include/configs/KUP4X.h
include/configs/LANTEC.h
include/configs/M5208EVBE.h
include/configs/M52277EVB.h
include/configs/M5235EVB.h
include/configs/M5249EVB.h
include/configs/M5253DEMO.h
include/configs/M5253EVBE.h
include/configs/M5271EVB.h
include/configs/M5272C3.h
include/configs/M5275EVB.h
include/configs/M5282EVB.h
include/configs/M53017EVB.h
include/configs/M5329EVB.h
include/configs/M5373EVB.h
include/configs/M54451EVB.h
include/configs/M54455EVB.h
include/configs/M5475EVB.h
include/configs/M5485EVB.h
include/configs/MBX.h
include/configs/MBX860T.h
include/configs/METROBOX.h
include/configs/MHPC.h
include/configs/MIP405.h
include/configs/ML2.h
include/configs/MOUSSE.h
include/configs/MPC8260ADS.h
include/configs/MPC8266ADS.h
include/configs/MPC8308RDB.h
include/configs/MPC8313ERDB.h
include/configs/MPC8315ERDB.h
include/configs/MPC8323ERDB.h
include/configs/MPC832XEMDS.h
include/configs/MPC8349EMDS.h
include/configs/MPC8349ITX.h
include/configs/MPC8360EMDS.h
include/configs/MPC8360ERDK.h
include/configs/MPC837XEMDS.h
include/configs/MPC837XERDB.h
include/configs/MPC8536DS.h
include/configs/MPC8540ADS.h
include/configs/MPC8540EVAL.h
include/configs/MPC8541CDS.h
include/configs/MPC8544DS.h
include/configs/MPC8548CDS.h
include/configs/MPC8555CDS.h
include/configs/MPC8560ADS.h
include/configs/MPC8568MDS.h
include/configs/MPC8569MDS.h
include/configs/MPC8572DS.h
include/configs/MPC8610HPCD.h
include/configs/MPC8641HPCN.h
include/configs/MUSENKI.h
include/configs/MVBC_P.h
include/configs/MVBLM7.h
include/configs/MVBLUE.h
include/configs/MVS1.h
include/configs/MVSMR.h
include/configs/MigoR.h
include/configs/NC650.h [deleted file]
include/configs/NETPHONE.h
include/configs/NETTA.h
include/configs/NETTA2.h
include/configs/NETVIA.h
include/configs/NSCU.h
include/configs/NX823.h
include/configs/OCRTC.h
include/configs/ORSG.h
include/configs/OXC.h
include/configs/P1022DS.h
include/configs/P1_P2_RDB.h
include/configs/P2020DS.h
include/configs/P3G4.h
include/configs/PATI.h
include/configs/PCI405.h
include/configs/PCI5441.h
include/configs/PCIPPC2.h
include/configs/PCIPPC6.h
include/configs/PIP405.h
include/configs/PK1C20.h
include/configs/PLU405.h
include/configs/PM520.h
include/configs/PM826.h
include/configs/PM828.h
include/configs/PM854.h
include/configs/PM856.h
include/configs/PMC405.h
include/configs/PMC405DE.h
include/configs/PMC440.h
include/configs/PN62.h
include/configs/PPChameleonEVB.h
include/configs/QS823.h
include/configs/QS850.h
include/configs/QS860T.h
include/configs/R360MPI.h
include/configs/RBC823.h
include/configs/RPXClassic.h
include/configs/RPXlite.h
include/configs/RPXlite_DW.h
include/configs/RPXsuper.h
include/configs/RRvision.h
include/configs/Rattler.h
include/configs/SBC8540.h
include/configs/SCM.h
include/configs/SIMPC8313.h
include/configs/SM850.h
include/configs/SMN42.h
include/configs/SPD823TS.h
include/configs/SX1.h
include/configs/SXNI855T.h
include/configs/Sandpoint8240.h
include/configs/Sandpoint8245.h
include/configs/TASREG.h
include/configs/TB5200.h
include/configs/TK885D.h
include/configs/TOP5200.h
include/configs/TOP860.h
include/configs/TQM5200.h
include/configs/TQM823L.h
include/configs/TQM823M.h
include/configs/TQM8260.h
include/configs/TQM8272.h
include/configs/TQM834x.h
include/configs/TQM850L.h
include/configs/TQM850M.h
include/configs/TQM855L.h
include/configs/TQM855M.h
include/configs/TQM85xx.h
include/configs/TQM860L.h
include/configs/TQM860M.h
include/configs/TQM862L.h
include/configs/TQM862M.h
include/configs/TQM866M.h
include/configs/TQM885D.h
include/configs/Total5200.h
include/configs/VCMA9.h
include/configs/VOH405.h
include/configs/VOM405.h
include/configs/VoVPN-GW.h
include/configs/W7OLMC.h
include/configs/W7OLMG.h
include/configs/WUH405.h
include/configs/XPEDITE1000.h [deleted file]
include/configs/XPEDITE5170.h [deleted file]
include/configs/XPEDITE5200.h [deleted file]
include/configs/XPEDITE5370.h [deleted file]
include/configs/Yukon8220.h
include/configs/ZPC1900.h
include/configs/ZUMA.h
include/configs/a320evb.h
include/configs/a4m072.h
include/configs/acadia.h
include/configs/actux1.h
include/configs/actux2.h
include/configs/actux3.h
include/configs/actux4.h
include/configs/aev.h
include/configs/afeb9260.h
include/configs/alpr.h
include/configs/am3517_evm.h
include/configs/amcc-common.h
include/configs/ap325rxa.h
include/configs/apollon.h
include/configs/aria.h
include/configs/armadillo.h
include/configs/assabet.h
include/configs/astro_mcf5373l.h
include/configs/at91cap9adk.h
include/configs/at91rm9200dk.h
include/configs/at91rm9200ek.h
include/configs/at91sam9260ek.h
include/configs/at91sam9261ek.h
include/configs/at91sam9263ek.h
include/configs/at91sam9m10g45ek.h
include/configs/at91sam9rlek.h
include/configs/atc.h
include/configs/balloon3.h [new file with mode: 0644]
include/configs/bamboo.h
include/configs/barco.h
include/configs/bct-brettl2.h
include/configs/bf548-ezkit.h
include/configs/bfin_adi_common.h
include/configs/blackvme.h
include/configs/bluestone.h
include/configs/bubinga.h
include/configs/c2mon.h
include/configs/ca9x4_ct_vxp.h
include/configs/canmb.h
include/configs/canyonlands.h
include/configs/cerf250.h
include/configs/cm4008.h
include/configs/cm41xx.h
include/configs/cm5200.h
include/configs/cmc_pu2.h
include/configs/cmi_mpc5xx.h
include/configs/cobra5272.h
include/configs/cogent_mpc8260.h
include/configs/cogent_mpc8xx.h
include/configs/colibri_pxa270.h
include/configs/corenet_ds.h
include/configs/cpci5200.h
include/configs/cpu9260.h
include/configs/cpuat91.h
include/configs/cradle.h
include/configs/csb226.h
include/configs/csb272.h
include/configs/csb472.h
include/configs/csb637.h
include/configs/da830evm.h
include/configs/da850evm.h
include/configs/davinci_dm355evm.h
include/configs/davinci_dm355leopard.h
include/configs/davinci_dm365evm.h
include/configs/davinci_dm6467evm.h
include/configs/davinci_dvevm.h
include/configs/davinci_schmoogie.h
include/configs/davinci_sffsdr.h
include/configs/davinci_sonata.h
include/configs/debris.h
include/configs/delta.h [deleted file]
include/configs/devkit8000.h
include/configs/digsy_mtc.h
include/configs/dlvision.h
include/configs/dnp1110.h
include/configs/eXalion.h
include/configs/eb_cpux9k2.h
include/configs/ebony.h
include/configs/edb93xx.h
include/configs/edminiv2.h
include/configs/ep7312.h
include/configs/ep8248.h
include/configs/ep8260.h
include/configs/ep82xxm.h
include/configs/espt.h
include/configs/evb4510.h
include/configs/galaxy5200.h
include/configs/gcplus.h
include/configs/gdppc440etx.h
include/configs/gr_cpci_ax2000.h
include/configs/gr_ep2s60.h
include/configs/gr_xc3s_1500.h
include/configs/grsim.h
include/configs/grsim_leon2.h
include/configs/gw8260.h
include/configs/hcu4.h
include/configs/hcu5.h
include/configs/hermes.h
include/configs/hmi1001.h
include/configs/hymod.h
include/configs/icon.h
include/configs/idmr.h
include/configs/igep0020.h
include/configs/igep0030.h
include/configs/impa7.h
include/configs/imx27lite-common.h
include/configs/imx31_litekit.h
include/configs/imx31_phycore.h
include/configs/inka4x0.h
include/configs/innokom.h
include/configs/integratorap.h
include/configs/integratorcp.h
include/configs/intip.h
include/configs/io.h [new file with mode: 0644]
include/configs/iocon.h [new file with mode: 0644]
include/configs/ipek01.h
include/configs/ixdp425.h
include/configs/ixdpg425.h
include/configs/jadecpu.h
include/configs/jornada.h [new file with mode: 0644]
include/configs/jupiter.h
include/configs/katmai.h
include/configs/kb9202.h
include/configs/kilauea.h
include/configs/km8xx.h
include/configs/km_arm.h
include/configs/kmeter1.h
include/configs/korat.h
include/configs/kvme080.h
include/configs/lart.h
include/configs/linkstation.h
include/configs/lpc2292sodimm.h
include/configs/lpd7a400.h
include/configs/lpd7a404.h
include/configs/luan.h
include/configs/lubbock.h
include/configs/lwmon.h
include/configs/lwmon5.h
include/configs/m501sk.h
include/configs/makalu.h
include/configs/manroland/mpc5200-common.h
include/configs/mcc200.h
include/configs/mcu25.h
include/configs/mecp5123.h
include/configs/mecp5200.h
include/configs/meesc.h
include/configs/mgcoge.h
include/configs/microblaze-generic.h
include/configs/modnet50.h
include/configs/motionpro.h
include/configs/mp2usb.h
include/configs/mpc5121-common.h
include/configs/mpc5121ads.h
include/configs/mpc7448hpc2.h
include/configs/mpc8308_p1m.h
include/configs/mpr2.h
include/configs/ms7720se.h
include/configs/ms7722se.h
include/configs/ms7750se.h
include/configs/muas3001.h
include/configs/munices.h
include/configs/mv-common.h
include/configs/mx1ads.h
include/configs/mx1fs2.h
include/configs/mx31ads.h
include/configs/mx31pdk.h
include/configs/mx51evk.h
include/configs/neo.h
include/configs/netstar.h
include/configs/nhk8815.h
include/configs/nios2-generic.h
include/configs/ns9750dev.h
include/configs/o2dnt.h
include/configs/ocotea.h
include/configs/omap1510inn.h
include/configs/omap1610h2.h
include/configs/omap1610inn.h
include/configs/omap2420h4.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/omap4_panda.h
include/configs/omap4_sdp4430.h
include/configs/omap5912osk.h
include/configs/omap730p2.h
include/configs/otc570.h
include/configs/p3mx.h
include/configs/p3p440.h
include/configs/palmld.h [new file with mode: 0644]
include/configs/palmtc.h [new file with mode: 0644]
include/configs/pcm030.h
include/configs/pcs440ep.h
include/configs/pdnb3.h
include/configs/pf5200.h
include/configs/pleb2.h
include/configs/pm9261.h
include/configs/pm9263.h
include/configs/pm9g45.h
include/configs/ppmc7xx.h
include/configs/ppmc8260.h
include/configs/pxa255_idp.h
include/configs/qong.h
include/configs/quad100hd.h
include/configs/quantum.h
include/configs/r2dplus.h
include/configs/r7780mp.h
include/configs/redwood.h
include/configs/rmu.h
include/configs/rsdproto.h
include/configs/rsk7203.h
include/configs/s5p_goni.h
include/configs/sacsng.h
include/configs/sbc2410x.h
include/configs/sbc35_a9g20.h
include/configs/sbc405.h
include/configs/sbc8240.h
include/configs/sbc8260.h
include/configs/sbc8349.h
include/configs/sbc8548.h
include/configs/sbc8560.h
include/configs/sbc8641d.h
include/configs/sc3.h
include/configs/scb9328.h
include/configs/sequoia.h
include/configs/sh7763rdp.h
include/configs/sh7785lcr.h
include/configs/shannon.h
include/configs/smdk2400.h
include/configs/smdk2410.h
include/configs/smdk6400.h
include/configs/smdkc100.h
include/configs/socrates.h
include/configs/sorcery.h
include/configs/spc1920.h
include/configs/spear-common.h
include/configs/spieval.h
include/configs/stxgp3.h
include/configs/stxssa.h
include/configs/stxxtc.h
include/configs/svm_sc8xx.h
include/configs/t3corp.h
include/configs/taihu.h
include/configs/taishan.h
include/configs/tnetv107x_evm.h
include/configs/tny_a9260.h
include/configs/trab.h
include/configs/trizepsiv.h
include/configs/tx25.h
include/configs/uc100.h
include/configs/utx8245.h
include/configs/v37.h
include/configs/v38b.h
include/configs/ve8313.h
include/configs/versatile.h
include/configs/virtlab2.h
include/configs/vision2.h
include/configs/vme8349.h
include/configs/voiceblue.h
include/configs/vpac270.h
include/configs/walnut.h
include/configs/wepep250.h [deleted file]
include/configs/xaeniax.h
include/configs/xilinx-ppc.h
include/configs/xm250.h
include/configs/xpedite1000.h [new file with mode: 0644]
include/configs/xpedite517x.h [new file with mode: 0644]
include/configs/xpedite520x.h [new file with mode: 0644]
include/configs/xpedite537x.h [new file with mode: 0644]
include/configs/xpedite550x.h [new file with mode: 0644]
include/configs/xsengine.h [deleted file]
include/configs/yosemite.h
include/configs/yucca.h
include/configs/zeus.h
include/configs/zipitz2.h
include/configs/zylonite.h
include/lattice.h
include/led-display.h
include/linux/fb.h [new file with mode: 0644]
include/linux/kbuild.h [new file with mode: 0644]
include/linux/usb/cdc.h
include/post.h
include/usb/ehci-fsl.h
lib/asm-offsets.c [new file with mode: 0644]
lib/hashtable.c
lib/qsort.c
nand_spl/board/karo/tx25/u-boot.lds
nand_spl/nand_boot.c
nand_spl/nand_boot_fsl_nfc.c
onenand_ipl/board/vpac270/Makefile
onenand_ipl/board/vpac270/lowlevel_init.S [deleted file]
post/board/lwmon5/fpga.c
post/drivers/i2c.c
post/drivers/memory.c
post/post.c
post/tests.c
tools/scripts/make-asm-offsets [new file with mode: 0755]

index 67d2cd62c06b2ad84cb13bcd98e54444e7482a54..e71f6ac474d565c2e56299e7fec62a4ddfabc996 100644 (file)
@@ -40,6 +40,9 @@
 /errlog
 /reloc_off
 
+/include/generated/
+/lib/asm-offsets.s
+
 # stgit generated dirs
 patches-*
 .stgit-edit.txt
index 5108c547bf26313a065824d4c9b43e8a29b01deb..9258cb12732f23cfa8de54ea7d02a79f7c359be8 100644 (file)
@@ -102,7 +102,6 @@ Wolfgang Denk <wd@denx.de>
        IVMS8_256       MPC860
        LANTEC          MPC850
        LWMON           MPC823
-       NC650           MPC852
        R360MPI         MPC823
        RMU             MPC850
        RRvision        MPC823
@@ -145,6 +144,8 @@ Dirk Eibach <eibach@gdsys.de>
        dlvision        PPC405EP
        gdppc440etx     PPC440EP/GR
        intip           PPC460EX
+       io              PPC405EP
+       iocon           PPC405EP
        neo             PPC405EP
 
 Dave Ellis <DGE@sixnetio.com>
@@ -463,10 +464,11 @@ Rune Torgersen <runet@innovsys.com>
 
 Peter Tyser <ptyser@xes-inc.com>
 
-       XPEDITE1000     PPC440GX
-       XPEDITE5170     MPC8640
-       XPEDITE5200     MPC8548
-       XPEDITE5370     MPC8572
+       xpedite1000     PPC440GX
+       xpedite5170     MPC8640
+       xpedite5200     MPC8548
+       xpedite5370     MPC8572
+       xpedite5500     P2020
 
 David Updegraff <dave@cray.com>
 
@@ -573,6 +575,10 @@ Rishi Bhattacharya <rishi@ti.com>
 
        omap5912osk     ARM926EJS
 
+Andreas Bießmann <andreas.devel@gmail.com>
+
+       at91rm9200ek    at91rm9200
+
 Cliff Brake <cliff.brake@gmail.com>
 
        pxa255_idp      xscale
@@ -598,6 +604,10 @@ Thomas Elste <info@elste.org>
 
        modnet50        ARM720T (NET+50)
 
+Kristoffer Ericson <kristoffer.ericson@gmail.com>
+
+       jornada SA1110
+
 Fabio Estevam <Fabio.Estevam@freescale.com>
 
        mx31pdk         i.MX31
@@ -805,6 +815,15 @@ Greg Ungerer <greg.ungerer@opengear.com>
        cm4116          ks8695p
        cm4148          ks8695p
 
+Marek Vasut <marek.vasut@gmail.com>
+
+       balloon3        xscale
+       colibri_pxa270  xscale
+       palmld          xscale
+       palmtc          xscale
+       vpac270         xscale
+       zipitz2         xscale
+
 Hugo Villeneuve <hugo.villeneuve@lyrtech.com>
 
        SFFSDR          ARM926EJS
diff --git a/MAKEALL b/MAKEALL
index c1f3842aad48f3043752389c3174bcfd9be44693..c54c6e8cf95eb3bbba05fa0881d4454347309550 100755 (executable)
--- a/MAKEALL
+++ b/MAKEALL
@@ -56,7 +56,7 @@ LONG_OPTS="arch:,cpu:,vendor:,soc:"
 
 # Option processing based on util-linux-2.13/getopt-parse.bash
 
-# Note that we use `"$@"' to let each command-line parameter expand to a 
+# Note that we use `"$@"' to let each command-line parameter expand to a
 # separate word. The quotes around `$@' are essential!
 # We need TEMP as the `eval set --' would nuke the return value of
 # getopt.
@@ -468,12 +468,7 @@ LIST_at91="                        \
 ## Xscale Systems
 #########################################################################
 
-LIST_pxa="$(boards_by_cpu pxa)
-       polaris         \
-       trizepsiv       \
-       vpac270_nor     \
-       vpac270_onenand \
-"
+LIST_pxa="$(boards_by_cpu pxa)"
 
 LIST_ixp="$(boards_by_cpu ixp)
        pdnb3           \
@@ -559,9 +554,7 @@ LIST_mips_el="                      \
 ## i386 Systems
 #########################################################################
 
-LIST_x86="$(boards_by_arch i386)
-       sc520_eNET      \
-"
+LIST_x86="$(boards_by_arch i386)"
 
 #########################################################################
 ## Nios-II Systems
@@ -606,39 +599,17 @@ LIST_avr32="$(boards_by_arch avr32)"
 ## Blackfin Systems
 #########################################################################
 
-LIST_blackfin="$(boards_by_arch blackfin)
-       bf527-ezkit-v2
-"
+LIST_blackfin="$(boards_by_arch blackfin)"
 
 #########################################################################
 ## SH Systems
 #########################################################################
 
-LIST_sh2="             \
-       rsk7203         \
-"
-LIST_sh3="             \
-       mpr2            \
-       ms7720se        \
-"
-
-LIST_sh4="             \
-       ms7750se        \
-       ms7722se        \
-       MigoR           \
-       r7780mp         \
-       r2dplus         \
-       sh7763rdp       \
-       sh7785lcr       \
-       ap325rxa        \
-       espt            \
-"
+LIST_sh2="$(boards_by_cpu sh2)"
+LIST_sh3="$(boards_by_cpu sh3)"
+LIST_sh4="$(boards_by_cpu sh4)"
 
-LIST_sh="              \
-       ${LIST_sh2}     \
-       ${LIST_sh3}     \
-       ${LIST_sh4}     \
-"
+LIST_sh="$(boards_by_arch sh)"
 
 #########################################################################
 ## SPARC Systems
index 30a564d3cbd67988cdfd904f4fdb851727948ce6..ae36ea5cdb0f004d02bd471f80456f50eb220f72 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -22,9 +22,9 @@
 #
 
 VERSION = 2010
-PATCHLEVEL = 09
+PATCHLEVEL = 12
 SUBLEVEL =
-EXTRAVERSION =
+EXTRAVERSION = -rc1
 ifneq "$(SUBLEVEL)" ""
 U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 else
@@ -304,6 +304,21 @@ __LIBS := $(subst $(obj),,$(LIBS)) $(subst $(obj),,$(LIBBOARD))
 #########################################################################
 #########################################################################
 
+ifneq ($(CONFIG_BOARD_SIZE_LIMIT),)
+BOARD_SIZE_CHECK = \
+       @actual=`wc -c $@ | awk '{print $$1}'`; \
+       limit=$(CONFIG_BOARD_SIZE_LIMIT); \
+       if test $$actual -gt $$limit; then \
+               echo "$@ exceeds file size limit:"; \
+               echo "  limit:  $$limit bytes"; \
+               echo "  actual: $$actual bytes"; \
+               echo "  excess: $$((actual - limit)) bytes"; \
+               exit 1; \
+       fi
+else
+BOARD_SIZE_CHECK =
+endif
+
 # Always append ALL so that arch config.mk's can add custom ones
 ALL += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map $(U_BOOT_NAND) $(U_BOOT_ONENAND)
 
@@ -317,10 +332,12 @@ $(obj)u-boot.srec:        $(obj)u-boot
 
 $(obj)u-boot.bin:      $(obj)u-boot
                $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
+               $(BOARD_SIZE_CHECK)
 
 $(obj)u-boot.ldr:      $(obj)u-boot
                $(CREATE_LDR_ENV)
                $(LDR) -T $(CONFIG_BFIN_CPU) -c $@ $< $(LDR_FLAGS)
+               $(BOARD_SIZE_CHECK)
 
 $(obj)u-boot.ldr.hex:  $(obj)u-boot.ldr
                $(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@ -I binary
@@ -341,7 +358,7 @@ $(obj)u-boot.imx:       $(obj)u-boot.bin
 
 $(obj)u-boot.kwb:       $(obj)u-boot.bin
                $(obj)tools/mkimage -n $(KWD_CONFIG) -T kwbimage \
-               -a $(CONFIG_SYS_TEXT_BASE) -e $(TEXT_BASE) -d $< $@
+               -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) -d $< $@
 
 $(obj)u-boot.sha1:     $(obj)u-boot.bin
                $(obj)tools/ubsha1 $(obj)u-boot.bin
@@ -355,7 +372,8 @@ GEN_UBOOT = \
                cd $(LNDIR) && $(LD) $(LDFLAGS) $$UNDEF_SYM $(__OBJS) \
                        --start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \
                        -Map u-boot.map -o u-boot
-$(obj)u-boot:  depend $(SUBDIRS) $(OBJS) $(LIBBOARD) $(LIBS) $(LDSCRIPT) $(obj)u-boot.lds
+$(obj)u-boot:  depend \
+               $(SUBDIRS) $(OBJS) $(LIBBOARD) $(LIBS) $(LDSCRIPT) $(obj)u-boot.lds
                $(GEN_UBOOT)
 ifeq ($(CONFIG_KALLSYMS),y)
                smap=`$(call SYSTEM_MAP,u-boot) | \
@@ -383,7 +401,7 @@ $(LDSCRIPT):        depend
 $(obj)u-boot.lds: $(LDSCRIPT)
                $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
 
-$(NAND_SPL):   $(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
+$(NAND_SPL):   $(TIMESTAMP_FILE) $(VERSION_FILE) depend
                $(MAKE) -C nand_spl/board/$(BOARDDIR) all
 
 $(U_BOOT_NAND):        $(NAND_SPL) $(obj)u-boot.bin
@@ -409,7 +427,9 @@ updater:
 
 # Explicitly make _depend in subdirs containing multiple targets to prevent
 # parallel sub-makes creating .depend files simultaneously.
-depend dep:    $(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
+depend dep:    $(TIMESTAMP_FILE) $(VERSION_FILE) \
+               $(obj)include/autoconf.mk \
+               $(obj)include/generated/generic-asm-offsets.h
                for dir in $(SUBDIRS) $(CPUDIR) $(dir $(LDSCRIPT)) ; do \
                        $(MAKE) -C $$dir _depend ; done
 
@@ -456,6 +476,18 @@ $(obj)include/autoconf.mk: $(obj)include/config.h
                sed -n -f tools/scripts/define2mk.sed > $@.tmp && \
        mv $@.tmp $@
 
+$(obj)include/generated/generic-asm-offsets.h: $(obj)include/autoconf.mk.dep \
+       $(obj)lib/asm-offsets.s
+       @$(XECHO) Generating $@
+       tools/scripts/make-asm-offsets $(obj)lib/asm-offsets.s $@
+
+$(obj)lib/asm-offsets.s:       $(obj)include/autoconf.mk.dep \
+       $(src)lib/asm-offsets.c
+       @mkdir -p $(obj)lib
+       $(CC) -DDO_DEPS_ONLY \
+               $(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \
+               -o $@ $(src)lib/asm-offsets.c -c -S
+
 #########################################################################
 else   # !config.mk
 all $(obj)u-boot.hex $(obj)u-boot.srec $(obj)u-boot.bin \
@@ -1010,23 +1042,6 @@ scpu_config:     unconfig
        fi
        @$(MKCONFIG) -n $@ -a pdnb3 arm ixp pdnb3 prodrive
 
-polaris_config \
-trizepsiv_config       :       unconfig
-       @mkdir -p $(obj)include
-       @if [ "$(findstring polaris,$@)" ] ; then \
-               echo "#define CONFIG_POLARIS 1" >>$(obj)include/config.h ; \
-       fi;
-       @$(MKCONFIG) -n $@ -a trizepsiv arm pxa trizepsiv
-
-vpac270_nor_config \
-vpac270_onenand_config : unconfig
-       @mkdir -p $(obj)include
-       @if [ "$(findstring onenand,$@)" ] ; then \
-               echo "#define CONFIG_ONENAND_U_BOOT" \
-                       >>$(obj)include/config.h ; \
-       fi;
-       @$(MKCONFIG) -n $@ -a vpac270 arm pxa vpac270
-
 #########################################################################
 ## ARM1136 Systems
 #########################################################################
@@ -1052,7 +1067,6 @@ mx31pdk_nand_config       : unconfig
                echo "#define CONFIG_NAND_U_BOOT" >> $(obj)include/config.h;            \
        else                                                                            \
                echo "#define CONFIG_SKIP_LOWLEVEL_INIT" >> $(obj)include/config.h;     \
-               echo "#define CONFIG_SKIP_RELOCATE_UBOOT" >> $(obj)include/config.h;    \
        fi
        @$(MKCONFIG) -n $@ -a mx31pdk arm arm1136 mx31pdk freescale mx31
 
@@ -1176,96 +1190,6 @@ NIOS2_GENERIC = nios2-generic
 $(NIOS2_GENERIC:%=%_config) : unconfig
        @$(MKCONFIG) $@ nios2 nios2 nios2-generic altera
 
-#========================================================================
-# Blackfin
-#========================================================================
-
-bf527-ezkit-v2_config  : unconfig
-       @$(MKCONFIG) -t BF527_EZKIT_REV_2_1 \
-               bf527-ezkit blackfin blackfin bf527-ezkit
-
-#========================================================================
-# SH3 (SuperH)
-#========================================================================
-
-#########################################################################
-## sh2 (Renesas SuperH)
-#########################################################################
-rsk7203_config: unconfig
-       @mkdir -p $(obj)include
-       @echo "#define CONFIG_RSK7203 1" > $(obj)include/config.h
-       @$(MKCONFIG) -a $@ sh sh2 rsk7203 renesas
-
-#########################################################################
-## sh3 (Renesas SuperH)
-#########################################################################
-
-mpr2_config: unconfig
-       @mkdir -p $(obj)include
-       @echo "#define CONFIG_MPR2 1" > $(obj)include/config.h
-       @$(MKCONFIG) -a $@ sh sh3 mpr2
-
-ms7720se_config: unconfig
-       @mkdir -p $(obj)include
-       @echo "#define CONFIG_MS7720SE 1" > $(obj)include/config.h
-       @$(MKCONFIG) -a $@ sh sh3 ms7720se
-
-#########################################################################
-## sh4 (Renesas SuperH)
-#########################################################################
-
-MigoR_config :       unconfig
-       @mkdir -p $(obj)include
-       @echo "#define CONFIG_MIGO_R 1" > $(obj)include/config.h
-       @$(MKCONFIG) -a $@ sh sh4 MigoR renesas
-
-ms7750se_config: unconfig
-       @mkdir -p $(obj)include
-       @echo "#define CONFIG_MS7750SE 1" > $(obj)include/config.h
-       @$(MKCONFIG) -a $@ sh sh4 ms7750se
-
-ms7722se_config :      unconfig
-       @mkdir -p $(obj)include
-       @echo "#define CONFIG_MS7722SE 1" > $(obj)include/config.h
-       @$(MKCONFIG) -a $@ sh sh4 ms7722se
-
-r2dplus_config  :   unconfig
-       @mkdir -p $(obj)include
-       @echo "#define CONFIG_R2DPLUS 1" > $(obj)include/config.h
-       @$(MKCONFIG) -a $@ sh sh4 r2dplus renesas
-
-r7780mp_config: unconfig
-       @mkdir -p $(obj)include
-       @echo "#define CONFIG_R7780MP 1" > $(obj)include/config.h
-       @$(MKCONFIG) -a $@ sh sh4 r7780mp renesas
-
-sh7763rdp_config  :   unconfig
-       @mkdir -p $(obj)include
-       @echo "#define CONFIG_SH7763RDP 1" > $(obj)include/config.h
-       @$(MKCONFIG) -a $@ sh sh4 sh7763rdp renesas
-
-sh7785lcr_32bit_config \
-sh7785lcr_config  :   unconfig
-       @mkdir -p $(obj)include
-       @mkdir -p $(obj)board/renesas/sh7785lcr
-       @echo "#define CONFIG_SH7785LCR 1" > $(obj)include/config.h
-       @if [ "$(findstring 32bit, $@)" ] ; then \
-               echo "#define CONFIG_SH_32BIT 1" >> $(obj)include/config.h ; \
-               echo "CONFIG_SYS_TEXT_BASE = 0x8ff80000" > \
-                       $(obj)board/renesas/sh7785lcr/config.tmp ; \
-       fi
-       @$(MKCONFIG) -n $@ -a sh7785lcr sh sh4 sh7785lcr renesas
-
-ap325rxa_config  :   unconfig
-       @mkdir -p $(obj)include
-       @echo "#define CONFIG_AP325RXA 1" > $(obj)include/config.h
-       @$(MKCONFIG) -a $@ sh sh4 ap325rxa renesas
-
-espt_config  :   unconfig
-       @mkdir -p $(obj)include
-       @echo "#define CONFIG_ESPT 1" > $(obj)include/config.h
-       @$(MKCONFIG) -a $@ sh sh4 espt
-
 #########################################################################
 #########################################################################
 
@@ -1296,6 +1220,7 @@ clean:
               $(obj)u-boot.lds                                           \
               $(obj)arch/blackfin/cpu/bootrom-asm-offsets.[chs]
        @rm -f $(obj)include/bmp_logo.h
+       @rm -f $(obj)lib/asm-offsets.s
        @rm -f $(obj)nand_spl/{u-boot.lds,u-boot-spl,u-boot-spl.map,System.map}
        @rm -f $(obj)onenand_ipl/onenand-{ipl,ipl.bin,ipl.map}
        @rm -f $(ONENAND_BIN)
@@ -1319,6 +1244,7 @@ clobber:  clean
        @rm -f $(obj)tools/{env/crc32.c,inca-swap-bytes}
        @rm -f $(obj)arch/powerpc/cpu/mpc824x/bedbug_603e.c
        @rm -f $(obj)include/asm/proc $(obj)include/asm/arch $(obj)include/asm
+       @rm -fr $(obj)include/generated
        @[ ! -d $(obj)nand_spl ] || find $(obj)nand_spl -name "*" -type l -print | xargs rm -f
        @[ ! -d $(obj)onenand_ipl ] || find $(obj)onenand_ipl -name "*" -type l -print | xargs rm -f
 
diff --git a/README b/README
index a507a1f434b5e9e54f445fa05cdeeeb64098c8aa..1acf9a37eea34fe2db045b06f211c8130f654802 100644 (file)
--- a/README
+++ b/README
@@ -2364,11 +2364,11 @@ Configuration Settings:
 
 - CONFIG_ENV_MAX_ENTRIES
 
-        Maximum number of entries in the hash table that is used
-        internally to store the environment settings. The default
-        setting is supposed to be generous and should work in most
-        cases. This setting can be used to tune behaviour; see
-        lib/hashtable.c for details.
+       Maximum number of entries in the hash table that is used
+       internally to store the environment settings. The default
+       setting is supposed to be generous and should work in most
+       cases. This setting can be used to tune behaviour; see
+       lib/hashtable.c for details.
 
 The following definitions that deal with the placement and management
 of environment data (variable area); in general, we support the
@@ -2686,7 +2686,7 @@ Low Level (hardware related) configuration options:
                area defined by CONFIG_SYS_INIT_RAM_ADDR. Usually
                CONFIG_SYS_GBL_DATA_OFFSET is chosen such that the initial
                data is located at the end of the available space
-               (sometimes written as (CONFIG_SYS_INIT_RAM_END -
+               (sometimes written as (CONFIG_SYS_INIT_RAM_SIZE -
                CONFIG_SYS_INIT_DATA_SIZE), and the initial stack is just
                below that area (growing from (CONFIG_SYS_INIT_RAM_ADDR +
                CONFIG_SYS_GBL_DATA_OFFSET) downward.
@@ -2836,19 +2836,17 @@ Low Level (hardware related) configuration options:
                globally (CONFIG_CMD_MEM).
 
 - CONFIG_SKIP_LOWLEVEL_INIT
-- CONFIG_SKIP_RELOCATE_UBOOT
+                [ARM only] If this variable is defined, then certain
+                low level initializations (like setting up the memory
+                controller) are omitted and/or U-Boot does not
+                relocate itself into RAM.
 
-               [ARM only] If these variables are defined, then
-               certain low level initializations (like setting up
-               the memory controller) are omitted and/or U-Boot does
-               not relocate itself into RAM.
-               Normally these variables MUST NOT be defined. The
-               only exception is when U-Boot is loaded (to RAM) by
-               some other boot loader or by a debugger which
-               performs these initializations itself.
+                Normally this variable MUST NOT be defined. The only
+                exception is when U-Boot is loaded (to RAM) by some
+                other boot loader or by a debugger which performs
+                these initializations itself.
 
 - CONFIG_PRELOADER
-
                Modifies the behaviour of start.S when compiling a loader
                that is executed before the actual U-Boot. E.g. when
                compiling a NAND SPL.
index 6923f6dafaffc41837488a9e6c1fd2315acae188..4e165bfda4e389c9613bbfa6ac0d1ed414775420 100644 (file)
@@ -33,14 +33,6 @@ STANDALONE_LOAD_ADDR = 0xc100000
 endif
 endif
 
-ifndef CONFIG_SYS_ARM_WITHOUT_RELOC
-# needed for relocation
-PLATFORM_RELFLAGS += -fPIC
-endif
-
-ifdef CONFIG_SYS_ARM_WITHOUT_RELOC
-PLATFORM_CPPFLAGS += -DCONFIG_SYS_ARM_WITHOUT_RELOC
-endif
 PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__
 
 # Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb:
@@ -72,3 +64,8 @@ PLATFORM_LIBS += $(OBJTREE)/arch/arm/lib/eabi_compat.o
 endif
 endif
 LDSCRIPT := $(SRCTREE)/$(CPUDIR)/u-boot.lds
+
+# needed for relocation
+ifndef CONFIG_NAND_SPL
+PLATFORM_LDFLAGS += -pie
+endif
index cbe8243ab8f9bff2863ee819d5110843f6e19aa6..8bd23ee870573c95d829ddd4e7f5cf98069bed04 100644 (file)
@@ -93,17 +93,16 @@ void mx31_gpio_mux(unsigned long mode)
 
 void mx31_set_pad(enum iomux_pins pin, u32 config)
 {
-       u32 field, l;
-       void *reg;
+       u32 field, l, reg;
 
        pin &= IOMUX_PADNUM_MASK;
        reg = (IOMUXC_BASE + 0x154) + (pin + 2) / 3 * 4;
        field = (pin + 2) % 3;
 
-       l = __raw_readl(reg);
+       l = __REG(reg);
        l &= ~(0x1ff << (field * 10));
        l |= config << (field * 10);
-       __raw_writel(l, reg);
+       __REG(reg) = l;
 
 }
 
index 5008ac6e9e2f1a139d306e75122f3c8a91a021e6..aecc943c8e980be314a38bd0582fa790da87b674 100644 (file)
@@ -28,6 +28,7 @@
  * MA 02111-1307 USA
  */
 
+#include <asm-offsets.h>
 #include <config.h>
 #include <version.h>
 .globl _start
@@ -89,48 +90,35 @@ _end_vect:
 _TEXT_BASE:
        .word   CONFIG_SYS_TEXT_BASE
 
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-.globl _armboot_start
-_armboot_start:
-       .word _start
-#endif
-
 /*
  * These are defined in the board-specific linker script.
+ * Subtracting _start from them lets the linker put their
+ * relative position in the executable instead of leaving
+ * them null.
  */
-.globl _bss_start
-_bss_start:
-       .word __bss_start
-
-.globl _bss_end
-_bss_end:
-       .word _end
-
-#if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-.globl _datarel_start
-_datarel_start:
-       .word __datarel_start
-
-.globl _datarelrolocal_start
-_datarelrolocal_start:
-       .word __datarelrolocal_start
-
-.globl _datarellocal_start
-_datarellocal_start:
-       .word __datarellocal_start
-
-.globl _datarelro_start
-_datarelro_start:
-       .word __datarelro_start
-
-.globl _got_start
-_got_start:
-       .word __got_start
-
-.globl _got_end
-_got_end:
-       .word __got_end
-#endif
+.globl _bss_start_ofs
+_bss_start_ofs:
+       .word __bss_start - _start
+
+.globl _bss_end_ofs
+_bss_end_ofs:
+       .word _end - _start
+
+.globl _datarel_start_ofs
+_datarel_start_ofs:
+       .word __datarel_start - _start
+
+.globl _datarelrolocal_start_ofs
+_datarelrolocal_start_ofs:
+       .word __datarelrolocal_start - _start
+
+.globl _datarellocal_start_ofs
+_datarellocal_start_ofs:
+       .word __datarellocal_start - _start
+
+.globl _datarelro_start_ofs
+_datarelro_start_ofs:
+       .word __datarelro_start - _start
 
 #ifdef CONFIG_USE_IRQ
 /* IRQ stack memory (calculated at run-time) */
@@ -144,14 +132,11 @@ FIQ_STACK_START:
        .word 0x0badc0de
 #endif
 
-#if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
 /* IRQ stack memory (calculated at run-time) + 8 bytes */
 .globl IRQ_STACK_START_IN
 IRQ_STACK_START_IN:
        .word   0x0badc0de
-#endif
 
-#if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
 /*
  * the actual reset code
  */
@@ -225,13 +210,11 @@ stack_setup:
 
        adr     r0, _start
        ldr     r2, _TEXT_BASE
-       ldr     r3, _bss_start
-       sub     r2, r3, r2              /* r2 <- size of armboot            */
-       add     r2, r0, r2              /* r2 <- source end address         */
+       ldr     r3, _bss_start_ofs
+       add     r2, r0, r3              /* r2 <- source end address         */
        cmp     r0, r6
        beq     clear_bss
 
-#ifndef CONFIG_SKIP_RELOCATE_UBOOT
 copy_loop:
        ldmia   r0!, {r9-r10}           /* copy from source address [r0]    */
        stmia   r6!, {r9-r10}           /* copy to   target address [r1]    */
@@ -239,36 +222,53 @@ copy_loop:
        blo     copy_loop
 
 #ifndef CONFIG_PRELOADER
-       /* fix got entries */
-       ldr     r1, _TEXT_BASE
-       mov     r0, r7                  /* reloc addr */
-       ldr     r2, _got_start          /* addr in Flash */
-       ldr     r3, _got_end            /* addr in Flash */
-       sub     r3, r3, r1
-       add     r3, r3, r0
-       sub     r2, r2, r1
-       add     r2, r2, r0
-
+       /*
+        * fix .rel.dyn relocations
+        */
+       ldr     r0, _TEXT_BASE          /* r0 <- Text base */
+       sub     r9, r7, r0              /* r9 <- relocation offset */
+       ldr     r10, _dynsym_start_ofs  /* r10 <- sym table ofs */
+       add     r10, r10, r0            /* r10 <- sym table in FLASH */
+       ldr     r2, _rel_dyn_start_ofs  /* r2 <- rel dyn start ofs */
+       add     r2, r2, r0              /* r2 <- rel dyn start in FLASH */
+       ldr     r3, _rel_dyn_end_ofs    /* r3 <- rel dyn end ofs */
+       add     r3, r3, r0              /* r3 <- rel dyn end in FLASH */
 fixloop:
-       ldr     r4, [r2]
-       sub     r4, r4, r1
-       add     r4, r4, r0
-       str     r4, [r2]
-       add     r2, r2, #4
+       ldr     r0, [r2]                /* r0 <- location to fix up, IN FLASH! */
+       add     r0, r0, r9              /* r0 <- location to fix up in RAM */
+       ldr     r1, [r2, #4]
+       and     r8, r1, #0xff
+       cmp     r8, #23                 /* relative fixup? */
+       beq     fixrel
+       cmp     r8, #2                  /* absolute fixup? */
+       beq     fixabs
+       /* ignore unknown type of fixup */
+       b       fixnext
+fixabs:
+       /* absolute fix: set location to (offset) symbol value */
+       mov     r1, r1, LSR #4          /* r1 <- symbol index in .dynsym */
+       add     r1, r10, r1             /* r1 <- address of symbol in table */
+       ldr     r1, [r1, #4]            /* r1 <- symbol value */
+       add     r1, r9                  /* r1 <- relocated sym addr */
+       b       fixnext
+fixrel:
+       /* relative fix: increase location by offset */
+       ldr     r1, [r0]
+       add     r1, r1, r9
+fixnext:
+       str     r1, [r0]
+       add     r2, r2, #8              /* each rel.dyn entry is 8 bytes */
        cmp     r2, r3
-       bne     fixloop
+       blo     fixloop
 #endif
-#endif /* #ifndef CONFIG_SKIP_RELOCATE_UBOOT */
 
 clear_bss:
 #ifndef CONFIG_PRELOADER
-       ldr     r0, _bss_start
-       ldr     r1, _bss_end
+       ldr     r0, _bss_start_ofs
+       ldr     r1, _bss_end_ofs
        ldr     r3, _TEXT_BASE          /* Text base */
        mov     r4, r7                  /* reloc addr */
-       sub     r0, r0, r3
        add     r0, r0, r4
-       sub     r1, r1, r3
        add     r1, r1, r4
        mov     r2, #0x00000000         /* clear                            */
 
@@ -283,122 +283,33 @@ clbss_l:str      r2, [r0]                /* clear loop...                    */
  * initialization, now running from RAM.
  */
 #ifdef CONFIG_NAND_SPL
-       ldr     pc, _nand_boot
-
-_nand_boot: .word nand_boot
+       ldr     r0, _nand_boot_ofs
+       adr     r1, _start
+       add     pc, r0, r1
+_nand_boot_ofs
+       : .word nand_boot - _start
 #else
 jump_2_ram:
-       ldr     r0, _TEXT_BASE
-       ldr     r2, _board_init_r
-       sub     r2, r2, r0
-       add     r2, r2, r7      /* position from board_init_r in RAM */
+       ldr     r0, _board_init_r_ofs
+       adr     r1, _start
+       add     lr, r0, r1
+       add     lr, lr, r9
        /* setup parameters for board_init_r */
        mov     r0, r5          /* gd_t */
        mov     r1, r7          /* dest_addr */
        /* jump to it ... */
-       mov     lr, r2
        mov     pc, lr
 
-_board_init_r: .word board_init_r
+_board_init_r_ofs:
+       .word board_init_r - _start
 #endif
-#else /* #if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC) */
-/*
- * the actual reset code
- */
 
-reset:
-       /*
-        * set the cpu to SVC32 mode
-        */
-       mrs     r0,cpsr
-       bic     r0,r0,#0x1f
-       orr     r0,r0,#0xd3
-       msr     cpsr,r0
-
-#ifdef CONFIG_OMAP2420H4
-       /* Copy vectors to mask ROM indirect addr */
-       adr     r0, _start              /* r0 <- current position of code   */
-               add     r0, r0, #4                              /* skip reset vector                    */
-       mov     r2, #64                 /* r2 <- size to copy  */
-       add     r2, r0, r2              /* r2 <- source end address         */
-       mov     r1, #SRAM_OFFSET0         /* build vect addr */
-       mov     r3, #SRAM_OFFSET1
-       add     r1, r1, r3
-       mov     r3, #SRAM_OFFSET2
-       add     r1, r1, r3
-next:
-       ldmia   r0!, {r3-r10}           /* copy from source address [r0]    */
-       stmia   r1!, {r3-r10}           /* copy to   target address [r1]    */
-       cmp     r0, r2                  /* until source end address [r2]    */
-       bne     next                    /* loop until equal */
-       bl      cpy_clk_code            /* put dpll adjust code behind vectors */
-#endif
-       /* the mask ROM code should have PLL and others stable */
-#ifndef CONFIG_SKIP_LOWLEVEL_INIT
-       bl  cpu_init_crit
-#endif
-
-#ifndef CONFIG_SKIP_RELOCATE_UBOOT
-relocate:                              /* relocate U-Boot to RAM           */
-       adr     r0, _start              /* r0 <- current position of code   */
-       ldr     r1, _TEXT_BASE          /* test if we run from flash or RAM */
-       cmp     r0, r1                  /* don't reloc during debug         */
-#ifndef CONFIG_PRELOADER
-       beq     stack_setup
-#endif /* CONFIG_PRELOADER */
-
-       ldr     r2, _armboot_start
-       ldr     r3, _bss_start
-       sub     r2, r3, r2              /* r2 <- size of armboot            */
-       add     r2, r0, r2              /* r2 <- source end address         */
-
-copy_loop:
-       ldmia   r0!, {r3-r10}           /* copy from source address [r0]    */
-       stmia   r1!, {r3-r10}           /* copy to   target address [r1]    */
-       cmp     r0, r2                  /* until source end address [r2]    */
-       blo     copy_loop
-#endif /* CONFIG_SKIP_RELOCATE_UBOOT */
-
-       /* Set up the stack                                                 */
-stack_setup:
-       ldr     r0, _TEXT_BASE          /* upper 128 KiB: relocated uboot   */
-#ifdef CONFIG_PRELOADER
-       sub     sp, r0, #128            /* leave 32 words for abort-stack   */
-#else
-       sub     r0, r0, #CONFIG_SYS_MALLOC_LEN /* malloc area                       */
-       sub     r0, r0, #CONFIG_SYS_GBL_DATA_SIZE /* bdinfo                         */
-#ifdef CONFIG_USE_IRQ
-       sub     r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ)
-#endif
-       sub     sp, r0, #12             /* leave 3 words for abort-stack    */
-#endif /* CONFIG_PRELOADER */
-       bic     sp, sp, #7              /* 8-byte alignment for ABI compliance */
-
-clear_bss:
-       ldr     r0, _bss_start          /* find start of bss segment        */
-       ldr     r1, _bss_end            /* stop here                        */
-       mov     r2, #0x00000000         /* clear                            */
-
-#ifndef CONFIG_PRELOADER
-clbss_l:str    r2, [r0]                /* clear loop...                    */
-       add     r0, r0, #4
-       cmp     r0, r1
-       bne     clbss_l
-#endif
-
-       ldr     pc, _start_armboot
-
-#ifdef CONFIG_NAND_SPL
-_start_armboot: .word nand_boot
-#else
-#ifdef CONFIG_ONENAND_IPL
-_start_armboot: .word start_oneboot
-#else
-_start_armboot: .word start_armboot
-#endif /* CONFIG_ONENAND_IPL */
-#endif /* CONFIG_NAND_SPL */
-
-#endif /* #if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC) */
+_rel_dyn_start_ofs:
+       .word __rel_dyn_start - _start
+_rel_dyn_end_ofs:
+       .word __rel_dyn_end - _start
+_dynsym_start_ofs:
+       .word __dynsym_start - _start
 
 /*
  *************************************************************************
@@ -484,13 +395,7 @@ cpu_init_crit:
        sub     sp, sp, #S_FRAME_SIZE           @ carve out a frame on current user stack
        stmia   sp, {r0 - r12}                  @ Save user registers (now in svc mode) r0-r12
 
-#if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
        ldr     r2, IRQ_STACK_START_IN          @ set base 2 words into abort stack
-#else
-       ldr     r2, _armboot_start
-       sub     r2, r2, #(CONFIG_SYS_MALLOC_LEN)
-       sub     r2, r2, #(CONFIG_SYS_GBL_DATA_SIZE+8)   @ set base 2 words into abort stack
-#endif
        ldmia   r2, {r2 - r3}                   @ get values for "aborted" pc and cpsr (into parm regs)
        add     r0, sp, #S_FRAME_SIZE           @ grab pointer to old stack
 
@@ -521,13 +426,7 @@ cpu_init_crit:
        .endm
 
        .macro get_bad_stack
-#if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
        ldr     r13, IRQ_STACK_START_IN         @ setup our mode stack (enter in banked mode)
-#else
-       ldr     r13, _armboot_start             @ setup our mode stack (enter in banked mode)
-       sub     r13, r13, #(CONFIG_SYS_MALLOC_LEN)      @ move past malloc pool
-       sub     r13, r13, #(CONFIG_SYS_GBL_DATA_SIZE+8) @ move to reserved a couple spots for abort stack
-#endif
 
        str     lr, [r13]                       @ save caller lr in position 0 of saved stack
        mrs     lr, spsr                        @ get the spsr
@@ -543,13 +442,7 @@ cpu_init_crit:
        .macro get_bad_stack_swi
        sub     r13, r13, #4                    @ space on current stack for scratch reg.
        str     r0, [r13]                       @ save R0's value.
-#if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
        ldr     r0, IRQ_STACK_START_IN          @ get data regions start
-#else
-       ldr     r0, _armboot_start              @ get data regions start
-       sub     r0, r0, #(CONFIG_SYS_MALLOC_LEN)        @ move past malloc pool
-       sub     r0, r0, #(CONFIG_SYS_GBL_DATA_SIZE+8)   @ move past gbl and a couple spots for abort stack
-#endif
        str     lr, [r0]                        @ save caller lr in position 0 of saved stack
        mrs     r0, spsr                        @ get the spsr
        str     lr, [r0, #4]                    @ save spsr in position 1 of saved stack
index 1db4b49cc759c411cfada23ba777827a338e4afd..31f43f0e084b96838f62f58c89f56c7656c283bf 100644 (file)
@@ -59,11 +59,14 @@ SECTIONS
                *(.data.rel.ro)
        }
 
-       __got_start = .;
        . = ALIGN(4);
-       .got : { *(.got) }
+       __rel_dyn_start = .;
+       .rel.dyn : { *(.rel.dyn) }
+       __rel_dyn_end = .;
+
+       __dynsym_start = .;
+       .dynsym : { *(.dynsym) }
 
-       __got_end = .;
        . = .;
        __u_boot_cmd_start = .;
        .u_boot_cmd : { *(.u_boot_cmd) }
@@ -73,4 +76,10 @@ SECTIONS
        __bss_start = .;
        .bss (NOLOAD) : { *(.bss) . = ALIGN(4); }
        _end = .;
+
+       /DISCARD/ : { *(.dynstr*) }
+       /DISCARD/ : { *(.dynamic*) }
+       /DISCARD/ : { *(.plt*) }
+       /DISCARD/ : { *(.interp*) }
+       /DISCARD/ : { *(.gnu*) }
 }
index 24e5bf4fff5a4597de8e667845be905a67053f3c..f04d2688814e238bf460f5a56bef9c11a4a9b24e 100644 (file)
@@ -30,6 +30,7 @@
  * Base codes by scsuh (sc.suh)
  */
 
+#include <asm-offsets.h>
 #include <config.h>
 #include <version.h>
 #ifdef CONFIG_ENABLE_MMU
@@ -107,52 +108,53 @@ _TEXT_BASE:
 _TEXT_PHY_BASE:
        .word   CONFIG_SYS_PHY_UBOOT_BASE
 
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-.globl _armboot_start
-_armboot_start:
-       .word _start
-#endif
-
 /*
  * These are defined in the board-specific linker script.
+ * Subtracting _start from them lets the linker put their
+ * relative position in the executable instead of leaving
+ * them null.
  */
-.globl _bss_start
-_bss_start:
-       .word __bss_start
 
-.globl _bss_end
-_bss_end:
-       .word _end
+.globl _bss_start_ofs
+_bss_start_ofs:
+       .word __bss_start - _start
 
-#if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-/* IRQ stack memory (calculated at run-time) + 8 bytes */
-.globl IRQ_STACK_START_IN
-IRQ_STACK_START_IN:
-       .word   0x0badc0de
+.globl _bss_end_ofs
+_bss_end_ofs:
+       .word _end - _start
 
-.globl _datarel_start
-_datarel_start:
-       .word __datarel_start
+.globl _datarel_start_ofs
+_datarel_start_ofs:
+       .word __datarel_start - _start
 
-.globl _datarelrolocal_start
-_datarelrolocal_start:
-       .word __datarelrolocal_start
+.globl _datarelrolocal_start_ofs
+_datarelrolocal_start_ofs:
+       .word __datarelrolocal_start - _start
 
-.globl _datarellocal_start
-_datarellocal_start:
-       .word __datarellocal_start
+.globl _datarellocal_start_ofs
+_datarellocal_start_ofs:
+       .word __datarellocal_start - _start
 
-.globl _datarelro_start
-_datarelro_start:
-       .word __datarelro_start
+.globl _datarelro_start_ofs
+_datarelro_start_ofs:
+       .word __datarelro_start - _start
 
-.globl _got_start
-_got_start:
-       .word __got_start
+.globl _rel_dyn_start_ofs
+_rel_dyn_start_ofs:
+       .word __rel_dyn_start - _start
 
-.globl _got_end
-_got_end:
-       .word __got_end
+.globl _rel_dyn_end_ofs
+_rel_dyn_end_ofs:
+       .word __rel_dyn_end - _start
+
+.globl _dynsym_start_ofs
+_dynsym_start_ofs:
+       .word __dynsym_start - _start
+
+/* IRQ stack memory (calculated at run-time) + 8 bytes */
+.globl IRQ_STACK_START_IN
+IRQ_STACK_START_IN:
+       .word   0x0badc0de
 
 /*
  * the actual reset code
@@ -274,13 +276,11 @@ stack_setup:
 
        adr     r0, _start
        ldr     r2, _TEXT_BASE
-       ldr     r3, _bss_start
-       sub     r2, r3, r2              /* r2 <- size of armboot            */
-       add     r2, r0, r2              /* r2 <- source end address         */
+       ldr     r3, _bss_start_ofs
+       add     r2, r0, r3              /* r2 <- source end address         */
        cmp     r0, r6
        beq     clear_bss
 
-#ifndef CONFIG_SKIP_RELOCATE_UBOOT
 copy_loop:
        ldmia   r0!, {r9-r10}           /* copy from source address [r0]    */
        stmia   r6!, {r9-r10}           /* copy to   target address [r1]    */
@@ -288,26 +288,45 @@ copy_loop:
        blo     copy_loop
 
 #ifndef CONFIG_PRELOADER
-       /* fix got entries */
-       ldr     r1, _TEXT_BASE          /* Text base */
-       mov     r0, r7                  /* reloc addr */
-       ldr     r2, _got_start          /* addr in Flash */
-       ldr     r3, _got_end            /* addr in Flash */
-       sub     r3, r3, r1
-       add     r3, r3, r0
-       sub     r2, r2, r1
-       add     r2, r2, r0
-
+       /*
+        * fix .rel.dyn relocations
+        */
+       ldr     r0, _TEXT_BASE          /* r0 <- Text base */
+       sub     r9, r7, r0              /* r9 <- relocation offset */
+       ldr     r10, _dynsym_start_ofs  /* r10 <- sym table ofs */
+       add     r10, r10, r0            /* r10 <- sym table in FLASH */
+       ldr     r2, _rel_dyn_start_ofs  /* r2 <- rel dyn start ofs */
+       add     r2, r2, r0              /* r2 <- rel dyn start in FLASH */
+       ldr     r3, _rel_dyn_end_ofs    /* r3 <- rel dyn end ofs */
+       add     r3, r3, r0              /* r3 <- rel dyn end in FLASH */
 fixloop:
-       ldr     r4, [r2]
-       sub     r4, r4, r1
-       add     r4, r4, r0
-       str     r4, [r2]
-       add     r2, r2, #4
+       ldr     r0, [r2]        /* r0 <- location to fix up, IN FLASH! */
+       add     r0, r0, r9      /* r0 <- location to fix up in RAM */
+       ldr     r1, [r2, #4]
+       and     r8, r1, #0xff
+       cmp     r8, #23         /* relative fixup? */
+       beq     fixrel
+       cmp     r8, #2          /* absolute fixup? */
+       beq     fixabs
+       /* ignore unknown type of fixup */
+       b       fixnext
+fixabs:
+       /* absolute fix: set location to (offset) symbol value */
+       mov     r1, r1, LSR #4          /* r1 <- symbol index in .dynsym */
+       add     r1, r10, r1             /* r1 <- address of symbol in table */
+       ldr     r1, [r1, #4]            /* r1 <- symbol value */
+       add     r1, r1, r9              /* r1 <- relocated sym addr */
+       b       fixnext
+fixrel:
+       /* relative fix: increase location by offset */
+       ldr     r1, [r0]
+       add     r1, r1, r9
+fixnext:
+       str     r1, [r0]
+       add     r2, r2, #8      /* each rel.dyn entry is 8 bytes */
        cmp     r2, r3
-       bne     fixloop
+       blo     fixloop
 #endif
-#endif /* #ifndef CONFIG_SKIP_RELOCATE_UBOOT */
 
 #ifdef CONFIG_ENABLE_MMU
 enable_mmu:
@@ -349,13 +368,11 @@ skip_hw_init:
 
 clear_bss:
 #ifndef CONFIG_PRELOADER
-       ldr     r0, _bss_start
-       ldr     r1, _bss_end
+       ldr     r0, _bss_start_ofs
+       ldr     r1, _bss_end_ofs
        ldr     r3, _TEXT_BASE          /* Text base */
        mov     r4, r7                  /* reloc addr */
-       sub     r0, r0, r3
        add     r0, r0, r4
-       sub     r1, r1, r3
        add     r1, r1, r4
        mov     r2, #0x00000000         /* clear                            */
 
@@ -377,202 +394,20 @@ clbss_l:str      r2, [r0]                /* clear loop...                    */
 
 _nand_boot: .word nand_boot
 #else
-       ldr     r0, _TEXT_BASE
-       ldr     r2, _board_init_r
-       sub     r2, r2, r0
-       add     r2, r2, r7      /* position from board_init_r in RAM */
+       ldr     r0, _board_init_r_ofs
+       adr     r1, _start
+       add     lr, r0, r1
+       add     lr, lr, r9
        /* setup parameters for board_init_r */
        mov     r0, r5          /* gd_t */
        mov     r1, r7          /* dest_addr */
        /* jump to it ... */
-       mov     lr, r2
        mov     pc, lr
 
-_board_init_r: .word board_init_r
-#endif
-
-#else /* #if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC) */
-
-/*
- * the actual reset code
- */
-
-reset:
-       /*
-        * set the cpu to SVC32 mode
-        */
-       mrs     r0, cpsr
-       bic     r0, r0, #0x3f
-       orr     r0, r0, #0xd3
-       msr     cpsr, r0
-
-/*
- *************************************************************************
- *
- * CPU_init_critical registers
- *
- * setup important registers
- * setup memory timing
- *
- *************************************************************************
- */
-       /*
-        * we do sys-critical inits only at reboot,
-        * not when booting from ram!
-        */
-cpu_init_crit:
-       /*
-        * When booting from NAND - it has definitely been a reset, so, no need
-        * to flush caches and disable the MMU
-        */
-#ifndef CONFIG_NAND_SPL
-       /*
-        * flush v4 I/D caches
-        */
-       mov     r0, #0
-       mcr     p15, 0, r0, c7, c7, 0   /* flush v3/v4 cache */
-       mcr     p15, 0, r0, c8, c7, 0   /* flush v4 TLB */
-
-       /*
-        * disable MMU stuff and caches
-        */
-       mrc     p15, 0, r0, c1, c0, 0
-       bic     r0, r0, #0x00002300     @ clear bits 13, 9:8 (--V- --RS)
-       bic     r0, r0, #0x00000087     @ clear bits 7, 2:0 (B--- -CAM)
-       orr     r0, r0, #0x00000002     @ set bit 2 (A) Align
-       orr     r0, r0, #0x00001000     @ set bit 12 (I) I-Cache
-
-       /* Prepare to disable the MMU */
-       adr     r2, mmu_disable_phys
-       sub     r2, r2, #(CONFIG_SYS_PHY_UBOOT_BASE - CONFIG_SYS_TEXT_BASE)
-       b       mmu_disable
-
-       .align 5
-       /* Run in a single cache-line */
-mmu_disable:
-       mcr     p15, 0, r0, c1, c0, 0
-       nop
-       nop
-       mov     pc, r2
-mmu_disable_phys:
-
-#ifdef CONFIG_DISABLE_TCM
-       /*
-        * Disable the TCMs
-        */
-       mrc     p15, 0, r0, c0, c0, 2   /* Return TCM details */
-       cmp     r0, #0
-       beq     skip_tcmdisable
-       mov     r1, #0
-       mov     r2, #1
-       tst     r0, r2
-       mcrne   p15, 0, r1, c9, c1, 1   /* Disable Instruction TCM if present*/
-       tst     r0, r2, LSL #16
-       mcrne   p15, 0, r1, c9, c1, 0   /* Disable Data TCM if present*/
-skip_tcmdisable:
-#endif
-#endif
-
-#ifdef CONFIG_PERIPORT_REMAP
-       /* Peri port setup */
-       ldr     r0, =CONFIG_PERIPORT_BASE
-       orr     r0, r0, #CONFIG_PERIPORT_SIZE
-       mcr     p15,0,r0,c15,c2,4
-#endif
-
-       /*
-        * Go setup Memory and board specific bits prior to relocation.
-        */
-       bl      lowlevel_init           /* go setup pll,mux,memory */
-
-#ifndef CONFIG_SKIP_RELOCATE_UBOOT
-relocate:                              /* relocate U-Boot to RAM           */
-       adr     r0, _start              /* r0 <- current position of code   */
-       ldr     r1, _TEXT_BASE          /* test if we run from flash or RAM */
-       cmp     r0, r1                  /* don't reloc during debug         */
-       beq     stack_setup
-
-       ldr     r2, _armboot_start
-       ldr     r3, _bss_start
-       sub     r2, r3, r2              /* r2 <- size of armboot            */
-       add     r2, r0, r2              /* r2 <- source end address         */
-
-copy_loop:
-       ldmia   r0!, {r3-r10}           /* copy from source address [r0]    */
-       stmia   r1!, {r3-r10}           /* copy to   target address [r1]    */
-       cmp     r0, r2                  /* until source end address [r2]    */
-       blo     copy_loop
-#endif /* CONFIG_SKIP_RELOCATE_UBOOT */
-
-#ifdef CONFIG_ENABLE_MMU
-enable_mmu:
-       /* enable domain access */
-       ldr     r5, =0x0000ffff
-       mcr     p15, 0, r5, c3, c0, 0   /* load domain access register */
-
-       /* Set the TTB register */
-       ldr     r0, _mmu_table_base
-       ldr     r1, =CONFIG_SYS_PHY_UBOOT_BASE
-       ldr     r2, =0xfff00000
-       bic     r0, r0, r2
-       orr     r1, r0, r1
-       mcr     p15, 0, r1, c2, c0, 0
-
-       /* Enable the MMU */
-       mrc     p15, 0, r0, c1, c0, 0
-       orr     r0, r0, #1              /* Set CR_M to enable MMU */
-
-       /* Prepare to enable the MMU */
-       adr     r1, skip_hw_init
-       and     r1, r1, #0x3fc
-       ldr     r2, _TEXT_BASE
-       ldr     r3, =0xfff00000
-       and     r2, r2, r3
-       orr     r2, r2, r1
-       b       mmu_enable
-
-       .align 5
-       /* Run in a single cache-line */
-mmu_enable:
-
-       mcr     p15, 0, r0, c1, c0, 0
-       nop
-       nop
-       mov     pc, r2
-skip_hw_init:
+_board_init_r_ofs:
+       .word board_init_r - _start
 #endif
 
-       /* Set up the stack                                                 */
-stack_setup:
-       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    */
-       bic     sp, sp, #7              /* 8-byte alignment for ABI compliance */
-
-clear_bss:
-       ldr     r0, _bss_start          /* find start of bss segment        */
-       ldr     r1, _bss_end            /* stop here                        */
-       mov     r2, #0                  /* clear                            */
-
-clbss_l:
-       str     r2, [r0]                /* clear loop...                    */
-       add     r0, r0, #4
-       cmp     r0, r1
-       blo     clbss_l
-
-#ifndef CONFIG_NAND_SPL
-       ldr     pc, _start_armboot
-
-_start_armboot:
-       .word start_armboot
-#else
-       b       nand_boot
-/*     .word nand_boot*/
-#endif
-
-#endif /* #if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC) */
-
 #ifdef CONFIG_ENABLE_MMU
 _mmu_table_base:
        .word mmu_table
@@ -659,14 +494,7 @@ phy_last_jump:
        /* Save user registers (now in svc mode) r0-r12 */
        stmia   sp, {r0 - r12}
 
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-       ldr     r2, _armboot_start
-       sub     r2, r2, #(CONFIG_SYS_MALLOC_LEN)
-       /* set base 2 words into abort stack */
-       sub     r2, r2, #(CONFIG_SYS_GBL_DATA_SIZE+8)
-#else
        ldr     r2, IRQ_STACK_START_IN
-#endif
        /* get values for "aborted" pc and cpsr (into parm regs) */
        ldmia   r2, {r2 - r3}
        /* grab pointer to old stack */
@@ -681,16 +509,7 @@ phy_last_jump:
        .endm
 
        .macro get_bad_stack
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-       /* setup our mode stack (enter in banked mode) */
-       ldr     r13, _armboot_start
-       /* move past malloc pool */
-       sub     r13, r13, #(CONFIG_SYS_MALLOC_LEN)
-       /* move to reserved a couple spots for abort stack */
-       sub     r13, r13, #(CONFIG_SYS_GBL_DATA_SIZE + 8)
-#else
        ldr     r13, IRQ_STACK_START_IN         @ setup our mode stack
-#endif
 
        /* save caller lr in position 0 of saved stack */
        str     lr, [r13]
@@ -715,16 +534,7 @@ phy_last_jump:
        sub     r13, r13, #4
        /* save R0's value. */
        str     r0, [r13]
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-       /* get data regions start */
-       ldr     r0, _armboot_start
-       /* move past malloc pool */
-       sub     r0, r0, #(CONFIG_SYS_MALLOC_LEN)
-       /* move past gbl and a couple spots for abort stack */
-       sub     r0, r0, #(CONFIG_SYS_GBL_DATA_SIZE + 8)
-#else
        ldr     r13, IRQ_STACK_START_IN         @ setup our mode stack
-#endif
        /* save caller lr in position 0 of saved stack */
        str     lr, [r0]
        /* get the spsr */
index fa640eec200648fb81f42942b2a6961fb87483df..d9ed95405d848784b6e50eadcb51bfba0e08f36e 100644 (file)
@@ -51,11 +51,14 @@ SECTIONS
                *(.data.rel.ro)
        }
 
-       __got_start = .;
        . = ALIGN(4);
-       .got : { *(.got) }
+       __rel_dyn_start = .;
+       .rel.dyn : { *(.rel.dyn) }
+       __rel_dyn_end = .;
+
+       __dynsym_start = .;
+       .dynsym : { *(.dynsym) }
 
-       __got_end = .;
        . = .;
        __u_boot_cmd_start = .;
        .u_boot_cmd : { *(.u_boot_cmd) }
@@ -65,4 +68,10 @@ SECTIONS
        __bss_start = .;
        .bss (NOLOAD) : { *(.bss) . = ALIGN(4); }
        _end = .;
+
+       /DISCARD/ : { *(.dynstr*) }
+       /DISCARD/ : { *(.dynamic*) }
+       /DISCARD/ : { *(.plt*) }
+       /DISCARD/ : { *(.interp*) }
+       /DISCARD/ : { *(.gnu*) }
 }
index d93911f566b04060c76c04889dcd540a01c4d8b6..8cd267b352a215bfcad139d75d40802066c599cc 100644 (file)
@@ -23,7 +23,7 @@
  * MA 02111-1307 USA
  */
 
-
+#include <asm-offsets.h>
 #include <config.h>
 #include <version.h>
 #include <asm/hardware.h>
@@ -79,12 +79,6 @@ _fiq:                        .word fiq
 _TEXT_BASE:
        .word   CONFIG_SYS_TEXT_BASE
 
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-.globl _armboot_start
-_armboot_start:
-       .word _start
-#endif
-
 /*
  * These are defined in the board-specific linker script.
  */
@@ -108,7 +102,6 @@ FIQ_STACK_START:
        .word 0x0badc0de
 #endif
 
-#if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
 /* IRQ stack memory (calculated at run-time) + 8 bytes */
 .globl IRQ_STACK_START_IN
 IRQ_STACK_START_IN:
@@ -197,7 +190,6 @@ stack_setup:
        cmp     r0, r6
        beq     clear_bss
 
-#ifndef CONFIG_SKIP_RELOCATE_UBOOT
 copy_loop:
        ldmia   r0!, {r9-r10}           /* copy from source address [r0]    */
        stmia   r6!, {r9-r10}           /* copy to   target address [r1]    */
@@ -222,9 +214,8 @@ fixloop:
        str     r4, [r2]
        add     r2, r2, #4
        cmp     r2, r3
-       bne     fixloop
+       blo     fixloop
 #endif
-#endif /* #ifndef CONFIG_SKIP_RELOCATE_UBOOT */
 
 clear_bss:
 #ifndef CONFIG_PRELOADER
@@ -264,92 +255,6 @@ clbss_l:str        r2, [r0]                /* clear loop...                    */
 
 _board_init_r: .word board_init_r
 
-#else /* #if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC) */
-
-/*
- * the actual reset code
- */
-
-reset:
-       /*
-        * set the cpu to SVC32 mode
-        */
-       mrs     r0,cpsr
-       bic     r0,r0,#0x1f
-       orr     r0,r0,#0x13
-       msr     cpsr,r0
-
-       /*
-        * we do sys-critical inits only at reboot,
-        * not when booting from ram!
-        */
-#ifndef CONFIG_SKIP_LOWLEVEL_INIT
-       bl      cpu_init_crit
-#endif
-
-#ifdef CONFIG_LPC2292
-       bl      lowlevel_init
-#endif
-
-#ifndef CONFIG_SKIP_RELOCATE_UBOOT
-relocate:                              /* relocate U-Boot to RAM           */
-       adr     r0, _start              /* r0 <- current position of code   */
-       ldr     r1, _TEXT_BASE          /* test if we run from flash or RAM */
-       cmp     r0, r1                  /* don't reloc during debug         */
-       beq     stack_setup
-
-#if CONFIG_SYS_TEXT_BASE
-#ifndef CONFIG_LPC2292 /* already done in lowlevel_init */
-       ldr     r2, =0x0                /* Relocate the exception vectors   */
-       cmp     r1, r2                  /* and associated data to address   */
-       ldmneia r0!, {r3-r10}           /* 0x0. Do nothing if CONFIG_SYS_TEXT_BASE is  */
-       stmneia r2!, {r3-r10}           /* 0x0. Copy the first 15 words.    */
-       ldmneia r0, {r3-r9}
-       stmneia r2, {r3-r9}
-       adrne   r0, _start              /* restore r0                       */
-#endif /* !CONFIG_LPC2292 */
-#endif
-
-       ldr     r2, _armboot_start
-       ldr     r3, _bss_start
-       sub     r2, r3, r2              /* r2 <- size of armboot            */
-       add     r2, r0, r2              /* r2 <- source end address         */
-
-copy_loop:
-       ldmia   r0!, {r3-r10}           /* copy from source address [r0]    */
-       stmia   r1!, {r3-r10}           /* copy to   target address [r1]    */
-       cmp     r0, r2                  /* until source end address [r2]    */
-       blo     copy_loop
-
-#endif /* CONFIG_SKIP_RELOCATE_UBOOT */
-
-       /* Set up the stack                                                 */
-stack_setup:
-       ldr     r0, _TEXT_BASE          /* upper 128 KiB: relocated uboot   */
-       sub     r0, r0, #CONFIG_SYS_MALLOC_LEN /* malloc area                       */
-       sub     r0, r0, #CONFIG_SYS_GBL_DATA_SIZE /* bdinfo                         */
-#ifdef CONFIG_USE_IRQ
-       sub     r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ)
-#endif
-       sub     sp, r0, #12             /* leave 3 words for abort-stack    */
-       bic     sp, sp, #7              /* 8-byte alignment for ABI compliance */
-
-clear_bss:
-       ldr     r0, _bss_start          /* find start of bss segment        */
-       ldr     r1, _bss_end            /* stop here                        */
-       mov     r2, #0x00000000         /* clear                            */
-
-clbss_l:str    r2, [r0]                /* clear loop...                    */
-       add     r0, r0, #4
-       cmp     r0, r1
-       blo     clbss_l
-
-       ldr     pc, _start_armboot
-
-_start_armboot: .word start_armboot
-
-#endif /* #if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC) */
-
 /*
  *************************************************************************
  *
@@ -606,13 +511,7 @@ lock_loop:
        stmia   sp, {r0 - r12}                  @ Calling r0-r12
        add     r8, sp, #S_PC
 
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-       ldr     r2, _armboot_start
-       sub     r2, r2, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN)
-       sub     r2, r2, #(CONFIG_SYS_GBL_DATA_SIZE+8)   @ set base 2 words into abort stack
-#else
        ldr     r2, IRQ_STACK_START_IN
-#endif
        ldmia   r2, {r2 - r4}                   @ get pc, cpsr, old_r0
        add     r0, sp, #S_FRAME_SIZE           @ restore sp_SVC
 
@@ -643,13 +542,7 @@ lock_loop:
        .endm
 
        .macro get_bad_stack
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-       ldr     r13, _armboot_start             @ setup our mode stack
-       sub     r13, r13, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN)
-       sub     r13, r13, #(CONFIG_SYS_GBL_DATA_SIZE+8) @ reserved a couple spots in abort stack
-#else
        ldr     r13, IRQ_STACK_START_IN         @ setup our mode stack
-#endif
 
        str     lr, [r13]                       @ save caller lr / spsr
        mrs     lr, spsr
index 343a760df411f0d3d0b935ed537240647e0e8cec..d4edde797b7b24327f1db896b374e59eddf071d5 100644 (file)
@@ -24,6 +24,7 @@
  * MA 02111-1307 USA
  */
 
+#include <asm-offsets.h>
 #include <common.h>
 #include <config.h>
 
@@ -74,12 +75,6 @@ _fiq:                        .word fiq
 _TEXT_BASE:
        .word   CONFIG_SYS_TEXT_BASE
 
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-.globl _armboot_start
-_armboot_start:
-       .word _start
-#endif
-
 /*
  * These are defined in the board-specific linker script.
  */
@@ -103,7 +98,6 @@ FIQ_STACK_START:
        .word 0x0badc0de
 #endif
 
-#if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
 /* IRQ stack memory (calculated at run-time) + 8 bytes */
 .globl IRQ_STACK_START_IN
 IRQ_STACK_START_IN:
@@ -242,7 +236,6 @@ stack_setup:
        cmp     r0, r6
        beq     clear_bss
 
-#ifndef CONFIG_SKIP_RELOCATE_UBOOT
 copy_loop:
        ldmia   r0!, {r9-r10}           /* copy from source address [r0]    */
        stmia   r6!, {r9-r10}           /* copy to   target address [r1]    */
@@ -267,9 +260,8 @@ fixloop:
        str     r4, [r2]
        add     r2, r2, #4
        cmp     r2, r3
-       bne     fixloop
+       blo     fixloop
 #endif
-#endif /* #ifndef CONFIG_SKIP_RELOCATE_UBOOT */
 
 clear_bss:
 #ifndef CONFIG_PRELOADER
@@ -315,127 +307,6 @@ _nand_boot: .word nand_boot
 _board_init_r: .word board_init_r
 #endif
 
-#else /* #if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC) */
-/*
- * the actual start code
- */
-
-start_code:
-       /*
-        * set the cpu to SVC32 mode
-        */
-       mrs     r0, cpsr
-       bic     r0, r0, #0x1f
-       orr     r0, r0, #0xd3
-       msr     cpsr, r0
-
-       bl      coloured_LED_init
-       bl      red_LED_on
-
-#if    defined(CONFIG_AT91RM9200DK) || defined(CONFIG_AT91RM9200EK)
-       /*
-        * relocate exception table
-        */
-       ldr     r0, =_start
-       ldr     r1, =0x0
-       mov     r2, #16
-copyex:
-       subs    r2, r2, #1
-       ldr     r3, [r0], #4
-       str     r3, [r1], #4
-       bne     copyex
-#endif
-
-#ifdef CONFIG_S3C24X0
-       /* turn off the watchdog */
-
-# if defined(CONFIG_S3C2400)
-#  define pWTCON       0x15300000
-#  define INTMSK       0x14400008      /* Interupt-Controller base addresses */
-#  define CLKDIVN      0x14800014      /* clock divisor register */
-#else
-#  define pWTCON       0x53000000
-#  define INTMSK       0x4A000008      /* Interupt-Controller base addresses */
-#  define INTSUBMSK    0x4A00001C
-#  define CLKDIVN      0x4C000014      /* clock divisor register */
-# endif
-
-       ldr     r0, =pWTCON
-       mov     r1, #0x0
-       str     r1, [r0]
-
-       /*
-        * mask all IRQs by setting all bits in the INTMR - default
-        */
-       mov     r1, #0xffffffff
-       ldr     r0, =INTMSK
-       str     r1, [r0]
-# if defined(CONFIG_S3C2410)
-       ldr     r1, =0x3ff
-       ldr     r0, =INTSUBMSK
-       str     r1, [r0]
-# endif
-
-       /* FCLK:HCLK:PCLK = 1:2:4 */
-       /* default FCLK is 120 MHz ! */
-       ldr     r0, =CLKDIVN
-       mov     r1, #3
-       str     r1, [r0]
-#endif /* CONFIG_S3C24X0 */
-
-       /*
-        * we do sys-critical inits only at reboot,
-        * not when booting from ram!
-        */
-#ifndef CONFIG_SKIP_LOWLEVEL_INIT
-       bl      cpu_init_crit
-#endif
-
-#ifndef CONFIG_SKIP_RELOCATE_UBOOT
-relocate:                              /* relocate U-Boot to RAM           */
-       adr     r0, _start              /* r0 <- current position of code   */
-       ldr     r1, _TEXT_BASE          /* test if we run from flash or RAM */
-       cmp     r0, r1                  /* don't reloc during debug         */
-       beq     stack_setup
-
-       ldr     r2, _armboot_start
-       ldr     r3, _bss_start
-       sub     r2, r3, r2              /* r2 <- size of armboot            */
-       add     r2, r0, r2              /* r2 <- source end address         */
-
-copy_loop:
-       ldmia   r0!, {r3-r10}           /* copy from source address [r0]    */
-       stmia   r1!, {r3-r10}           /* copy to   target address [r1]    */
-       cmp     r0, r2                  /* until source end address [r2]    */
-       blo     copy_loop
-#endif /* CONFIG_SKIP_RELOCATE_UBOOT */
-
-       /* Set up the stack                                                 */
-stack_setup:
-       ldr     r0, _TEXT_BASE          /* upper 128 KiB: relocated uboot   */
-       sub     r0, r0, #CONFIG_SYS_MALLOC_LEN  /* malloc area              */
-       sub     r0, r0, #CONFIG_SYS_GBL_DATA_SIZE /* bdinfo                 */
-#ifdef CONFIG_USE_IRQ
-       sub     r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ)
-#endif
-       sub     sp, r0, #12             /* leave 3 words for abort-stack    */
-       bic     sp, sp, #7              /* 8-byte alignment for ABI compliance */
-
-clear_bss:
-       ldr     r0, _bss_start          /* find start of bss segment        */
-       ldr     r1, _bss_end            /* stop here                        */
-       mov     r2, #0x00000000         /* clear                            */
-
-clbss_l:str    r2, [r0]                /* clear loop...                    */
-       add     r0, r0, #4
-       cmp     r0, r1
-       blo     clbss_l
-
-       ldr     pc, _start_armboot
-
-_start_armboot:        .word start_armboot
-#endif /* #if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC) */
-
 /*
  *************************************************************************
  *
@@ -524,15 +395,7 @@ cpu_init_crit:
        .macro  bad_save_user_regs
        sub     sp, sp, #S_FRAME_SIZE
        stmia   sp, {r0 - r12}                  @ Calling r0-r12
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-       ldr     r2, _armboot_start
-       sub     r2, r2, #(CONFIG_STACKSIZE)
-       sub     r2, r2, #(CONFIG_SYS_MALLOC_LEN)
-       /* set base 2 words into abort stack */
-       sub     r2, r2, #(CONFIG_SYS_GBL_DATA_SIZE+8)
-#else
        ldr     r2, IRQ_STACK_START_IN
-#endif
        ldmia   r2, {r2 - r3}                   @ get pc, cpsr
        add     r0, sp, #S_FRAME_SIZE           @ restore sp_SVC
 
@@ -564,15 +427,7 @@ cpu_init_crit:
        .endm
 
        .macro get_bad_stack
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-       ldr     r13, _armboot_start             @ setup our mode stack
-       sub     r13, r13, #(CONFIG_STACKSIZE)
-       sub     r13, r13, #(CONFIG_SYS_MALLOC_LEN)
-       /* reserve a couple spots in abort stack */
-       sub     r13, r13, #(CONFIG_SYS_GBL_DATA_SIZE+8)
-#else
        ldr     r13, IRQ_STACK_START_IN         @ setup our mode stack
-#endif
 
        str     lr, [r13]                       @ save caller lr / spsr
        mrs     lr, spsr
index cf18a01664099ad9b12cc6ec947f67e8061228f1..51229c61544383f58a1e84295f2f6971e5fc202f 100644 (file)
@@ -30,7 +30,7 @@
  * MA 02111-1307 USA
  */
 
-
+#include <asm-offsets.h>
 #include <config.h>
 #include <version.h>
 
@@ -85,12 +85,6 @@ _fiq:                        .word fiq
 _TEXT_BASE:
        .word   CONFIG_SYS_TEXT_BASE
 
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-.globl _armboot_start
-_armboot_start:
-       .word _start
-#endif
-
 /*
  * These are defined in the board-specific linker script.
  */
@@ -114,7 +108,6 @@ FIQ_STACK_START:
        .word 0x0badc0de
 #endif
 
-#if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
 /* IRQ stack memory (calculated at run-time) + 8 bytes */
 .globl IRQ_STACK_START_IN
 IRQ_STACK_START_IN:
@@ -234,7 +227,6 @@ stack_setup:
        cmp     r0, r6
        beq     clear_bss
 
-#ifndef CONFIG_SKIP_RELOCATE_UBOOT
 copy_loop:
        ldmia   r0!, {r9-r10}           /* copy from source address [r0]    */
        stmia   r6!, {r9-r10}           /* copy to   target address [r1]    */
@@ -259,9 +251,8 @@ fixloop:
        str     r4, [r2]
        add     r2, r2, #4
        cmp     r2, r3
-       bne     fixloop
+       blo     fixloop
 #endif
-#endif /* #ifndef CONFIG_SKIP_RELOCATE_UBOOT */
 
 clear_bss:
 #ifndef CONFIG_PRELOADER
@@ -305,108 +296,6 @@ _nand_boot: .word nand_boot
 _board_init_r: .word board_init_r
 #endif
 
-#else /* #if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC) */
-/*
- * the actual reset code
- */
-
-reset:
-       /*
-        * set the cpu to SVC32 mode
-        */
-       mrs     r0,cpsr
-       bic     r0,r0,#0x1f
-       orr     r0,r0,#0xd3
-       msr     cpsr,r0
-
-       /*
-        * Set up 925T mode
-        */
-       mov r1, #0x81               /* Set ARM925T configuration. */
-       mcr p15, 0, r1, c15, c1, 0  /* Write ARM925T configuration register. */
-
-       /*
-        * turn off the watchdog, unlock/diable sequence
-        */
-       mov  r1, #0xF5
-       ldr  r0, =WDTIM_MODE
-       strh r1, [r0]
-       mov  r1, #0xA0
-       strh r1, [r0]
-
-       /*
-        * mask all IRQs by setting all bits in the INTMR - default
-        */
-       mov r1, #0xffffffff
-       ldr r0, =REG_IHL1_MIR
-       str r1, [r0]
-       ldr r0, =REG_IHL2_MIR
-       str r1, [r0]
-
-       /*
-        * wait for dpll to lock
-        */
-       ldr  r0, =CK_DPLL1
-       mov  r1, #0x10
-       strh r1, [r0]
-poll1:
-       ldrh r1, [r0]
-       ands r1, r1, #0x01
-       beq poll1
-
-       /*
-        * we do sys-critical inits only at reboot,
-        * not when booting from ram!
-        */
-#ifndef CONFIG_SKIP_LOWLEVEL_INIT
-       bl  cpu_init_crit
-#endif
-
-#ifndef CONFIG_SKIP_RELOCATE_UBOOT
-relocate:                              /* relocate U-Boot to RAM           */
-       adr     r0, _start              /* r0 <- current position of code   */
-       ldr     r1, _TEXT_BASE          /* test if we run from flash or RAM */
-       cmp     r0, r1                  /* don't reloc during debug         */
-       beq     stack_setup
-
-       ldr     r2, _armboot_start
-       ldr     r3, _bss_start
-       sub     r2, r3, r2              /* r2 <- size of armboot            */
-       add     r2, r0, r2              /* r2 <- source end address         */
-
-copy_loop:
-       ldmia   r0!, {r3-r10}           /* copy from source address [r0]    */
-       stmia   r1!, {r3-r10}           /* copy to   target address [r1]    */
-       cmp     r0, r2                  /* until source end address [r2]    */
-       blo     copy_loop
-#endif /* CONFIG_SKIP_RELOCATE_UBOOT */
-
-       /* Set up the stack                                                 */
-stack_setup:
-       ldr     r0, _TEXT_BASE          /* upper 128 KiB: relocated uboot   */
-       sub     r0, r0, #CONFIG_SYS_MALLOC_LEN  /* malloc area                      */
-       sub     r0, r0, #CONFIG_SYS_GBL_DATA_SIZE /* bdinfo                        */
-#ifdef CONFIG_USE_IRQ
-       sub     r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ)
-#endif
-       sub     sp, r0, #12             /* leave 3 words for abort-stack    */
-       bic     sp, sp, #7              /* 8-byte alignment for ABI compliance */
-
-clear_bss:
-       ldr     r0, _bss_start          /* find start of bss segment        */
-       ldr     r1, _bss_end            /* stop here                        */
-       mov     r2, #0x00000000         /* clear                            */
-
-clbss_l:str    r2, [r0]                /* clear loop...                    */
-       add     r0, r0, #4
-       cmp     r0, r1
-       blo     clbss_l
-
-       ldr     pc, _start_armboot
-
-_start_armboot:        .word start_armboot
-#endif /* #if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC) */
-
 /*
  *************************************************************************
  *
@@ -489,13 +378,7 @@ cpu_init_crit:
        sub     sp, sp, #S_FRAME_SIZE           @ carve out a frame on current user stack
        stmia   sp, {r0 - r12}                  @ Save user registers (now in svc mode) r0-r12
 
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-       ldr     r2, _armboot_start
-       sub     r2, r2, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN)
-       sub     r2, r2, #(CONFIG_SYS_GBL_DATA_SIZE+8)  @ set base 2 words into abort stack
-#else
        ldr     r2, IRQ_STACK_START_IN
-#endif
        ldmia   r2, {r2 - r3}                   @ get values for "aborted" pc and cpsr (into parm regs)
        add     r0, sp, #S_FRAME_SIZE           @ grab pointer to old stack
 
@@ -526,13 +409,7 @@ cpu_init_crit:
        .endm
 
        .macro get_bad_stack
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-       ldr     r13, _armboot_start             @ setup our mode stack
-       sub     r13, r13, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN)
-       sub     r13, r13, #(CONFIG_SYS_GBL_DATA_SIZE+8) @ reserved a couple spots in abort stack
-#else
        ldr     r13, IRQ_STACK_START_IN
-#endif
 
        str     lr, [r13]                       @ save caller lr in position 0 of saved stack
        mrs     lr, spsr                        @ get the spsr
index ecf91f5187419871c9b375e8e9d34921a45d3b1b..7a10a77877eb7257695a80e389c244e4dfe14f6a 100644 (file)
  * (at your option) any later version.
  */
 
-#include <config.h>
+#include <common.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/io.h>
 #include <asm/arch/at91_pmc.h>
 #include <asm/arch/clk.h>
 
-static unsigned long cpu_clk_rate_hz;
-static unsigned long main_clk_rate_hz;
-static unsigned long mck_rate_hz;
-static unsigned long plla_rate_hz;
-static unsigned long pllb_rate_hz;
-static u32 at91_pllb_usb_init;
+#if !defined(CONFIG_AT91FAMILY)
+# error You need to define CONFIG_AT91FAMILY in your board config!
+#endif
+
+DECLARE_GLOBAL_DATA_PTR;
 
 unsigned long get_cpu_clk_rate(void)
 {
-       return cpu_clk_rate_hz;
+       return gd->cpu_clk_rate_hz;
 }
 
 unsigned long get_main_clk_rate(void)
 {
-       return main_clk_rate_hz;
+       return gd->main_clk_rate_hz;
 }
 
 unsigned long get_mck_clk_rate(void)
 {
-       return mck_rate_hz;
+       return gd->mck_rate_hz;
 }
 
 unsigned long get_plla_clk_rate(void)
 {
-       return plla_rate_hz;
+       return gd->plla_rate_hz;
 }
 
 unsigned long get_pllb_clk_rate(void)
 {
-       return pllb_rate_hz;
+       return gd->pllb_rate_hz;
 }
 
 u32 get_pllb_init(void)
 {
-       return at91_pllb_usb_init;
+       return gd->at91_pllb_usb_init;
 }
 
 static unsigned long at91_css_to_rate(unsigned long css)
@@ -60,11 +59,11 @@ static unsigned long at91_css_to_rate(unsigned long css)
        case AT91_PMC_MCKR_CSS_SLOW:
                return AT91_SLOW_CLOCK;
        case AT91_PMC_MCKR_CSS_MAIN:
-               return main_clk_rate_hz;
+               return gd->main_clk_rate_hz;
        case AT91_PMC_MCKR_CSS_PLLA:
-               return plla_rate_hz;
+               return gd->plla_rate_hz;
        case AT91_PMC_MCKR_CSS_PLLB:
-               return pllb_rate_hz;
+               return gd->pllb_rate_hz;
        }
 
        return 0;
@@ -163,10 +162,10 @@ int at91_clock_init(unsigned long main_clock)
                main_clock = tmp * (AT91_SLOW_CLOCK / 16);
        }
 #endif
-       main_clk_rate_hz = main_clock;
+       gd->main_clk_rate_hz = main_clock;
 
        /* report if PLLA is more than mildly overclocked */
-       plla_rate_hz = at91_pll_rate(main_clock, readl(&pmc->pllar));
+       gd->plla_rate_hz = at91_pll_rate(main_clock, readl(&pmc->pllar));
 
 #ifdef CONFIG_USB_ATMEL
        /*
@@ -175,9 +174,9 @@ int at91_clock_init(unsigned long main_clock)
         *
         * REVISIT:  assumes MCK doesn't derive from PLLB!
         */
-       at91_pllb_usb_init = at91_pll_calc(main_clock, 48000000 * 2) |
+       gd->at91_pllb_usb_init = at91_pll_calc(main_clock, 48000000 * 2) |
                             AT91_PMC_PLLBR_USBDIV_2;
-       pllb_rate_hz = at91_pll_rate(main_clock, at91_pllb_usb_init);
+       gd->pllb_rate_hz = at91_pll_rate(main_clock, gd->at91_pllb_usb_init);
 #endif
 
        /*
@@ -187,30 +186,30 @@ int at91_clock_init(unsigned long main_clock)
        mckr = readl(&pmc->mckr);
 #if defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45)
        /* plla divisor by 2 */
-       plla_rate_hz /= (1 << ((mckr & 1 << 12) >> 12));
+       gd->plla_rate_hz /= (1 << ((mckr & 1 << 12) >> 12));
 #endif
-       mck_rate_hz = at91_css_to_rate(mckr & AT91_PMC_MCKR_CSS_MASK);
-       freq = mck_rate_hz;
+       gd->mck_rate_hz = at91_css_to_rate(mckr & AT91_PMC_MCKR_CSS_MASK);
+       freq = gd->mck_rate_hz;
 
        freq /= (1 << ((mckr & AT91_PMC_MCKR_PRES_MASK) >> 2)); /* prescale */
 #if defined(CONFIG_AT91RM9200)
        /* mdiv */
-       mck_rate_hz = freq / (1 + ((mckr & AT91_PMC_MCKR_MDIV_MASK) >> 8));
+       gd->mck_rate_hz = freq / (1 + ((mckr & AT91_PMC_MCKR_MDIV_MASK) >> 8));
 #elif defined(CONFIG_AT91SAM9G20)
        /* mdiv ; (x >> 7) = ((x >> 8) * 2) */
-       mck_rate_hz = (mckr & AT91_PMC_MCKR_MDIV_MASK) ?
+       gd->mck_rate_hz = (mckr & AT91_PMC_MCKR_MDIV_MASK) ?
                freq / ((mckr & AT91_PMC_MCKR_MDIV_MASK) >> 7) : freq;
        if (mckr & AT91_PMC_MCKR_MDIV_MASK)
                freq /= 2;                      /* processor clock division */
 #elif defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45)
-       mck_rate_hz = (mckr & AT91_PMC_MCKR_MDIV_MASK) ==
+       gd->mck_rate_hz = (mckr & AT91_PMC_MCKR_MDIV_MASK) ==
                (AT91_PMC_MCKR_MDIV_2 | AT91_PMC_MCKR_MDIV_4)
                ? freq / 3
                : freq / (1 << ((mckr & AT91_PMC_MCKR_MDIV_MASK) >> 8));
 #else
-       mck_rate_hz = freq / (1 << ((mckr & AT91_PMC_MCKR_MDIV_MASK) >> 8));
+       gd->mck_rate_hz = freq / (1 << ((mckr & AT91_PMC_MCKR_MDIV_MASK) >> 8));
 #endif
-       cpu_clk_rate_hz = freq;
+       gd->cpu_clk_rate_hz = freq;
 
        return 0;
 }
index 8efc34bcf12061d81244e6736c45b38b54e32b17..82b8d7e7d7f65bc39023444270feff720f20b13d 100644 (file)
 #include <asm/arch/io.h>
 #include <div64.h>
 
+#if !defined(CONFIG_AT91FAMILY)
+# error You need to define CONFIG_AT91FAMILY in your board config!
+#endif
+
+DECLARE_GLOBAL_DATA_PTR;
+
 /*
  * We're using the AT91CAP9/SAM9 PITC in 32 bit mode, by
  * setting the 20 bit counter period to its maximum (0xfffff).
+ * (See the relevant data sheets to understand that this really works)
+ *
+ * We do also mimic the typical powerpc way of incrementing
+ * two 32 bit registers called tbl and tbu.
+ *
+ * Those registers increment at 1/16 the main clock rate.
  */
-#define TIMER_LOAD_VAL 0xfffff
 
-static ulong timestamp;
-static ulong lastinc;
-static ulong timer_freq;
+#define TIMER_LOAD_VAL 0xfffff
 
 static inline unsigned long long tick_to_time(unsigned long long tick)
 {
        tick *= CONFIG_SYS_HZ;
-       do_div(tick, timer_freq);
+       do_div(tick, gd->timer_rate_hz);
 
        return tick;
 }
 
 static inline unsigned long long usec_to_tick(unsigned long long usec)
 {
-       usec *= timer_freq;
+       usec *= gd->timer_rate_hz;
        do_div(usec, 1000000);
 
        return usec;
 }
 
-/* nothing really to do with interrupts, just starts up a counter. */
+/*
+ * Use the PITC in full 32 bit incrementing mode
+ */
 int timer_init(void)
 {
        at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE;
        at91_pit_t *pit = (at91_pit_t *) AT91_PIT_BASE;
-       /*
-        * Enable PITC Clock
-        * The clock is already enabled for system controller in boot
-        */
+
+       /* Enable PITC Clock */
        writel(1 << AT91_ID_SYS, &pmc->pcer);
 
        /* Enable PITC */
        writel(TIMER_LOAD_VAL | AT91_PIT_MR_EN , &pit->mr);
 
-       reset_timer_masked();
-
-       timer_freq = get_mck_clk_rate() >> 4;
+       gd->timer_rate_hz = gd->mck_rate_hz / 16;
+       gd->tbu = gd->tbl = 0;
 
        return 0;
 }
 
 /*
- * timer without interrupts
+ * Get the current 64 bit timer tick count
  */
 unsigned long long get_ticks(void)
 {
@@ -86,28 +94,11 @@ unsigned long long get_ticks(void)
 
        ulong now = readl(&pit->piir);
 
-       if (now >= lastinc)     /* normal mode (non roll) */
-               /* move stamp forward with absolut diff ticks */
-               timestamp += (now - lastinc);
-       else                    /* we have rollover of incrementer */
-               timestamp += (0xFFFFFFFF - lastinc) + now;
-       lastinc = now;
-       return timestamp;
-}
-
-void reset_timer_masked(void)
-{
-       /* reset time */
-       at91_pit_t *pit = (at91_pit_t *) AT91_PIT_BASE;
-
-       /* capture current incrementer value time */
-       lastinc = readl(&pit->piir);
-       timestamp = 0; /* start "advancing" time stamp from 0 */
-}
-
-ulong get_timer_masked(void)
-{
-       return tick_to_time(get_ticks());
+       /* increment tbu if tbl has rolled over */
+       if (now < gd->tbl)
+               gd->tbu++;
+       gd->tbl = now;
+       return (((unsigned long long)gd->tbu) << 32) | gd->tbl;
 }
 
 void __udelay(unsigned long usec)
@@ -119,24 +110,32 @@ void __udelay(unsigned long usec)
        tmp = get_ticks() + tmo;        /* get current timestamp */
 
        while (get_ticks() < tmp)       /* loop till event */
-                /*NOP*/;
+               ;
 }
 
+/*
+ * reset_timer() and get_timer(base) are a pair of functions that are used by
+ * some timeout/sleep mechanisms in u-boot.
+ *
+ * reset_timer() marks the current time as epoch and
+ * get_timer(base) works relative to that epoch.
+ *
+ * The time is used in CONFIG_SYS_HZ units!
+ */
 void reset_timer(void)
 {
-       reset_timer_masked();
+       gd->timer_reset_value = get_ticks();
 }
 
 ulong get_timer(ulong base)
 {
-       return get_timer_masked () - base;
+       return tick_to_time(get_ticks() - gd->timer_reset_value) - base;
 }
 
 /*
- * This function is derived from PowerPC code (timebase clock frequency).
- * On ARM it returns the number of timer ticks per second.
+ * Return the number of timer ticks per second.
  */
 ulong get_tbclk(void)
 {
-       return timer_freq;
+       return gd->timer_rate_hz;
 }
index 7439c87f681070cb3ab24c615afcf8642bbb6ca7..342afe9cd06726316e5c64521c09104b4a0c96f2 100644 (file)
@@ -93,4 +93,3 @@ void dram_init_banksize(void)
        dram_init();
 }
 #endif /* CONFIG_SYS_BOARD_DRAM_INIT */
-
index c5c8ab7e4d88f74e677f0eeb3d5d82c9016920fc..b749282099061f0210bf71fdcc5c2adac90e5b11 100644 (file)
@@ -49,20 +49,6 @@ u32 orion5x_sdram_bar(enum memory_bank bank)
        result = winregs[bank].base;
        return result;
 }
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-int dram_init(void)
-{
-       int i;
-
-       for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
-               gd->bd->bi_dram[i].start = orion5x_sdram_bar(i);
-               gd->bd->bi_dram[i].size = get_ram_size(
-                       (volatile long *) (gd->bd->bi_dram[i].start),
-                       CONFIG_MAX_RAM_BANK_SIZE);
-       }
-       return 0;
-}
-#else
 int dram_init (void)
 {
        /* dram_init must store complete ramsize in gd->ram_size */
@@ -83,4 +69,3 @@ void dram_init_banksize (void)
                        CONFIG_MAX_RAM_BANK_SIZE);
        }
 }
-#endif
index 8cbe3e74663c8c459b864d825c1f98be1de03456..6dcc9b4d6749455382ebb122a67334a950c4c9b8 100644 (file)
@@ -10,6 +10,7 @@
  *  Copyright (c) 2002 Gary Jennejohn <garyj@denx.de>
  *  Copyright (c) 2003 Richard Woodruff <r-woodruff2@ti.com>
  *  Copyright (c) 2003 Kshitij <kshitij@ti.com>
+ *  Copyright (c) 2010 Albert Aribaud <albert.aribaud@free.fr>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -30,7 +31,7 @@
  * MA 02111-1307 USA
  */
 
-
+#include <asm-offsets.h>
 #include <config.h>
 #include <common.h>
 #include <version.h>
@@ -118,22 +119,19 @@ _fiq:
 _TEXT_BASE:
        .word   CONFIG_SYS_TEXT_BASE
 
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-.globl _armboot_start
-_armboot_start:
-       .word _start
-#endif
-
 /*
  * These are defined in the board-specific linker script.
+ * Subtracting _start from them lets the linker put their
+ * relative position in the executable instead of leaving
+ * them null.
  */
-.globl _bss_start
-_bss_start:
-       .word __bss_start
+.globl _bss_start_ofs
+_bss_start_ofs:
+       .word __bss_start - _start
 
-.globl _bss_end
-_bss_end:
-       .word _end
+.globl _bss_end_ofs
+_bss_end_ofs:
+       .word _end - _start
 
 #ifdef CONFIG_USE_IRQ
 /* IRQ stack memory (calculated at run-time) */
@@ -147,36 +145,11 @@ FIQ_STACK_START:
        .word 0x0badc0de
 #endif
 
-#if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
 /* IRQ stack memory (calculated at run-time) + 8 bytes */
 .globl IRQ_STACK_START_IN
 IRQ_STACK_START_IN:
        .word   0x0badc0de
 
-.globl _datarel_start
-_datarel_start:
-       .word __datarel_start
-
-.globl _datarelrolocal_start
-_datarelrolocal_start:
-       .word __datarelrolocal_start
-
-.globl _datarellocal_start
-_datarellocal_start:
-       .word __datarellocal_start
-
-.globl _datarelro_start
-_datarelro_start:
-       .word __datarelro_start
-
-.globl _got_start
-_got_start:
-       .word __got_start
-
-.globl _got_end
-_got_end:
-       .word __got_end
-
 /*
  * the actual reset code
  */
@@ -226,13 +199,11 @@ stack_setup:
 
        adr     r0, _start
        ldr     r2, _TEXT_BASE
-       ldr     r3, _bss_start
-       sub     r2, r3, r2              /* r2 <- size of armboot            */
-       add     r2, r0, r2              /* r2 <- source end address         */
+       ldr     r3, _bss_start_ofs
+       add     r2, r0, r3              /* r2 <- source end address         */
        cmp     r0, r6
        beq     clear_bss
 
-#ifndef CONFIG_SKIP_RELOCATE_UBOOT
 copy_loop:
        ldmia   r0!, {r9-r10}           /* copy from source address [r0]    */
        stmia   r6!, {r9-r10}           /* copy to   target address [r1]    */
@@ -240,36 +211,53 @@ copy_loop:
        blo     copy_loop
 
 #ifndef CONFIG_PRELOADER
-       /* fix got entries */
-       ldr     r1, _TEXT_BASE          /* Text base */
-       mov     r0, r7                  /* reloc addr */
-       ldr     r2, _got_start          /* addr in Flash */
-       ldr     r3, _got_end            /* addr in Flash */
-       sub     r3, r3, r1
-       add     r3, r3, r0
-       sub     r2, r2, r1
-       add     r2, r2, r0
-
+       /*
+        * fix .rel.dyn relocations
+        */
+       ldr     r0, _TEXT_BASE          /* r0 <- Text base */
+       sub     r9, r7, r0              /* r9 <- relocation offset */
+       ldr     r10, _dynsym_start_ofs  /* r10 <- sym table ofs */
+       add     r10, r10, r0            /* r10 <- sym table in FLASH */
+       ldr     r2, _rel_dyn_start_ofs  /* r2 <- rel dyn start ofs */
+       add     r2, r2, r0              /* r2 <- rel dyn start in FLASH */
+       ldr     r3, _rel_dyn_end_ofs    /* r3 <- rel dyn end ofs */
+       add     r3, r3, r0              /* r3 <- rel dyn end in FLASH */
 fixloop:
-       ldr     r4, [r2]
-       sub     r4, r4, r1
-       add     r4, r4, r0
-       str     r4, [r2]
-       add     r2, r2, #4
+       ldr     r0, [r2]                /* r0 <- location to fix up, IN FLASH! */
+       add     r0, r0, r9              /* r0 <- location to fix up in RAM */
+       ldr     r1, [r2, #4]
+       and     r8, r1, #0xff
+       cmp     r8, #23                 /* relative fixup? */
+       beq     fixrel
+       cmp     r8, #2                  /* absolute fixup? */
+       beq     fixabs
+       /* ignore unknown type of fixup */
+       b       fixnext
+fixabs:
+       /* absolute fix: set location to (offset) symbol value */
+       mov     r1, r1, LSR #4          /* r1 <- symbol index in .dynsym */
+       add     r1, r10, r1             /* r1 <- address of symbol in table */
+       ldr     r1, [r1, #4]            /* r1 <- symbol value */
+       add     r1, r9                  /* r1 <- relocated sym addr */
+       b       fixnext
+fixrel:
+       /* relative fix: increase location by offset */
+       ldr     r1, [r0]
+       add     r1, r1, r9
+fixnext:
+       str     r1, [r0]
+       add     r2, r2, #8              /* each rel.dyn entry is 8 bytes */
        cmp     r2, r3
-       bne     fixloop
+       blo     fixloop
 #endif
-#endif /* #ifndef CONFIG_SKIP_RELOCATE_UBOOT */
 
 clear_bss:
 #ifndef CONFIG_PRELOADER
-       ldr     r0, _bss_start
-       ldr     r1, _bss_end
+       ldr     r0, _bss_start_ofs
+       ldr     r1, _bss_end_ofs
        ldr     r3, _TEXT_BASE          /* Text base */
        mov     r4, r7                  /* reloc addr */
-       sub     r0, r0, r3
        add     r0, r0, r4
-       sub     r1, r1, r3
        add     r1, r1, r4
        mov     r2, #0x00000000         /* clear                            */
 
@@ -287,102 +275,32 @@ clbss_l:str      r2, [r0]                /* clear loop...                    */
  * initialization, now running from RAM.
  */
 #ifdef CONFIG_NAND_SPL
-       ldr     pc, _nand_boot
+       ldr     r0, _nand_boot_ofs
+       mov     pc, r0
 
-_nand_boot: .word nand_boot
+_nand_boot_ofs:
+       .word nand_boot
 #else
-       ldr     r0, _TEXT_BASE
-       ldr     r2, _board_init_r
-       sub     r2, r2, r0
-       add     r2, r2, r7      /* position from board_init_r in RAM */
+       ldr     r0, _board_init_r_ofs
+       adr     r1, _start
+       add     lr, r0, r1
+       add     lr, lr, r9
        /* setup parameters for board_init_r */
        mov     r0, r5          /* gd_t */
        mov     r1, r7          /* dest_addr */
        /* jump to it ... */
-       mov     lr, r2
        mov     pc, lr
 
-_board_init_r: .word board_init_r
-#endif
-
-#else /* #if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC) */
-/*
- * the actual reset code
- */
-
-reset:
-       /*
-        * set the cpu to SVC32 mode
-        */
-       mrs     r0,cpsr
-       bic     r0,r0,#0x1f
-       orr     r0,r0,#0xd3
-       msr     cpsr,r0
-
-       /*
-        * we do sys-critical inits only at reboot,
-        * not when booting from ram!
-        */
-#ifndef CONFIG_SKIP_LOWLEVEL_INIT
-       bl      cpu_init_crit
-#endif
-
-#ifndef CONFIG_SKIP_RELOCATE_UBOOT
-relocate:                              /* relocate U-Boot to RAM           */
-       adr     r0, _start              /* r0 <- current position of code   */
-       ldr     r1, _TEXT_BASE          /* test if we run from flash or RAM */
-       cmp     r0, r1                  /* don't reloc during debug         */
-       beq     stack_setup
-       ldr     r2, _armboot_start
-       ldr     r3, _bss_start
-       sub     r2, r3, r2              /* r2 <- size of armboot            */
-       add     r2, r0, r2              /* r2 <- source end address         */
-
-copy_loop:
-       ldmia   r0!, {r3-r10}           /* copy from source address [r0]    */
-       stmia   r1!, {r3-r10}           /* copy to   target address [r1]    */
-       cmp     r0, r2                  /* until source end address [r2]    */
-       blo     copy_loop
-#endif /* CONFIG_SKIP_RELOCATE_UBOOT */
-
-       /* Set up the stack                                                 */
-stack_setup:
-       ldr     r0, _TEXT_BASE          /* upper 128 KiB: relocated uboot   */
-       sub     sp, r0, #128            /* leave 32 words for abort-stack   */
-#ifndef CONFIG_PRELOADER
-       sub     r0, r0, #CONFIG_SYS_MALLOC_LEN  /* malloc area                      */
-       sub     r0, r0, #CONFIG_SYS_GBL_DATA_SIZE /* bdinfo                        */
-#ifdef CONFIG_USE_IRQ
-       sub     r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ)
+_board_init_r_ofs:
+       .word board_init_r - _start
 #endif
-#endif /* CONFIG_PRELOADER */
-       sub     sp, r0, #12             /* leave 3 words for abort-stack    */
-       bic     sp, sp, #7              /* 8-byte alignment for ABI compliance */
 
-clear_bss:
-       ldr     r0, _bss_start          /* find start of bss segment        */
-       ldr     r1, _bss_end            /* stop here                        */
-       mov     r2, #0x00000000         /* clear                            */
-
-#ifndef CONFIG_PRELOADER
-clbss_l:str    r2, [r0]                /* clear loop...                    */
-       add     r0, r0, #4
-       cmp     r0, r1
-       blo     clbss_l
-
-       bl coloured_LED_init
-       bl red_LED_on
-#endif /* CONFIG_PRELOADER */
-
-       ldr     pc, _start_armboot
-
-_start_armboot:
-#ifdef CONFIG_NAND_SPL
-       .word nand_boot
-#else
-       .word start_armboot
-#endif /* CONFIG_NAND_SPL */
-#endif /* #if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC) */
+_rel_dyn_start_ofs:
+       .word __rel_dyn_start - _start
+_rel_dyn_end_ofs:
+       .word __rel_dyn_end - _start
+_dynsym_start_ofs:
+       .word __dynsym_start - _start
 
 /*
  *************************************************************************
@@ -468,13 +386,7 @@ cpu_init_crit:
        @ carve out a frame on current user stack
        sub     sp, sp, #S_FRAME_SIZE
        stmia   sp, {r0 - r12}  @ Save user registers (now in svc mode) r0-r12
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-       ldr     r2, _armboot_start
-       sub     r2, r2, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN)
-       sub     r2, r2, #(CONFIG_SYS_GBL_DATA_SIZE+8)  @ set base 2 words into abort stack
-#else
        ldr     r2, IRQ_STACK_START_IN
-#endif
        @ get values for "aborted" pc and cpsr (into parm regs)
        ldmia   r2, {r2 - r3}
        add     r0, sp, #S_FRAME_SIZE           @ grab pointer to old stack
@@ -506,13 +418,7 @@ cpu_init_crit:
        .endm
 
        .macro get_bad_stack
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-       ldr     r13, _armboot_start             @ setup our mode stack
-       sub     r13, r13, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN)
-       sub     r13, r13, #(CONFIG_SYS_GBL_DATA_SIZE+8) @ reserved a couple spots in abort stack
-#else
        ldr     r13, IRQ_STACK_START_IN         @ setup our mode stack
-#endif
 
        str     lr, [r13]       @ save caller lr in position 0 of saved stack
        mrs     lr, spsr        @ get the spsr
index 02eb8ca6072809a9de96ac055a832dc6c56baae2..72f45f80040cf1fe644349edda6f187da7cc3698 100644 (file)
@@ -41,21 +41,19 @@ SECTIONS
        . = ALIGN(4);
        .data : {
                *(.data)
-       __datarel_start = .;
-               *(.data.rel)
-       __datarelrolocal_start = .;
-               *(.data.rel.ro.local)
-       __datarellocal_start = .;
-               *(.data.rel.local)
-       __datarelro_start = .;
-               *(.data.rel.ro)
        }
 
-       __got_start = .;
        . = ALIGN(4);
-       .got : { *(.got) }
 
-       __got_end = .;
+       __rel_dyn_start = .;
+       .rel.dyn : { *(.rel.dyn) }
+       __rel_dyn_end = .;
+
+       __dynsym_start = .;
+       .dynsym : { *(.dynsym) }
+
+       . = ALIGN(4);
+
        . = .;
        __u_boot_cmd_start = .;
        .u_boot_cmd : { *(.u_boot_cmd) }
@@ -65,4 +63,10 @@ SECTIONS
        __bss_start = .;
        .bss (NOLOAD) : { *(.bss) . = ALIGN(4); }
        _end = .;
+
+       /DISCARD/ : { *(.dynstr*) }
+       /DISCARD/ : { *(.dynamic*) }
+       /DISCARD/ : { *(.plt*) }
+       /DISCARD/ : { *(.interp*) }
+       /DISCARD/ : { *(.gnu*) }
 }
index 077886f36f4b954ca2f6f6c041032a1415bf8843..cad43ba0485631762b8edafa9cfafd3c2a8349ad 100644 (file)
@@ -30,7 +30,7 @@
  * MA 02111-1307 USA
  */
 
-
+#include <asm-offsets.h>
 #include <config.h>
 #include <version.h>
 
@@ -89,12 +89,6 @@ _fiq:
 _TEXT_BASE:
        .word   CONFIG_SYS_TEXT_BASE
 
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-.globl _armboot_start
-_armboot_start:
-       .word _start
-#endif
-
 /*
  * These are defined in the board-specific linker script.
  */
@@ -118,7 +112,6 @@ FIQ_STACK_START:
        .word 0x0badc0de
 #endif
 
-#if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
 /* IRQ stack memory (calculated at run-time) + 8 bytes */
 .globl IRQ_STACK_START_IN
 IRQ_STACK_START_IN:
@@ -203,7 +196,6 @@ stack_setup:
        cmp     r0, r6
        beq     clear_bss
 
-#ifndef CONFIG_SKIP_RELOCATE_UBOOT
 copy_loop:
        ldmia   r0!, {r9-r10}           /* copy from source address [r0]    */
        stmia   r6!, {r9-r10}           /* copy to   target address [r1]    */
@@ -228,9 +220,8 @@ fixloop:
        str     r4, [r2]
        add     r2, r2, #4
        cmp     r2, r3
-       bne     fixloop
+       blo     fixloop
 #endif
-#endif /* #ifndef CONFIG_SKIP_RELOCATE_UBOOT */
 
 clear_bss:
 #ifndef CONFIG_PRELOADER
@@ -273,72 +264,6 @@ _nand_boot: .word nand_boot
 _board_init_r: .word board_init_r
 #endif
 
-#else /* #if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC) */
-/*
- * the actual reset code
- */
-
-reset:
-       /*
-        * set the cpu to SVC32 mode
-        */
-       mrs     r0,cpsr
-       bic     r0,r0,#0x1f
-       orr     r0,r0,#0xd3
-       msr     cpsr,r0
-
-       /*
-        * we do sys-critical inits only at reboot,
-        * not when booting from ram!
-        */
-#ifndef CONFIG_SKIP_LOWLEVEL_INIT
-       bl      cpu_init_crit
-#endif
-
-relocate:                              /* relocate U-Boot to RAM           */
-       adr     r0, _start              /* r0 <- current position of code   */
-       ldr     r1, _TEXT_BASE          /* test if we run from flash or RAM */
-       cmp     r0, r1                  /* don't reloc during debug         */
-       beq     stack_setup
-
-       ldr     r2, _armboot_start
-       ldr     r3, _bss_start
-       sub     r2, r3, r2              /* r2 <- size of armboot            */
-       add     r2, r0, r2              /* r2 <- source end address         */
-
-copy_loop:
-       ldmia   r0!, {r3-r10}           /* copy from source address [r0]    */
-       stmia   r1!, {r3-r10}           /* copy to   target address [r1]    */
-       cmp     r0, r2                  /* until source end address [r2]    */
-       blo     copy_loop
-
-       /* Set up the stack                                                 */
-stack_setup:
-       ldr     r0, _TEXT_BASE          /* upper 128 KiB: relocated uboot   */
-       sub     r0, r0, #CONFIG_SYS_MALLOC_LEN  /* malloc area                      */
-       sub     r0, r0, #CONFIG_SYS_GBL_DATA_SIZE /* bdinfo                        */
-#ifdef CONFIG_USE_IRQ
-       sub     r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ)
-#endif
-       sub     sp, r0, #12             /* leave 3 words for abort-stack    */
-       bic     sp, sp, #7              /* 8-byte alignment for ABI compliance */
-
-clear_bss:
-       ldr     r0, _bss_start          /* find start of bss segment        */
-       ldr     r1, _bss_end            /* stop here                        */
-       mov     r2, #0x00000000         /* clear                            */
-
-clbss_l:str    r2, [r0]                /* clear loop...                    */
-       add     r0, r0, #4
-       cmp     r0, r1
-       bne     clbss_l
-
-       ldr     pc, _start_armboot
-
-_start_armboot:
-       .word start_armboot
-#endif /* #if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC) */
-
 /*
  *************************************************************************
  *
@@ -424,13 +349,7 @@ cpu_init_crit:
        sub     sp, sp, #S_FRAME_SIZE
        stmia   sp, {r0 - r12}  @ Save user registers (now in svc mode) r0-r12
 
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-       ldr     r2, _armboot_start
-       sub     r2, r2, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN)
-       sub     r2, r2, #(CONFIG_SYS_GBL_DATA_SIZE+8)  @ set base 2 words into abort stack
-#else
        ldr     r2, IRQ_STACK_START_IN
-#endif
        @ get values for "aborted" pc and cpsr (into parm regs)
        ldmia   r2, {r2 - r3}
        add     r0, sp, #S_FRAME_SIZE           @ grab pointer to old stack
@@ -462,13 +381,7 @@ cpu_init_crit:
        .endm
 
        .macro get_bad_stack
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-       ldr     r13, _armboot_start             @ setup our mode stack
-       sub     r13, r13, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN)
-       sub     r13, r13, #(CONFIG_SYS_GBL_DATA_SIZE+8) @ reserved a couple spots in abort stack
-#else
        ldr     r13, IRQ_STACK_START_IN         @ setup our mode stack
-#endif
 
        str     lr, [r13]       @ save caller lr in position 0 of saved stack
        mrs     lr, spsr        @ get the spsr
index 07356cb5fd018983d5fd98a0382c1caf6b9f5467..957ca34766c333baaf943c8018fa552ce64ce97d 100644 (file)
@@ -30,7 +30,7 @@
  * MA 02111-1307 USA
  */
 
-
+#include <asm-offsets.h>
 #include <config.h>
 #include <version.h>
 
@@ -87,12 +87,6 @@ _fiq:
 _TEXT_BASE:
        .word   CONFIG_SYS_TEXT_BASE /* address of _start in the linked image */
 
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-.globl _armboot_start
-_armboot_start:
-       .word _start
-#endif
-
 /*
  * These are defined in the board-specific linker script.
  */
@@ -116,7 +110,6 @@ FIQ_STACK_START:
        .word 0x0badc0de
 #endif
 
-#if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
 /* IRQ stack memory (calculated at run-time) + 8 bytes */
 .globl IRQ_STACK_START_IN
 IRQ_STACK_START_IN:
@@ -201,7 +194,6 @@ stack_setup:
        cmp     r0, r6
        beq     clear_bss
 
-#ifndef CONFIG_SKIP_RELOCATE_UBOOT
 copy_loop:
        ldmia   r0!, {r9-r10}           /* copy from source address [r0]    */
        stmia   r6!, {r9-r10}           /* copy to   target address [r1]    */
@@ -226,9 +218,8 @@ fixloop:
        str     r4, [r2]
        add     r2, r2, #4
        cmp     r2, r3
-       bne     fixloop
+       blo     fixloop
 #endif
-#endif /* #ifndef CONFIG_SKIP_RELOCATE_UBOOT */
 
 clear_bss:
 #ifndef CONFIG_PRELOADER
@@ -268,74 +259,6 @@ clbss_l:str        r2, [r0]                /* clear loop...                    */
 
 _board_init_r: .word board_init_r
 
-#else /* #if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC) */
-
-/*
- * the actual reset code
- */
-.globl reset
-reset:
-       /*
-        * set the cpu to SVC32 mode
-        */
-       mrs     r0,cpsr
-       bic     r0,r0,#0x1f
-       orr     r0,r0,#0xd3
-       msr     cpsr,r0
-
-       /*
-        * we do sys-critical inits only at reboot,
-        * not when booting from ram!
-        */
-#ifndef CONFIG_SKIP_LOWLEVEL_INIT
-       bl      cpu_init_crit
-#endif
-
-relocate:                              /* relocate U-Boot to RAM           */
-       adr     r0, _start              /* pc relative  address of label    */
-       ldr     r1, _TEXT_BASE          /* linked image address of label    */
-       cmp     r0, r1                  /* test if we run from flash or RAM */
-       beq     stack_setup             /* ifeq we are in the RAM copy      */
-
-       ldr     r2, _armboot_start
-       ldr     r3, _bss_start
-       sub     r2, r3, r2              /* r2 <- size of armboot            */
-       add     r2, r0, r2              /* r2 <- source end address         */
-
-copy_loop:
-       ldmia   r0!, {r3-r10}           /* copy from source address [r0]    */
-       stmia   r1!, {r3-r10}           /* copy to   target address [r1]    */
-       cmp     r0, r2                  /* until source end address [r2]    */
-       blo     copy_loop
-
-       /* Set up the stack                                                 */
-stack_setup:
-       ldr     r0, _TEXT_BASE          /* upper 128 KiB: relocated uboot   */
-       sub     r0, r0, #CONFIG_SYS_MALLOC_LEN  /* malloc area                      */
-       sub     r0, r0, #CONFIG_SYS_GBL_DATA_SIZE /* bdinfo                        */
-#ifdef CONFIG_USE_IRQ
-       sub     r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ)
-#endif
-       sub     sp, r0, #12             /* leave 3 words for abort-stack    */
-       bic     sp, sp, #7              /* 8-byte alignment for ABI compliance */
-
-clear_bss:
-       ldr     r0, _bss_start          /* find start of bss segment        */
-       ldr     r1, _bss_end            /* stop here                        */
-       mov     r2, #0x00000000         /* clear                            */
-
-clbss_l:str    r2, [r0]                /* clear loop...                    */
-       add     r0, r0, #4
-       cmp     r0, r1
-       blo     clbss_l
-
-       ldr     pc, _start_armboot
-
-_start_armboot:
-       .word start_armboot
-
-#endif /* #if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC) */
-
 /*
  *************************************************************************
  *
@@ -400,13 +323,7 @@ cpu_init_crit:
        sub     sp, sp, #S_FRAME_SIZE
        stmia   sp, {r0 - r12}  @ Save user registers (now in svc mode) r0-r12
 
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-       ldr     r2, _armboot_start
-       sub     r2, r2, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN)
-       sub     r2, r2, #(CONFIG_SYS_GBL_DATA_SIZE+8)  @ set base 2 words into abort stack
-#else
        ldr     r2, IRQ_STACK_START_IN
-#endif
        @ get values for "aborted" pc and cpsr (into parm regs)
        ldmia   r2, {r2 - r3}
        add     r0, sp, #S_FRAME_SIZE           @ grab pointer to old stack
@@ -438,13 +355,7 @@ cpu_init_crit:
        .endm
 
        .macro get_bad_stack
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-       ldr     r13, _armboot_start             @ setup our mode stack
-       sub     r13, r13, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN)
-       sub     r13, r13, #(CONFIG_SYS_GBL_DATA_SIZE+8) @ reserved a couple spots in abort stack
-#else
        ldr     r13, IRQ_STACK_START_IN         @ setup our mode stack
-#endif
 
        str     lr, [r13]       @ save caller lr in position 0 of saved stack
        mrs     lr, spsr        @ get the spsr
diff --git a/arch/arm/cpu/armv7/mx5/Makefile b/arch/arm/cpu/armv7/mx5/Makefile
new file mode 100644 (file)
index 0000000..7cfaa2c
--- /dev/null
@@ -0,0 +1,48 @@
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+#
+# (C) Copyright 2009 Freescale Semiconductor, Inc.
+#
+# 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
+
+COBJS  = soc.o clock.o iomux.o timer.o speed.o
+SOBJS = lowlevel_init.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/arch/arm/cpu/armv7/mx5/clock.c b/arch/arm/cpu/armv7/mx5/clock.c
new file mode 100644 (file)
index 0000000..00f649c
--- /dev/null
@@ -0,0 +1,294 @@
+/*
+ * (C) Copyright 2007
+ * Sascha Hauer, Pengutronix
+ *
+ * (C) Copyright 2009 Freescale Semiconductor, Inc.
+ *
+ * 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/io.h>
+#include <asm/errno.h>
+#include <asm/arch/imx-regs.h>
+#include <asm/arch/crm_regs.h>
+#include <asm/arch/clock.h>
+
+enum pll_clocks {
+       PLL1_CLOCK = 0,
+       PLL2_CLOCK,
+       PLL3_CLOCK,
+       PLL_CLOCKS,
+};
+
+struct mxc_pll_reg *mxc_plls[PLL_CLOCKS] = {
+       [PLL1_CLOCK] = (struct mxc_pll_reg *)PLL1_BASE_ADDR,
+       [PLL2_CLOCK] = (struct mxc_pll_reg *)PLL2_BASE_ADDR,
+       [PLL3_CLOCK] = (struct mxc_pll_reg *)PLL3_BASE_ADDR,
+};
+
+struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)MXC_CCM_BASE;
+
+/*
+ * Calculate the frequency of this pll.
+ */
+static u32 decode_pll(struct mxc_pll_reg *pll, u32 infreq)
+{
+       u32 mfi, mfn, mfd, pd;
+
+       mfn = __raw_readl(&pll->mfn);
+       mfd = __raw_readl(&pll->mfd) + 1;
+       mfi = __raw_readl(&pll->op);
+       pd = (mfi  & 0xF) + 1;
+       mfi = (mfi >> 4) & 0xF;
+       mfi = (mfi >= 5) ? mfi : 5;
+
+       return ((4 * (infreq / 1000) * (mfi * mfd + mfn)) / (mfd * pd)) * 1000;
+}
+
+/*
+ * Get mcu main rate
+ */
+u32 get_mcu_main_clk(void)
+{
+       u32 reg, freq;
+
+       reg = (__raw_readl(&mxc_ccm->cacrr) & MXC_CCM_CACRR_ARM_PODF_MASK) >>
+               MXC_CCM_CACRR_ARM_PODF_OFFSET;
+       freq = decode_pll(mxc_plls[PLL1_CLOCK], CONFIG_SYS_MX5_HCLK);
+       return freq / (reg + 1);
+}
+
+/*
+ * Get the rate of peripheral's root clock.
+ */
+static u32 get_periph_clk(void)
+{
+       u32 reg;
+
+       reg = __raw_readl(&mxc_ccm->cbcdr);
+       if (!(reg & MXC_CCM_CBCDR_PERIPH_CLK_SEL))
+               return decode_pll(mxc_plls[PLL2_CLOCK], CONFIG_SYS_MX5_HCLK);
+       reg = __raw_readl(&mxc_ccm->cbcmr);
+       switch ((reg & MXC_CCM_CBCMR_PERIPH_CLK_SEL_MASK) >>
+               MXC_CCM_CBCMR_PERIPH_CLK_SEL_OFFSET) {
+       case 0:
+               return decode_pll(mxc_plls[PLL1_CLOCK], CONFIG_SYS_MX5_HCLK);
+       case 1:
+               return decode_pll(mxc_plls[PLL3_CLOCK], CONFIG_SYS_MX5_HCLK);
+       default:
+               return 0;
+       }
+       /* NOTREACHED */
+}
+
+/*
+ * Get the rate of ipg clock.
+ */
+static u32 get_ipg_clk(void)
+{
+       u32 ahb_podf, ipg_podf;
+
+       ahb_podf = __raw_readl(&mxc_ccm->cbcdr);
+       ipg_podf = (ahb_podf & MXC_CCM_CBCDR_IPG_PODF_MASK) >>
+                       MXC_CCM_CBCDR_IPG_PODF_OFFSET;
+       ahb_podf = (ahb_podf & MXC_CCM_CBCDR_AHB_PODF_MASK) >>
+                       MXC_CCM_CBCDR_AHB_PODF_OFFSET;
+       return get_periph_clk() / ((ahb_podf + 1) * (ipg_podf + 1));
+}
+
+/*
+ * Get the rate of ipg_per clock.
+ */
+static u32 get_ipg_per_clk(void)
+{
+       u32 pred1, pred2, podf;
+
+       if (__raw_readl(&mxc_ccm->cbcmr) & MXC_CCM_CBCMR_PERCLK_IPG_CLK_SEL)
+               return get_ipg_clk();
+       /* Fixme: not handle what about lpm*/
+       podf = __raw_readl(&mxc_ccm->cbcdr);
+       pred1 = (podf & MXC_CCM_CBCDR_PERCLK_PRED1_MASK) >>
+               MXC_CCM_CBCDR_PERCLK_PRED1_OFFSET;
+       pred2 = (podf & MXC_CCM_CBCDR_PERCLK_PRED2_MASK) >>
+               MXC_CCM_CBCDR_PERCLK_PRED2_OFFSET;
+       podf = (podf & MXC_CCM_CBCDR_PERCLK_PODF_MASK) >>
+               MXC_CCM_CBCDR_PERCLK_PODF_OFFSET;
+
+       return get_periph_clk() / ((pred1 + 1) * (pred2 + 1) * (podf + 1));
+}
+
+/*
+ * Get the rate of uart clk.
+ */
+static u32 get_uart_clk(void)
+{
+       unsigned int freq, reg, pred, podf;
+
+       reg = __raw_readl(&mxc_ccm->cscmr1);
+       switch ((reg & MXC_CCM_CSCMR1_UART_CLK_SEL_MASK) >>
+               MXC_CCM_CSCMR1_UART_CLK_SEL_OFFSET) {
+       case 0x0:
+               freq = decode_pll(mxc_plls[PLL1_CLOCK],
+                                   CONFIG_SYS_MX5_HCLK);
+               break;
+       case 0x1:
+               freq = decode_pll(mxc_plls[PLL2_CLOCK],
+                                   CONFIG_SYS_MX5_HCLK);
+               break;
+       case 0x2:
+               freq = decode_pll(mxc_plls[PLL3_CLOCK],
+                                   CONFIG_SYS_MX5_HCLK);
+               break;
+       default:
+               return 66500000;
+       }
+
+       reg = __raw_readl(&mxc_ccm->cscdr1);
+
+       pred = (reg & MXC_CCM_CSCDR1_UART_CLK_PRED_MASK) >>
+               MXC_CCM_CSCDR1_UART_CLK_PRED_OFFSET;
+
+       podf = (reg & MXC_CCM_CSCDR1_UART_CLK_PODF_MASK) >>
+               MXC_CCM_CSCDR1_UART_CLK_PODF_OFFSET;
+       freq /= (pred + 1) * (podf + 1);
+
+       return freq;
+}
+
+/*
+ * This function returns the low power audio clock.
+ */
+u32 get_lp_apm(void)
+{
+       u32 ret_val = 0;
+       u32 ccsr = __raw_readl(&mxc_ccm->ccsr);
+
+       if (((ccsr >> 9) & 1) == 0)
+               ret_val = CONFIG_SYS_MX5_HCLK;
+       else
+               ret_val = ((32768 * 1024));
+
+       return ret_val;
+}
+
+/*
+ * get cspi clock rate.
+ */
+u32 imx_get_cspiclk(void)
+{
+       u32 ret_val = 0, pdf, pre_pdf, clk_sel;
+       u32 cscmr1 = __raw_readl(&mxc_ccm->cscmr1);
+       u32 cscdr2 = __raw_readl(&mxc_ccm->cscdr2);
+
+       pre_pdf = (cscdr2 & MXC_CCM_CSCDR2_CSPI_CLK_PRED_MASK) \
+                       >> MXC_CCM_CSCDR2_CSPI_CLK_PRED_OFFSET;
+       pdf = (cscdr2 & MXC_CCM_CSCDR2_CSPI_CLK_PODF_MASK) \
+                       >> MXC_CCM_CSCDR2_CSPI_CLK_PODF_OFFSET;
+       clk_sel = (cscmr1 & MXC_CCM_CSCMR1_CSPI_CLK_SEL_MASK) \
+                       >> MXC_CCM_CSCMR1_CSPI_CLK_SEL_OFFSET;
+
+       switch (clk_sel) {
+       case 0:
+               ret_val = decode_pll(mxc_plls[PLL1_CLOCK],
+                                       CONFIG_SYS_MX5_HCLK) /
+                                       ((pre_pdf + 1) * (pdf + 1));
+               break;
+       case 1:
+               ret_val = decode_pll(mxc_plls[PLL2_CLOCK],
+                                       CONFIG_SYS_MX5_HCLK) /
+                                       ((pre_pdf + 1) * (pdf + 1));
+               break;
+       case 2:
+               ret_val = decode_pll(mxc_plls[PLL3_CLOCK],
+                                       CONFIG_SYS_MX5_HCLK) /
+                                       ((pre_pdf + 1) * (pdf + 1));
+               break;
+       default:
+               ret_val = get_lp_apm() / ((pre_pdf + 1) * (pdf + 1));
+               break;
+       }
+
+       return ret_val;
+}
+
+/*
+ * The API of get mxc clockes.
+ */
+unsigned int mxc_get_clock(enum mxc_clock clk)
+{
+       switch (clk) {
+       case MXC_ARM_CLK:
+               return get_mcu_main_clk();
+       case MXC_AHB_CLK:
+               break;
+       case MXC_IPG_CLK:
+               return get_ipg_clk();
+       case MXC_IPG_PERCLK:
+               return get_ipg_per_clk();
+       case MXC_UART_CLK:
+               return get_uart_clk();
+       case MXC_CSPI_CLK:
+               return imx_get_cspiclk();
+       case MXC_FEC_CLK:
+               return decode_pll(mxc_plls[PLL1_CLOCK],
+                                   CONFIG_SYS_MX5_HCLK);
+       default:
+               break;
+       }
+       return -1;
+}
+
+u32 imx_get_uartclk(void)
+{
+       return get_uart_clk();
+}
+
+
+u32 imx_get_fecclk(void)
+{
+       return mxc_get_clock(MXC_IPG_CLK);
+}
+
+/*
+ * Dump some core clockes.
+ */
+int do_mx5_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+       u32 freq;
+
+       freq = decode_pll(mxc_plls[PLL1_CLOCK], CONFIG_SYS_MX5_HCLK);
+       printf("pll1: %dMHz\n", freq / 1000000);
+       freq = decode_pll(mxc_plls[PLL2_CLOCK], CONFIG_SYS_MX5_HCLK);
+       printf("pll2: %dMHz\n", freq / 1000000);
+       freq = decode_pll(mxc_plls[PLL3_CLOCK], CONFIG_SYS_MX5_HCLK);
+       printf("pll3: %dMHz\n", freq / 1000000);
+       printf("ipg clock     : %dHz\n", mxc_get_clock(MXC_IPG_CLK));
+       printf("ipg per clock : %dHz\n", mxc_get_clock(MXC_IPG_PERCLK));
+
+       return 0;
+}
+
+/***************************************************/
+
+U_BOOT_CMD(
+       clockinfo,      CONFIG_SYS_MAXARGS,     1,      do_mx5_showclocks,
+       "display clocks\n",
+       ""
+);
diff --git a/arch/arm/cpu/armv7/mx5/iomux.c b/arch/arm/cpu/armv7/mx5/iomux.c
new file mode 100644 (file)
index 0000000..e8928d5
--- /dev/null
@@ -0,0 +1,166 @@
+/*
+ * (C) Copyright 2009 Freescale Semiconductor, Inc.
+ *
+ * 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/io.h>
+#include <asm/arch/imx-regs.h>
+#include <asm/arch/mx5x_pins.h>
+#include <asm/arch/iomux.h>
+#include <asm/arch/sys_proto.h>
+
+/* IOMUX register (base) addresses */
+enum iomux_reg_addr {
+       IOMUXGPR0 = IOMUXC_BASE_ADDR,
+       IOMUXGPR1 = IOMUXC_BASE_ADDR + 0x004,
+       IOMUXSW_MUX_CTL = IOMUXC_BASE_ADDR,
+       IOMUXSW_MUX_END = IOMUXC_BASE_ADDR + MUX_I_END,
+       IOMUXSW_PAD_CTL = IOMUXC_BASE_ADDR + PAD_I_START,
+       IOMUXSW_INPUT_CTL = IOMUXC_BASE_ADDR,
+};
+
+#define MUX_PIN_NUM_MAX (((MUX_I_END - MUX_I_START) >> 2) + 1)
+
+/* Get the iomux register address of this pin */
+static inline u32 get_mux_reg(iomux_pin_name_t pin)
+{
+       u32 mux_reg = PIN_TO_IOMUX_MUX(pin);
+
+       if (is_soc_rev(CHIP_REV_2_0) < 0) {
+               /*
+                * Fixup register address:
+                *      i.MX51 TO1 has offset with the register
+                *      which is define as TO2.
+                */
+               if ((pin == MX51_PIN_NANDF_RB5) ||
+                       (pin == MX51_PIN_NANDF_RB6) ||
+                       (pin == MX51_PIN_NANDF_RB7))
+                       ; /* Do nothing */
+               else if (mux_reg >= 0x2FC)
+                       mux_reg += 8;
+               else if (mux_reg >= 0x130)
+                       mux_reg += 0xC;
+       }
+       mux_reg += IOMUXSW_MUX_CTL;
+       return mux_reg;
+}
+
+/* Get the pad register address of this pin */
+static inline u32 get_pad_reg(iomux_pin_name_t pin)
+{
+       u32 pad_reg = PIN_TO_IOMUX_PAD(pin);
+
+       if (is_soc_rev(CHIP_REV_2_0) < 0) {
+               /*
+                * Fixup register address:
+                *      i.MX51 TO1 has offset with the register
+                *      which is define as TO2.
+                */
+               if ((pin == MX51_PIN_NANDF_RB5) ||
+                       (pin == MX51_PIN_NANDF_RB6) ||
+                       (pin == MX51_PIN_NANDF_RB7))
+                       ; /* Do nothing */
+               else if (pad_reg == 0x4D0 - PAD_I_START)
+                       pad_reg += 0x4C;
+               else if (pad_reg == 0x860 - PAD_I_START)
+                       pad_reg += 0x9C;
+               else if (pad_reg >= 0x804 - PAD_I_START)
+                       pad_reg += 0xB0;
+               else if (pad_reg >= 0x7FC - PAD_I_START)
+                       pad_reg += 0xB4;
+               else if (pad_reg >= 0x4E4 - PAD_I_START)
+                       pad_reg += 0xCC;
+               else
+                       pad_reg += 8;
+       }
+       pad_reg += IOMUXSW_PAD_CTL;
+       return pad_reg;
+}
+
+/* Get the last iomux register address */
+static inline u32 get_mux_end(void)
+{
+       if (is_soc_rev(CHIP_REV_2_0) < 0)
+               return IOMUXC_BASE_ADDR + (0x3F8 - 4);
+       else
+               return IOMUXC_BASE_ADDR + (0x3F0 - 4);
+}
+
+/*
+ * This function is used to configure a pin through the IOMUX module.
+ * @param  pin         a pin number as defined in iomux_pin_name_t
+ * @param  cfg         an output function as defined in iomux_pin_cfg_t
+ *
+ * @return             0 if successful; Non-zero otherwise
+ */
+static void iomux_config_mux(iomux_pin_name_t pin, iomux_pin_cfg_t cfg)
+{
+       u32 mux_reg = get_mux_reg(pin);
+
+       if ((mux_reg > get_mux_end()) || (mux_reg < IOMUXSW_MUX_CTL))
+               return ;
+       if (cfg == IOMUX_CONFIG_GPIO)
+               writel(PIN_TO_ALT_GPIO(pin), mux_reg);
+       else
+               writel(cfg, mux_reg);
+}
+
+/*
+ * Request ownership for an IO pin. This function has to be the first one
+ * being called before that pin is used. The caller has to check the
+ * return value to make sure it returns 0.
+ *
+ * @param  pin         a name defined by iomux_pin_name_t
+ * @param  cfg         an input function as defined in iomux_pin_cfg_t
+ *
+ */
+void mxc_request_iomux(iomux_pin_name_t pin, iomux_pin_cfg_t cfg)
+{
+       iomux_config_mux(pin, cfg);
+}
+
+/*
+ * Release ownership for an IO pin
+ *
+ * @param  pin         a name defined by iomux_pin_name_t
+ * @param  cfg         an input function as defined in iomux_pin_cfg_t
+ */
+void mxc_free_iomux(iomux_pin_name_t pin, iomux_pin_cfg_t cfg)
+{
+}
+
+/*
+ * This function configures the pad value for a IOMUX pin.
+ *
+ * @param  pin     a pin number as defined in iomux_pin_name_t
+ * @param  config  the ORed value of elements defined in iomux_pad_config_t
+ */
+void mxc_iomux_set_pad(iomux_pin_name_t pin, u32 config)
+{
+       u32 pad_reg = get_pad_reg(pin);
+       writel(config, pad_reg);
+}
+
+unsigned int mxc_iomux_get_pad(iomux_pin_name_t pin)
+{
+       u32 pad_reg = get_pad_reg(pin);
+       return readl(pad_reg);
+}
diff --git a/arch/arm/cpu/armv7/mx5/lowlevel_init.S b/arch/arm/cpu/armv7/mx5/lowlevel_init.S
new file mode 100644 (file)
index 0000000..e984870
--- /dev/null
@@ -0,0 +1,277 @@
+/*
+ * Copyright (C) 2007, Guennadi Liakhovetski <lg@denx.de>
+ *
+ * (C) Copyright 2009 Freescale Semiconductor, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <config.h>
+#include <asm/arch/imx-regs.h>
+#include <asm/arch/asm-offsets.h>
+
+/*
+ * L2CC Cache setup/invalidation/disable
+ */
+.macro init_l2cc
+       /* explicitly disable L2 cache */
+       mrc 15, 0, r0, c1, c0, 1
+       bic r0, r0, #0x2
+       mcr 15, 0, r0, c1, c0, 1
+
+       /* reconfigure L2 cache aux control reg */
+       mov r0, #0xC0                   /* tag RAM */
+       add r0, r0, #0x4                /* data RAM */
+       orr r0, r0, #(1 << 24)          /* disable write allocate delay */
+       orr r0, r0, #(1 << 23)          /* disable write allocate combine */
+       orr r0, r0, #(1 << 22)          /* disable write allocate */
+
+       cmp r3, #0x10    /* r3 contains the silicon rev */
+
+       /* disable write combine for TO 2 and lower revs */
+       orrls r0, r0, #(1 << 25)
+
+       mcr 15, 1, r0, c9, c0, 2
+.endm /* init_l2cc */
+
+/* AIPS setup - Only setup MPROTx registers.
+ * The PACR default values are good.*/
+.macro init_aips
+       /*
+        * Set all MPROTx to be non-bufferable, trusted for R/W,
+        * not forced to user-mode.
+        */
+       ldr r0, =AIPS1_BASE_ADDR
+       ldr r1, =0x77777777
+       str r1, [r0, #0x0]
+       str r1, [r0, #0x4]
+       ldr r0, =AIPS2_BASE_ADDR
+       str r1, [r0, #0x0]
+       str r1, [r0, #0x4]
+       /*
+        * Clear the on and off peripheral modules Supervisor Protect bit
+        * for SDMA to access them. Did not change the AIPS control registers
+        * (offset 0x20) access type
+        */
+.endm /* init_aips */
+
+/* M4IF setup */
+.macro init_m4if
+       /* VPU and IPU given higher priority (0x4)
+        * IPU accesses with ID=0x1 given highest priority (=0xA)
+        */
+       ldr r0, =M4IF_BASE_ADDR
+
+       ldr r1, =0x00000203
+       str r1, [r0, #0x40]
+
+       ldr r1, =0x0
+       str r1, [r0, #0x44]
+
+       ldr r1, =0x00120125
+       str r1, [r0, #0x9C]
+
+       ldr r1, =0x001901A3
+       str r1, [r0, #0x48]
+
+.endm /* init_m4if */
+
+.macro setup_pll pll, freq
+       ldr r2, =\pll
+       ldr r1, =0x00001232
+       str r1, [r2, #PLL_DP_CTL] /* Set DPLL ON (set UPEN bit): BRMO=1 */
+       mov r1, #0x2
+       str r1, [r2, #PLL_DP_CONFIG] /* Enable auto-restart AREN bit */
+
+       str r3, [r2, #PLL_DP_OP]
+       str r3, [r2, #PLL_DP_HFS_OP]
+
+       str r4, [r2, #PLL_DP_MFD]
+       str r4, [r2, #PLL_DP_HFS_MFD]
+
+       str r5, [r2, #PLL_DP_MFN]
+       str r5, [r2, #PLL_DP_HFS_MFN]
+
+       ldr r1, =0x00001232
+       str r1, [r2, #PLL_DP_CTL]
+1:     ldr r1, [r2, #PLL_DP_CTL]
+       ands r1, r1, #0x1
+       beq 1b
+.endm
+
+.macro init_clock
+       ldr r0, =CCM_BASE_ADDR
+
+       /* Gate of clocks to the peripherals first */
+       ldr r1, =0x3FFFFFFF
+       str r1, [r0, #CLKCTL_CCGR0]
+       ldr r1, =0x0
+       str r1, [r0, #CLKCTL_CCGR1]
+       str r1, [r0, #CLKCTL_CCGR2]
+       str r1, [r0, #CLKCTL_CCGR3]
+
+       ldr r1, =0x00030000
+       str r1, [r0, #CLKCTL_CCGR4]
+       ldr r1, =0x00FFF030
+       str r1, [r0, #CLKCTL_CCGR5]
+       ldr r1, =0x00000300
+       str r1, [r0, #CLKCTL_CCGR6]
+
+       /* Disable IPU and HSC dividers */
+       mov r1, #0x60000
+       str r1, [r0, #CLKCTL_CCDR]
+
+       /* Make sure to switch the DDR away from PLL 1 */
+       ldr r1, =0x19239145
+       str r1, [r0, #CLKCTL_CBCDR]
+       /* make sure divider effective */
+1:     ldr r1, [r0, #CLKCTL_CDHIPR]
+       cmp r1, #0x0
+       bne 1b
+
+       /* Switch ARM to step clock */
+       mov r1, #0x4
+       str r1, [r0, #CLKCTL_CCSR]
+       mov r3, #DP_OP_800
+       mov r4, #DP_MFD_800
+       mov r5, #DP_MFN_800
+       setup_pll PLL1_BASE_ADDR
+
+       mov r3, #DP_OP_665
+       mov r4, #DP_MFD_665
+       mov r5, #DP_MFN_665
+       setup_pll PLL3_BASE_ADDR
+
+       /* Switch peripheral to PLL 3 */
+       ldr r0, =CCM_BASE_ADDR
+       ldr r1, =0x000010C0
+       orr r1,r1,#CONFIG_SYS_DDR_CLKSEL
+       str r1, [r0, #CLKCTL_CBCMR]
+       ldr r1, =0x13239145
+       str r1, [r0, #CLKCTL_CBCDR]
+       mov r3, #DP_OP_665
+       mov r4, #DP_MFD_665
+       mov r5, #DP_MFN_665
+       setup_pll PLL2_BASE_ADDR
+
+       /* Switch peripheral to PLL2 */
+       ldr r0, =CCM_BASE_ADDR
+       ldr r1, =0x19239145
+       str r1, [r0, #CLKCTL_CBCDR]
+       ldr r1, =0x000020C0
+       orr r1,r1,#CONFIG_SYS_DDR_CLKSEL
+       str r1, [r0, #CLKCTL_CBCMR]
+
+       mov r3, #DP_OP_216
+       mov r4, #DP_MFD_216
+       mov r5, #DP_MFN_216
+       setup_pll PLL3_BASE_ADDR
+
+
+       /* Set the platform clock dividers */
+       ldr r0, =ARM_BASE_ADDR
+       ldr r1, =0x00000725
+       str r1, [r0, #0x14]
+
+       ldr r0, =CCM_BASE_ADDR
+
+       /* Run 3.0 at Full speed, for other TO's wait till we increase VDDGP */
+       ldr r1, =0x0
+       ldr r3, [r1, #ROM_SI_REV]
+       cmp r3, #0x10
+       movls r1, #0x1
+       movhi r1, #0
+       str r1, [r0, #CLKCTL_CACRR]
+
+       /* Switch ARM back to PLL 1 */
+       mov r1, #0
+       str r1, [r0, #CLKCTL_CCSR]
+
+       /* setup the rest */
+       /* Use lp_apm (24MHz) source for perclk */
+       ldr r1, =0x000020C2
+       orr r1,r1,#CONFIG_SYS_DDR_CLKSEL
+       str r1, [r0, #CLKCTL_CBCMR]
+       /* ddr clock from PLL 1, all perclk dividers are 1 since using 24MHz */
+       ldr r1, =CONFIG_SYS_CLKTL_CBCDR
+       str r1, [r0, #CLKCTL_CBCDR]
+
+       /* Restore the default values in the Gate registers */
+       ldr r1, =0xFFFFFFFF
+       str r1, [r0, #CLKCTL_CCGR0]
+       str r1, [r0, #CLKCTL_CCGR1]
+       str r1, [r0, #CLKCTL_CCGR2]
+       str r1, [r0, #CLKCTL_CCGR3]
+       str r1, [r0, #CLKCTL_CCGR4]
+       str r1, [r0, #CLKCTL_CCGR5]
+       str r1, [r0, #CLKCTL_CCGR6]
+
+       /* Use PLL 2 for UART's, get 66.5MHz from it */
+       ldr r1, =0xA5A2A020
+       str r1, [r0, #CLKCTL_CSCMR1]
+       ldr r1, =0x00C30321
+       str r1, [r0, #CLKCTL_CSCDR1]
+
+       /* make sure divider effective */
+1:     ldr r1, [r0, #CLKCTL_CDHIPR]
+       cmp r1, #0x0
+       bne 1b
+
+       mov r1, #0x0
+       str r1, [r0, #CLKCTL_CCDR]
+
+       /* for cko - for ARM div by 8 */
+       mov r1, #0x000A0000
+       add r1, r1, #0x00000F0
+       str r1, [r0, #CLKCTL_CCOSR]
+.endm
+
+.macro setup_wdog
+       ldr r0, =WDOG1_BASE_ADDR
+       mov r1, #0x30
+       strh r1, [r0]
+.endm
+
+.section ".text.init", "x"
+
+.globl lowlevel_init
+lowlevel_init:
+       ldr r0, =GPIO1_BASE_ADDR
+       ldr r1, [r0, #0x0]
+       orr r1, r1, #(1 << 23)
+       str r1, [r0, #0x0]
+       ldr r1, [r0, #0x4]
+       orr r1, r1, #(1 << 23)
+       str r1, [r0, #0x4]
+
+       init_l2cc
+
+       init_aips
+
+       init_m4if
+
+       init_clock
+
+       /* r12 saved upper lr*/
+       mov pc,lr
+
+/* Board level setting value */
+DDR_PERCHARGE_CMD:     .word 0x04008008
+DDR_REFRESH_CMD:       .word 0x00008010
+DDR_LMR1_W:            .word 0x00338018
+DDR_LMR_CMD:           .word 0xB2220000
+DDR_TIMING_W:          .word 0xB02567A9
+DDR_MISC_W:            .word 0x000A0104
diff --git a/arch/arm/cpu/armv7/mx5/soc.c b/arch/arm/cpu/armv7/mx5/soc.c
new file mode 100644 (file)
index 0000000..7c7a565
--- /dev/null
@@ -0,0 +1,120 @@
+/*
+ * (C) Copyright 2007
+ * Sascha Hauer, Pengutronix
+ *
+ * (C) Copyright 2009 Freescale Semiconductor, Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <common.h>
+#include <asm/arch/imx-regs.h>
+#include <asm/arch/clock.h>
+#include <asm/errno.h>
+#include <asm/io.h>
+
+#ifdef CONFIG_FSL_ESDHC
+#include <fsl_esdhc.h>
+#endif
+
+#if defined(CONFIG_MX51)
+#define CPU_TYPE 0x51000
+#else
+#error "CPU_TYPE not defined"
+#endif
+
+u32 get_cpu_rev(void)
+{
+       int system_rev = CPU_TYPE;
+       int reg = __raw_readl(ROM_SI_REV);
+
+       switch (reg) {
+       case 0x02:
+               system_rev |= CHIP_REV_1_1;
+               break;
+       case 0x10:
+               if ((__raw_readl(GPIO1_BASE_ADDR + 0x0) & (0x1 << 22)) == 0)
+                       system_rev |= CHIP_REV_2_5;
+               else
+                       system_rev |= CHIP_REV_2_0;
+               break;
+       case 0x20:
+               system_rev |= CHIP_REV_3_0;
+               break;
+       return system_rev;
+       default:
+               system_rev |= CHIP_REV_1_0;
+               break;
+       }
+       return system_rev;
+}
+
+
+#if defined(CONFIG_DISPLAY_CPUINFO)
+int print_cpuinfo(void)
+{
+       u32 cpurev;
+
+       cpurev = get_cpu_rev();
+       printf("CPU:   Freescale i.MX%x family rev%d.%d at %d MHz\n",
+               (cpurev & 0xFF000) >> 12,
+               (cpurev & 0x000F0) >> 4,
+               (cpurev & 0x0000F) >> 0,
+               mxc_get_clock(MXC_ARM_CLK) / 1000000);
+       return 0;
+}
+#endif
+
+/*
+ * Initializes on-chip ethernet controllers.
+ * to override, implement board_eth_init()
+ */
+#if defined(CONFIG_FEC_MXC)
+extern int fecmxc_initialize(bd_t *bis);
+#endif
+
+int cpu_eth_init(bd_t *bis)
+{
+       int rc = -ENODEV;
+
+#if defined(CONFIG_FEC_MXC)
+       rc = fecmxc_initialize(bis);
+#endif
+
+       return rc;
+}
+
+/*
+ * Initializes on-chip MMC controllers.
+ * to override, implement board_mmc_init()
+ */
+int cpu_mmc_init(bd_t *bis)
+{
+#ifdef CONFIG_FSL_ESDHC
+       return fsl_esdhc_mmc_init(bis);
+#else
+       return 0;
+#endif
+}
+
+
+void reset_cpu(ulong addr)
+{
+       __raw_writew(4, WDOG1_BASE_ADDR);
+}
diff --git a/arch/arm/cpu/armv7/mx5/speed.c b/arch/arm/cpu/armv7/mx5/speed.c
new file mode 100644 (file)
index 0000000..a444def
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * (C) Copyright 2000-2003
+ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+ *
+ * Copyright (C) 2004-2007 Freescale Semiconductor, Inc.
+ * TsiChung Liew (Tsi-Chung.Liew@freescale.com)
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <common.h>
+#include <asm/arch/imx-regs.h>
+#include <asm/arch/clock.h>
+
+int get_clocks(void)
+{
+       DECLARE_GLOBAL_DATA_PTR;
+
+#ifdef CONFIG_FSL_ESDHC
+       gd->sdhc_clk = mxc_get_clock(MXC_IPG_PERCLK);
+#endif
+       return 0;
+}
diff --git a/arch/arm/cpu/armv7/mx5/timer.c b/arch/arm/cpu/armv7/mx5/timer.c
new file mode 100644 (file)
index 0000000..3044fcf
--- /dev/null
@@ -0,0 +1,119 @@
+/*
+ * (C) Copyright 2007
+ * Sascha Hauer, Pengutronix
+ *
+ * (C) Copyright 2009 Freescale Semiconductor, Inc.
+ *
+ * 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/io.h>
+#include <asm/arch/imx-regs.h>
+
+/* General purpose timers registers */
+struct mxc_gpt {
+       unsigned int control;
+       unsigned int prescaler;
+       unsigned int status;
+       unsigned int nouse[6];
+       unsigned int counter;
+};
+
+static struct mxc_gpt *cur_gpt = (struct mxc_gpt *)GPT1_BASE_ADDR;
+
+/* General purpose timers bitfields */
+#define GPTCR_SWR       (1<<15)        /* Software reset */
+#define GPTCR_FRR       (1<<9) /* Freerun / restart */
+#define GPTCR_CLKSOURCE_32 (4<<6)      /* Clock source */
+#define GPTCR_TEN       (1)    /* Timer enable */
+
+static ulong timestamp;
+static ulong lastinc;
+
+int timer_init(void)
+{
+       int i;
+
+       /* setup GP Timer 1 */
+       __raw_writel(GPTCR_SWR, &cur_gpt->control);
+
+       /* We have no udelay by now */
+       for (i = 0; i < 100; i++)
+               __raw_writel(0, &cur_gpt->control);
+
+       __raw_writel(0, &cur_gpt->prescaler); /* 32Khz */
+
+       /* Freerun Mode, PERCLK1 input */
+       i = __raw_readl(&cur_gpt->control);
+       __raw_writel(i | GPTCR_CLKSOURCE_32 | GPTCR_TEN, &cur_gpt->control);
+       reset_timer_masked();
+       return 0;
+}
+
+void reset_timer(void)
+{
+       reset_timer_masked();
+}
+
+void reset_timer_masked(void)
+{
+       ulong val = __raw_readl(&cur_gpt->counter);
+       lastinc = val / (CONFIG_SYS_MX5_CLK32 / CONFIG_SYS_HZ);
+       timestamp = 0;
+}
+
+ulong get_timer_masked(void)
+{
+       ulong val = __raw_readl(&cur_gpt->counter);
+       val /= (CONFIG_SYS_MX5_CLK32 / CONFIG_SYS_HZ);
+       if (val >= lastinc)
+               timestamp += (val - lastinc);
+       else
+               timestamp += ((0xFFFFFFFF / (CONFIG_SYS_MX5_CLK32 / CONFIG_SYS_HZ))
+                               - lastinc) + val;
+       lastinc = val;
+       return timestamp;
+}
+
+ulong get_timer(ulong base)
+{
+       return get_timer_masked() - base;
+}
+
+void set_timer(ulong t)
+{
+       timestamp = t;
+}
+
+/* delay x useconds AND preserve advance timestamp value */
+void __udelay(unsigned long usec)
+{
+       unsigned long now, start, tmo;
+       tmo = usec * (CONFIG_SYS_MX5_CLK32 / 1000) / 1000;
+
+       if (!tmo)
+               tmo = 1;
+
+       now = start = readl(&cur_gpt->counter);
+
+       while ((now - start) < tmo)
+               now = readl(&cur_gpt->counter);
+
+}
diff --git a/arch/arm/cpu/armv7/mx5/u-boot.lds b/arch/arm/cpu/armv7/mx5/u-boot.lds
new file mode 100644 (file)
index 0000000..55d6599
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * January 2004 - Changed to support H4 device
+ * Copyright (c) 2004 Texas Instruments
+ *
+ * (C) Copyright 2002
+ * Gary Jennejohn, DENX Software Engineering, <gj@denx.de>
+ *
+ * (C) Copyright 2009 Freescale Semiconductor, Inc.
+ *
+ * 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_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
+OUTPUT_ARCH(arm)
+ENTRY(_start)
+SECTIONS
+{
+       . = 0x00000000;
+
+       . = ALIGN(4);
+       .text      :
+       {
+         arch/arm/cpu/armv7/start.o
+         *(.text)
+       }
+
+       . = ALIGN(4);
+       .rodata : { *(.rodata) }
+
+       . = ALIGN(4);
+       .data : {
+               *(.data)
+       __datarel_start = .;
+               *(.data.rel)
+       __datarelrolocal_start = .;
+               *(.data.rel.ro.local)
+       __datarellocal_start = .;
+               *(.data.rel.local)
+       __datarelro_start = .;
+               *(.data.rel.ro)
+       }
+
+       __got_start = .;
+       . = ALIGN(4);
+       .got : { *(.got) }
+       __got_end = .;
+
+       . = .;
+       __u_boot_cmd_start = .;
+       .u_boot_cmd : { *(.u_boot_cmd) }
+       __u_boot_cmd_end = .;
+
+       . = ALIGN(4);
+       __bss_start = .;
+       .bss : { *(.bss) }
+       _end = .;
+}
diff --git a/arch/arm/cpu/armv7/mx51/Makefile b/arch/arm/cpu/armv7/mx51/Makefile
deleted file mode 100644 (file)
index 7cfaa2c..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# (C) Copyright 2000-2006
-# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-#
-# (C) Copyright 2009 Freescale Semiconductor, Inc.
-#
-# 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
-
-COBJS  = soc.o clock.o iomux.o timer.o speed.o
-SOBJS = lowlevel_init.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/arch/arm/cpu/armv7/mx51/clock.c b/arch/arm/cpu/armv7/mx51/clock.c
deleted file mode 100644 (file)
index a27227d..0000000
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
- * (C) Copyright 2007
- * Sascha Hauer, Pengutronix
- *
- * (C) Copyright 2009 Freescale Semiconductor, Inc.
- *
- * 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/io.h>
-#include <asm/errno.h>
-#include <asm/arch/imx-regs.h>
-#include <asm/arch/crm_regs.h>
-#include <asm/arch/clock.h>
-
-enum pll_clocks {
-       PLL1_CLOCK = 0,
-       PLL2_CLOCK,
-       PLL3_CLOCK,
-       PLL_CLOCKS,
-};
-
-struct mxc_pll_reg *mxc_plls[PLL_CLOCKS] = {
-       [PLL1_CLOCK] = (struct mxc_pll_reg *)PLL1_BASE_ADDR,
-       [PLL2_CLOCK] = (struct mxc_pll_reg *)PLL2_BASE_ADDR,
-       [PLL3_CLOCK] = (struct mxc_pll_reg *)PLL3_BASE_ADDR,
-};
-
-struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)MXC_CCM_BASE;
-
-/*
- * Calculate the frequency of this pll.
- */
-static u32 decode_pll(struct mxc_pll_reg *pll, u32 infreq)
-{
-       u32 mfi, mfn, mfd, pd;
-
-       mfn = __raw_readl(&pll->mfn);
-       mfd = __raw_readl(&pll->mfd) + 1;
-       mfi = __raw_readl(&pll->op);
-       pd = (mfi  & 0xF) + 1;
-       mfi = (mfi >> 4) & 0xF;
-       mfi = (mfi >= 5) ? mfi : 5;
-
-       return ((4 * (infreq / 1000) * (mfi * mfd + mfn)) / (mfd * pd)) * 1000;
-}
-
-/*
- * Get mcu main rate
- */
-u32 get_mcu_main_clk(void)
-{
-       u32 reg, freq;
-
-       reg = (__raw_readl(&mxc_ccm->cacrr) & MXC_CCM_CACRR_ARM_PODF_MASK) >>
-               MXC_CCM_CACRR_ARM_PODF_OFFSET;
-       freq = decode_pll(mxc_plls[PLL1_CLOCK], CONFIG_MX51_HCLK_FREQ);
-       return freq / (reg + 1);
-}
-
-/*
- * Get the rate of peripheral's root clock.
- */
-static u32 get_periph_clk(void)
-{
-       u32 reg;
-
-       reg = __raw_readl(&mxc_ccm->cbcdr);
-       if (!(reg & MXC_CCM_CBCDR_PERIPH_CLK_SEL))
-               return decode_pll(mxc_plls[PLL2_CLOCK], CONFIG_MX51_HCLK_FREQ);
-       reg = __raw_readl(&mxc_ccm->cbcmr);
-       switch ((reg & MXC_CCM_CBCMR_PERIPH_CLK_SEL_MASK) >>
-               MXC_CCM_CBCMR_PERIPH_CLK_SEL_OFFSET) {
-       case 0:
-               return decode_pll(mxc_plls[PLL1_CLOCK], CONFIG_MX51_HCLK_FREQ);
-       case 1:
-               return decode_pll(mxc_plls[PLL3_CLOCK], CONFIG_MX51_HCLK_FREQ);
-       default:
-               return 0;
-       }
-       /* NOTREACHED */
-}
-
-/*
- * Get the rate of ipg clock.
- */
-static u32 get_ipg_clk(void)
-{
-       u32 ahb_podf, ipg_podf;
-
-       ahb_podf = __raw_readl(&mxc_ccm->cbcdr);
-       ipg_podf = (ahb_podf & MXC_CCM_CBCDR_IPG_PODF_MASK) >>
-                       MXC_CCM_CBCDR_IPG_PODF_OFFSET;
-       ahb_podf = (ahb_podf & MXC_CCM_CBCDR_AHB_PODF_MASK) >>
-                       MXC_CCM_CBCDR_AHB_PODF_OFFSET;
-       return get_periph_clk() / ((ahb_podf + 1) * (ipg_podf + 1));
-}
-
-/*
- * Get the rate of ipg_per clock.
- */
-static u32 get_ipg_per_clk(void)
-{
-       u32 pred1, pred2, podf;
-
-       if (__raw_readl(&mxc_ccm->cbcmr) & MXC_CCM_CBCMR_PERCLK_IPG_CLK_SEL)
-               return get_ipg_clk();
-       /* Fixme: not handle what about lpm*/
-       podf = __raw_readl(&mxc_ccm->cbcdr);
-       pred1 = (podf & MXC_CCM_CBCDR_PERCLK_PRED1_MASK) >>
-               MXC_CCM_CBCDR_PERCLK_PRED1_OFFSET;
-       pred2 = (podf & MXC_CCM_CBCDR_PERCLK_PRED2_MASK) >>
-               MXC_CCM_CBCDR_PERCLK_PRED2_OFFSET;
-       podf = (podf & MXC_CCM_CBCDR_PERCLK_PODF_MASK) >>
-               MXC_CCM_CBCDR_PERCLK_PODF_OFFSET;
-
-       return get_periph_clk() / ((pred1 + 1) * (pred2 + 1) * (podf + 1));
-}
-
-/*
- * Get the rate of uart clk.
- */
-static u32 get_uart_clk(void)
-{
-       unsigned int freq, reg, pred, podf;
-
-       reg = __raw_readl(&mxc_ccm->cscmr1);
-       switch ((reg & MXC_CCM_CSCMR1_UART_CLK_SEL_MASK) >>
-               MXC_CCM_CSCMR1_UART_CLK_SEL_OFFSET) {
-       case 0x0:
-               freq = decode_pll(mxc_plls[PLL1_CLOCK],
-                                   CONFIG_MX51_HCLK_FREQ);
-               break;
-       case 0x1:
-               freq = decode_pll(mxc_plls[PLL2_CLOCK],
-                                   CONFIG_MX51_HCLK_FREQ);
-               break;
-       case 0x2:
-               freq = decode_pll(mxc_plls[PLL3_CLOCK],
-                                   CONFIG_MX51_HCLK_FREQ);
-               break;
-       default:
-               return 66500000;
-       }
-
-       reg = __raw_readl(&mxc_ccm->cscdr1);
-
-       pred = (reg & MXC_CCM_CSCDR1_UART_CLK_PRED_MASK) >>
-               MXC_CCM_CSCDR1_UART_CLK_PRED_OFFSET;
-
-       podf = (reg & MXC_CCM_CSCDR1_UART_CLK_PODF_MASK) >>
-               MXC_CCM_CSCDR1_UART_CLK_PODF_OFFSET;
-       freq /= (pred + 1) * (podf + 1);
-
-       return freq;
-}
-
-/*
- * This function returns the low power audio clock.
- */
-u32 get_lp_apm(void)
-{
-       u32 ret_val = 0;
-       u32 ccsr = __raw_readl(&mxc_ccm->ccsr);
-
-       if (((ccsr >> 9) & 1) == 0)
-               ret_val = CONFIG_MX51_HCLK_FREQ;
-       else
-               ret_val = ((32768 * 1024));
-
-       return ret_val;
-}
-
-/*
- * get cspi clock rate.
- */
-u32 imx_get_cspiclk(void)
-{
-       u32 ret_val = 0, pdf, pre_pdf, clk_sel;
-       u32 cscmr1 = __raw_readl(&mxc_ccm->cscmr1);
-       u32 cscdr2 = __raw_readl(&mxc_ccm->cscdr2);
-
-       pre_pdf = (cscdr2 & MXC_CCM_CSCDR2_CSPI_CLK_PRED_MASK) \
-                       >> MXC_CCM_CSCDR2_CSPI_CLK_PRED_OFFSET;
-       pdf = (cscdr2 & MXC_CCM_CSCDR2_CSPI_CLK_PODF_MASK) \
-                       >> MXC_CCM_CSCDR2_CSPI_CLK_PODF_OFFSET;
-       clk_sel = (cscmr1 & MXC_CCM_CSCMR1_CSPI_CLK_SEL_MASK) \
-                       >> MXC_CCM_CSCMR1_CSPI_CLK_SEL_OFFSET;
-
-       switch (clk_sel) {
-       case 0:
-               ret_val = decode_pll(mxc_plls[PLL1_CLOCK],
-                                       CONFIG_MX51_HCLK_FREQ) /
-                                       ((pre_pdf + 1) * (pdf + 1));
-               break;
-       case 1:
-               ret_val = decode_pll(mxc_plls[PLL2_CLOCK],
-                                       CONFIG_MX51_HCLK_FREQ) /
-                                       ((pre_pdf + 1) * (pdf + 1));
-               break;
-       case 2:
-               ret_val = decode_pll(mxc_plls[PLL3_CLOCK],
-                                       CONFIG_MX51_HCLK_FREQ) /
-                                       ((pre_pdf + 1) * (pdf + 1));
-               break;
-       default:
-               ret_val = get_lp_apm() / ((pre_pdf + 1) * (pdf + 1));
-               break;
-       }
-
-       return ret_val;
-}
-
-/*
- * The API of get mxc clockes.
- */
-unsigned int mxc_get_clock(enum mxc_clock clk)
-{
-       switch (clk) {
-       case MXC_ARM_CLK:
-               return get_mcu_main_clk();
-       case MXC_AHB_CLK:
-               break;
-       case MXC_IPG_CLK:
-               return get_ipg_clk();
-       case MXC_IPG_PERCLK:
-               return get_ipg_per_clk();
-       case MXC_UART_CLK:
-               return get_uart_clk();
-       case MXC_CSPI_CLK:
-               return imx_get_cspiclk();
-       case MXC_FEC_CLK:
-               return decode_pll(mxc_plls[PLL1_CLOCK],
-                                   CONFIG_MX51_HCLK_FREQ);
-       default:
-               break;
-       }
-       return -1;
-}
-
-u32 imx_get_uartclk(void)
-{
-       return get_uart_clk();
-}
-
-
-u32 imx_get_fecclk(void)
-{
-       return mxc_get_clock(MXC_IPG_CLK);
-}
-
-/*
- * Dump some core clockes.
- */
-int do_mx51_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
-{
-       u32 freq;
-
-       freq = decode_pll(mxc_plls[PLL1_CLOCK], CONFIG_MX51_HCLK_FREQ);
-       printf("mx51 pll1: %dMHz\n", freq / 1000000);
-       freq = decode_pll(mxc_plls[PLL2_CLOCK], CONFIG_MX51_HCLK_FREQ);
-       printf("mx51 pll2: %dMHz\n", freq / 1000000);
-       freq = decode_pll(mxc_plls[PLL3_CLOCK], CONFIG_MX51_HCLK_FREQ);
-       printf("mx51 pll3: %dMHz\n", freq / 1000000);
-       printf("ipg clock     : %dHz\n", mxc_get_clock(MXC_IPG_CLK));
-       printf("ipg per clock : %dHz\n", mxc_get_clock(MXC_IPG_PERCLK));
-
-       return 0;
-}
-
-/***************************************************/
-
-U_BOOT_CMD(
-       clockinfo,      CONFIG_SYS_MAXARGS,     1,      do_mx51_showclocks,
-       "display mx51 clocks\n",
-       ""
-);
diff --git a/arch/arm/cpu/armv7/mx51/iomux.c b/arch/arm/cpu/armv7/mx51/iomux.c
deleted file mode 100644 (file)
index 62b2954..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * (C) Copyright 2009 Freescale Semiconductor, Inc.
- *
- * 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/io.h>
-#include <asm/arch/imx-regs.h>
-#include <asm/arch/mx51_pins.h>
-#include <asm/arch/iomux.h>
-#include <asm/arch/sys_proto.h>
-
-/* IOMUX register (base) addresses */
-enum iomux_reg_addr {
-       IOMUXGPR0 = IOMUXC_BASE_ADDR,
-       IOMUXGPR1 = IOMUXC_BASE_ADDR + 0x004,
-       IOMUXSW_MUX_CTL = IOMUXC_BASE_ADDR,
-       IOMUXSW_MUX_END = IOMUXC_BASE_ADDR + MUX_I_END,
-       IOMUXSW_PAD_CTL = IOMUXC_BASE_ADDR + PAD_I_START,
-       IOMUXSW_INPUT_CTL = IOMUXC_BASE_ADDR,
-};
-
-#define MUX_PIN_NUM_MAX (((MUX_I_END - MUX_I_START) >> 2) + 1)
-
-/* Get the iomux register address of this pin */
-static inline u32 get_mux_reg(iomux_pin_name_t pin)
-{
-       u32 mux_reg = PIN_TO_IOMUX_MUX(pin);
-
-       if (is_soc_rev(CHIP_REV_2_0) < 0) {
-               /*
-                * Fixup register address:
-                *      i.MX51 TO1 has offset with the register
-                *      which is define as TO2.
-                */
-               if ((pin == MX51_PIN_NANDF_RB5) ||
-                       (pin == MX51_PIN_NANDF_RB6) ||
-                       (pin == MX51_PIN_NANDF_RB7))
-                       ; /* Do nothing */
-               else if (mux_reg >= 0x2FC)
-                       mux_reg += 8;
-               else if (mux_reg >= 0x130)
-                       mux_reg += 0xC;
-       }
-       mux_reg += IOMUXSW_MUX_CTL;
-       return mux_reg;
-}
-
-/* Get the pad register address of this pin */
-static inline u32 get_pad_reg(iomux_pin_name_t pin)
-{
-       u32 pad_reg = PIN_TO_IOMUX_PAD(pin);
-
-       if (is_soc_rev(CHIP_REV_2_0) < 0) {
-               /*
-                * Fixup register address:
-                *      i.MX51 TO1 has offset with the register
-                *      which is define as TO2.
-                */
-               if ((pin == MX51_PIN_NANDF_RB5) ||
-                       (pin == MX51_PIN_NANDF_RB6) ||
-                       (pin == MX51_PIN_NANDF_RB7))
-                       ; /* Do nothing */
-               else if (pad_reg == 0x4D0 - PAD_I_START)
-                       pad_reg += 0x4C;
-               else if (pad_reg == 0x860 - PAD_I_START)
-                       pad_reg += 0x9C;
-               else if (pad_reg >= 0x804 - PAD_I_START)
-                       pad_reg += 0xB0;
-               else if (pad_reg >= 0x7FC - PAD_I_START)
-                       pad_reg += 0xB4;
-               else if (pad_reg >= 0x4E4 - PAD_I_START)
-                       pad_reg += 0xCC;
-               else
-                       pad_reg += 8;
-       }
-       pad_reg += IOMUXSW_PAD_CTL;
-       return pad_reg;
-}
-
-/* Get the last iomux register address */
-static inline u32 get_mux_end(void)
-{
-       if (is_soc_rev(CHIP_REV_2_0) < 0)
-               return IOMUXC_BASE_ADDR + (0x3F8 - 4);
-       else
-               return IOMUXC_BASE_ADDR + (0x3F0 - 4);
-}
-
-/*
- * This function is used to configure a pin through the IOMUX module.
- * @param  pin         a pin number as defined in iomux_pin_name_t
- * @param  cfg         an output function as defined in iomux_pin_cfg_t
- *
- * @return             0 if successful; Non-zero otherwise
- */
-static void iomux_config_mux(iomux_pin_name_t pin, iomux_pin_cfg_t cfg)
-{
-       u32 mux_reg = get_mux_reg(pin);
-
-       if ((mux_reg > get_mux_end()) || (mux_reg < IOMUXSW_MUX_CTL))
-               return ;
-       if (cfg == IOMUX_CONFIG_GPIO)
-               writel(PIN_TO_ALT_GPIO(pin), mux_reg);
-       else
-               writel(cfg, mux_reg);
-}
-
-/*
- * Request ownership for an IO pin. This function has to be the first one
- * being called before that pin is used. The caller has to check the
- * return value to make sure it returns 0.
- *
- * @param  pin         a name defined by iomux_pin_name_t
- * @param  cfg         an input function as defined in iomux_pin_cfg_t
- *
- */
-void mxc_request_iomux(iomux_pin_name_t pin, iomux_pin_cfg_t cfg)
-{
-       iomux_config_mux(pin, cfg);
-}
-
-/*
- * Release ownership for an IO pin
- *
- * @param  pin         a name defined by iomux_pin_name_t
- * @param  cfg         an input function as defined in iomux_pin_cfg_t
- */
-void mxc_free_iomux(iomux_pin_name_t pin, iomux_pin_cfg_t cfg)
-{
-}
-
-/*
- * This function configures the pad value for a IOMUX pin.
- *
- * @param  pin     a pin number as defined in iomux_pin_name_t
- * @param  config  the ORed value of elements defined in iomux_pad_config_t
- */
-void mxc_iomux_set_pad(iomux_pin_name_t pin, u32 config)
-{
-       u32 pad_reg = get_pad_reg(pin);
-       writel(config, pad_reg);
-}
-
-unsigned int mxc_iomux_get_pad(iomux_pin_name_t pin)
-{
-       u32 pad_reg = get_pad_reg(pin);
-       return readl(pad_reg);
-}
diff --git a/arch/arm/cpu/armv7/mx51/lowlevel_init.S b/arch/arm/cpu/armv7/mx51/lowlevel_init.S
deleted file mode 100644 (file)
index 783c81f..0000000
+++ /dev/null
@@ -1,291 +0,0 @@
-/*
- * Copyright (C) 2007, Guennadi Liakhovetski <lg@denx.de>
- *
- * (C) Copyright 2009 Freescale Semiconductor, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include <config.h>
-#include <asm/arch/imx-regs.h>
-#include <asm/arch/asm-offsets.h>
-
-/*
- * L2CC Cache setup/invalidation/disable
- */
-.macro init_l2cc
-       /* explicitly disable L2 cache */
-       mrc 15, 0, r0, c1, c0, 1
-       bic r0, r0, #0x2
-       mcr 15, 0, r0, c1, c0, 1
-
-       /* reconfigure L2 cache aux control reg */
-       mov r0, #0xC0                   /* tag RAM */
-       add r0, r0, #0x4                /* data RAM */
-       orr r0, r0, #(1 << 24)          /* disable write allocate delay */
-       orr r0, r0, #(1 << 23)          /* disable write allocate combine */
-       orr r0, r0, #(1 << 22)          /* disable write allocate */
-
-       cmp r3, #0x10    /* r3 contains the silicon rev */
-
-       /* disable write combine for TO 2 and lower revs */
-       orrls r0, r0, #(1 << 25)
-
-       mcr 15, 1, r0, c9, c0, 2
-.endm /* init_l2cc */
-
-/* AIPS setup - Only setup MPROTx registers.
- * The PACR default values are good.*/
-.macro init_aips
-       /*
-        * Set all MPROTx to be non-bufferable, trusted for R/W,
-        * not forced to user-mode.
-        */
-       ldr r0, =AIPS1_BASE_ADDR
-       ldr r1, =0x77777777
-       str r1, [r0, #0x0]
-       str r1, [r0, #0x4]
-       ldr r0, =AIPS2_BASE_ADDR
-       str r1, [r0, #0x0]
-       str r1, [r0, #0x4]
-       /*
-        * Clear the on and off peripheral modules Supervisor Protect bit
-        * for SDMA to access them. Did not change the AIPS control registers
-        * (offset 0x20) access type
-        */
-.endm /* init_aips */
-
-/* M4IF setup */
-.macro init_m4if
-       /* VPU and IPU given higher priority (0x4)
-        * IPU accesses with ID=0x1 given highest priority (=0xA)
-        */
-       ldr r0, =M4IF_BASE_ADDR
-
-       ldr r1, =0x00000203
-       str r1, [r0, #0x40]
-
-       ldr r1, =0x0
-       str r1, [r0, #0x44]
-
-       ldr r1, =0x00120125
-       str r1, [r0, #0x9C]
-
-       ldr r1, =0x001901A3
-       str r1, [r0, #0x48]
-
-.endm /* init_m4if */
-
-.macro setup_pll pll, freq
-       ldr r2, =\pll
-       ldr r1, =0x00001232
-       str r1, [r2, #PLL_DP_CTL] /* Set DPLL ON (set UPEN bit): BRMO=1 */
-       mov r1, #0x2
-       str r1, [r2, #PLL_DP_CONFIG] /* Enable auto-restart AREN bit */
-
-       str r3, [r2, #PLL_DP_OP]
-       str r3, [r2, #PLL_DP_HFS_OP]
-
-       str r4, [r2, #PLL_DP_MFD]
-       str r4, [r2, #PLL_DP_HFS_MFD]
-
-       str r5, [r2, #PLL_DP_MFN]
-       str r5, [r2, #PLL_DP_HFS_MFN]
-
-       ldr r1, =0x00001232
-       str r1, [r2, #PLL_DP_CTL]
-1:     ldr r1, [r2, #PLL_DP_CTL]
-       ands r1, r1, #0x1
-       beq 1b
-.endm
-
-.macro init_clock
-       ldr r0, =CCM_BASE_ADDR
-
-       /* Gate of clocks to the peripherals first */
-       ldr r1, =0x3FFFFFFF
-       str r1, [r0, #CLKCTL_CCGR0]
-       ldr r1, =0x0
-       str r1, [r0, #CLKCTL_CCGR1]
-       str r1, [r0, #CLKCTL_CCGR2]
-       str r1, [r0, #CLKCTL_CCGR3]
-
-       ldr r1, =0x00030000
-       str r1, [r0, #CLKCTL_CCGR4]
-       ldr r1, =0x00FFF030
-       str r1, [r0, #CLKCTL_CCGR5]
-       ldr r1, =0x00000300
-       str r1, [r0, #CLKCTL_CCGR6]
-
-       /* Disable IPU and HSC dividers */
-       mov r1, #0x60000
-       str r1, [r0, #CLKCTL_CCDR]
-
-       /* Make sure to switch the DDR away from PLL 1 */
-       ldr r1, =0x19239145
-       str r1, [r0, #CLKCTL_CBCDR]
-       /* make sure divider effective */
-1:     ldr r1, [r0, #CLKCTL_CDHIPR]
-       cmp r1, #0x0
-       bne 1b
-
-       /* Switch ARM to step clock */
-       mov r1, #0x4
-       str r1, [r0, #CLKCTL_CCSR]
-       mov r3, #DP_OP_800
-       mov r4, #DP_MFD_800
-       mov r5, #DP_MFN_800
-       setup_pll PLL1_BASE_ADDR
-
-       mov r3, #DP_OP_665
-       mov r4, #DP_MFD_665
-       mov r5, #DP_MFN_665
-       setup_pll PLL3_BASE_ADDR
-
-       /* Switch peripheral to PLL 3 */
-       ldr r0, =CCM_BASE_ADDR
-       ldr r1, =0x000010C0
-       orr r1,r1,#CONFIG_SYS_DDR_CLKSEL
-       str r1, [r0, #CLKCTL_CBCMR]
-       ldr r1, =0x13239145
-       str r1, [r0, #CLKCTL_CBCDR]
-       mov r3, #DP_OP_665
-       mov r4, #DP_MFD_665
-       mov r5, #DP_MFN_665
-       setup_pll PLL2_BASE_ADDR
-
-       /* Switch peripheral to PLL2 */
-       ldr r0, =CCM_BASE_ADDR
-       ldr r1, =0x19239145
-       str r1, [r0, #CLKCTL_CBCDR]
-       ldr r1, =0x000020C0
-       orr r1,r1,#CONFIG_SYS_DDR_CLKSEL
-       str r1, [r0, #CLKCTL_CBCMR]
-
-       mov r3, #DP_OP_216
-       mov r4, #DP_MFD_216
-       mov r5, #DP_MFN_216
-       setup_pll PLL3_BASE_ADDR
-
-
-       /* Set the platform clock dividers */
-       ldr r0, =ARM_BASE_ADDR
-       ldr r1, =0x00000725
-       str r1, [r0, #0x14]
-
-       ldr r0, =CCM_BASE_ADDR
-
-       /* Run 3.0 at Full speed, for other TO's wait till we increase VDDGP */
-       ldr r1, =0x0
-       ldr r3, [r1, #ROM_SI_REV]
-       cmp r3, #0x10
-       movls r1, #0x1
-       movhi r1, #0
-       str r1, [r0, #CLKCTL_CACRR]
-
-       /* Switch ARM back to PLL 1 */
-       mov r1, #0
-       str r1, [r0, #CLKCTL_CCSR]
-
-       /* setup the rest */
-       /* Use lp_apm (24MHz) source for perclk */
-       ldr r1, =0x000020C2
-       orr r1,r1,#CONFIG_SYS_DDR_CLKSEL
-       str r1, [r0, #CLKCTL_CBCMR]
-       /* ddr clock from PLL 1, all perclk dividers are 1 since using 24MHz */
-       ldr r1, =CONFIG_SYS_CLKTL_CBCDR
-       str r1, [r0, #CLKCTL_CBCDR]
-
-       /* Restore the default values in the Gate registers */
-       ldr r1, =0xFFFFFFFF
-       str r1, [r0, #CLKCTL_CCGR0]
-       str r1, [r0, #CLKCTL_CCGR1]
-       str r1, [r0, #CLKCTL_CCGR2]
-       str r1, [r0, #CLKCTL_CCGR3]
-       str r1, [r0, #CLKCTL_CCGR4]
-       str r1, [r0, #CLKCTL_CCGR5]
-       str r1, [r0, #CLKCTL_CCGR6]
-
-       /* Use PLL 2 for UART's, get 66.5MHz from it */
-       ldr r1, =0xA5A2A020
-       str r1, [r0, #CLKCTL_CSCMR1]
-       ldr r1, =0x00C30321
-       str r1, [r0, #CLKCTL_CSCDR1]
-
-       /* make sure divider effective */
-1:     ldr r1, [r0, #CLKCTL_CDHIPR]
-       cmp r1, #0x0
-       bne 1b
-
-       mov r1, #0x0
-       str r1, [r0, #CLKCTL_CCDR]
-
-       /* for cko - for ARM div by 8 */
-       mov r1, #0x000A0000
-       add r1, r1, #0x00000F0
-       str r1, [r0, #CLKCTL_CCOSR]
-.endm
-
-.macro setup_wdog
-       ldr r0, =WDOG1_BASE_ADDR
-       mov r1, #0x30
-       strh r1, [r0]
-.endm
-
-.section ".text.init", "x"
-
-.globl lowlevel_init
-lowlevel_init:
-       ldr r0, =GPIO1_BASE_ADDR
-       ldr r1, [r0, #0x0]
-       orr r1, r1, #(1 << 23)
-       str r1, [r0, #0x0]
-       ldr r1, [r0, #0x4]
-       orr r1, r1, #(1 << 23)
-       str r1, [r0, #0x4]
-
-#ifdef ENABLE_IMPRECISE_ABORT
-       mrs r1, spsr            /* save old spsr */
-       mrs r0, cpsr            /* read out the cpsr */
-       bic r0, r0, #0x100      /* clear the A bit */
-       msr spsr, r0            /* update spsr */
-       add lr, pc, #0x8        /* update lr */
-       movs pc, lr             /* update cpsr */
-       nop
-       nop
-       nop
-       nop
-       msr spsr, r1            /* restore old spsr */
-#endif
-
-       init_l2cc
-
-       init_aips
-
-       init_m4if
-
-       init_clock
-
-       /* r12 saved upper lr*/
-       mov pc,lr
-
-/* Board level setting value */
-DDR_PERCHARGE_CMD:     .word 0x04008008
-DDR_REFRESH_CMD:       .word 0x00008010
-DDR_LMR1_W:            .word 0x00338018
-DDR_LMR_CMD:           .word 0xB2220000
-DDR_TIMING_W:          .word 0xB02567A9
-DDR_MISC_W:            .word 0x000A0104
diff --git a/arch/arm/cpu/armv7/mx51/soc.c b/arch/arm/cpu/armv7/mx51/soc.c
deleted file mode 100644 (file)
index f22ebe9..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * (C) Copyright 2007
- * Sascha Hauer, Pengutronix
- *
- * (C) Copyright 2009 Freescale Semiconductor, Inc.
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include <common.h>
-#include <asm/arch/imx-regs.h>
-#include <asm/arch/clock.h>
-#include <asm/errno.h>
-#include <asm/io.h>
-
-#ifdef CONFIG_FSL_ESDHC
-#include <fsl_esdhc.h>
-#endif
-
-u32 get_cpu_rev(void)
-{
-       int reg;
-       int system_rev;
-
-       reg = __raw_readl(ROM_SI_REV);
-       switch (reg) {
-       case 0x02:
-               system_rev = 0x51000 | CHIP_REV_1_1;
-               break;
-       case 0x10:
-               if ((__raw_readl(GPIO1_BASE_ADDR + 0x0) & (0x1 << 22)) == 0)
-                       system_rev = 0x51000 | CHIP_REV_2_5;
-               else
-                       system_rev = 0x51000 | CHIP_REV_2_0;
-               break;
-       case 0x20:
-               system_rev = 0x51000 | CHIP_REV_3_0;
-               break;
-       return system_rev;
-       default:
-               system_rev = 0x51000 | CHIP_REV_1_0;
-               break;
-       }
-       return system_rev;
-}
-
-
-#if defined(CONFIG_DISPLAY_CPUINFO)
-int print_cpuinfo(void)
-{
-       u32 cpurev;
-
-       cpurev = get_cpu_rev();
-       printf("CPU:   Freescale i.MX51 family rev%d.%d at %d MHz\n",
-               (cpurev & 0xF0) >> 4,
-               (cpurev & 0x0F) >> 4,
-               mxc_get_clock(MXC_ARM_CLK) / 1000000);
-       return 0;
-}
-#endif
-
-/*
- * Initializes on-chip ethernet controllers.
- * to override, implement board_eth_init()
- */
-#if defined(CONFIG_FEC_MXC)
-extern int fecmxc_initialize(bd_t *bis);
-#endif
-
-int cpu_eth_init(bd_t *bis)
-{
-       int rc = -ENODEV;
-
-#if defined(CONFIG_FEC_MXC)
-       rc = fecmxc_initialize(bis);
-#endif
-
-       return rc;
-}
-
-/*
- * Initializes on-chip MMC controllers.
- * to override, implement board_mmc_init()
- */
-int cpu_mmc_init(bd_t *bis)
-{
-#ifdef CONFIG_FSL_ESDHC
-       return fsl_esdhc_mmc_init(bis);
-#else
-       return 0;
-#endif
-}
-
-
-void reset_cpu(ulong addr)
-{
-       __raw_writew(4, WDOG1_BASE_ADDR);
-}
diff --git a/arch/arm/cpu/armv7/mx51/speed.c b/arch/arm/cpu/armv7/mx51/speed.c
deleted file mode 100644 (file)
index a444def..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * (C) Copyright 2000-2003
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * Copyright (C) 2004-2007 Freescale Semiconductor, Inc.
- * TsiChung Liew (Tsi-Chung.Liew@freescale.com)
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include <common.h>
-#include <asm/arch/imx-regs.h>
-#include <asm/arch/clock.h>
-
-int get_clocks(void)
-{
-       DECLARE_GLOBAL_DATA_PTR;
-
-#ifdef CONFIG_FSL_ESDHC
-       gd->sdhc_clk = mxc_get_clock(MXC_IPG_PERCLK);
-#endif
-       return 0;
-}
diff --git a/arch/arm/cpu/armv7/mx51/timer.c b/arch/arm/cpu/armv7/mx51/timer.c
deleted file mode 100644 (file)
index 110edbf..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * (C) Copyright 2007
- * Sascha Hauer, Pengutronix
- *
- * (C) Copyright 2009 Freescale Semiconductor, Inc.
- *
- * 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/io.h>
-#include <asm/arch/imx-regs.h>
-
-/* General purpose timers registers */
-struct mxc_gpt {
-       unsigned int control;
-       unsigned int prescaler;
-       unsigned int status;
-       unsigned int nouse[6];
-       unsigned int counter;
-};
-
-static struct mxc_gpt *cur_gpt = (struct mxc_gpt *)GPT1_BASE_ADDR;
-
-/* General purpose timers bitfields */
-#define GPTCR_SWR       (1<<15)        /* Software reset */
-#define GPTCR_FRR       (1<<9) /* Freerun / restart */
-#define GPTCR_CLKSOURCE_32 (4<<6)      /* Clock source */
-#define GPTCR_TEN       (1)    /* Timer enable */
-
-static ulong timestamp;
-static ulong lastinc;
-
-int timer_init(void)
-{
-       int i;
-
-       /* setup GP Timer 1 */
-       __raw_writel(GPTCR_SWR, &cur_gpt->control);
-
-       /* We have no udelay by now */
-       for (i = 0; i < 100; i++)
-               __raw_writel(0, &cur_gpt->control);
-
-       __raw_writel(0, &cur_gpt->prescaler); /* 32Khz */
-
-       /* Freerun Mode, PERCLK1 input */
-       i = __raw_readl(&cur_gpt->control);
-       __raw_writel(i | GPTCR_CLKSOURCE_32 | GPTCR_TEN, &cur_gpt->control);
-       reset_timer_masked();
-       return 0;
-}
-
-void reset_timer(void)
-{
-       reset_timer_masked();
-}
-
-void reset_timer_masked(void)
-{
-       ulong val = __raw_readl(&cur_gpt->counter);
-       lastinc = val / (CONFIG_MX51_CLK32 / CONFIG_SYS_HZ);
-       timestamp = 0;
-}
-
-ulong get_timer_masked(void)
-{
-       ulong val = __raw_readl(&cur_gpt->counter);
-       val /= (CONFIG_MX51_CLK32 / CONFIG_SYS_HZ);
-       if (val >= lastinc)
-               timestamp += (val - lastinc);
-       else
-               timestamp += ((0xFFFFFFFF / (CONFIG_MX51_CLK32 / CONFIG_SYS_HZ))
-                               - lastinc) + val;
-       lastinc = val;
-       return timestamp;
-}
-
-ulong get_timer(ulong base)
-{
-       return get_timer_masked() - base;
-}
-
-void set_timer(ulong t)
-{
-       timestamp = t;
-}
-
-/* delay x useconds AND preserve advance timestamp value */
-void __udelay(unsigned long usec)
-{
-       unsigned long now, start, tmo;
-       tmo = usec * (CONFIG_MX51_CLK32 / 1000) / 1000;
-
-       if (!tmo)
-               tmo = 1;
-
-       now = start = readl(&cur_gpt->counter);
-
-       while ((now - start) < tmo)
-               now = readl(&cur_gpt->counter);
-
-}
diff --git a/arch/arm/cpu/armv7/mx51/u-boot.lds b/arch/arm/cpu/armv7/mx51/u-boot.lds
deleted file mode 100644 (file)
index 55d6599..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * January 2004 - Changed to support H4 device
- * Copyright (c) 2004 Texas Instruments
- *
- * (C) Copyright 2002
- * Gary Jennejohn, DENX Software Engineering, <gj@denx.de>
- *
- * (C) Copyright 2009 Freescale Semiconductor, Inc.
- *
- * 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_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
-OUTPUT_ARCH(arm)
-ENTRY(_start)
-SECTIONS
-{
-       . = 0x00000000;
-
-       . = ALIGN(4);
-       .text      :
-       {
-         arch/arm/cpu/armv7/start.o
-         *(.text)
-       }
-
-       . = ALIGN(4);
-       .rodata : { *(.rodata) }
-
-       . = ALIGN(4);
-       .data : {
-               *(.data)
-       __datarel_start = .;
-               *(.data.rel)
-       __datarelrolocal_start = .;
-               *(.data.rel.ro.local)
-       __datarellocal_start = .;
-               *(.data.rel.local)
-       __datarelro_start = .;
-               *(.data.rel.ro)
-       }
-
-       __got_start = .;
-       . = ALIGN(4);
-       .got : { *(.got) }
-       __got_end = .;
-
-       . = .;
-       __u_boot_cmd_start = .;
-       .u_boot_cmd : { *(.u_boot_cmd) }
-       __u_boot_cmd_end = .;
-
-       . = ALIGN(4);
-       __bss_start = .;
-       .bss : { *(.bss) }
-       _end = .;
-}
index da2cd9001303c1c23e3e7c4ab613dc8bc17a4391..0870857ede4eddd9d63a9783e5aff180ede84dbf 100644 (file)
@@ -136,29 +136,6 @@ void do_emif4_init(void)
  * dram_init -
  *  - Sets uboots idea of sdram size
  */
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-int dram_init(void)
-{
-       DECLARE_GLOBAL_DATA_PTR;
-       unsigned int size0 = 0, size1 = 0;
-
-       size0 = get_sdr_cs_size(CS0);
-       /*
-        * If a second bank of DDR is attached to CS1 this is
-        * where it can be started.  Early init code will init
-        * memory on CS0.
-        */
-       if ((sysinfo.mtype == DDR_COMBO) || (sysinfo.mtype == DDR_STACKED))
-               size1 = get_sdr_cs_size(CS1);
-
-       gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-       gd->bd->bi_dram[0].size = size0;
-       gd->bd->bi_dram[1].start = PHYS_SDRAM_1 + get_sdr_cs_offset(CS1);
-       gd->bd->bi_dram[1].size = size1;
-
-       return 0;
-}
-#else
 int dram_init(void)
 {
        DECLARE_GLOBAL_DATA_PTR;
@@ -190,7 +167,6 @@ void dram_init_banksize (void)
        gd->bd->bi_dram[1].start = PHYS_SDRAM_1 + get_sdr_cs_offset(CS1);
        gd->bd->bi_dram[1].size = size1;
 }
-#endif
 
 /*
  * mem_init() -
index 6c419f5b93dcc8dc7281c868ff600f67e8a8d118..c75aa1d11ca69b44573345b93a7599e284242e10 100644 (file)
@@ -163,33 +163,6 @@ void do_sdrc_init(u32 cs, u32 early)
  * dram_init -
  *  - Sets uboots idea of sdram size
  */
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-int dram_init(void)
-{
-       DECLARE_GLOBAL_DATA_PTR;
-       unsigned int size0 = 0, size1 = 0;
-
-       size0 = get_sdr_cs_size(CS0);
-       /*
-        * If a second bank of DDR is attached to CS1 this is
-        * where it can be started.  Early init code will init
-        * memory on CS0.
-        */
-       if ((sysinfo.mtype == DDR_COMBO) || (sysinfo.mtype == DDR_STACKED)) {
-               do_sdrc_init(CS1, NOT_EARLY);
-               make_cs1_contiguous();
-
-               size1 = get_sdr_cs_size(CS1);
-       }
-
-       gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-       gd->bd->bi_dram[0].size = size0;
-       gd->bd->bi_dram[1].start = PHYS_SDRAM_1 + get_sdr_cs_offset(CS1);
-       gd->bd->bi_dram[1].size = size1;
-
-       return 0;
-}
-#else
 int dram_init(void)
 {
        DECLARE_GLOBAL_DATA_PTR;
@@ -225,7 +198,6 @@ void dram_init_banksize (void)
        gd->bd->bi_dram[1].start = PHYS_SDRAM_1 + get_sdr_cs_offset(CS1);
        gd->bd->bi_dram[1].size = size1;
 }
-#endif
 
 /*
  * mem_init -
index 24a66f5b94637e8d00e81b0ac601c6db74b06be0..e7651d2dd5b5007aa27c95677d8b070b71b5038d 100644 (file)
@@ -102,12 +102,7 @@ int dram_init(void)
 {
        DECLARE_GLOBAL_DATA_PTR;
 
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-       gd->bd->bi_dram[0].start = 0x80000000;
-       gd->bd->bi_dram[0].size = sdram_size();
-#else
        gd->ram_size = sdram_size();
-#endif
 
        return 0;
 }
index 26f335a91613802f00073afe99db81a99753edf5..bb3948d401cc30f34c9e748e53bdbda99ad5cbba 100644 (file)
@@ -29,6 +29,7 @@
  * MA 02111-1307 USA
  */
 
+#include <asm-offsets.h>
 #include <config.h>
 #include <version.h>
 
@@ -69,22 +70,16 @@ _end_vect:
 _TEXT_BASE:
        .word   CONFIG_SYS_TEXT_BASE
 
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-.globl _armboot_start
-_armboot_start:
-       .word _start
-#endif
-
 /*
  * These are defined in the board-specific linker script.
  */
-.globl _bss_start
-_bss_start:
-       .word __bss_start
+.globl _bss_start_ofs
+_bss_start_ofs:
+       .word __bss_start - _start
 
-.globl _bss_end
-_bss_end:
-       .word _end
+.globl _bss_end_ofs
+_bss_end_ofs:
+       .word _end - _start
 
 #ifdef CONFIG_USE_IRQ
 /* IRQ stack memory (calculated at run-time) */
@@ -98,35 +93,34 @@ FIQ_STACK_START:
        .word 0x0badc0de
 #endif
 
-#if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
 /* IRQ stack memory (calculated at run-time) + 8 bytes */
 .globl IRQ_STACK_START_IN
 IRQ_STACK_START_IN:
        .word   0x0badc0de
 
-.globl _datarel_start
-_datarel_start:
-       .word __datarel_start
+.globl _datarel_start_ofs
+_datarel_start_ofs:
+       .word __datarel_start - _start
 
-.globl _datarelrolocal_start
-_datarelrolocal_start:
-       .word __datarelrolocal_start
+.globl _datarelrolocal_start_ofs
+_datarelrolocal_start_ofs:
+       .word __datarelrolocal_start - _start
 
-.globl _datarellocal_start
-_datarellocal_start:
-       .word __datarellocal_start
+.globl _datarellocal_start_ofs
+_datarellocal_start_ofs:
+       .word __datarellocal_start - _start
 
-.globl _datarelro_start
-_datarelro_start:
-       .word __datarelro_start
+.globl _datarelro_start_ofs
+_datarelro_start_ofs:
+       .word __datarelro_start - _start
 
-.globl _got_start
-_got_start:
-       .word __got_start
+.globl _got_start_ofs
+_got_start_ofs:
+       .word __got_start - _start
 
-.globl _got_end
-_got_end:
-       .word __got_end
+.globl _got_end_Ofs
+_got_end_ofs:
+       .word __got_end - _start
 
 /*
  * the actual reset code
@@ -195,12 +189,10 @@ relocate_code:
 stack_setup:
        mov     sp, r4
 
-#ifndef CONFIG_SKIP_RELOCATE_UBOOT
        adr     r0, _start
        ldr     r2, _TEXT_BASE
-       ldr     r3, _bss_start
-       sub     r2, r3, r2              /* r2 <- size of armboot            */
-       add     r2, r0, r2              /* r2 <- source end address         */
+       ldr     r3, _bss_start_ofs
+       add     r2, r0, r3              /* r2 <- source end address         */
        cmp     r0, r6
 #ifndef CONFIG_PRELOADER
        beq     jump_2_ram
@@ -213,33 +205,51 @@ copy_loop:
        blo     copy_loop
 
 #ifndef CONFIG_PRELOADER
-       /* fix got entries */
-       ldr     r1, _TEXT_BASE
-       mov     r0, r7                  /* reloc addr */
-       ldr     r2, _got_start          /* addr in Flash */
-       ldr     r3, _got_end            /* addr in Flash */
-       sub     r3, r3, r1
-       add     r3, r3, r0
-       sub     r2, r2, r1
-       add     r2, r2, r0
-
+       /*
+        * fix .rel.dyn relocations
+        */
+       ldr     r0, _TEXT_BASE          /* r0 <- Text base */
+       sub     r9, r7, r0              /* r9 <- relocation offset */
+       ldr     r10, _dynsym_start_ofs  /* r10 <- sym table ofs */
+       add     r10, r10, r0            /* r10 <- sym table in FLASH */
+       ldr     r2, _rel_dyn_start_ofs  /* r2 <- rel dyn start ofs */
+       add     r2, r2, r0              /* r2 <- rel dyn start in FLASH */
+       ldr     r3, _rel_dyn_end_ofs    /* r3 <- rel dyn end ofs */
+       add     r3, r3, r0              /* r3 <- rel dyn end in FLASH */
 fixloop:
-       ldr     r4, [r2]
-       sub     r4, r4, r1
-       add     r4, r4, r0
-       str     r4, [r2]
-       add     r2, r2, #4
+       ldr     r0, [r2]                /* r0 <- location to fix up, IN FLASH! */
+       add     r0, r0, r9              /* r0 <- location to fix up in RAM */
+       ldr     r1, [r2, #4]
+       and     r8, r1, #0xff
+       cmp     r8, #23                 /* relative fixup? */
+       beq     fixrel
+       cmp     r8, #2                  /* absolute fixup? */
+       beq     fixabs
+       /* ignore unknown type of fixup */
+       b       fixnext
+fixabs:
+       /* absolute fix: set location to (offset) symbol value */
+       mov     r1, r1, LSR #4          /* r1 <- symbol index in .dynsym */
+       add     r1, r10, r1             /* r1 <- address of symbol in table */
+       ldr     r1, [r1, #4]            /* r1 <- symbol value */
+       add     r1, r9                  /* r1 <- relocated sym addr */
+       b       fixnext
+fixrel:
+       /* relative fix: increase location by offset */
+       ldr     r1, [r0]
+       add     r1, r1, r9
+fixnext:
+       str     r1, [r0]
+       add     r2, r2, #8              /* each rel.dyn entry is 8 bytes */
        cmp     r2, r3
-       bne     fixloop
+       blo     fixloop
 
 clear_bss:
-       ldr     r0, _bss_start
-       ldr     r1, _bss_end
+       ldr     r0, _bss_start_ofs
+       ldr     r1, _bss_end_ofs
        ldr     r3, _TEXT_BASE          /* Text base */
        mov     r4, r7                  /* reloc addr */
-       sub     r0, r0, r3
        add     r0, r0, r4
-       sub     r1, r1, r3
        add     r1, r1, r4
        mov     r2, #0x00000000         /* clear                            */
 
@@ -248,112 +258,31 @@ clbss_l:str      r2, [r0]                /* clear loop...                    */
        cmp     r0, r1
        bne     clbss_l
 #endif /* #ifndef CONFIG_PRELOADER */
-#endif /* #ifndef CONFIG_SKIP_RELOCATE_UBOOT */
 
 /*
  * We are done. Do not return, instead branch to second part of board
  * initialization, now running from RAM.
  */
 jump_2_ram:
-       ldr     r0, _TEXT_BASE
-       ldr     r2, _board_init_r
-       sub     r2, r2, r0
-       add     r2, r2, r7      /* position from board_init_r in RAM */
+       ldr     r0, _board_init_r_ofs
+       adr     r1, _start
+       add     lr, r0, r1
+       add     lr, lr, r9
        /* setup parameters for board_init_r */
        mov     r0, r5          /* gd_t */
        mov     r1, r7          /* dest_addr */
        /* jump to it ... */
-       mov     lr, r2
        mov     pc, lr
 
-_board_init_r: .word board_init_r
-#else /* #if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC) */
-/*
- * the actual reset code
- */
+_board_init_r_ofs:
+       .word board_init_r - _start
 
-reset:
-       /*
-        * set the cpu to SVC32 mode
-        */
-       mrs     r0, cpsr
-       bic     r0, r0, #0x1f
-       orr     r0, r0, #0xd3
-       msr     cpsr,r0
-
-#if (CONFIG_OMAP34XX)
-       /* Copy vectors to mask ROM indirect addr */
-       adr     r0, _start              @ r0 <- current position of code
-       add     r0, r0, #4              @ skip reset vector
-       mov     r2, #64                 @ r2 <- size to copy
-       add     r2, r0, r2              @ r2 <- source end address
-       mov     r1, #SRAM_OFFSET0       @ build vect addr
-       mov     r3, #SRAM_OFFSET1
-       add     r1, r1, r3
-       mov     r3, #SRAM_OFFSET2
-       add     r1, r1, r3
-next:
-       ldmia   r0!, {r3 - r10}         @ copy from source address [r0]
-       stmia   r1!, {r3 - r10}         @ copy to   target address [r1]
-       cmp     r0, r2                  @ until source end address [r2]
-       bne     next                    @ loop until equal */
-#if !defined(CONFIG_SYS_NAND_BOOT) && !defined(CONFIG_SYS_ONENAND_BOOT)
-       /* No need to copy/exec the clock code - DPLL adjust already done
-        * in NAND/oneNAND Boot.
-        */
-       bl      cpy_clk_code            @ put dpll adjust code behind vectors
-#endif /* NAND Boot */
-#endif
-       /* the mask ROM code should have PLL and others stable */
-#ifndef CONFIG_SKIP_LOWLEVEL_INIT
-       bl      cpu_init_crit
-#endif
-
-#ifndef CONFIG_SKIP_RELOCATE_UBOOT
-relocate:                              @ relocate U-Boot to RAM
-       adr     r0, _start              @ r0 <- current position of code
-       ldr     r1, _TEXT_BASE          @ test if we run from flash or RAM
-       cmp     r0, r1                  @ don't reloc during debug
-       beq     stack_setup
-
-       ldr     r2, _armboot_start
-       ldr     r3, _bss_start
-       sub     r2, r3, r2              @ r2 <- size of armboot
-       add     r2, r0, r2              @ r2 <- source end address
-
-copy_loop:                             @ copy 32 bytes at a time
-       ldmia   r0!, {r3 - r10}         @ copy from source address [r0]
-       stmia   r1!, {r3 - r10}         @ copy to   target address [r1]
-       cmp     r0, r2                  @ until source end address [r2]
-       blo     copy_loop
-#endif /* CONFIG_SKIP_RELOCATE_UBOOT */
-
-       /* Set up the stack */
-stack_setup:
-       ldr     r0, _TEXT_BASE          @ upper 128 KiB: relocated uboot
-       sub     r0, r0, #CONFIG_SYS_MALLOC_LEN @ malloc area
-       sub     r0, r0, #CONFIG_SYS_GBL_DATA_SIZE @ bdinfo
-#ifdef CONFIG_USE_IRQ
-       sub     r0, r0, #(CONFIG_STACKSIZE_IRQ + CONFIG_STACKSIZE_FIQ)
-#endif
-       sub     sp, r0, #12             @ leave 3 words for abort-stack
-       bic     sp, sp, #7              @ 8-byte alignment for ABI compliance
-
-       /* Clear BSS (if any). Is below tx (watch load addr - need space) */
-clear_bss:
-       ldr     r0, _bss_start          @ find start of bss segment
-       ldr     r1, _bss_end            @ stop here
-       mov     r2, #0x00000000         @ clear value
-clbss_l:
-       str     r2, [r0]                @ clear BSS location
-       cmp     r0, r1                  @ are we at the end yet
-       add     r0, r0, #4              @ increment clear index pointer
-       bne     clbss_l                 @ keep clearing till at end
-
-       ldr     pc, _start_armboot      @ jump to C code
-
-_start_armboot: .word start_armboot
-#endif /* #if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC) */
+_rel_dyn_start_ofs:
+       .word __rel_dyn_start - _start
+_rel_dyn_end_ofs:
+       .word __rel_dyn_end - _start
+_dynsym_start_ofs:
+       .word __dynsym_start - _start
 
 /*************************************************************************
  *
@@ -436,14 +365,8 @@ cpu_init_crit:
                                                @ user stack
        stmia   sp, {r0 - r12}                  @ Save user registers (now in
                                                @ svc mode) r0-r12
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-       ldr     r2, _armboot_start
-       sub     r2, r2, #(CONFIG_SYS_MALLOC_LEN)
-       sub     r2, r2, #(CONFIG_SYS_GBL_DATA_SIZE + 8) @ set base 2 words into abort
-#else
        ldr     r2, IRQ_STACK_START_IN          @ set base 2 words into abort
                                                @ stack
-#endif
        ldmia   r2, {r2 - r3}                   @ get values for "aborted" pc
                                                @ and cpsr (into parm regs)
        add     r0, sp, #S_FRAME_SIZE           @ grab pointer to old stack
@@ -479,14 +402,8 @@ cpu_init_crit:
        .endm
 
        .macro get_bad_stack
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-       ldr     r13, _armboot_start             @ setup our mode stack (enter
-       sub     r13, r13, #(CONFIG_SYS_MALLOC_LEN)      @ move past malloc pool
-       sub     r13, r13, #(CONFIG_SYS_GBL_DATA_SIZE + 8) @ move to reserved a couple
-#else
        ldr     r13, IRQ_STACK_START_IN         @ setup our mode stack (enter
                                                @ in banked mode)
-#endif
 
        str     lr, [r13]                       @ save caller lr in position 0
                                                @ of saved stack
@@ -507,14 +424,8 @@ cpu_init_crit:
        sub     r13, r13, #4                    @ space on current stack for
                                                @ scratch reg.
        str     r0, [r13]                       @ save R0's value.
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-       ldr     r0, _armboot_start              @ get data regions start
-       sub     r0, r0, #(CONFIG_SYS_MALLOC_LEN)        @ move past malloc pool
-       sub     r0, r0, #(CONFIG_SYS_GBL_DATA_SIZE + 8) @ move past gbl and a couple
-#else
        ldr     r0, IRQ_STACK_START_IN          @ get data regions start
                                                @ spots for abort stack
-#endif
        str     lr, [r0]                        @ save caller lr in position 0
                                                @ of saved stack
        mrs     r0, spsr                        @ get the spsr
index d4fd3fccee62d19c5f9bebdf61ffa63961b4cea4..88a0fecd86b2ac510b945f8bde3b3276d617da9e 100644 (file)
@@ -53,6 +53,13 @@ SECTIONS
        __datarelro_start = .;
                *(.data.rel.ro)
        }
+       . = ALIGN(4);
+       __rel_dyn_start = .;
+       .rel.dyn : { *(.rel.dyn) }
+       __rel_dyn_end = .;
+
+       __dynsym_start = .;
+       .dynsym : { *(.dynsym) }
 
        __got_start = .;
        . = ALIGN(4);
index 836c33ba8b2e48e72dfb311e006672bee4592136..8d1aebc7199892cbdb53af18a2f4e98fe3c69f33 100644 (file)
@@ -27,6 +27,7 @@
  * MA 02111-1307 USA
  */
 
+#include <asm-offsets.h>
 #include <config.h>
 #include <version.h>
 #include <asm/arch/ixp425.h>
@@ -97,12 +98,6 @@ _fiq:                        .word fiq
 _TEXT_BASE:
        .word   CONFIG_SYS_TEXT_BASE
 
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-.globl _armboot_start
-_armboot_start:
-       .word _start
-#endif
-
 /*
  * These are defined in the board-specific linker script.
  */
@@ -126,7 +121,6 @@ FIQ_STACK_START:
        .word 0x0badc0de
 #endif
 
-#if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
 /* IRQ stack memory (calculated at run-time) + 8 bytes */
 .globl IRQ_STACK_START_IN
 IRQ_STACK_START_IN:
@@ -326,7 +320,6 @@ stack_setup:
        cmp     r0, r6
        beq     clear_bss
 
-#ifndef CONFIG_SKIP_RELOCATE_UBOOT
 copy_loop:
        ldmia   r0!, {r9-r10}           /* copy from source address [r0]    */
        stmia   r6!, {r9-r10}           /* copy to   target address [r1]    */
@@ -351,9 +344,8 @@ fixloop:
        str     r4, [r2]
        add     r2, r2, #4
        cmp     r2, r3
-       bne     fixloop
+       blo     fixloop
 #endif
-#endif /* #ifndef CONFIG_SKIP_RELOCATE_UBOOT */
 
 clear_bss:
 #ifndef CONFIG_PRELOADER
@@ -393,190 +385,6 @@ clbss_l:str       r2, [r0]                /* clear loop...                    */
 
 _board_init_r: .word board_init_r
 
-#else /* #if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC) */
-/****************************************************************************/
-/*                                                                         */
-/* the actual reset code                                                   */
-/*                                                                         */
-/****************************************************************************/
-
-reset:
-       /* disable mmu, set big-endian */
-       mov     r0, #0xf8
-       mcr     p15, 0, r0, c1, c0, 0
-       CPWAIT  r0
-
-       /* invalidate I & D caches & BTB */
-       mcr     p15, 0, r0, c7, c7, 0
-       CPWAIT  r0
-
-       /* invalidate I & Data TLB */
-       mcr     p15, 0, r0, c8, c7, 0
-       CPWAIT r0
-
-       /* drain write and fill buffers */
-       mcr     p15, 0, r0, c7, c10, 4
-       CPWAIT  r0
-
-       /* disable write buffer coalescing */
-       mrc     p15, 0, r0, c1, c0, 1
-       orr     r0, r0, #1
-       mcr     p15, 0, r0, c1, c0, 1
-       CPWAIT  r0
-
-       /* set EXP CS0 to the optimum timing */
-       ldr     r1, =CONFIG_SYS_EXP_CS0
-       ldr     r2, =IXP425_EXP_CS0
-       str     r1, [r2]
-
-       /* make sure flash is visible at 0 */
-#if 0
-       ldr     r2, =IXP425_EXP_CFG0
-       ldr     r1, [r2]
-       orr     r1, r1, #0x80000000
-       str     r1, [r2]
-#endif
-       mov     r1, #CONFIG_SYS_SDR_CONFIG
-       ldr     r2, =IXP425_SDR_CONFIG
-       str     r1, [r2]
-
-       /* disable refresh cycles */
-       mov     r1, #0
-       ldr     r3, =IXP425_SDR_REFRESH
-       str     r1, [r3]
-
-       /* send nop command */
-       mov     r1, #3
-       ldr     r4, =IXP425_SDR_IR
-       str     r1, [r4]
-       DELAY_FOR 0x4000, r0
-
-       /* set SDRAM internal refresh val */
-       ldr     r1, =CONFIG_SYS_SDRAM_REFRESH_CNT
-       str     r1, [r3]
-       DELAY_FOR 0x4000, r0
-
-       /* send precharge-all command to close all open banks */
-       mov     r1, #2
-       str     r1, [r4]
-       DELAY_FOR 0x4000, r0
-
-       /* provide 8 auto-refresh cycles */
-       mov     r1, #4
-       mov     r5, #8
-111:    str    r1, [r4]
-       DELAY_FOR 0x100, r0
-       subs    r5, r5, #1
-       bne     111b
-
-       /* set mode register in sdram */
-       mov     r1, #CONFIG_SYS_SDR_MODE_CONFIG
-       str     r1, [r4]
-       DELAY_FOR 0x4000, r0
-
-       /* send normal operation command */
-       mov     r1, #6
-       str     r1, [r4]
-       DELAY_FOR 0x4000, r0
-
-       /* copy */
-       mov     r0, #0
-       mov     r4, r0
-       add     r2, r0, #CONFIG_SYS_MONITOR_LEN
-       mov     r1, #0x10000000
-       mov     r5, r1
-
-    30:
-       ldr     r3, [r0], #4
-       str     r3, [r1], #4
-       cmp     r0, r2
-       bne     30b
-
-       /* invalidate I & D caches & BTB */
-       mcr     p15, 0, r0, c7, c7, 0
-       CPWAIT  r0
-
-       /* invalidate I & Data TLB */
-       mcr     p15, 0, r0, c8, c7, 0
-       CPWAIT r0
-
-       /* drain write and fill buffers */
-       mcr     p15, 0, r0, c7, c10, 4
-       CPWAIT  r0
-
-       /* move flash to 0x50000000 */
-       ldr     r2, =IXP425_EXP_CFG0
-       ldr     r1, [r2]
-       bic     r1, r1, #0x80000000
-       str     r1, [r2]
-
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-
-       /* invalidate I & Data TLB */
-       mcr     p15, 0, r0, c8, c7, 0
-       CPWAIT r0
-
-       /* enable I cache */
-       mrc     p15, 0, r0, c1, c0, 0
-       orr     r0, r0, #MMU_Control_I
-       mcr     p15, 0, r0, c1, c0, 0
-       CPWAIT  r0
-
-       mrs     r0,cpsr                 /* set the cpu to SVC32 mode        */
-       bic     r0,r0,#0x1f             /* (superviser mode, M=10011)       */
-       orr     r0,r0,#0x13
-       msr     cpsr,r0
-
-#ifndef CONFIG_SKIP_RELOCATE_UBOOT
-relocate:                              /* relocate U-Boot to RAM           */
-       adr     r0, _start              /* r0 <- current position of code   */
-       ldr     r1, _TEXT_BASE          /* test if we run from flash or RAM */
-       cmp     r0, r1                  /* don't reloc during debug         */
-       beq     stack_setup
-
-       ldr     r2, _armboot_start
-       ldr     r3, _bss_start
-       sub     r2, r3, r2              /* r2 <- size of armboot            */
-       add     r2, r0, r2              /* r2 <- source end address         */
-
-copy_loop:
-       ldmia   r0!, {r3-r10}           /* copy from source address [r0]    */
-       stmia   r1!, {r3-r10}           /* copy to   target address [r1]    */
-       cmp     r0, r2                  /* until source end address [r2]    */
-       blo     copy_loop
-#endif /* CONFIG_SKIP_RELOCATE_UBOOT */
-
-       /* Set up the stack                                                 */
-stack_setup:
-       ldr     r0, _TEXT_BASE          /* upper 128 KiB: relocated uboot   */
-       sub     r0, r0, #CONFIG_SYS_MALLOC_LEN  /* malloc area                      */
-       sub     r0, r0, #CONFIG_SYS_GBL_DATA_SIZE /* bdinfo                        */
-#ifdef CONFIG_USE_IRQ
-       sub     r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ)
-#endif
-       sub     sp, r0, #12             /* leave 3 words for abort-stack    */
-       bic     sp, sp, #7              /* 8-byte alignment for ABI compliance */
-
-clear_bss:
-       ldr     r0, _bss_start          /* find start of bss segment        */
-       ldr     r1, _bss_end            /* stop here                        */
-       mov     r2, #0x00000000         /* clear                            */
-
-clbss_l:str    r2, [r0]                /* clear loop...                    */
-       add     r0, r0, #4
-       cmp     r0, r1
-       blo     clbss_l
-
-       ldr     pc, _start_armboot
-
-_start_armboot: .word start_armboot
-#endif /* #if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC) */
-
 
 /****************************************************************************/
 /*                                                                         */
@@ -617,13 +425,7 @@ _start_armboot: .word start_armboot
        stmia   sp, {r0 - r12}                  /* Calling r0-r12           */
        add     r8, sp, #S_PC
 
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-       ldr     r2, _armboot_start
-       sub     r2, r2, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN)
-       sub     r2, r2, #(CONFIG_SYS_GBL_DATA_SIZE+8)  @ set base 2 words into abort stack
-#else
        ldr     r2, IRQ_STACK_START_IN
-#endif
        ldmia   r2, {r2 - r4}                   /* get pc, cpsr, old_r0     */
        add     r0, sp, #S_FRAME_SIZE           /* restore sp_SVC           */
 
@@ -658,13 +460,7 @@ _start_armboot: .word start_armboot
        .endm
 
        .macro get_bad_stack
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-       ldr     r13, _armboot_start             @ setup our mode stack
-       sub     r13, r13, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN)
-       sub     r13, r13, #(CONFIG_SYS_GBL_DATA_SIZE+8) @ reserved a couple spots in abort stack
-#else
        ldr     r13, IRQ_STACK_START_IN         @ setup our mode stack
-#endif
 
        str     lr, [r13]                       @ save caller lr / spsr
        mrs     lr, spsr
index d944860fca7ba04513f6d2cbbd9e526f8c991c88..fd8a40b8aa4a2aea201be7cf6d1d4c2d07658164 100644 (file)
  * MA 02111-1307 USA
  */
 
-
+#include <asm-offsets.h>
 #include <config.h>
 #include <version.h>
 
-
 /*
  *************************************************************************
  *
@@ -76,12 +75,6 @@ _fiq:                        .word fiq
 _TEXT_BASE:
        .word   CONFIG_SYS_TEXT_BASE
 
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-.globl _armboot_start
-_armboot_start:
-       .word _start
-#endif
-
 /*
  * These are defined in the board-specific linker script.
  */
@@ -105,7 +98,6 @@ FIQ_STACK_START:
        .word 0x0badc0de
 #endif
 
-#if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
 /* IRQ stack memory (calculated at run-time) + 8 bytes */
 .globl IRQ_STACK_START_IN
 IRQ_STACK_START_IN:
@@ -215,7 +207,6 @@ stack_setup:
        cmp     r0, r6
        beq     clear_bss
 
-#ifndef CONFIG_SKIP_RELOCATE_UBOOT
 copy_loop:
        ldmia   r0!, {r9-r10}           /* copy from source address [r0]    */
        stmia   r6!, {r9-r10}           /* copy to   target address [r1]    */
@@ -240,9 +231,8 @@ fixloop:
        str     r4, [r2]
        add     r2, r2, #4
        cmp     r2, r3
-       bne     fixloop
+       blo     fixloop
 #endif
-#endif /* #ifndef CONFIG_SKIP_RELOCATE_UBOOT */
 
 clear_bss:
 #ifndef CONFIG_PRELOADER
@@ -279,100 +269,6 @@ clbss_l:str       r2, [r0]                /* clear loop...                    */
 
 _board_init_r: .word board_init_r
 
-#else /* #if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC) */
-/*
- * the actual reset code
- */
-
-reset:
-       /*
-        * set the cpu to SVC32 mode
-        */
-       mrs     r0,cpsr
-       bic     r0,r0,#0x1f
-       orr     r0,r0,#0xd3
-       msr     cpsr,r0
-
-#define pWDTCTL                0x80001400  /* Watchdog Timer control register */
-#define pINTENC                0x8000050C  /* Interupt-Controller enable clear register */
-#define pCLKSET                0x80000420  /* clock divisor register */
-
-       /* disable watchdog, set watchdog control register to
-        * all zeros (default reset)
-        */
-       ldr     r0, =pWDTCTL
-       mov     r1, #0x0
-       str     r1, [r0]
-
-       /*
-        * mask all IRQs by setting all bits in the INTENC register (default)
-        */
-       mov     r1, #0xffffffff
-       ldr     r0, =pINTENC
-       str     r1, [r0]
-
-       /* FCLK:HCLK:PCLK = 1:2:2 */
-       /* default FCLK is 200 MHz, using 14.7456 MHz fin */
-       ldr     r0, =pCLKSET
-       ldr r1, =0x0004ee39
-@      ldr r1, =0x0005ee39     @ 1: 2: 4
-       str     r1, [r0]
-
-       /*
-        * we do sys-critical inits only at reboot,
-        * not when booting from ram!
-        */
-#ifndef CONFIG_SKIP_LOWLEVEL_INIT
-       bl      cpu_init_crit
-#endif
-
-#ifndef CONFIG_SKIP_RELOCATE_UBOOT
-relocate:                              /* relocate U-Boot to RAM           */
-       adr     r0, _start              /* r0 <- current position of code   */
-       ldr     r1, _TEXT_BASE          /* test if we run from flash or RAM */
-       cmp     r0, r1                  /* don't reloc during debug         */
-       beq     stack_setup
-
-       ldr     r2, _armboot_start
-       ldr     r3, _bss_start
-       sub     r2, r3, r2              /* r2 <- size of armboot            */
-       add     r2, r0, r2              /* r2 <- source end address         */
-
-copy_loop:
-       ldmia   r0!, {r3-r10}           /* copy from source address [r0]    */
-       stmia   r1!, {r3-r10}           /* copy to   target address [r1]    */
-       cmp     r0, r2                  /* until source end address [r2]    */
-       blo     copy_loop
-#endif /* CONFIG_SKIP_RELOCATE_UBOOT */
-
-       /* Set up the stack                                                 */
-stack_setup:
-       ldr     r0, _TEXT_BASE          /* upper 128 KiB: relocated uboot   */
-       sub     r0, r0, #CONFIG_SYS_MALLOC_LEN  /* malloc area                      */
-       sub     r0, r0, #CONFIG_SYS_GBL_DATA_SIZE /* bdinfo                        */
-#ifdef CONFIG_USE_IRQ
-       sub     r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ)
-#endif
-       sub     sp, r0, #12             /* leave 3 words for abort-stack    */
-       bic     sp, sp, #7              /* 8-byte alignment for ABI compliance */
-
-clear_bss:
-       ldr     r0, _bss_start          /* find start of bss segment        */
-       @add    r0, r0, #4              /* start at first byte of bss       */
-                                       /*   why inc. 4 bytes past then?    */
-       ldr     r1, _bss_end            /* stop here                        */
-       mov     r2, #0x00000000         /* clear                            */
-
-clbss_l:str    r2, [r0]                /* clear loop...                    */
-       add     r0, r0, #4
-       cmp     r0, r1
-       blo     clbss_l
-
-       ldr     pc, _start_armboot
-
-_start_armboot:        .word start_armboot
-#endif /* #if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC) */
-
 /*
  *************************************************************************
  *
@@ -461,13 +357,7 @@ cpu_init_crit:
        .macro  bad_save_user_regs
        sub     sp, sp, #S_FRAME_SIZE
        stmia   sp, {r0 - r12}                  @ Calling r0-r12
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-       ldr     r2, _armboot_start
-       sub     r2, r2, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN)
-       sub     r2, r2, #(CONFIG_SYS_GBL_DATA_SIZE+8)  @ set base 2 words into abort stack
-#else
        ldr     r2, IRQ_STACK_START_IN
-#endif
        ldmia   r2, {r2 - r3}                   @ get pc, cpsr
        add     r0, sp, #S_FRAME_SIZE           @ restore sp_SVC
 
@@ -498,13 +388,7 @@ cpu_init_crit:
        .endm
 
        .macro get_bad_stack
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-       ldr     r13, _armboot_start             @ setup our mode stack
-       sub     r13, r13, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN)
-       sub     r13, r13, #(CONFIG_SYS_GBL_DATA_SIZE+8) @ reserved a couple spots in abort stack
-#else
        ldr     r13, IRQ_STACK_START_IN         @ setup our mode stack
-#endif
 
        str     lr, [r13]                       @ save caller lr / spsr
        mrs     lr, spsr
index 800d120e718bb11a6527223fec3b94855ec17988..7d49cbb4fd9af1a33e425e33267213fc497addc2 100644 (file)
  * CPU specific code
  */
 
-#include <common.h>
+#include <asm/io.h>
+#include <asm/system.h>
 #include <command.h>
+#include <common.h>
 #include <asm/arch/pxa-regs.h>
-#include <asm/system.h>
 
 static void cache_flush(void);
 
@@ -71,17 +72,249 @@ void set_GPIO_mode(int gpio_mode)
 {
        int gpio = gpio_mode & GPIO_MD_MASK_NR;
        int fn = (gpio_mode & GPIO_MD_MASK_FN) >> 8;
-       int gafr;
+       int val;
+
+       /* This below changes direction setting of GPIO "gpio" */
+       val = readl(GPDR(gpio));
 
        if (gpio_mode & GPIO_MD_MASK_DIR)
-       {
-               GPDR(gpio) |= GPIO_bit(gpio);
-       }
+               val |= GPIO_bit(gpio);
        else
-       {
-               GPDR(gpio) &= ~GPIO_bit(gpio);
-       }
-       gafr = GAFR(gpio) & ~(0x3 << (((gpio) & 0xf)*2));
-       GAFR(gpio) = gafr |  (fn  << (((gpio) & 0xf)*2));
+               val &= ~GPIO_bit(gpio);
+
+       writel(val, GPDR(gpio));
+
+       /* This below updates only AF of GPIO "gpio" */
+       val = readl(GAFR(gpio));
+       val &= ~(0x3 << (((gpio) & 0xf) * 2));
+       val |= fn << (((gpio) & 0xf) * 2);
+       writel(val, GAFR(gpio));
 }
 #endif /* CONFIG_CPU_MONAHANS */
+
+void pxa_wait_ticks(int ticks)
+{
+       writel(0, OSCR);
+       while (readl(OSCR) < ticks)
+               asm volatile("":::"memory");
+}
+
+inline void writelrb(uint32_t val, uint32_t addr)
+{
+       writel(val, addr);
+       asm volatile("":::"memory");
+       readl(addr);
+       asm volatile("":::"memory");
+}
+
+void pxa_dram_init(void)
+{
+       uint32_t tmp;
+       int i;
+       /*
+        * 1) Initialize Asynchronous static memory controller
+        */
+
+       writelrb(CONFIG_SYS_MSC0_VAL, MSC0);
+       writelrb(CONFIG_SYS_MSC1_VAL, MSC1);
+       writelrb(CONFIG_SYS_MSC2_VAL, MSC2);
+       /*
+        * 2) Initialize Card Interface
+        */
+
+       /* MECR: Memory Expansion Card Register */
+       writelrb(CONFIG_SYS_MECR_VAL, MECR);
+       /* MCMEM0: Card Interface slot 0 timing */
+       writelrb(CONFIG_SYS_MCMEM0_VAL, MCMEM0);
+       /* MCMEM1: Card Interface slot 1 timing */
+       writelrb(CONFIG_SYS_MCMEM1_VAL, MCMEM1);
+       /* MCATT0: Card Interface Attribute Space Timing, slot 0 */
+       writelrb(CONFIG_SYS_MCATT0_VAL, MCATT0);
+       /* MCATT1: Card Interface Attribute Space Timing, slot 1 */
+       writelrb(CONFIG_SYS_MCATT1_VAL, MCATT1);
+       /* MCIO0: Card Interface I/O Space Timing, slot 0 */
+       writelrb(CONFIG_SYS_MCIO0_VAL, MCIO0);
+       /* MCIO1: Card Interface I/O Space Timing, slot 1 */
+       writelrb(CONFIG_SYS_MCIO1_VAL, MCIO1);
+
+       /*
+        * 3) Configure Fly-By DMA register
+        */
+
+       writelrb(CONFIG_SYS_FLYCNFG_VAL, FLYCNFG);
+
+       /*
+        * 4) Initialize Timing for Sync Memory (SDCLK0)
+        */
+
+       /*
+        * Before accessing MDREFR we need a valid DRI field, so we set
+        * this to power on defaults + DRI field.
+        */
+
+       /* Read current MDREFR config and zero out DRI */
+       tmp = readl(MDREFR) & ~0xfff;
+       /* Add user-specified DRI */
+       tmp |= CONFIG_SYS_MDREFR_VAL & 0xfff;
+       /* Configure important bits */
+       tmp |= MDREFR_K0RUN | MDREFR_SLFRSH;
+       tmp &= ~(MDREFR_APD | MDREFR_E1PIN);
+
+       /* Write MDREFR back */
+       writelrb(tmp, MDREFR);
+
+       /*
+        * 5) Initialize Synchronous Static Memory (Flash/Peripherals)
+        */
+
+       /* Initialize SXCNFG register. Assert the enable bits.
+        *
+        * Write SXMRS to cause an MRS command to all enabled banks of
+        * synchronous static memory. Note that SXLCR need not be written
+        * at this time.
+        */
+       writelrb(CONFIG_SYS_SXCNFG_VAL, SXCNFG);
+
+       /*
+        * 6) Initialize SDRAM
+        */
+
+       writelrb(CONFIG_SYS_MDREFR_VAL & ~MDREFR_SLFRSH, MDREFR);
+       writelrb(CONFIG_SYS_MDREFR_VAL | MDREFR_E1PIN, MDREFR);
+
+       /*
+        * 7) Write MDCNFG with MDCNFG:DEx deasserted (set to 0), to configure
+        *    but not enable each SDRAM partition pair.
+        */
+
+       writelrb(CONFIG_SYS_MDCNFG_VAL &
+               ~(MDCNFG_DE0 | MDCNFG_DE1 | MDCNFG_DE2 | MDCNFG_DE3), MDCNFG);
+       /* Wait for the clock to the SDRAMs to stabilize, 100..200 usec. */
+       pxa_wait_ticks(0x300);
+
+       /*
+        * 8) Trigger a number (usually 8) refresh cycles by attempting
+        *    non-burst read or write accesses to disabled SDRAM, as commonly
+        *    specified in the power up sequence documented in SDRAM data
+        *    sheets. The address(es) used for this purpose must not be
+        *    cacheable.
+        */
+       for (i = 9; i >= 0; i--) {
+               writel(i, 0xa0000000);
+               asm volatile("":::"memory");
+       }
+       /*
+        * 9) Write MDCNFG with enable bits asserted (MDCNFG:DEx set to 1).
+        */
+
+       tmp = CONFIG_SYS_MDCNFG_VAL &
+               (MDCNFG_DE0 | MDCNFG_DE1 | MDCNFG_DE2 | MDCNFG_DE3);
+       tmp |= readl(MDCNFG);
+       writelrb(tmp, MDCNFG);
+
+       /*
+        * 10) Write MDMRS.
+        */
+
+       writelrb(CONFIG_SYS_MDMRS_VAL, MDMRS);
+
+       /*
+        * 11) Enable APD
+        */
+
+       if (CONFIG_SYS_MDREFR_VAL & MDREFR_APD) {
+               tmp = readl(MDREFR);
+               tmp |= MDREFR_APD;
+               writelrb(tmp, MDREFR);
+       }
+}
+
+void pxa_gpio_setup(void)
+{
+       writel(CONFIG_SYS_GPSR0_VAL, GPSR0);
+       writel(CONFIG_SYS_GPSR1_VAL, GPSR1);
+       writel(CONFIG_SYS_GPSR2_VAL, GPSR2);
+#if defined(CONFIG_PXA27X) || defined(CONFIG_CPU_MONAHANS)
+       writel(CONFIG_SYS_GPSR3_VAL, GPSR3);
+#endif
+
+       writel(CONFIG_SYS_GPCR0_VAL, GPCR0);
+       writel(CONFIG_SYS_GPCR1_VAL, GPCR1);
+       writel(CONFIG_SYS_GPCR2_VAL, GPCR2);
+#if defined(CONFIG_PXA27X) || defined(CONFIG_CPU_MONAHANS)
+       writel(CONFIG_SYS_GPCR3_VAL, GPCR3);
+#endif
+
+       writel(CONFIG_SYS_GPDR0_VAL, GPDR0);
+       writel(CONFIG_SYS_GPDR1_VAL, GPDR1);
+       writel(CONFIG_SYS_GPDR2_VAL, GPDR2);
+#if defined(CONFIG_PXA27X) || defined(CONFIG_CPU_MONAHANS)
+       writel(CONFIG_SYS_GPDR3_VAL, GPDR3);
+#endif
+
+       writel(CONFIG_SYS_GAFR0_L_VAL, GAFR0_L);
+       writel(CONFIG_SYS_GAFR0_U_VAL, GAFR0_U);
+       writel(CONFIG_SYS_GAFR1_L_VAL, GAFR1_L);
+       writel(CONFIG_SYS_GAFR1_U_VAL, GAFR1_U);
+       writel(CONFIG_SYS_GAFR2_L_VAL, GAFR2_L);
+       writel(CONFIG_SYS_GAFR2_U_VAL, GAFR2_U);
+#if defined(CONFIG_PXA27X) || defined(CONFIG_CPU_MONAHANS)
+       writel(CONFIG_SYS_GAFR3_L_VAL, GAFR3_L);
+       writel(CONFIG_SYS_GAFR3_U_VAL, GAFR3_U);
+#endif
+
+       writel(CONFIG_SYS_PSSR_VAL, PSSR);
+}
+
+void pxa_interrupt_setup(void)
+{
+       writel(0, ICLR);
+       writel(0, ICMR);
+#if defined(CONFIG_PXA27X) || defined(CONFIG_CPU_MONAHANS)
+       writel(0, ICLR2);
+       writel(0, ICMR2);
+#endif
+}
+
+void pxa_clock_setup(void)
+{
+#ifndef CONFIG_CPU_MONAHANS
+       writel(CONFIG_SYS_CKEN, CKEN);
+       writel(CONFIG_SYS_CCCR, CCCR);
+       asm volatile("mcr       p14, 0, %0, c6, c0, 0"::"r"(2));
+#else
+/* Set CKENA/CKENB/ACCR for MH */
+#endif
+
+       /* enable the 32Khz oscillator for RTC and PowerManager */
+       writel(OSCC_OON, OSCC);
+       while(!(readl(OSCC) & OSCC_OOK))
+               asm volatile("":::"memory");
+}
+
+void pxa_wakeup(void)
+{
+       uint32_t rcsr;
+
+       rcsr = readl(RCSR);
+       writel(rcsr & (RCSR_GPR | RCSR_SMR | RCSR_WDR | RCSR_HWR), RCSR);
+
+       /* Wakeup */
+       if (rcsr & RCSR_SMR) {
+               writel(PSSR_PH, PSSR);
+               pxa_dram_init();
+               icache_disable();
+               dcache_disable();
+               asm volatile("mov       pc, %0"::"r"(readl(PSSR)));
+       }
+}
+
+int arch_cpu_init(void)
+{
+       pxa_gpio_setup();
+/*     pxa_wait_ticks(0x8000); */
+       pxa_wakeup();
+       pxa_interrupt_setup();
+       pxa_clock_setup();
+       return 0;
+}
index 6b72ba13a09e0d8c47bd2e41af67fbdb457800a5..7aa49ae4a00658cd88dfb9c7ee880f5f70337956 100644 (file)
@@ -33,6 +33,7 @@
 /* FIXME: this file is PXA255 specific! What about other XScales? */
 
 #include <common.h>
+#include <asm/io.h>
 
 #ifdef CONFIG_HARD_I2C
 
@@ -93,19 +94,21 @@ struct i2c_msg {
 
 static void i2c_reset( void )
 {
-       ICR &= ~ICR_IUE;                /* disable unit */
-       ICR |= ICR_UR;                  /* reset the unit */
+       writel(readl(ICR) & ~ICR_IUE, ICR);     /* disable unit */
+       writel(readl(ICR) | ICR_UR, ICR);       /* reset the unit */
        udelay(100);
-       ICR &= ~ICR_IUE;                /* disable unit */
+       writel(readl(ICR) & ~ICR_IUE, ICR);     /* disable unit */
 #ifdef CONFIG_CPU_MONAHANS
-       CKENB |= (CKENB_4_I2C); /*  | CKENB_1_PWM1 | CKENB_0_PWM0); */
+       /* | CKENB_1_PWM1 | CKENB_0_PWM0); */
+       writel(readl(CKENB) | (CKENB_4_I2C), CKENB);
 #else /* CONFIG_CPU_MONAHANS */
-       CKEN |= CKEN14_I2C;             /* set the global I2C clock on */
+       /* set the global I2C clock on */
+       writel(readl(CKEN) | CKEN14_I2C, CKEN);
 #endif
-       ISAR = I2C_PXA_SLAVE_ADDR;      /* set our slave address */
-       ICR = I2C_ICR_INIT;             /* set control register values */
-       ISR = I2C_ISR_INIT;             /* set clear interrupt bits */
-       ICR |= ICR_IUE;                 /* enable unit */
+       writel(I2C_PXA_SLAVE_ADDR, ISAR);       /* set our slave address */
+       writel(I2C_ICR_INIT, ICR);              /* set control reg values */
+       writel(I2C_ISR_INIT, ISR);              /* set clear interrupt bits */
+       writel(readl(ICR) | ICR_IUE, ICR);      /* enable unit */
        udelay(100);
 }
 
@@ -159,22 +162,26 @@ int i2c_transfer(struct i2c_msg *msg)
                        goto transfer_error_bus_busy;
 
                /* start transmission */
-               ICR &= ~ICR_START;
-               ICR &= ~ICR_STOP;
-               IDBR = msg->data;
-               if (msg->condition == I2C_COND_START)     ICR |=  ICR_START;
-               if (msg->condition == I2C_COND_STOP)      ICR |=  ICR_STOP;
-               if (msg->acknack   == I2C_ACKNAK_SENDNAK) ICR |=  ICR_ACKNAK;
-               if (msg->acknack   == I2C_ACKNAK_SENDACK) ICR &= ~ICR_ACKNAK;
-               ICR &= ~ICR_ALDIE;
-               ICR |= ICR_TB;
+               writel(readl(ICR) & ~ICR_START, ICR);
+               writel(readl(ICR) & ~ICR_STOP, ICR);
+               writel(msg->data, IDBR);
+               if (msg->condition == I2C_COND_START)
+                       writel(readl(ICR) | ICR_START, ICR);
+               if (msg->condition == I2C_COND_STOP)
+                       writel(readl(ICR) | ICR_STOP, ICR);
+               if (msg->acknack == I2C_ACKNAK_SENDNAK)
+                       writel(readl(ICR) | ICR_ACKNAK, ICR);
+               if (msg->acknack == I2C_ACKNAK_SENDACK)
+                       writel(readl(ICR) & ~ICR_ACKNAK, ICR);
+               writel(readl(ICR) & ~ICR_ALDIE, ICR);
+               writel(readl(ICR) | ICR_TB, ICR);
 
                /* transmit register empty? */
                if (!i2c_isr_set_cleared(ISR_ITE,0))
                        goto transfer_error_transmit_timeout;
 
                /* clear 'transmit empty' state */
-               ISR |= ISR_ITE;
+               writel(readl(ISR) | ISR_ITE, ISR);
 
                /* wait for ACK from slave */
                if (msg->acknack == I2C_ACKNAK_WAITACK)
@@ -189,23 +196,27 @@ int i2c_transfer(struct i2c_msg *msg)
                        goto transfer_error_bus_busy;
 
                /* start receive */
-               ICR &= ~ICR_START;
-               ICR &= ~ICR_STOP;
-               if (msg->condition == I2C_COND_START)     ICR |= ICR_START;
-               if (msg->condition == I2C_COND_STOP)      ICR |= ICR_STOP;
-               if (msg->acknack   == I2C_ACKNAK_SENDNAK) ICR |=  ICR_ACKNAK;
-               if (msg->acknack   == I2C_ACKNAK_SENDACK) ICR &= ~ICR_ACKNAK;
-               ICR &= ~ICR_ALDIE;
-               ICR |= ICR_TB;
+               writel(readl(ICR) & ~ICR_START, ICR);
+               writel(readl(ICR) & ~ICR_STOP, ICR);
+               if (msg->condition == I2C_COND_START)
+                       writel(readl(ICR) | ICR_START, ICR);
+               if (msg->condition == I2C_COND_STOP)
+                       writel(readl(ICR) | ICR_STOP, ICR);
+               if (msg->acknack == I2C_ACKNAK_SENDNAK)
+                       writel(readl(ICR) | ICR_ACKNAK, ICR);
+               if (msg->acknack == I2C_ACKNAK_SENDACK)
+                       writel(readl(ICR) & ~ICR_ACKNAK, ICR);
+               writel(readl(ICR) & ~ICR_ALDIE, ICR);
+               writel(readl(ICR) | ICR_TB, ICR);
 
                /* receive register full? */
                if (!i2c_isr_set_cleared(ISR_IRF,0))
                        goto transfer_error_receive_timeout;
 
-               msg->data = IDBR;
+               msg->data = readl(IDBR);
 
                /* clear 'receive empty' state */
-               ISR |= ISR_IRF;
+               writel(readl(ISR) | ISR_IRF, ISR);
 
                break;
 
index 0ee6a75319cdc83793146f7921c32ad48baa7b0a..987fa0682c8d5b9da794e223bfdfeca1f510dc93 100644 (file)
@@ -35,6 +35,7 @@
 #include <stdio_dev.h>
 #include <lcd.h>
 #include <asm/arch/pxa-regs.h>
+#include <asm/io.h>
 
 /* #define DEBUG */
 
 
 /* 640x480x16 @ 61 Hz */
 vidinfo_t panel_info = {
-       vl_col:         640,
-       vl_row:         480,
-       vl_width:       640,
-       vl_height:      480,
-       vl_clkp:        CONFIG_SYS_HIGH,
-       vl_oep:         CONFIG_SYS_HIGH,
-       vl_hsp:         CONFIG_SYS_HIGH,
-       vl_vsp:         CONFIG_SYS_HIGH,
-       vl_dp:          CONFIG_SYS_HIGH,
-       vl_bpix:        LCD_BPP,
-       vl_lbw:         0,
-       vl_splt:        0,
-       vl_clor:        0,
-       vl_tft:         1,
-       vl_hpw:         40,
-       vl_blw:         56,
-       vl_elw:         56,
-       vl_vpw:         20,
-       vl_bfw:         8,
-       vl_efw:         8,
+       .vl_col         = 640,
+       .vl_row         = 480,
+       .vl_width       = 640,
+       .vl_height      = 480,
+       .vl_clkp        = CONFIG_SYS_HIGH,
+       .vl_oep         = CONFIG_SYS_HIGH,
+       .vl_hsp         = CONFIG_SYS_HIGH,
+       .vl_vsp         = CONFIG_SYS_HIGH,
+       .vl_dp          = CONFIG_SYS_HIGH,
+       .vl_bpix        = LCD_BPP,
+       .vl_lbw         = 0,
+       .vl_splt        = 0,
+       .vl_clor        = 0,
+       .vl_tft         = 1,
+       .vl_hpw         = 40,
+       .vl_blw         = 56,
+       .vl_elw         = 56,
+       .vl_vpw         = 20,
+       .vl_bfw         = 8,
+       .vl_efw         = 8,
 };
 #endif /* CONFIG_PXA_VIDEO */
 
@@ -90,26 +91,26 @@ vidinfo_t panel_info = {
 # define REG_LCCR3     0x0340FF08
 
 vidinfo_t panel_info = {
-       vl_col:         640,
-       vl_row:         480,
-       vl_width:       157,
-       vl_height:      118,
-       vl_clkp:        CONFIG_SYS_HIGH,
-       vl_oep:         CONFIG_SYS_HIGH,
-       vl_hsp:         CONFIG_SYS_HIGH,
-       vl_vsp:         CONFIG_SYS_HIGH,
-       vl_dp:          CONFIG_SYS_HIGH,
-       vl_bpix:        LCD_BPP,
-       vl_lbw:         0,
-       vl_splt:        1,
-       vl_clor:        1,
-       vl_tft:         0,
-       vl_hpw:         1,
-       vl_blw:         3,
-       vl_elw:         3,
-       vl_vpw:         1,
-       vl_bfw:         0,
-       vl_efw:         0,
+       .vl_col         = 640,
+       .vl_row         = 480,
+       .vl_width       = 157,
+       .vl_height      = 118,
+       .vl_clkp        = CONFIG_SYS_HIGH,
+       .vl_oep         = CONFIG_SYS_HIGH,
+       .vl_hsp         = CONFIG_SYS_HIGH,
+       .vl_vsp         = CONFIG_SYS_HIGH,
+       .vl_dp          = CONFIG_SYS_HIGH,
+       .vl_bpix        = LCD_BPP,
+       .vl_lbw         = 0,
+       .vl_splt        = 1,
+       .vl_clor        = 1,
+       .vl_tft         = 0,
+       .vl_hpw         = 1,
+       .vl_blw         = 3,
+       .vl_elw         = 3,
+       .vl_vpw         = 1,
+       .vl_bfw         = 0,
+       .vl_efw         = 0,
 };
 #endif /* CONFIG_SHARP_LM8V31 */
 /*----------------------------------------------------------------------*/
@@ -123,26 +124,26 @@ vidinfo_t panel_info = {
 # define REG_LCCR3     0x0340FF08
 
 vidinfo_t panel_info = {
-       vl_col:         640,
-       vl_row:         480,
-       vl_width:       157,
-       vl_height:      118,
-       vl_clkp:        CONFIG_SYS_HIGH,
-       vl_oep:         CONFIG_SYS_HIGH,
-       vl_hsp:         CONFIG_SYS_HIGH,
-       vl_vsp:         CONFIG_SYS_HIGH,
-       vl_dp:          CONFIG_SYS_HIGH,
-       vl_bpix:        LCD_BPP,
-       vl_lbw:         0,
-       vl_splt:        1,
-       vl_clor:        1,
-       vl_tft:         1,
-       vl_hpw:         32,
-       vl_blw:         144,
-       vl_elw:         32,
-       vl_vpw:         2,
-       vl_bfw:         13,
-       vl_efw:         30,
+       .vl_col         = 640,
+       .vl_row         = 480,
+       .vl_width       = 157,
+       .vl_height      = 118,
+       .vl_clkp        = CONFIG_SYS_HIGH,
+       .vl_oep         = CONFIG_SYS_HIGH,
+       .vl_hsp         = CONFIG_SYS_HIGH,
+       .vl_vsp         = CONFIG_SYS_HIGH,
+       .vl_dp          = CONFIG_SYS_HIGH,
+       .vl_bpix        = LCD_BPP,
+       .vl_lbw         = 0,
+       .vl_splt        = 1,
+       .vl_clor        = 1,
+       .vl_tft         = 1,
+       .vl_hpw         = 32,
+       .vl_blw         = 144,
+       .vl_elw         = 32,
+       .vl_vpw         = 2,
+       .vl_bfw         = 13,
+       .vl_efw         = 30,
 };
 #endif /* CONFIG_VOIPAC_LCD */
 
@@ -156,26 +157,26 @@ vidinfo_t panel_info = {
 #define REG_LCCR3      0x0340FF20
 
 vidinfo_t panel_info = {
-       vl_col:         320,
-       vl_row:         240,
-       vl_width:       167,
-       vl_height:      109,
-       vl_clkp:        CONFIG_SYS_HIGH,
-       vl_oep:         CONFIG_SYS_HIGH,
-       vl_hsp:         CONFIG_SYS_HIGH,
-       vl_vsp:         CONFIG_SYS_HIGH,
-       vl_dp:          CONFIG_SYS_HIGH,
-       vl_bpix:        LCD_BPP,
-       vl_lbw:         1,
-       vl_splt:        0,
-       vl_clor:        1,
-       vl_tft:         0,
-       vl_hpw:         1,
-       vl_blw:         1,
-       vl_elw:         1,
-       vl_vpw:         7,
-       vl_bfw:         0,
-       vl_efw:         0,
+       .vl_col         = 320,
+       .vl_row         = 240,
+       .vl_width       = 167,
+       .vl_height      = 109,
+       .vl_clkp        = CONFIG_SYS_HIGH,
+       .vl_oep         = CONFIG_SYS_HIGH,
+       .vl_hsp         = CONFIG_SYS_HIGH,
+       .vl_vsp         = CONFIG_SYS_HIGH,
+       .vl_dp          = CONFIG_SYS_HIGH,
+       .vl_bpix        = LCD_BPP,
+       .vl_lbw         = 1,
+       .vl_splt        = 0,
+       .vl_clor        = 1,
+       .vl_tft         = 0,
+       .vl_hpw         = 1,
+       .vl_blw         = 1,
+       .vl_elw         = 1,
+       .vl_vpw         = 7,
+       .vl_bfw         = 0,
+       .vl_efw         = 0,
 };
 #endif /* CONFIG_HITACHI_SX14 */
 
@@ -190,31 +191,132 @@ vidinfo_t panel_info = {
 # define REG_LCCR3     0x03b00009
 
 vidinfo_t panel_info = {
-       vl_col:         240,
-       vl_row:         320,
-       vl_width:       240,
-       vl_height:      320,
-       vl_clkp:        CONFIG_SYS_HIGH,
-       vl_oep:         CONFIG_SYS_LOW,
-       vl_hsp:         CONFIG_SYS_LOW,
-       vl_vsp:         CONFIG_SYS_LOW,
-       vl_dp:          CONFIG_SYS_HIGH,
-       vl_bpix:        LCD_BPP,
-       vl_lbw:         0,
-       vl_splt:        1,
-       vl_clor:        1,
-       vl_tft:         1,
-       vl_hpw:         4,
-       vl_blw:         4,
-       vl_elw:         8,
-       vl_vpw:         4,
-       vl_bfw:         4,
-       vl_efw:         8,
+       .vl_col         = 240,
+       .vl_row         = 320,
+       .vl_width       = 240,
+       .vl_height      = 320,
+       .vl_clkp        = CONFIG_SYS_HIGH,
+       .vl_oep         = CONFIG_SYS_LOW,
+       .vl_hsp         = CONFIG_SYS_LOW,
+       .vl_vsp         = CONFIG_SYS_LOW,
+       .vl_dp          = CONFIG_SYS_HIGH,
+       .vl_bpix        = LCD_BPP,
+       .vl_lbw         = 0,
+       .vl_splt        = 1,
+       .vl_clor        = 1,
+       .vl_tft         = 1,
+       .vl_hpw         = 4,
+       .vl_blw         = 4,
+       .vl_elw         = 8,
+       .vl_vpw         = 4,
+       .vl_bfw         = 4,
+       .vl_efw         = 8,
 };
 #endif /* CONFIG_LMS283GF05 */
 
 /*----------------------------------------------------------------------*/
 
+#ifdef CONFIG_ACX517AKN
+
+# define LCD_BPP       LCD_COLOR8
+
+/* you have to set lccr0 and lccr3 (including pcd) */
+# define REG_LCCR0     0x003008f9
+# define REG_LCCR3     0x03700006
+
+vidinfo_t panel_info = {
+       .vl_col         = 320,
+       .vl_row         = 320,
+       .vl_width       = 320,
+       .vl_height      = 320,
+       .vl_clkp        = CONFIG_SYS_HIGH,
+       .vl_oep         = CONFIG_SYS_LOW,
+       .vl_hsp         = CONFIG_SYS_LOW,
+       .vl_vsp         = CONFIG_SYS_LOW,
+       .vl_dp          = CONFIG_SYS_HIGH,
+       .vl_bpix        = LCD_BPP,
+       .vl_lbw         = 0,
+       .vl_splt        = 1,
+       .vl_clor        = 1,
+       .vl_tft         = 1,
+       .vl_hpw         = 0x04,
+       .vl_blw         = 0x1c,
+       .vl_elw         = 0x08,
+       .vl_vpw         = 0x01,
+       .vl_bfw         = 0x07,
+       .vl_efw         = 0x08,
+};
+#endif /* CONFIG_ACX517AKN */
+
+/*----------------------------------------------------------------------*/
+
+#ifdef CONFIG_LQ038J7DH53
+
+# define LCD_BPP       LCD_COLOR8
+
+/* you have to set lccr0 and lccr3 (including pcd) */
+# define REG_LCCR0     0x003008f9
+# define REG_LCCR3     0x03700004
+
+vidinfo_t panel_info = {
+       .vl_col         = 320,
+       .vl_row         = 480,
+       .vl_width       = 320,
+       .vl_height      = 480,
+       .vl_clkp        = CONFIG_SYS_HIGH,
+       .vl_oep         = CONFIG_SYS_LOW,
+       .vl_hsp         = CONFIG_SYS_LOW,
+       .vl_vsp         = CONFIG_SYS_LOW,
+       .vl_dp          = CONFIG_SYS_HIGH,
+       .vl_bpix        = LCD_BPP,
+       .vl_lbw         = 0,
+       .vl_splt        = 1,
+       .vl_clor        = 1,
+       .vl_tft         = 1,
+       .vl_hpw         = 0x04,
+       .vl_blw         = 0x20,
+       .vl_elw         = 0x01,
+       .vl_vpw         = 0x01,
+       .vl_bfw         = 0x04,
+       .vl_efw         = 0x01,
+};
+#endif /* CONFIG_ACX517AKN */
+
+/*----------------------------------------------------------------------*/
+
+#ifdef CONFIG_LITTLETON_LCD
+# define LCD_BPP       LCD_COLOR8
+
+/* you have to set lccr0 and lccr3 (including pcd) */
+# define REG_LCCR0     0x003008f8
+# define REG_LCCR3     0x0300FF04
+
+vidinfo_t panel_info = {
+       .vl_col         = 480,
+       .vl_row         = 640,
+       .vl_width       = 480,
+       .vl_height      = 640,
+       .vl_clkp        = CONFIG_SYS_HIGH,
+       .vl_oep         = CONFIG_SYS_HIGH,
+       .vl_hsp         = CONFIG_SYS_HIGH,
+       .vl_vsp         = CONFIG_SYS_HIGH,
+       .vl_dp          = CONFIG_SYS_HIGH,
+       .vl_bpix        = LCD_BPP,
+       .vl_lbw         = 0,
+       .vl_splt        = 0,
+       .vl_clor        = 0,
+       .vl_tft         = 1,
+       .vl_hpw         = 9,
+       .vl_blw         = 8,
+       .vl_elw         = 24,
+       .vl_vpw         = 2,
+       .vl_bfw         = 2,
+       .vl_efw         = 4,
+};
+#endif /* CONFIG_LITTLETON_LCD */
+
+/*----------------------------------------------------------------------*/
+
 #if LCD_BPP == LCD_COLOR8
 void lcd_setcolreg (ushort regno, ushort red, ushort green, ushort blue);
 #endif
@@ -377,12 +479,14 @@ static void pxafb_setup_gpio (vidinfo_t *vid)
        {
                debug("Setting GPIO for 4 bit data\n");
                /* bits 58-61 */
-               GPDR1 |= (0xf << 26);
-               GAFR1_U = (GAFR1_U & ~(0xff << 20)) | (0xaa << 20);
+               writel(readl(GPDR1) | (0xf << 26), GPDR1);
+               writel((readl(GAFR1_U) & ~(0xff << 20)) | (0xaa << 20),
+                       GAFR1_U);
 
                /* bits 74-77 */
-               GPDR2 |= (0xf << 10);
-               GAFR2_L = (GAFR2_L & ~(0xff << 20)) | (0xaa << 20);
+               writel(readl(GPDR2) | (0xf << 10), GPDR2);
+               writel((readl(GAFR2_L) & ~(0xff << 20)) | (0xaa << 20),
+                       GAFR2_L);
        }
 
        /* 8 bit interface */
@@ -391,15 +495,17 @@ static void pxafb_setup_gpio (vidinfo_t *vid)
        {
                debug("Setting GPIO for 8 bit data\n");
                /* bits 58-65 */
-               GPDR1 |= (0x3f << 26);
-               GPDR2 |= (0x3);
+               writel(readl(GPDR1) | (0x3f << 26), GPDR1);
+               writel(readl(GPDR2) | (0x3), GPDR2);
 
-               GAFR1_U = (GAFR1_U & ~(0xfff << 20)) | (0xaaa << 20);
-               GAFR2_L = (GAFR2_L & ~0xf) | (0xa);
+               writel((readl(GAFR1_U) & ~(0xfff << 20)) | (0xaaa << 20),
+                       GAFR1_U);
+               writel((readl(GAFR2_L) & ~0xf) | (0xa), GAFR2_L);
 
                /* bits 74-77 */
-               GPDR2 |= (0xf << 10);
-               GAFR2_L = (GAFR2_L & ~(0xff << 20)) | (0xaa << 20);
+               writel(readl(GPDR2) | (0xf << 10), GPDR2);
+               writel((readl(GAFR2_L) & ~(0xff << 20)) | (0xaa << 20),
+                       GAFR2_L);
        }
 
        /* 16 bit interface */
@@ -407,11 +513,12 @@ static void pxafb_setup_gpio (vidinfo_t *vid)
        {
                debug("Setting GPIO for 16 bit data\n");
                /* bits 58-77 */
-               GPDR1 |= (0x3f << 26);
-               GPDR2 |= 0x00003fff;
+               writel(readl(GPDR1) | (0x3f << 26), GPDR1);
+               writel(readl(GPDR2) | 0x00003fff, GPDR2);
 
-               GAFR1_U = (GAFR1_U & ~(0xfff << 20)) | (0xaaa << 20);
-               GAFR2_L = (GAFR2_L & 0xf0000000) | 0x0aaaaaaa;
+               writel((readl(GAFR1_U) & ~(0xfff << 20)) | (0xaaa << 20),
+                       GAFR1_U);
+               writel((readl(GAFR2_L) & 0xf0000000) | 0x0aaaaaaa, GAFR2_L);
        }
        else
        {
@@ -425,26 +532,26 @@ static void pxafb_enable_controller (vidinfo_t *vid)
        debug("Enabling LCD controller\n");
 
        /* Sequence from 11.7.10 */
-       LCCR3  = vid->pxa.reg_lccr3;
-       LCCR2  = vid->pxa.reg_lccr2;
-       LCCR1  = vid->pxa.reg_lccr1;
-       LCCR0  = vid->pxa.reg_lccr0 & ~LCCR0_ENB;
-       FDADR0 = vid->pxa.fdadr0;
-       FDADR1 = vid->pxa.fdadr1;
-       LCCR0 |= LCCR0_ENB;
+       writel(vid->pxa.reg_lccr3, LCCR3);
+       writel(vid->pxa.reg_lccr2, LCCR2);
+       writel(vid->pxa.reg_lccr1, LCCR1);
+       writel(vid->pxa.reg_lccr0 & ~LCCR0_ENB, LCCR0);
+       writel(vid->pxa.fdadr0, FDADR0);
+       writel(vid->pxa.fdadr1, FDADR1);
+       writel(readl(LCCR0) | LCCR0_ENB, LCCR0);
 
 #ifdef CONFIG_CPU_MONAHANS
-       CKENA |= CKENA_1_LCD;
+       writel(readl(CKENA) | CKENA_1_LCD, CKENA);
 #else
-       CKEN |= CKEN16_LCD;
+       writel(readl(CKEN) | CKEN16_LCD, CKEN);
 #endif
 
-       debug("FDADR0 = 0x%08x\n", (unsigned int)FDADR0);
-       debug("FDADR1 = 0x%08x\n", (unsigned int)FDADR1);
-       debug("LCCR0 = 0x%08x\n", (unsigned int)LCCR0);
-       debug("LCCR1 = 0x%08x\n", (unsigned int)LCCR1);
-       debug("LCCR2 = 0x%08x\n", (unsigned int)LCCR2);
-       debug("LCCR3 = 0x%08x\n", (unsigned int)LCCR3);
+       debug("FDADR0 = 0x%08x\n", readl(FDADR0));
+       debug("FDADR1 = 0x%08x\n", readl(FDADR1));
+       debug("LCCR0 = 0x%08x\n", readl(LCCR0));
+       debug("LCCR1 = 0x%08x\n", readl(LCCR1));
+       debug("LCCR2 = 0x%08x\n", readl(LCCR2));
+       debug("LCCR3 = 0x%08x\n", readl(LCCR3));
 }
 
 static int pxafb_init (vidinfo_t *vid)
index 9c5023bae4ae9465a563de18aa36ca0752217f25..ae358a56e61f816d4c87930a022f07c5e7ba48e8 100644 (file)
@@ -8,6 +8,7 @@
  *  Copyright (C) 2002 Kyle Harris <kharris@nexus-tech.net>
  *  Copyright (C) 2003 Robert Schwebel <r.schwebel@pengutronix.de>
  *  Copyright (C) 2003 Kai-Uwe Bloem <kai-uwe.bloem@auerswald.de>
+ *  Copyright (c) 2010 Marek Vasut <marek.vasut@gmail.com>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
  * MA 02111-1307 USA
  */
 
+#include <asm-offsets.h>
 #include <config.h>
 #include <version.h>
 #include <asm/arch/pxa-regs.h>
 
+/* takes care the CP15 update has taken place */
+.macro CPWAIT reg
+mrc  p15,0,\reg,c2,c0,0
+mov  \reg,\reg
+sub  pc,pc,#4
+.endm
+
 .globl _start
 _start: b      reset
 #ifdef CONFIG_PRELOADER
@@ -86,22 +95,16 @@ _fiq:                       .word fiq
 _TEXT_BASE:
        .word   CONFIG_SYS_TEXT_BASE
 
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-.globl _armboot_start
-_armboot_start:
-       .word _start
-#endif
-
 /*
  * These are defined in the board-specific linker script.
  */
-.globl _bss_start
-_bss_start:
-       .word __bss_start
+.globl _bss_start_ofs
+_bss_start_ofs:
+       .word __bss_start - _start
 
-.globl _bss_end
-_bss_end:
-       .word _end
+.globl _bss_end_ofs
+_bss_end_ofs:
+       .word _end - _start
 
 #ifdef CONFIG_USE_IRQ
 /* IRQ stack memory (calculated at run-time) */
@@ -115,36 +118,12 @@ FIQ_STACK_START:
        .word 0x0badc0de
 #endif /* CONFIG_USE_IRQ */
 
-#if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
+#ifndef CONFIG_PRELOADER
 /* IRQ stack memory (calculated at run-time) + 8 bytes */
 .globl IRQ_STACK_START_IN
 IRQ_STACK_START_IN:
        .word   0x0badc0de
 
-.globl _datarel_start
-_datarel_start:
-       .word __datarel_start
-
-.globl _datarelrolocal_start
-_datarelrolocal_start:
-       .word __datarelrolocal_start
-
-.globl _datarellocal_start
-_datarellocal_start:
-       .word __datarellocal_start
-
-.globl _datarelro_start
-_datarelro_start:
-       .word __datarelro_start
-
-.globl _got_start
-_got_start:
-       .word __got_start
-
-.globl _got_end
-_got_end:
-       .word __got_end
-
 /*
  * the actual reset code
  */
@@ -159,12 +138,84 @@ reset:
        msr     cpsr,r0
 
        /*
-        * we do sys-critical inits only at reboot,
-        * not when booting from ram!
+        * Enable MMU to use DCache as DRAM
         */
-#ifndef CONFIG_SKIP_LOWLEVEL_INIT
-       bl      cpu_init_crit
-#endif
+       /* Domain access -- enable for all CPs */
+       ldr     r0, =0x0000ffff
+       mcr     p15, 0, r0, c3, c0, 0
+
+       /* Point TTBR to MMU table */
+       ldr     r0, =mmu_table
+       adr     r2, _start
+       orr     r0, r2
+       mcr     p15, 0, r0, c2, c0, 0
+
+/* !!! Hereby, check if the code is running from SRAM !!! */
+/* If the code is running from SRAM, alias SRAM to 0x0 to simulate NOR. The code
+ * is linked to 0x0 too, so this makes things easier. */
+       cmp     r2, #0x5c000000
+
+       ldreq   r1, [r0]
+       orreq   r1, r2
+       streq   r1, [r0]
+
+       /* Kick in MMU, ICache, DCache, BTB */
+       mrc     p15, 0, r0, c1, c0, 0
+       bic     r0, #0x1b00
+       bic     r0, #0x0087
+       orr     r0, #0x1800
+       orr     r0, #0x0005
+       mcr     p15, 0, r0, c1, c0, 0
+       CPWAIT  r0
+
+       /* Unlock Icache, Dcache */
+       mcr     p15, 0, r0, c9, c1, 1
+       mcr     p15, 0, r0, c9, c2, 1
+
+       /* Flush Icache, Dcache, BTB */
+       mcr     p15, 0, r0, c7, c7, 0
+
+       /* Unlock I-TLB, D-TLB */
+       mcr     p15, 0, r0, c10, c4, 1
+       mcr     p15, 0, r0, c10, c8, 1
+
+       /* Flush TLB */
+       mcr     p15, 0, r0, c8, c7, 0
+       /* Allocate 4096 bytes of Dcache as RAM */
+
+       /* Drain pending loads and stores */
+       mcr     p15, 0, r0, c7, c10, 4
+
+       mov     r4, #0x00
+       mov     r5, #0x00
+       mov     r2, #0x01
+       mcr     p15, 0, r0, c9, c2, 0
+       CPWAIT  r0
+
+       /* 128 lines reserved (128 x 32bytes = 4096 bytes total) */
+       mov     r0, #128
+       mov     r1, #0xa0000000
+alloc:
+       mcr     p15, 0, r1, c7, c2, 5
+       /* Drain pending loads and stores */
+       mcr     p15, 0, r0, c7, c10, 4
+       strd    r4, [r1], #8
+       strd    r4, [r1], #8
+       strd    r4, [r1], #8
+       strd    r4, [r1], #8
+       subs    r0, #0x01
+       bne     alloc
+       /* Drain pending loads and stores */
+       mcr     p15, 0, r0, c7, c10, 4
+       mov     r2, #0x00
+       mcr     p15, 0, r2, c9, c2, 0
+       CPWAIT  r0
+
+       /* Jump to 0x0 ( + offset) if running from SRAM */
+       adr     r0, zerojmp
+       bic     r0, #0x5c000000
+       mov     pc, r0
+zerojmp:
 
 /* Set stackpointer in internal RAM to call board_init_f */
 call_board_init_f:
@@ -194,50 +245,67 @@ stack_setup:
 
        adr     r0, _start
        ldr     r2, _TEXT_BASE
-       ldr     r3, _bss_start
-       sub     r2, r3, r2              /* r2 <- size of armboot            */
-       add     r2, r0, r2              /* r2 <- source end address         */
+       ldr     r3, _bss_start_ofs
+       add     r2, r0, r3              /* r2 <- source end address         */
        cmp     r0, r6
        beq     clear_bss
 
-#ifndef CONFIG_SKIP_RELOCATE_UBOOT
+       stmfd sp!, {r0-r12}
 copy_loop:
-       ldmia   r0!, {r9-r10}           /* copy from source address [r0]    */
-       stmia   r6!, {r9-r10}           /* copy to   target address [r1]    */
+       ldmia   r0!, {r3-r5, r7-r11}    /* copy from source address [r0]    */
+       stmia   r6!, {r3-r5, r7-r11}    /* copy to   target address [r1]    */
        cmp     r0, r2                  /* until source end address [r2]    */
        blo     copy_loop
+       ldmfd sp!, {r0-r12}
 
 #ifndef CONFIG_PRELOADER
-       /* fix got entries */
-       ldr     r1, _TEXT_BASE          /* Text base */
-       mov     r0, r7                  /* reloc addr */
-       ldr     r2, _got_start          /* addr in Flash */
-       ldr     r3, _got_end            /* addr in Flash */
-       sub     r3, r3, r1
-       add     r3, r3, r0
-       sub     r2, r2, r1
-       add     r2, r2, r0
-
+       /*
+        * fix .rel.dyn relocations
+        */
+       ldr     r0, _TEXT_BASE          /* r0 <- Text base */
+       sub     r9, r7, r0              /* r9 <- relocation offset */
+       ldr     r10, _dynsym_start_ofs  /* r10 <- sym table ofs */
+       add     r10, r10, r0            /* r10 <- sym table in FLASH */
+       ldr     r2, _rel_dyn_start_ofs  /* r2 <- rel dyn start ofs */
+       add     r2, r2, r0              /* r2 <- rel dyn start in FLASH */
+       ldr     r3, _rel_dyn_end_ofs    /* r3 <- rel dyn end ofs */
+       add     r3, r3, r0              /* r3 <- rel dyn end in FLASH */
 fixloop:
-       ldr     r4, [r2]
-       sub     r4, r4, r1
-       add     r4, r4, r0
-       str     r4, [r2]
-       add     r2, r2, #4
+       ldr     r0, [r2]        /* r0 <- location to fix up, IN FLASH! */
+       add     r0, r9          /* r0 <- location to fix up in RAM */
+       ldr     r1, [r2, #4]
+       and     r8, r1, #0xff
+       cmp     r8, #23         /* relative fixup? */
+       beq     fixrel
+       cmp     r8, #2          /* absolute fixup? */
+       beq     fixabs
+       /* ignore unknown type of fixup */
+       b       fixnext
+fixabs:
+       /* absolute fix: set location to (offset) symbol value */
+       mov     r1, r1, LSR #4          /* r1 <- symbol index in .dynsym */
+       add     r1, r10, r1             /* r1 <- address of symbol in table */
+       ldr     r1, [r1, #4]            /* r1 <- symbol value */
+       add     r1, r9                  /* r1 <- relocated sym addr */
+       b       fixnext
+fixrel:
+       /* relative fix: increase location by offset */
+       ldr     r1, [r0]
+       add     r1, r1, r9
+fixnext:
+       str     r1, [r0]
+       add     r2, r2, #8      /* each rel.dyn entry is 8 bytes */
        cmp     r2, r3
-       bne     fixloop
-#endif
-#endif /* #ifndef CONFIG_SKIP_RELOCATE_UBOOT */
+       blo     fixloop
+#endif /* #ifndef CONFIG_PRELOADER */
 
 clear_bss:
 #ifndef CONFIG_PRELOADER
-       ldr     r0, _bss_start
-       ldr     r1, _bss_end
+       ldr     r0, _bss_start_ofs
+       ldr     r1, _bss_end_ofs
        ldr     r3, _TEXT_BASE          /* Text base */
        mov     r4, r7                  /* reloc addr */
-       sub     r0, r0, r3
        add     r0, r0, r4
-       sub     r1, r1, r3
        add     r1, r1, r4
        mov     r2, #0x00000000         /* clear                            */
 
@@ -245,247 +313,66 @@ clbss_l:str      r2, [r0]                /* clear loop...                    */
        add     r0, r0, #4
        cmp     r0, r1
        bne     clbss_l
-#endif
+#endif /* #ifndef CONFIG_PRELOADER */
 
 /*
  * We are done. Do not return, instead branch to second part of board
  * initialization, now running from RAM.
  */
 #ifdef CONFIG_ONENAND_IPL
-       ldr     pc, _start_oneboot
+       ldr     r0, _start_oneboot_ofs
+       mov     pc, r0
 
-_start_oneboot: .word start_oneboot
+_start_oneboot_ofs
+       : .word start_oneboot
 #else
-       ldr     r0, _TEXT_BASE
-       ldr     r2, _board_init_r
-       sub     r2, r2, r0
-       add     r2, r2, r7      /* position from board_init_r in RAM */
+       ldr     r0, _board_init_r_ofs
+       adr     r1, _start
+       add     lr, r0, r1
+       add     lr, lr, r9
        /* setup parameters for board_init_r */
        mov     r0, r5          /* gd_t */
        mov     r1, r7          /* dest_addr */
        /* jump to it ... */
-       mov     lr, r2
        mov     pc, lr
 
-_board_init_r: .word board_init_r
-#endif
+_board_init_r_ofs:
+       .word board_init_r - _start
+#endif /* CONFIG_ONENAND_IPL */
+
+_rel_dyn_start_ofs:
+       .word __rel_dyn_start - _start
+_rel_dyn_end_ofs:
+       .word __rel_dyn_end - _start
+_dynsym_start_ofs:
+       .word __dynsym_start - _start
 
-#else /* #if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC) */
+#else /* CONFIG_PRELOADER */
 
 /****************************************************************************/
 /*                                                                         */
-/* the actual reset code                                                   */
+/* the actual reset code for OneNAND IPL                                   */
 /*                                                                         */
 /****************************************************************************/
 
+#ifndef        CONFIG_PXA27X
+#error OneNAND IPL is not supported on PXA25x and 26x due to lack of SRAM
+#endif
+
 reset:
-       mrs     r0,cpsr                 /* set the CPU to SVC32 mode        */
-       bic     r0,r0,#0x1f             /* (superviser mode, M=10011)       */
+       /* Set CPU to SVC32 mode */
+       mrs     r0,cpsr
+       bic     r0,r0,#0x1f
        orr     r0,r0,#0x13
        msr     cpsr,r0
 
-       /*
-        * we do sys-critical inits only at reboot,
-        * not when booting from RAM!
-        */
-#ifndef CONFIG_SKIP_LOWLEVEL_INIT
-       bl      cpu_init_crit           /* we do sys-critical inits         */
-#endif /* !CONFIG_SKIP_LOWLEVEL_INIT */
-
-#ifndef CONFIG_SKIP_RELOCATE_UBOOT
-relocate:                              /* relocate U-Boot to RAM           */
-       adr     r0, _start              /* r0 <- current position of code   */
-       ldr     r1, _TEXT_BASE          /* test if we run from flash or RAM */
-#ifndef        CONFIG_PRELOADER
-       cmp     r0, r1                  /* don't reloc during debug         */
-       beq     stack_setup
-#endif
+       /* Point stack at the end of SRAM and leave 32 words for abort-stack */
+       ldr     sp, =0x5c03ff80
 
-       ldr     r2, _armboot_start
-       ldr     r3, _bss_start
-       sub     r2, r3, r2              /* r2 <- size of armboot            */
-       add     r2, r0, r2              /* r2 <- source end address         */
+       /* Start OneNAND IPL */
+       ldr     pc, =start_oneboot
 
-copy_loop:
-       ldmia   r0!, {r3-r10}           /* copy from source address [r0]    */
-       stmia   r1!, {r3-r10}           /* copy to   target address [r1]    */
-       cmp     r0, r2                  /* until source end address [r2]    */
-       blo     copy_loop
-#endif /* !CONFIG_SKIP_RELOCATE_UBOOT */
-
-       /* Set up the stack                                                 */
-stack_setup:
-       ldr     r0, _TEXT_BASE          /* upper 128 KiB: relocated uboot   */
-#ifdef CONFIG_PRELOADER
-       sub     sp, r0, #128            /* leave 32 words for abort-stack   */
-#else
-       sub     r0, r0, #CONFIG_SYS_MALLOC_LEN /* malloc area               */
-       sub     r0, r0, #CONFIG_SYS_GBL_DATA_SIZE /* bdinfo                 */
-#ifdef CONFIG_USE_IRQ
-       sub     r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ)
-#endif /* CONFIG_USE_IRQ */
-       sub     sp, r0, #12             /* leave 3 words for abort-stack    */
-       bic     sp, sp, #7              /* 8-byte alignment for ABI compliance */
-#endif
-
-clear_bss:
-       ldr     r0, _bss_start          /* find start of bss segment        */
-       ldr     r1, _bss_end            /* stop here                        */
-       mov     r2, #0x00000000         /* clear                            */
-
-#ifndef CONFIG_PRELOADER
-clbss_l:str    r2, [r0]                /* clear loop...                    */
-       add     r0, r0, #4
-       cmp     r0, r1
-       blo     clbss_l
-#endif
-
-       ldr     pc, _start_armboot
-
-#ifdef CONFIG_ONENAND_IPL
-_start_armboot: .word start_oneboot
-#else
-_start_armboot: .word start_armboot
-#endif
-#endif /* #if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC) */
-
-/****************************************************************************/
-/*                                                                         */
-/* CPU_init_critical registers                                             */
-/*                                                                         */
-/* - setup important registers                                             */
-/* - setup memory timing                                                   */
-/*                                                                         */
-/****************************************************************************/
-/* mk@tbd: Fix this! */
-#undef RCSR
-#undef ICMR
-#undef OSMR3
-#undef OSCR
-#undef OWER
-#undef OIER
-#undef CCCR
-
-/* Interrupt-Controller base address                                       */
-IC_BASE:          .word           0x40d00000
-#define ICMR   0x04
-
-/* Reset-Controller */
-RST_BASE:      .word   0x40f00030
-#define RCSR   0x00
-
-/* Operating System Timer */
-OSTIMER_BASE:  .word   0x40a00000
-#define OSMR3  0x0C
-#define OSCR   0x10
-#define OWER   0x18
-#define OIER   0x1C
-
-/* Clock Manager Registers                                                 */
-#ifdef CONFIG_CPU_MONAHANS
-# ifndef CONFIG_SYS_MONAHANS_RUN_MODE_OSC_RATIO
-#  error "You have to define CONFIG_SYS_MONAHANS_RUN_MODE_OSC_RATIO!!"
-# endif /* !CONFIG_SYS_MONAHANS_RUN_MODE_OSC_RATIO */
-# ifndef CONFIG_SYS_MONAHANS_TURBO_RUN_MODE_RATIO
-#  define CONFIG_SYS_MONAHANS_TURBO_RUN_MODE_RATIO 0x1
-# endif /* !CONFIG_SYS_MONAHANS_TURBO_RUN_MODE_RATIO */
-#else /* !CONFIG_CPU_MONAHANS */
-#ifdef CONFIG_SYS_CPUSPEED
-CC_BASE:       .word   0x41300000
-#define CCCR   0x00
-cpuspeed:      .word   CONFIG_SYS_CPUSPEED
-#else /* !CONFIG_SYS_CPUSPEED */
-#error "You have to define CONFIG_SYS_CPUSPEED!!"
-#endif /* CONFIG_SYS_CPUSPEED */
-#endif /* CONFIG_CPU_MONAHANS */
-
-       /* takes care the CP15 update has taken place */
-       .macro CPWAIT reg
-       mrc  p15,0,\reg,c2,c0,0
-       mov  \reg,\reg
-       sub  pc,pc,#4
-       .endm
-
-cpu_init_crit:
-
-       /* mask all IRQs                                                    */
-#ifndef CONFIG_CPU_MONAHANS
-       ldr     r0, IC_BASE
-       mov     r1, #0x00
-       str     r1, [r0, #ICMR]
-#else /* CONFIG_CPU_MONAHANS */
-       /* Step 1 - Enable CP6 permission */
-       mrc     p15, 0, r1, c15, c1, 0  @ read CPAR
-       orr     r1, r1, #0x40
-               mcr     p15, 0, r1, c15, c1, 0
-       CPWAIT  r1
-
-       /* Step 2 - Mask ICMR & ICMR2 */
-       mov     r1, #0
-       mcr     p6, 0, r1, c1, c0, 0    @ ICMR
-       mcr     p6, 0, r1, c7, c0, 0    @ ICMR2
-
-       /* turn off all clocks but the ones we will definitly require */
-       ldr     r1, =CKENA
-       ldr     r2, =(CKENA_22_FFUART | CKENA_10_SRAM | CKENA_9_SMC | CKENA_8_DMC)
-       str     r2, [r1]
-       ldr     r1, =CKENB
-       ldr     r2, =(CKENB_6_IRQ)
-       str     r2, [r1]
-#endif /* !CONFIG_CPU_MONAHANS */
-
-       /* set clock speed */
-#ifdef CONFIG_CPU_MONAHANS
-       ldr     r0, =ACCR
-       ldr     r1, =(((CONFIG_SYS_MONAHANS_TURBO_RUN_MODE_RATIO<<8) & ACCR_XN_MASK) | (CONFIG_SYS_MONAHANS_RUN_MODE_OSC_RATIO & ACCR_XL_MASK))
-       str     r1, [r0]
-#else /* !CONFIG_CPU_MONAHANS */
-#ifdef CONFIG_SYS_CPUSPEED
-       ldr     r0, CC_BASE
-       ldr     r1, cpuspeed
-       str     r1, [r0, #CCCR]
-       mov     r0, #2
-       mcr     p14, 0, r0, c6, c0, 0
-
-setspeed_done:
-
-#endif /* CONFIG_SYS_CPUSPEED */
-#endif /* CONFIG_CPU_MONAHANS */
-
-       /*
-        * before relocating, we have to setup RAM timing
-        * because memory timing is board-dependend, you will
-        * find a lowlevel_init.S in your board directory.
-        */
-       mov     ip,     lr
-       bl      lowlevel_init
-       mov     lr,     ip
-
-       /* Memory interfaces are working. Disable MMU and enable I-cache.   */
-       /* mk: hmm, this is not in the monahans docs, leave it now but
-        *     check here if it doesn't work :-) */
-
-       ldr     r0, =0x2001             /* enable access to all coproc.     */
-       mcr     p15, 0, r0, c15, c1, 0
-       CPWAIT r0
-
-       mcr     p15, 0, r0, c7, c10, 4  /* drain the write & fill buffers   */
-       CPWAIT r0
-
-       mcr     p15, 0, r0, c7, c7, 0   /* flush Icache, Dcache and BTB     */
-       CPWAIT r0
-
-       mcr     p15, 0, r0, c8, c7, 0   /* flush instuction and data TLBs   */
-       CPWAIT r0
-
-       /* Enable the Icache                                                */
-/*
-       mrc     p15, 0, r0, c1, c0, 0
-       orr     r0, r0, #0x1800
-       mcr     p15, 0, r0, c1, c0, 0
-       CPWAIT
-*/
-       mov     pc, lr
+#endif /* CONFIG_PRELOADER */
 
 #ifndef CONFIG_PRELOADER
 /****************************************************************************/
@@ -527,13 +414,7 @@ setspeed_done:
        stmia   sp, {r0 - r12}                  /* Calling r0-r12           */
        add     r8, sp, #S_PC
 
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-       ldr     r2, _armboot_start
-       sub     r2, r2, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN)
-       sub     r2, r2, #(CONFIG_SYS_GBL_DATA_SIZE+8)   @ set base 2 words into abort stack
-#else
        ldr     r2, IRQ_STACK_START_IN
-#endif
        ldmia   r2, {r2 - r4}                   /* get pc, cpsr, old_r0     */
        add     r0, sp, #S_FRAME_SIZE           /* restore sp_SVC           */
 
@@ -568,13 +449,7 @@ setspeed_done:
        .endm
 
        .macro get_bad_stack
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-       ldr     r13, _armboot_start             @ setup our mode stack
-       sub     r13, r13, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN)
-       sub     r13, r13, #(CONFIG_SYS_GBL_DATA_SIZE+8) @ reserved a couple spots in abort stack
-#else
        ldr     r13, IRQ_STACK_START_IN         @ setup our mode stack
-#endif
 
        str     lr, [r13]                       @ save caller lr / spsr
        mrs     lr, spsr
@@ -593,7 +468,7 @@ setspeed_done:
        .macro get_fiq_stack                    @ setup FIQ stack
        ldr     sp, FIQ_STACK_START
        .endm
-#endif /* CONFIG_PRELOADER */
+#endif /* CONFIG_PRELOADER
 
 
 /****************************************************************************/
@@ -607,7 +482,7 @@ setspeed_done:
 do_hang:
        ldr     sp, _TEXT_BASE                  /* use 32 words abort stack */
        bl      hang                            /* hang and never return */
-#else  /* !CONFIG_PRELOADER */
+#else
        .align  5
 undefined_instruction:
        get_bad_stack
@@ -676,8 +551,8 @@ fiq:
 /* perform a watchdog timeout for a soft reset.                                    */
 /*                                                                         */
 /****************************************************************************/
-
-       .align  5
+/* Operating System Timer */
+.align 5
 .globl reset_cpu
 
        /* FIXME: this code is PXA250 specific. How is this handled on      */
@@ -687,19 +562,43 @@ reset_cpu:
 
        /* We set OWE:WME (watchdog enable) and wait until timeout happens  */
 
-       ldr     r0, OSTIMER_BASE
-       ldr     r1, [r0, #OWER]
+       ldr     r0, =OWER
+       ldr     r1, [r0]
        orr     r1, r1, #0x0001                 /* bit0: WME                */
-       str     r1, [r0, #OWER]
+       str     r1, [r0]
 
        /* OS timer does only wrap every 1165 seconds, so we have to set    */
        /* the match register as well.                                      */
 
-       ldr     r1, [r0, #OSCR]                 /* read OS timer            */
+       ldr     r0, =OSCR
+       ldr     r1, [r0]                        /* read OS timer            */
        add     r1, r1, #0x800                  /* let OSMR3 match after    */
        add     r1, r1, #0x800                  /* 4096*(1/3.6864MHz)=1ms   */
-       str     r1, [r0, #OSMR3]
+       ldr     r0, =OSMR3
+       str     r1, [r0]
 
 reset_endless:
 
        b       reset_endless
+
+#ifndef CONFIG_PRELOADER
+.section .mmudata, "a"
+       .align  14
+       .globl  mmu_table
+mmu_table:
+       /* 0x00000000 - 0xa0000000 : 1:1, uncached mapping */
+       .set    __base, 0
+       .rept   0xa00
+       .word   (__base << 20) | 0xc12
+       .set    __base, __base + 1
+       .endr
+
+       /* 0xa0000000 - 0xa0100000 : 1:1, cached mapping */
+       .word   (0xa00 << 20) | 0x1c1e
+
+       .set    __base, 0xa01
+       .rept   0x1000 - 0xa01
+       .word   (__base << 20) | 0xc12
+       .set    __base, __base + 1
+       .endr
+#endif /* CONFIG_PRELOADER */
index 8d0f82679b0a12707ce428d2a9a2bde13e1211a2..ec950c79660ebb1e0c9816a6d0e24a3c9ca3293b 100644 (file)
@@ -26,8 +26,9 @@
  * MA 02111-1307 USA
  */
 
-#include <common.h>
 #include <asm/arch/pxa-regs.h>
+#include <asm/io.h>
+#include <common.h>
 #include <div64.h>
 
 #ifdef CONFIG_USE_IRQ
@@ -86,7 +87,7 @@ void __udelay (unsigned long usec)
 
 void reset_timer_masked (void)
 {
-       OSCR = 0;
+       writel(0, OSCR);
 }
 
 ulong get_timer_masked (void)
@@ -113,7 +114,7 @@ void udelay_masked (unsigned long usec)
  */
 unsigned long long get_ticks(void)
 {
-       return OSCR;
+       return readl(OSCR);
 }
 
 /*
index 74a4c6e90c984c8f312c47afffa4cf1e459718da..d6643f9529b2f95473a2dca4643f00dbfa04c66b 100644 (file)
@@ -41,21 +41,18 @@ SECTIONS
        . = ALIGN(4);
        .data : {
                *(.data)
-       __datarel_start = .;
-               *(.data.rel)
-       __datarelrolocal_start = .;
-               *(.data.rel.ro.local)
-       __datarellocal_start = .;
-               *(.data.rel.local)
-       __datarelro_start = .;
-               *(.data.rel.ro)
        }
 
-       __got_start = .;
        . = ALIGN(4);
-       .got : { *(.got) }
+       __rel_dyn_start = .;
+       .rel.dyn : { *(.rel.dyn) }
+       __rel_dyn_end = .;
+
+       __dynsym_start = .;
+       .dynsym : { *(.dynsym) }
+
+       . = ALIGN(4);
 
-       __got_end = .;
        . = .;
        __u_boot_cmd_start = .;
        .u_boot_cmd : { *(.u_boot_cmd) }
index bd718a6fff8e7c5e85eb3c194d2cb1b9e3038ab9..0311d5e9978480630223ae7c2df68a4226e91521 100644 (file)
 # if defined(CONFIG_CPU_MONAHANS) || defined(CONFIG_PXA27X)
 
 #include <asm/arch/pxa-regs.h>
+#include <asm/io.h>
 #include <usb.h>
 
 int usb_cpu_init(void)
 {
 #if defined(CONFIG_CPU_MONAHANS)
        /* Enable USB host clock. */
-       CKENA |= (CKENA_2_USBHOST |  CKENA_20_UDC);
+       writel(readl(CKENA) | CKENA_2_USBHOST | CKENA_20_UDC, CKENA);
        udelay(100);
 #endif
 #if defined(CONFIG_PXA27X)
        /* Enable USB host clock. */
-       CKEN |= CKEN10_USBHOST;
+       writel(readl(CKEN) | CKEN10_USBHOST, CKEN);
 #endif
 
 #if defined(CONFIG_CPU_MONAHANS)
        /* Configure Port 2 for Host (USB Client Registers) */
-       UP2OCR = 0x3000c;
+       writel(0x3000c, UP2OCR);
 #endif
 
-       UHCHR |= UHCHR_FHR;
+       writel(readl(UHCHR) | UHCHR_FHR, UHCHR);
        wait_ms(11);
-       UHCHR &= ~UHCHR_FHR;
+       writel(readl(UHCHR) & ~UHCHR_FHR, UHCHR);
 
-       UHCHR |= UHCHR_FSBIR;
-       while (UHCHR & UHCHR_FSBIR)
+       writel(readl(UHCHR) | UHCHR_FSBIR, UHCHR);
+       while (readl(UHCHR) & UHCHR_FSBIR)
                udelay(1);
 
 #if defined(CONFIG_CPU_MONAHANS)
-       UHCHR &= ~UHCHR_SSEP0;
+       writel(readl(UHCHR) & ~UHCHR_SSEP0, UHCHR);
 #endif
 #if defined(CONFIG_PXA27X)
-       UHCHR &= ~UHCHR_SSEP2;
+       writel(readl(UHCHR) & ~UHCHR_SSEP2, UHCHR);
 #endif
-       UHCHR &= ~UHCHR_SSEP1;
-       UHCHR &= ~UHCHR_SSE;
+       writel(readl(UHCHR) & ~(UHCHR_SSEP1 | UHCHR_SSE), UHCHR);
 
        return 0;
 }
 
 int usb_cpu_stop(void)
 {
-       UHCHR |= UHCHR_FHR;
+       writel(readl(UHCHR) | UHCHR_FHR, UHCHR);
        udelay(11);
-       UHCHR &= ~UHCHR_FHR;
+       writel(readl(UHCHR) & ~UHCHR_FHR, UHCHR);
 
-       UHCCOMS |= 1;
+       writel(readl(UHCCOMS) | UHCHR_FHR, UHCCOMS);
        udelay(10);
 
 #if defined(CONFIG_CPU_MONAHANS)
-       UHCHR |= UHCHR_SSEP0;
+       writel(readl(UHCHR) | UHCHR_SSEP0, UHCHR);
 #endif
 #if defined(CONFIG_PXA27X)
-       UHCHR |= UHCHR_SSEP2;
+       writel(readl(UHCHR) | UHCHR_SSEP2, UHCHR);
 #endif
-       UHCHR |= UHCHR_SSEP1;
-       UHCHR |= UHCHR_SSE;
-
-       return 0;
-}
-
-int usb_cpu_init_fail(void)
-{
-       UHCHR |= UHCHR_FHR;
-       udelay(11);
-       UHCHR &= ~UHCHR_FHR;
-
-       UHCCOMS |= 1;
-       udelay(10);
+       writel(readl(UHCHR) | UHCHR_SSEP1 | UHCHR_SSE, UHCHR);
 
 #if defined(CONFIG_CPU_MONAHANS)
-       UHCHR |= UHCHR_SSEP0;
+       /* Disable USB host clock. */
+       writel(readl(CKENA) & ~(CKENA_2_USBHOST | CKENA_20_UDC), CKENA);
+       udelay(100);
 #endif
 #if defined(CONFIG_PXA27X)
-       UHCHR |= UHCHR_SSEP2;
+       /* Disable USB host clock. */
+       writel(readl(CKEN) & ~CKEN10_USBHOST, CKEN);
 #endif
-       UHCHR |= UHCHR_SSEP1;
-       UHCHR |= UHCHR_SSE;
 
        return 0;
 }
 
+int usb_cpu_init_fail(void)
+{
+       return usb_cpu_stop();
+}
+
 # endif /* defined(CONFIG_CPU_MONAHANS) || defined(CONFIG_PXA27X) */
 #endif /* defined(CONFIG_USB_OHCI) && defined(CONFIG_SYS_USB_OHCI_CPU_INIT) */
index 20091b24c0eb2ae3cd8deb299f1750e0fe100c6c..67b2c6a695576701d72fee325be1da8f2d3f78ee 100644 (file)
  * MA 02111-1307 USA
  */
 
-
+#include <asm-offsets.h>
 #include <config.h>
 #include <version.h>
 
-
 /*
  * Jump vector table
  */
@@ -67,12 +66,6 @@ _start:      b       reset
 _TEXT_BASE:
        .word   CONFIG_SYS_TEXT_BASE
 
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-.globl _armboot_start
-_armboot_start:
-       .word _start
-#endif
-
 /*
  * These are defined in the board-specific linker script.
  */
@@ -96,7 +89,6 @@ FIQ_STACK_START:
        .word 0x0badc0de
 #endif
 
-#if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
 /* IRQ stack memory (calculated at run-time) + 8 bytes */
 .globl IRQ_STACK_START_IN
 IRQ_STACK_START_IN:
@@ -187,7 +179,6 @@ stack_setup:
        cmp     r0, r6
        beq     clear_bss
 
-#ifndef CONFIG_SKIP_RELOCATE_UBOOT
 copy_loop:
        ldmia   r0!, {r9-r10}           /* copy from source address [r0]    */
        stmia   r6!, {r9-r10}           /* copy to   target address [r1]    */
@@ -212,7 +203,7 @@ fixloop:
        str     r4, [r2]
        add     r2, r2, #4
        cmp     r2, r3
-       bne     fixloop
+       blo     fixloop
 #endif
 /*
        now copy to sram the interrupt vector
@@ -226,7 +217,6 @@ vector_copy_loop:
        stmia   r1!, {r3-r10}
        cmp     r0, r2
        blo     vector_copy_loop
-#endif /* #ifndef CONFIG_SKIP_RELOCATE_UBOOT */
 
 clear_bss:
 #ifndef CONFIG_PRELOADER
@@ -266,84 +256,6 @@ clbss_l:str        r2, [r0]                /* clear loop...                    */
 
 _board_init_r: .word board_init_r
 
-#else /* #if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC) */
-/*
- * the actual reset code
- */
-
-reset:
-       /*
-        * set the cpu to SVC32 mode
-        */
-       mrs     r0,cpsr
-       bic     r0,r0,#0x1f
-       orr     r0,r0,#0x13
-       msr     cpsr,r0
-
-       /*
-        * we do sys-critical inits only at reboot,
-        * not when booting from ram!
-        */
-
-#ifndef CONFIG_SKIP_LOWLEVEL_INIT
-       bl      cpu_init_crit
-       /*
-        * before relocating, we have to setup RAM timing
-        * because memory timing is board-dependend, you will
-        * find a lowlevel_init.S in your board directory.
-        */
-       bl      lowlevel_init
-#endif
-
-#ifndef CONFIG_SKIP_RELOCATE_UBOOT
-relocate:                              /* relocate U-Boot to RAM           */
-       adr     r0, _start              /* r0 <- current position of code   */
-       ldr     r1, _TEXT_BASE          /* test if we run from flash or RAM */
-       cmp     r0, r1                  /* don't reloc during debug         */
-       beq     stack_setup
-
-       ldr     r2, _armboot_start
-       ldr     r3, _bss_start
-       sub     r2, r3, r2              /* r2 <- size of armboot            */
-       add     r2, r0, r2              /* r2 <- source end address         */
-
-copy_loop:
-       ldmia   r0!, {r3-r10}           /* copy from source address [r0]    */
-       stmia   r1!, {r3-r10}           /* copy to   target address [r1]    */
-       cmp     r0, r2                  /* until source end address [r2]    */
-       blo     copy_loop
-
-/*
-       now copy to sram the interrupt vector
-*/
-       adr     r0, real_vectors
-       add     r2, r0, #1024
-       ldr     r1, =0x0c000000
-       add     r1, r1, #0x08
-vector_copy_loop:
-       ldmia   r0!, {r3-r10}
-       stmia   r1!, {r3-r10}
-       cmp     r0, r2
-       blo     vector_copy_loop
-#endif /* CONFIG_SKIP_RELOCATE_UBOOT */
-
-       /* Set up the stack                                                 */
-stack_setup:
-       ldr     r0, _TEXT_BASE          /* upper 128 KiB: relocated uboot   */
-       sub     r0, r0, #CONFIG_SYS_MALLOC_LEN  /* malloc area                      */
-       sub     r0, r0, #CONFIG_SYS_GBL_DATA_SIZE /* bdinfo                        */
-#ifdef CONFIG_USE_IRQ
-       sub     r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ)
-#endif
-       sub     sp, r0, #12             /* leave 3 words for abort-stack    */
-       bic     sp, sp, #7              /* 8-byte alignment for ABI compliance */
-
-       ldr     pc, _start_armboot
-
-_start_armboot:        .word start_armboot
-
-#endif /* #if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC) */
-
 /*
  *************************************************************************
  *
index 8eabb66cabaa3eb5473dbe6c66e28f39e8fd5f83..ace0c074df77f409f2e7f64d04eb648d04615948 100644 (file)
  * MA 02111-1307 USA
  */
 
-
+#include <asm-offsets.h>
 #include <config.h>
 #include <version.h>
 
-
 /*
  *************************************************************************
  *
@@ -77,12 +76,6 @@ _fiq:                        .word fiq
 _TEXT_BASE:
        .word   CONFIG_SYS_TEXT_BASE
 
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-.globl _armboot_start
-_armboot_start:
-       .word _start
-#endif
-
 /*
  * These are defined in the board-specific linker script.
  */
@@ -106,7 +99,6 @@ FIQ_STACK_START:
        .word 0x0badc0de
 #endif
 
-#if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
 /* IRQ stack memory (calculated at run-time) + 8 bytes */
 .globl IRQ_STACK_START_IN
 IRQ_STACK_START_IN:
@@ -191,7 +183,6 @@ stack_setup:
        cmp     r0, r6
        beq     clear_bss
 
-#ifndef CONFIG_SKIP_RELOCATE_UBOOT
 copy_loop:
        ldmia   r0!, {r9-r10}           /* copy from source address [r0]    */
        stmia   r6!, {r9-r10}           /* copy to   target address [r1]    */
@@ -216,9 +207,8 @@ fixloop:
        str     r4, [r2]
        add     r2, r2, #4
        cmp     r2, r3
-       bne     fixloop
+       blo     fixloop
 #endif
-#endif /* #ifndef CONFIG_SKIP_RELOCATE_UBOOT */
 
 clear_bss:
 #ifndef CONFIG_PRELOADER
@@ -255,75 +245,6 @@ clbss_l:str        r2, [r0]                /* clear loop...                    */
 
 _board_init_r: .word board_init_r
 
-#else /* #if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC) */
-
-/*
- * the actual reset code
- */
-
-reset:
-       /*
-        * set the cpu to SVC32 mode
-        */
-       mrs     r0,cpsr
-       bic     r0,r0,#0x1f
-       orr     r0,r0,#0x13
-       msr     cpsr,r0
-
-       /*
-        * we do sys-critical inits only at reboot,
-        * not when booting from ram!
-        */
-#ifndef CONFIG_SKIP_LOWLEVEL_INIT
-       bl      cpu_init_crit
-#endif
-
-#ifndef CONFIG_SKIP_RELOCATE_UBOOT
-relocate:                              /* relocate U-Boot to RAM           */
-       adr     r0, _start              /* r0 <- current position of code   */
-       ldr     r1, _TEXT_BASE          /* test if we run from flash or RAM */
-       cmp     r0, r1                  /* don't reloc during debug         */
-       beq     stack_setup
-
-       ldr     r2, _armboot_start
-       ldr     r3, _bss_start
-       sub     r2, r3, r2              /* r2 <- size of armboot            */
-       add     r2, r0, r2              /* r2 <- source end address         */
-
-copy_loop:
-       ldmia   r0!, {r3-r10}           /* copy from source address [r0]    */
-       stmia   r1!, {r3-r10}           /* copy to   target address [r1]    */
-       cmp     r0, r2                  /* until source end address [r2]    */
-       blo     copy_loop
-#endif /* CONFIG_SKIP_RELOCATE_UBOOT */
-
-       /* Set up the stack                                                 */
-stack_setup:
-       ldr     r0, _TEXT_BASE          /* upper 128 KiB: relocated uboot   */
-       sub     r0, r0, #CONFIG_SYS_MALLOC_LEN  /* malloc area                      */
-       sub     r0, r0, #CONFIG_SYS_GBL_DATA_SIZE /* bdinfo                        */
-#ifdef CONFIG_USE_IRQ
-       sub     r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ)
-#endif
-       sub     sp, r0, #12             /* leave 3 words for abort-stack    */
-       bic     sp, sp, #7              /* 8-byte alignment for ABI compliance */
-
-clear_bss:
-       ldr     r0, _bss_start          /* find start of bss segment        */
-       ldr     r1, _bss_end            /* stop here                        */
-       mov     r2, #0x00000000         /* clear                            */
-
-clbss_l:str    r2, [r0]                /* clear loop...                    */
-       add     r0, r0, #4
-       cmp     r0, r1
-       blo     clbss_l
-
-       ldr     pc, _start_armboot
-
-_start_armboot:        .word start_armboot
-
-#endif /* #if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC) */
-
 /*
  *************************************************************************
  *
@@ -442,13 +363,7 @@ cpu_init_crit:
        stmia   sp, {r0 - r12}                  @ Calling r0-r12
        add     r8, sp, #S_PC
 
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-       ldr     r2, _armboot_start
-       sub     r2, r2, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN)
-       sub     r2, r2, #(CONFIG_SYS_GBL_DATA_SIZE+8)  @ set base 2 words into abort stack
-#else
        ldr     r2, IRQ_STACK_START_IN
-#endif
        ldmia   r2, {r2 - r4}                   @ get pc, cpsr, old_r0
        add     r0, sp, #S_FRAME_SIZE           @ restore sp_SVC
 
@@ -479,13 +394,7 @@ cpu_init_crit:
        .endm
 
        .macro get_bad_stack
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-       ldr     r13, _armboot_start             @ setup our mode stack
-       sub     r13, r13, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN)
-       sub     r13, r13, #(CONFIG_SYS_GBL_DATA_SIZE+8) @ reserved a couple spots in abort stack
-#else
        ldr     r13, IRQ_STACK_START_IN         @ setup our mode stack
-#endif
 
        str     lr, [r13]                       @ save caller lr / spsr
        mrs     lr, spsr
index 9f732a738e2a4dfcbae3a73cbdadb7954ae8742f..f5f80e0b1b1bacb7e1bc4fb21057d2e924c1c2dd 100644 (file)
@@ -18,6 +18,7 @@
 
 #if defined(CONFIG_AT91RM9200)
 #include <asm/arch-at91/at91rm9200.h>
+#define AT91_PMC_UHP   AT91RM9200_PMC_UHP
 #elif defined(CONFIG_AT91SAM9260) || defined(CONFIG_AT91SAM9G20)
 #include <asm/arch/at91sam9260.h>
 #define AT91_BASE_MCI  AT91SAM9260_BASE_MCI
index 5a5aa114a7471b8a513891bf9f5a5fb85fdbc7b0..a755212f0d062b6b1fcb2644e91ce3acdcf37551 100644 (file)
@@ -27,6 +27,7 @@
 extern u32 mx31_get_ipg_clk(void);
 #define imx_get_uartclk mx31_get_ipg_clk
 extern void mx31_gpio_mux(unsigned long mode);
+extern void mx31_set_pad(enum iomux_pins pin, u32 config);
 
 void mx31_uart1_hw_init(void);
 void mx31_spi2_hw_init(void);
diff --git a/arch/arm/include/asm/arch-mx5/asm-offsets.h b/arch/arm/include/asm/arch-mx5/asm-offsets.h
new file mode 100644 (file)
index 0000000..afd2728
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * needed for arch/arm/cpu/armv7/mx51/lowlevel_init.S
+ *
+ * These should be auto-generated
+ */
+/* CCM */
+#define CLKCTL_CCR              0x00
+#define CLKCTL_CCDR             0x04
+#define CLKCTL_CSR              0x08
+#define CLKCTL_CCSR             0x0C
+#define CLKCTL_CACRR            0x10
+#define CLKCTL_CBCDR            0x14
+#define CLKCTL_CBCMR            0x18
+#define CLKCTL_CSCMR1           0x1C
+#define CLKCTL_CSCMR2           0x20
+#define CLKCTL_CSCDR1           0x24
+#define CLKCTL_CS1CDR           0x28
+#define CLKCTL_CS2CDR           0x2C
+#define CLKCTL_CDCDR            0x30
+#define CLKCTL_CHSCCDR          0x34
+#define CLKCTL_CSCDR2           0x38
+#define CLKCTL_CSCDR3           0x3C
+#define CLKCTL_CSCDR4           0x40
+#define CLKCTL_CWDR             0x44
+#define CLKCTL_CDHIPR           0x48
+#define CLKCTL_CDCR             0x4C
+#define CLKCTL_CTOR             0x50
+#define CLKCTL_CLPCR            0x54
+#define CLKCTL_CISR             0x58
+#define CLKCTL_CIMR             0x5C
+#define CLKCTL_CCOSR            0x60
+#define CLKCTL_CGPR             0x64
+#define CLKCTL_CCGR0            0x68
+#define CLKCTL_CCGR1            0x6C
+#define CLKCTL_CCGR2            0x70
+#define CLKCTL_CCGR3            0x74
+#define CLKCTL_CCGR4            0x78
+#define CLKCTL_CCGR5            0x7C
+#define CLKCTL_CCGR6            0x80
+#define CLKCTL_CMEOR            0x84
+
+/* DPLL */
+#define PLL_DP_CTL     0x00
+#define PLL_DP_CONFIG  0x04
+#define PLL_DP_OP      0x08
+#define PLL_DP_MFD     0x0C
+#define PLL_DP_MFN     0x10
+#define PLL_DP_HFS_OP  0x1C
+#define PLL_DP_HFS_MFD 0x20
+#define PLL_DP_HFS_MFN 0x24
diff --git a/arch/arm/include/asm/arch-mx5/clock.h b/arch/arm/include/asm/arch-mx5/clock.h
new file mode 100644 (file)
index 0000000..1f8a537
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * (C) Copyright 2009
+ * Stefano Babic, DENX Software Engineering, sbabic@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 __ASM_ARCH_CLOCK_H
+#define __ASM_ARCH_CLOCK_H
+
+enum mxc_clock {
+       MXC_ARM_CLK = 0,
+       MXC_AHB_CLK,
+       MXC_IPG_CLK,
+       MXC_IPG_PERCLK,
+       MXC_UART_CLK,
+       MXC_CSPI_CLK,
+       MXC_FEC_CLK,
+};
+
+unsigned int imx_decode_pll(unsigned int pll, unsigned int f_ref);
+
+u32 imx_get_uartclk(void);
+u32 imx_get_fecclk(void);
+unsigned int mxc_get_clock(enum mxc_clock clk);
+
+#endif /* __ASM_ARCH_CLOCK_H */
diff --git a/arch/arm/include/asm/arch-mx5/crm_regs.h b/arch/arm/include/asm/arch-mx5/crm_regs.h
new file mode 100644 (file)
index 0000000..4ed8eb3
--- /dev/null
@@ -0,0 +1,203 @@
+/*
+ * (C) Copyright 2009 Freescale Semiconductor, Inc.
+ *
+ * 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 __ARCH_ARM_MACH_MX51_CRM_REGS_H__
+#define __ARCH_ARM_MACH_MX51_CRM_REGS_H__
+
+#define MXC_CCM_BASE   CCM_BASE_ADDR
+
+/* DPLL register mapping structure */
+struct mxc_pll_reg {
+       u32 ctrl;
+       u32 config;
+       u32 op;
+       u32 mfd;
+       u32 mfn;
+       u32 mfn_minus;
+       u32 mfn_plus;
+       u32 hfs_op;
+       u32 hfs_mfd;
+       u32 hfs_mfn;
+       u32 mfn_togc;
+       u32 destat;
+};
+
+/* Register maping of CCM*/
+struct mxc_ccm_reg {
+       u32 ccr;        /* 0x0000 */
+       u32 ccdr;
+       u32 csr;
+       u32 ccsr;
+       u32 cacrr;      /* 0x0010*/
+       u32 cbcdr;
+       u32 cbcmr;
+       u32 cscmr1;
+       u32 cscmr2;     /* 0x0020 */
+       u32 cscdr1;
+       u32 cs1cdr;
+       u32 cs2cdr;
+       u32 cdcdr;      /* 0x0030 */
+       u32 chscdr;
+       u32 cscdr2;
+       u32 cscdr3;
+       u32 cscdr4;     /* 0x0040 */
+       u32 cwdr;
+       u32 cdhipr;
+       u32 cdcr;
+       u32 ctor;       /* 0x0050 */
+       u32 clpcr;
+       u32 cisr;
+       u32 cimr;
+       u32 ccosr;      /* 0x0060 */
+       u32 cgpr;
+       u32 CCGR0;
+       u32 CCGR1;
+       u32 CCGR2;      /* 0x0070 */
+       u32 CCGR3;
+       u32 CCGR4;
+       u32 CCGR5;
+       u32 CCGR6;      /* 0x0080 */
+       u32 cmeor;
+};
+
+/* Define the bits in register CACRR */
+#define MXC_CCM_CACRR_ARM_PODF_OFFSET          0
+#define MXC_CCM_CACRR_ARM_PODF_MASK            0x7
+
+/* Define the bits in register CBCDR */
+#define MXC_CCM_CBCDR_EMI_CLK_SEL              (0x1 << 26)
+#define MXC_CCM_CBCDR_PERIPH_CLK_SEL           (0x1 << 25)
+#define MXC_CCM_CBCDR_EMI_PODF_OFFSET          22
+#define MXC_CCM_CBCDR_EMI_PODF_MASK            (0x7 << 22)
+#define MXC_CCM_CBCDR_AXI_B_PODF_OFFSET                19
+#define MXC_CCM_CBCDR_AXI_B_PODF_MASK          (0x7 << 19)
+#define MXC_CCM_CBCDR_AXI_A_PODF_OFFSET                16
+#define MXC_CCM_CBCDR_AXI_A_PODF_MASK          (0x7 << 16)
+#define MXC_CCM_CBCDR_NFC_PODF_OFFSET          13
+#define MXC_CCM_CBCDR_NFC_PODF_MASK            (0x7 << 13)
+#define MXC_CCM_CBCDR_AHB_PODF_OFFSET          10
+#define MXC_CCM_CBCDR_AHB_PODF_MASK            (0x7 << 10)
+#define MXC_CCM_CBCDR_IPG_PODF_OFFSET          8
+#define MXC_CCM_CBCDR_IPG_PODF_MASK            (0x3 << 8)
+#define MXC_CCM_CBCDR_PERCLK_PRED1_OFFSET      6
+#define MXC_CCM_CBCDR_PERCLK_PRED1_MASK                (0x3 << 6)
+#define MXC_CCM_CBCDR_PERCLK_PRED2_OFFSET      3
+#define MXC_CCM_CBCDR_PERCLK_PRED2_MASK                (0x7 << 3)
+#define MXC_CCM_CBCDR_PERCLK_PODF_OFFSET       0
+#define MXC_CCM_CBCDR_PERCLK_PODF_MASK         0x7
+
+/* Define the bits in register CSCMR1 */
+#define MXC_CCM_CSCMR1_SSI_EXT2_CLK_SEL_OFFSET         30
+#define MXC_CCM_CSCMR1_SSI_EXT2_CLK_SEL_MASK           (0x3 << 30)
+#define MXC_CCM_CSCMR1_SSI_EXT1_CLK_SEL_OFFSET         28
+#define MXC_CCM_CSCMR1_SSI_EXT1_CLK_SEL_MASK           (0x3 << 28)
+#define MXC_CCM_CSCMR1_USB_PHY_CLK_SEL_OFFSET          26
+#define MXC_CCM_CSCMR1_USB_PHY_CLK_SEL                 (0x1 << 26)
+#define MXC_CCM_CSCMR1_UART_CLK_SEL_OFFSET             24
+#define MXC_CCM_CSCMR1_UART_CLK_SEL_MASK               (0x3 << 24)
+#define MXC_CCM_CSCMR1_USBOH3_CLK_SEL_OFFSET           22
+#define MXC_CCM_CSCMR1_USBOH3_CLK_SEL_MASK             (0x3 << 22)
+#define MXC_CCM_CSCMR1_ESDHC1_MSHC1_CLK_SEL_OFFSET     20
+#define MXC_CCM_CSCMR1_ESDHC1_MSHC1_CLK_SEL_MASK       (0x3 << 20)
+#define MXC_CCM_CSCMR1_ESDHC3_CLK_SEL                  (0x1 << 19)
+#define MXC_CCM_CSCMR1_ESDHC4_CLK_SEL                  (0x1 << 18)
+#define MXC_CCM_CSCMR1_ESDHC2_MSHC2_CLK_SEL_OFFSET     16
+#define MXC_CCM_CSCMR1_ESDHC2_MSHC2_CLK_SEL_MASK       (0x3 << 16)
+#define MXC_CCM_CSCMR1_SSI1_CLK_SEL_OFFSET             14
+#define MXC_CCM_CSCMR1_SSI1_CLK_SEL_MASK               (0x3 << 14)
+#define MXC_CCM_CSCMR1_SSI2_CLK_SEL_OFFSET             12
+#define MXC_CCM_CSCMR1_SSI2_CLK_SEL_MASK               (0x3 << 12)
+#define MXC_CCM_CSCMR1_SSI3_CLK_SEL                    (0x1 << 11)
+#define MXC_CCM_CSCMR1_VPU_RCLK_SEL                    (0x1 << 10)
+#define MXC_CCM_CSCMR1_SSI_APM_CLK_SEL_OFFSET          8
+#define MXC_CCM_CSCMR1_SSI_APM_CLK_SEL_MASK            (0x3 << 8)
+#define MXC_CCM_CSCMR1_TVE_CLK_SEL                     (0x1 << 7)
+#define MXC_CCM_CSCMR1_TVE_EXT_CLK_SEL                 (0x1 << 6)
+#define MXC_CCM_CSCMR1_CSPI_CLK_SEL_OFFSET             4
+#define MXC_CCM_CSCMR1_CSPI_CLK_SEL_MASK               (0x3 << 4)
+#define MXC_CCM_CSCMR1_SPDIF_CLK_SEL_OFFSET            2
+#define MXC_CCM_CSCMR1_SPDIF_CLK_SEL_MASK              (0x3 << 2)
+#define MXC_CCM_CSCMR1_SSI_EXT2_COM_CLK_SEL            (0x1 << 1)
+#define MXC_CCM_CSCMR1_SSI_EXT1_COM_CLK_SEL            0x1
+
+/* Define the bits in register CSCDR2 */
+#define MXC_CCM_CSCDR2_CSPI_CLK_PRED_OFFSET            25
+#define MXC_CCM_CSCDR2_CSPI_CLK_PRED_MASK              (0x7 << 25)
+#define MXC_CCM_CSCDR2_CSPI_CLK_PODF_OFFSET            19
+#define MXC_CCM_CSCDR2_CSPI_CLK_PODF_MASK              (0x3F << 19)
+#define MXC_CCM_CSCDR2_SIM_CLK_PRED_OFFSET             16
+#define MXC_CCM_CSCDR2_SIM_CLK_PRED_MASK               (0x7 << 16)
+#define MXC_CCM_CSCDR2_SIM_CLK_PODF_OFFSET             9
+#define MXC_CCM_CSCDR2_SIM_CLK_PODF_MASK               (0x3F << 9)
+#define MXC_CCM_CSCDR2_SLIMBUS_CLK_PRED_OFFSET         6
+#define MXC_CCM_CSCDR2_SLIMBUS_PRED_MASK               (0x7 << 6)
+#define MXC_CCM_CSCDR2_SLIMBUS_PODF_OFFSET             0
+#define MXC_CCM_CSCDR2_SLIMBUS_PODF_MASK               0x3F
+
+/* Define the bits in register CBCMR */
+#define MXC_CCM_CBCMR_VPU_AXI_CLK_SEL_OFFSET           14
+#define MXC_CCM_CBCMR_VPU_AXI_CLK_SEL_MASK             (0x3 << 14)
+#define MXC_CCM_CBCMR_PERIPH_CLK_SEL_OFFSET            12
+#define MXC_CCM_CBCMR_PERIPH_CLK_SEL_MASK              (0x3 << 12)
+#define MXC_CCM_CBCMR_DDR_CLK_SEL_OFFSET               10
+#define MXC_CCM_CBCMR_DDR_CLK_SEL_MASK                 (0x3 << 10)
+#define MXC_CCM_CBCMR_ARM_AXI_CLK_SEL_OFFSET           8
+#define MXC_CCM_CBCMR_ARM_AXI_CLK_SEL_MASK             (0x3 << 8)
+#define MXC_CCM_CBCMR_IPU_HSP_CLK_SEL_OFFSET           6
+#define MXC_CCM_CBCMR_IPU_HSP_CLK_SEL_MASK             (0x3 << 6)
+#define MXC_CCM_CBCMR_GPU_CLK_SEL_OFFSET               4
+#define MXC_CCM_CBCMR_GPU_CLK_SEL_MASK                 (0x3 << 4)
+#define MXC_CCM_CBCMR_PERCLK_LP_APM_CLK_SEL            (0x1 << 1)
+#define MXC_CCM_CBCMR_PERCLK_IPG_CLK_SEL               (0x1 << 0)
+
+/* Define the bits in register CSCDR1 */
+#define MXC_CCM_CSCDR1_ESDHC2_MSHC2_CLK_PRED_OFFSET    22
+#define MXC_CCM_CSCDR1_ESDHC2_MSHC2_CLK_PRED_MASK      (0x7 << 22)
+#define MXC_CCM_CSCDR1_ESDHC2_MSHC2_CLK_PODF_OFFSET    19
+#define MXC_CCM_CSCDR1_ESDHC2_MSHC2_CLK_PODF_MASK      (0x7 << 19)
+#define MXC_CCM_CSCDR1_ESDHC1_MSHC1_CLK_PRED_OFFSET    16
+#define MXC_CCM_CSCDR1_ESDHC1_MSHC1_CLK_PRED_MASK      (0x7 << 16)
+#define MXC_CCM_CSCDR1_PGC_CLK_PODF_OFFSET             14
+#define MXC_CCM_CSCDR1_PGC_CLK_PODF_MASK               (0x3 << 14)
+#define MXC_CCM_CSCDR1_ESDHC1_MSHC1_CLK_PODF_OFFSET    11
+#define MXC_CCM_CSCDR1_ESDHC1_MSHC1_CLK_PODF_MASK      (0x7 << 11)
+#define MXC_CCM_CSCDR1_USBOH3_CLK_PRED_OFFSET          8
+#define MXC_CCM_CSCDR1_USBOH3_CLK_PRED_MASK            (0x7 << 8)
+#define MXC_CCM_CSCDR1_USBOH3_CLK_PODF_OFFSET          6
+#define MXC_CCM_CSCDR1_USBOH3_CLK_PODF_MASK            (0x3 << 6)
+#define MXC_CCM_CSCDR1_UART_CLK_PRED_OFFSET            3
+#define MXC_CCM_CSCDR1_UART_CLK_PRED_MASK              (0x7 << 3)
+#define MXC_CCM_CSCDR1_UART_CLK_PODF_OFFSET            0
+#define MXC_CCM_CSCDR1_UART_CLK_PODF_MASK              0x7
+
+/* Define the bits in register CCDR */
+#define MXC_CCM_CCDR_IPU_HS_MASK                       (0x1 << 17)
+
+/* Define the bits in register CCGRx */
+#define MXC_CCM_CCGR_CG_MASK                           0x3
+
+#define MXC_CCM_CCGR5_CG5_OFFSET                       10
+
+/* Define the bits in register CLPCR */
+#define MXC_CCM_CLPCR_BYPASS_IPU_LPM_HS                 (0x1 << 18)
+
+#endif                         /* __ARCH_ARM_MACH_MX51_CRM_REGS_H__ */
diff --git a/arch/arm/include/asm/arch-mx5/imx-regs.h b/arch/arm/include/asm/arch-mx5/imx-regs.h
new file mode 100644 (file)
index 0000000..3ddda40
--- /dev/null
@@ -0,0 +1,279 @@
+/*
+ * (C) Copyright 2009 Freescale Semiconductor, Inc.
+ *
+ * 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 __ASM_ARCH_MXC_MX51_H__
+#define __ASM_ARCH_MXC_MX51_H__
+
+/*
+ * IRAM
+ */
+#define IRAM_BASE_ADDR         0x1FFE8000      /* internal ram */
+/*
+ * Graphics Memory of GPU
+ */
+#define GPU_BASE_ADDR          0x20000000
+#define GPU_CTRL_BASE_ADDR     0x30000000
+#define IPU_CTRL_BASE_ADDR     0x40000000
+/*
+ * Debug
+ */
+#define DEBUG_BASE_ADDR                0x60000000
+#define ETB_BASE_ADDR          (DEBUG_BASE_ADDR + 0x00001000)
+#define ETM_BASE_ADDR          (DEBUG_BASE_ADDR + 0x00002000)
+#define TPIU_BASE_ADDR         (DEBUG_BASE_ADDR + 0x00003000)
+#define CTI0_BASE_ADDR         (DEBUG_BASE_ADDR + 0x00004000)
+#define CTI1_BASE_ADDR         (DEBUG_BASE_ADDR + 0x00005000)
+#define CTI2_BASE_ADDR         (DEBUG_BASE_ADDR + 0x00006000)
+#define CTI3_BASE_ADDR         (DEBUG_BASE_ADDR + 0x00007000)
+#define CORTEX_DBG_BASE_ADDR   (DEBUG_BASE_ADDR + 0x00008000)
+
+/*
+ * SPBA global module enabled #0
+ */
+#define SPBA0_BASE_ADDR        0x70000000
+
+#define MMC_SDHC1_BASE_ADDR    (SPBA0_BASE_ADDR + 0x00004000)
+#define MMC_SDHC2_BASE_ADDR    (SPBA0_BASE_ADDR + 0x00008000)
+#define UART3_BASE_ADDR        (SPBA0_BASE_ADDR + 0x0000C000)
+#define CSPI1_BASE_ADDR        (SPBA0_BASE_ADDR + 0x00010000)
+#define SSI2_BASE_ADDR         (SPBA0_BASE_ADDR + 0x00014000)
+#define MMC_SDHC3_BASE_ADDR    (SPBA0_BASE_ADDR + 0x00020000)
+#define MMC_SDHC4_BASE_ADDR    (SPBA0_BASE_ADDR + 0x00024000)
+#define SPDIF_BASE_ADDR                (SPBA0_BASE_ADDR + 0x00028000)
+#define ATA_DMA_BASE_ADDR      (SPBA0_BASE_ADDR + 0x00030000)
+#define SLIM_DMA_BASE_ADDR     (SPBA0_BASE_ADDR + 0x00034000)
+#define HSI2C_DMA_BASE_ADDR    (SPBA0_BASE_ADDR + 0x00038000)
+#define SPBA_CTRL_BASE_ADDR    (SPBA0_BASE_ADDR + 0x0003C000)
+
+/*
+ * AIPS 1
+ */
+#define AIPS1_BASE_ADDR        0x73F00000
+
+#define OTG_BASE_ADDR          (AIPS1_BASE_ADDR + 0x00080000)
+#define GPIO1_BASE_ADDR                (AIPS1_BASE_ADDR + 0x00084000)
+#define GPIO2_BASE_ADDR                (AIPS1_BASE_ADDR + 0x00088000)
+#define GPIO3_BASE_ADDR                (AIPS1_BASE_ADDR + 0x0008C000)
+#define GPIO4_BASE_ADDR                (AIPS1_BASE_ADDR + 0x00090000)
+#define KPP_BASE_ADDR          (AIPS1_BASE_ADDR + 0x00094000)
+#define WDOG1_BASE_ADDR                (AIPS1_BASE_ADDR + 0x00098000)
+#define WDOG2_BASE_ADDR                (AIPS1_BASE_ADDR + 0x0009C000)
+#define GPT1_BASE_ADDR         (AIPS1_BASE_ADDR + 0x000A0000)
+#define SRTC_BASE_ADDR         (AIPS1_BASE_ADDR + 0x000A4000)
+#define IOMUXC_BASE_ADDR       (AIPS1_BASE_ADDR + 0x000A8000)
+#define EPIT1_BASE_ADDR                (AIPS1_BASE_ADDR + 0x000AC000)
+#define EPIT2_BASE_ADDR                (AIPS1_BASE_ADDR + 0x000B0000)
+#define PWM1_BASE_ADDR         (AIPS1_BASE_ADDR + 0x000B4000)
+#define PWM2_BASE_ADDR         (AIPS1_BASE_ADDR + 0x000B8000)
+#define UART1_BASE_ADDR                (AIPS1_BASE_ADDR + 0x000BC000)
+#define UART2_BASE_ADDR                (AIPS1_BASE_ADDR + 0x000C0000)
+#define SRC_BASE_ADDR          (AIPS1_BASE_ADDR + 0x000D0000)
+#define CCM_BASE_ADDR          (AIPS1_BASE_ADDR + 0x000D4000)
+#define GPC_BASE_ADDR          (AIPS1_BASE_ADDR + 0x000D8000)
+
+/*
+ * AIPS 2
+ */
+#define AIPS2_BASE_ADDR        0x83F00000
+
+#define PLL1_BASE_ADDR         (AIPS2_BASE_ADDR + 0x00080000)
+#define PLL2_BASE_ADDR         (AIPS2_BASE_ADDR + 0x00084000)
+#define PLL3_BASE_ADDR         (AIPS2_BASE_ADDR + 0x00088000)
+#define AHBMAX_BASE_ADDR       (AIPS2_BASE_ADDR + 0x00094000)
+#define IIM_BASE_ADDR          (AIPS2_BASE_ADDR + 0x00098000)
+#define CSU_BASE_ADDR          (AIPS2_BASE_ADDR + 0x0009C000)
+#define ARM_BASE_ADDR          (AIPS2_BASE_ADDR + 0x000A0000)
+#define OWIRE_BASE_ADDR        (AIPS2_BASE_ADDR + 0x000A4000)
+#define FIRI_BASE_ADDR         (AIPS2_BASE_ADDR + 0x000A8000)
+#define CSPI2_BASE_ADDR                (AIPS2_BASE_ADDR + 0x000AC000)
+#define SDMA_BASE_ADDR         (AIPS2_BASE_ADDR + 0x000B0000)
+#define SCC_BASE_ADDR          (AIPS2_BASE_ADDR + 0x000B4000)
+#define ROMCP_BASE_ADDR                (AIPS2_BASE_ADDR + 0x000B8000)
+#define RTIC_BASE_ADDR         (AIPS2_BASE_ADDR + 0x000BC000)
+#define CSPI3_BASE_ADDR                (AIPS2_BASE_ADDR + 0x000C0000)
+#define I2C2_BASE_ADDR         (AIPS2_BASE_ADDR + 0x000C4000)
+#define I2C1_BASE_ADDR         (AIPS2_BASE_ADDR + 0x000C8000)
+#define SSI1_BASE_ADDR         (AIPS2_BASE_ADDR + 0x000CC000)
+#define AUDMUX_BASE_ADDR       (AIPS2_BASE_ADDR + 0x000D0000)
+#define M4IF_BASE_ADDR         (AIPS2_BASE_ADDR + 0x000D8000)
+#define ESDCTL_BASE_ADDR       (AIPS2_BASE_ADDR + 0x000D9000)
+#define WEIM_BASE_ADDR         (AIPS2_BASE_ADDR + 0x000DA000)
+#define NFC_BASE_ADDR          (AIPS2_BASE_ADDR + 0x000DB000)
+#define EMI_BASE_ADDR          (AIPS2_BASE_ADDR + 0x000DBF00)
+#define MIPI_HSC_BASE_ADDR     (AIPS2_BASE_ADDR + 0x000DC000)
+#define ATA_BASE_ADDR          (AIPS2_BASE_ADDR + 0x000E0000)
+#define SIM_BASE_ADDR          (AIPS2_BASE_ADDR + 0x000E4000)
+#define SSI3BASE_ADDR          (AIPS2_BASE_ADDR + 0x000E8000)
+#define FEC_BASE_ADDR          (AIPS2_BASE_ADDR + 0x000EC000)
+#define TVE_BASE_ADDR          (AIPS2_BASE_ADDR + 0x000F0000)
+#define VPU_BASE_ADDR          (AIPS2_BASE_ADDR + 0x000F4000)
+#define SAHARA_BASE_ADDR       (AIPS2_BASE_ADDR + 0x000F8000)
+
+#define TZIC_BASE_ADDR         0x8FFFC000
+
+/*
+ * Memory regions and CS
+ */
+#define CSD0_BASE_ADDR         0x90000000
+#define CSD1_BASE_ADDR         0xA0000000
+#define CS0_BASE_ADDR          0xB0000000
+#define CS1_BASE_ADDR          0xB8000000
+#define CS2_BASE_ADDR          0xC0000000
+#define CS3_BASE_ADDR          0xC8000000
+#define CS4_BASE_ADDR          0xCC000000
+#define CS5_BASE_ADDR          0xCE000000
+
+/*
+ * NFC
+ */
+#define NFC_BASE_ADDR_AXI      0xCFFF0000      /* NAND flash AXI */
+
+/*!
+ * Number of GPIO port as defined in the IC Spec
+ */
+#define GPIO_PORT_NUM          4
+/*!
+ * Number of GPIO pins per port
+ */
+#define GPIO_NUM_PIN            32
+
+#define IIM_SREV       0x24
+#define ROM_SI_REV     0x48
+
+#define NFC_BUF_SIZE   0x1000
+
+/* M4IF */
+#define M4IF_FBPM0     0x40
+#define M4IF_FIDBP     0x48
+
+/* Assuming 24MHz input clock with doubler ON */
+/*                            MFI         PDF */
+#define DP_OP_850      ((8 << 4) + ((1 - 1)  << 0))
+#define DP_MFD_850     (48 - 1)
+#define DP_MFN_850     41
+
+#define DP_OP_800      ((8 << 4) + ((1 - 1)  << 0))
+#define DP_MFD_800     (3 - 1)
+#define DP_MFN_800     1
+
+#define DP_OP_700      ((7 << 4) + ((1 - 1)  << 0))
+#define DP_MFD_700     (24 - 1)
+#define DP_MFN_700     7
+
+#define DP_OP_665      ((6 << 4) + ((1 - 1)  << 0))
+#define DP_MFD_665     (96 - 1)
+#define DP_MFN_665     89
+
+#define DP_OP_532      ((5 << 4) + ((1 - 1)  << 0))
+#define DP_MFD_532     (24 - 1)
+#define DP_MFN_532     13
+
+#define DP_OP_400      ((8 << 4) + ((2 - 1)  << 0))
+#define DP_MFD_400     (3 - 1)
+#define DP_MFN_400     1
+
+#define DP_OP_216      ((6 << 4) + ((3 - 1)  << 0))
+#define DP_MFD_216     (4 - 1)
+#define DP_MFN_216     3
+
+#define CHIP_REV_1_0            0x10
+#define CHIP_REV_1_1            0x11
+#define CHIP_REV_2_0            0x20
+#define CHIP_REV_2_5           0x25
+#define CHIP_REV_3_0            0x30
+
+#define BOARD_REV_1_0           0x0
+#define BOARD_REV_2_0           0x1
+
+#if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))
+#include <asm/types.h>
+
+#define __REG(x)       (*((volatile u32 *)(x)))
+#define __REG16(x)     (*((volatile u16 *)(x)))
+#define __REG8(x)      (*((volatile u8 *)(x)))
+
+struct clkctl {
+       u32     ccr;
+       u32     ccdr;
+       u32     csr;
+       u32     ccsr;
+       u32     cacrr;
+       u32     cbcdr;
+       u32     cbcmr;
+       u32     cscmr1;
+       u32     cscmr2;
+       u32     cscdr1;
+       u32     cs1cdr;
+       u32     cs2cdr;
+       u32     cdcdr;
+       u32     chsccdr;
+       u32     cscdr2;
+       u32     cscdr3;
+       u32     cscdr4;
+       u32     cwdr;
+       u32     cdhipr;
+       u32     cdcr;
+       u32     ctor;
+       u32     clpcr;
+       u32     cisr;
+       u32     cimr;
+       u32     ccosr;
+       u32     cgpr;
+       u32     ccgr0;
+       u32     ccgr1;
+       u32     ccgr2;
+       u32     ccgr3;
+       u32     ccgr4;
+       u32     ccgr5;
+       u32     ccgr6;
+       u32     cmeor;
+};
+
+/* WEIM registers */
+struct weim {
+       u32     csgcr1;
+       u32     csgcr2;
+       u32     csrcr1;
+       u32     csrcr2;
+       u32     cswcr1;
+       u32     cswcr2;
+};
+
+/* GPIO Registers */
+struct gpio_regs {
+       u32     gpio_dr;
+       u32     gpio_dir;
+       u32     gpio_psr;
+};
+
+/* System Reset Controller (SRC) */
+struct src {
+       u32     scr;
+       u32     sbmr;
+       u32     srsr;
+       u32     reserved1[2];
+       u32     sisr;
+       u32     simr;
+};
+#endif /* __ASSEMBLER__*/
+
+#endif                         /*  __ASM_ARCH_MXC_MX51_H__ */
diff --git a/arch/arm/include/asm/arch-mx5/iomux.h b/arch/arm/include/asm/arch-mx5/iomux.h
new file mode 100644 (file)
index 0000000..0d91a24
--- /dev/null
@@ -0,0 +1,193 @@
+/*
+ * (C) Copyright 2008-2009 Freescale Semiconductor, Inc.
+ *
+ * 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 __MACH_MX5_IOMUX_H__
+#define __MACH_MX5_IOMUX_H__
+
+#include <common.h>
+#include <asm/io.h>
+#include <asm/arch/imx-regs.h>
+#include <asm/arch/mx5x_pins.h>
+
+typedef unsigned int iomux_pin_name_t;
+
+/* various IOMUX output functions */
+typedef enum iomux_config {
+       IOMUX_CONFIG_ALT0,      /*!< used as alternate function 0 */
+       IOMUX_CONFIG_ALT1,      /*!< used as alternate function 1 */
+       IOMUX_CONFIG_ALT2,      /*!< used as alternate function 2 */
+       IOMUX_CONFIG_ALT3,      /*!< used as alternate function 3 */
+       IOMUX_CONFIG_ALT4,      /*!< used as alternate function 4 */
+       IOMUX_CONFIG_ALT5,      /*!< used as alternate function 5 */
+       IOMUX_CONFIG_ALT6,      /*!< used as alternate function 6 */
+       IOMUX_CONFIG_ALT7,      /*!< used as alternate function 7 */
+       IOMUX_CONFIG_GPIO,      /*!< added to help user use GPIO mode */
+       IOMUX_CONFIG_SION = 0x1 << 4,   /*!< used as LOOPBACK:MUX SION bit */
+} iomux_pin_cfg_t;
+
+/* various IOMUX pad functions */
+typedef enum iomux_pad_config {
+       PAD_CTL_SRE_SLOW = 0x0 << 0,    /* Slow slew rate */
+       PAD_CTL_SRE_FAST = 0x1 << 0,    /* Fast slew rate */
+       PAD_CTL_DRV_LOW = 0x0 << 1,     /* Low drive strength */
+       PAD_CTL_DRV_MEDIUM = 0x1 << 1,  /* Medium drive strength */
+       PAD_CTL_DRV_HIGH = 0x2 << 1,    /* High drive strength */
+       PAD_CTL_DRV_MAX = 0x3 << 1,     /* Max drive strength */
+       PAD_CTL_ODE_OPENDRAIN_NONE = 0x0 << 3,  /* Opendrain disable */
+       PAD_CTL_ODE_OPENDRAIN_ENABLE = 0x1 << 3,/* Opendrain enable */
+       PAD_CTL_100K_PD = 0x0 << 4,     /* 100Kohm pulldown */
+       PAD_CTL_47K_PU = 0x1 << 4,      /* 47Kohm pullup */
+       PAD_CTL_100K_PU = 0x2 << 4,     /* 100Kohm pullup */
+       PAD_CTL_22K_PU = 0x3 << 4,      /* 22Kohm pullup */
+       PAD_CTL_PUE_KEEPER = 0x0 << 6,  /* enable pulldown */
+       PAD_CTL_PUE_PULL = 0x1 << 6,    /* enable pullup */
+       PAD_CTL_PKE_NONE = 0x0 << 7,    /* Disable pullup/pulldown */
+       PAD_CTL_PKE_ENABLE = 0x1 << 7,  /* Enable pullup/pulldown */
+       PAD_CTL_HYS_NONE = 0x0 << 8,    /* Hysteresis disabled */
+       PAD_CTL_HYS_ENABLE = 0x1 << 8,  /* Hysteresis enabled */
+       PAD_CTL_DDR_INPUT_CMOS = 0x0 << 9,/* DDR input CMOS */
+       PAD_CTL_DDR_INPUT_DDR = 0x1 << 9,/* DDR input DDR */
+       PAD_CTL_DRV_VOT_LOW = 0x0 << 13, /* Low voltage mode */
+       PAD_CTL_DRV_VOT_HIGH = 0x1 << 13,/* High voltage mode */
+} iomux_pad_config_t;
+
+/* various IOMUX input select register index */
+typedef enum iomux_input_select {
+       MUX_IN_AUDMUX_P4_INPUT_DA_AMX_SELECT_I = 0,
+       MUX_IN_AUDMUX_P4_INPUT_DB_AMX_SELECT_I,
+       MUX_IN_AUDMUX_P4_INPUT_TXCLK_AMX_SELECT_INPUT,
+       MUX_IN_AUDMUX_P4_INPUT_TXFS_AMX_SELECT_INPUT,
+       MUX_IN_AUDMUX_P5_INPUT_DA_AMX_SELECT_INPUT,
+       MUX_IN_AUDMUX_P5_INPUT_DB_AMX_SELECT_INPUT,
+       MUX_IN_AUDMUX_P5_INPUT_RXCLK_AMX_SELECT_INPUT,
+       MUX_IN_AUDMUX_P5_INPUT_RXFS_AMX_SELECT,
+       MUX_IN_AUDMUX_P5_INPUT_TXCLK_AMX_SELECT_INPUT,
+       MUX_IN_AUDMUX_P5_INPUT_TXFS_AMX_SELECT_INPUT,
+       MUX_IN_AUDMUX_P6_INPUT_DA_AMX_SELECT_INPUT,
+       MUX_IN_AUDMUX_P6_INPUT_DB_AMX_SELECT_INPUT,
+       MUX_IN_AUDMUX_P6_INPUT_RXCLK_AMX_SELECT_INPUT,
+       MUX_IN_AUDMUX_P6_INPUT_RXFS_AMX_SELECT_INPUT,
+       MUX_IN_AUDMUX_P6_INPUT_TXCLK_AMX_SELECT_INPUT,
+       MUX_IN_AUDMUX_P6_INPUT_TXFS_AMX_SELECT_INPUT,
+       MUX_IN_CCM_IPP_DI_CLK_SELECT_INPUT,
+       /* TO2 */
+       MUX_IN_CCM_IPP_DI1_CLK_SELECT_INPUT,
+       MUX_IN_CCM_PLL1_BYPASS_CLK_SELECT_INPUT,
+       MUX_IN_CCM_PLL2_BYPASS_CLK_SELECT_INPUT,
+       MUX_IN_CSPI_IPP_CSPI_CLK_IN_SELECT_INPUT,
+       MUX_IN_CSPI_IPP_IND_MISO_SELECT_INPUT,
+       MUX_IN_CSPI_IPP_IND_MOSI_SELECT_INPUT,
+       MUX_IN_CSPI_IPP_IND_SS_B_1_SELECT_INPUT,
+       MUX_IN_CSPI_IPP_IND_SS_B_2_SELECT_INPUT,
+       MUX_IN_CSPI_IPP_IND_SS_B_3_SELECT_INPUT,
+       MUX_IN_DPLLIP1_L1T_TOG_EN_SELECT_INPUT,
+       /* TO2 */
+       MUX_IN_ECSPI2_IPP_IND_SS_B_1_SELECT_INPUT,
+       MUX_IN_ECSPI2_IPP_IND_SS_B_3_SELECT_INPUT,
+       MUX_IN_EMI_IPP_IND_RDY_INT_SELECT_INPUT,
+       MUX_IN_ESDHC3_IPP_DAT0_IN_SELECT_INPUT,
+       MUX_IN_ESDHC3_IPP_DAT1_IN_SELECT_INPUT,
+       MUX_IN_ESDHC3_IPP_DAT2_IN_SELECT_INPUT,
+       MUX_IN_ESDHC3_IPP_DAT3_IN_SELECT_INPUT,
+       MUX_IN_FEC_FEC_COL_SELECT_INPUT,
+       MUX_IN_FEC_FEC_CRS_SELECT_INPUT,
+       MUX_IN_FEC_FEC_MDI_SELECT_INPUT,
+       MUX_IN_FEC_FEC_RDATA_0_SELECT_INPUT,
+       MUX_IN_FEC_FEC_RDATA_1_SELECT_INPUT,
+       MUX_IN_FEC_FEC_RDATA_2_SELECT_INPUT,
+       MUX_IN_FEC_FEC_RDATA_3_SELECT_INPUT,
+       MUX_IN_FEC_FEC_RX_CLK_SELECT_INPUT,
+       MUX_IN_FEC_FEC_RX_DV_SELECT_INPUT,
+       MUX_IN_FEC_FEC_RX_ER_SELECT_INPUT,
+       MUX_IN_FEC_FEC_TX_CLK_SELECT_INPUT,
+       MUX_IN_GPIO3_IPP_IND_G_IN_1_SELECT_INPUT,
+       MUX_IN_GPIO3_IPP_IND_G_IN_2_SELECT_INPUT,
+       MUX_IN_GPIO3_IPP_IND_G_IN_3_SELECT_INPUT,
+       MUX_IN_GPIO3_IPP_IND_G_IN_4_SELECT_INPUT,
+       MUX_IN_GPIO3_IPP_IND_G_IN_5_SELECT_INPUT,
+       MUX_IN_GPIO3_IPP_IND_G_IN_6_SELECT_INPUT,
+       MUX_IN_GPIO3_IPP_IND_G_IN_7_SELECT_INPUT,
+       MUX_IN_GPIO3_IPP_IND_G_IN_8_SELECT_INPUT,
+       /* TO2 */
+       MUX_IN_GPIO3_IPP_IND_G_IN_12_SELECT_INPUT,
+       MUX_IN_HSC_MIPI_MIX_IPP_IND_SENS1_DATA_EN_SELECT_INPUT,
+       MUX_IN_HSC_MIPI_MIX_IPP_IND_SENS2_DATA_EN_SELECT_INPUT,
+       /* TO2 */
+       MUX_IN_HSC_MIPI_MIX_PAR_VSYNC_SELECT_INPUT,
+       /* TO2 */
+       MUX_IN_HSC_MIPI_MIX_PAR_DI_WAIT_SELECT_INPUT,
+       MUX_IN_HSC_MIPI_MIX_PAR_SISG_TRIG_SELECT_INPUT,
+       MUX_IN_I2C1_IPP_SCL_IN_SELECT_INPUT,
+       MUX_IN_I2C1_IPP_SDA_IN_SELECT_INPUT,
+       MUX_IN_I2C2_IPP_SCL_IN_SELECT_INPUT,
+       MUX_IN_I2C2_IPP_SDA_IN_SELECT_INPUT,
+
+       MUX_IN_IPU_IPP_DI_0_IND_DISPB_SD_D_SELECT_INPUT,
+
+       MUX_IN_IPU_IPP_DI_1_IND_DISPB_SD_D_SELECT_INPUT,
+
+       MUX_IN_KPP_IPP_IND_COL_6_SELECT_INPUT,
+       MUX_IN_KPP_IPP_IND_COL_7_SELECT_INPUT,
+       MUX_IN_KPP_IPP_IND_ROW_4_SELECT_INPUT,
+       MUX_IN_KPP_IPP_IND_ROW_5_SELECT_INPUT,
+       MUX_IN_KPP_IPP_IND_ROW_6_SELECT_INPUT,
+       MUX_IN_KPP_IPP_IND_ROW_7_SELECT_INPUT,
+       MUX_IN_UART1_IPP_UART_RTS_B_SELECT_INPUT,
+       MUX_IN_UART1_IPP_UART_RXD_MUX_SELECT_INPUT,
+       MUX_IN_UART2_IPP_UART_RTS_B_SELECT_INPUT,
+       MUX_IN_UART2_IPP_UART_RXD_MUX_SELECT_INPUT,
+       MUX_IN_UART3_IPP_UART_RTS_B_SELECT_INPUT,
+       MUX_IN_UART3_IPP_UART_RXD_MUX_SELECT_INPUT,
+       MUX_IN_USBOH3_IPP_IND_UH3_CLK_SELECT_INPUT,
+       MUX_IN_USBOH3_IPP_IND_UH3_DATA_0_SELECT_INPUT,
+       MUX_IN_USBOH3_IPP_IND_UH3_DATA_1_SELECT_INPUT,
+       MUX_IN_USBOH3_IPP_IND_UH3_DATA_2_SELECT_INPUT,
+       MUX_IN_USBOH3_IPP_IND_UH3_DATA_3_SELECT_INPUT,
+       MUX_IN_USBOH3_IPP_IND_UH3_DATA_4_SELECT_INPUT,
+       MUX_IN_USBOH3_IPP_IND_UH3_DATA_5_SELECT_INPUT,
+       MUX_IN_USBOH3_IPP_IND_UH3_DATA_6_SELECT_INPUT,
+       MUX_IN_USBOH3_IPP_IND_UH3_DATA_7_SELECT_INPUT,
+       MUX_IN_USBOH3_IPP_IND_UH3_DIR_SELECT_INPUT,
+       MUX_IN_USBOH3_IPP_IND_UH3_NXT_SELECT_INPUT,
+       MUX_IN_USBOH3_IPP_IND_UH3_STP_SELECT_INPUT,
+       MUX_INPUT_NUM_MUX,
+} iomux_input_select_t;
+
+/* various IOMUX input functions */
+typedef enum iomux_input_config {
+       INPUT_CTL_PATH0 = 0x0,
+       INPUT_CTL_PATH1,
+       INPUT_CTL_PATH2,
+       INPUT_CTL_PATH3,
+       INPUT_CTL_PATH4,
+       INPUT_CTL_PATH5,
+       INPUT_CTL_PATH6,
+       INPUT_CTL_PATH7,
+} iomux_input_config_t;
+
+void mxc_request_iomux(iomux_pin_name_t pin, iomux_pin_cfg_t config);
+void mxc_free_iomux(iomux_pin_name_t pin, iomux_pin_cfg_t config);
+void mxc_iomux_set_pad(iomux_pin_name_t pin, u32 config);
+unsigned int mxc_iomux_get_pad(iomux_pin_name_t pin);
+void mxc_iomux_set_input(iomux_input_select_t input, u32 config);
+
+#endif                         /*  __MACH_MX5_IOMUX_H__ */
diff --git a/arch/arm/include/asm/arch-mx5/mx5x_pins.h b/arch/arm/include/asm/arch-mx5/mx5x_pins.h
new file mode 100644 (file)
index 0000000..a564fce
--- /dev/null
@@ -0,0 +1,418 @@
+/*
+ * (C) Copyright 2008-2009 Freescale Semiconductor, Inc.
+ *
+ * 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 __ASM_ARCH_MX5_MX5X_PINS_H__
+#define __ASM_ARCH_MX5_MX5X_PINS_H__
+
+#ifndef __ASSEMBLY__
+
+/*
+ * In order to identify pins more effectively, each mux-controlled pin's
+ * enumerated value is constructed in the following way:
+ *
+ * -------------------------------------------------------------------
+ * 31-29 | 28 - 24 |  23 - 21 | 20  - 10| 9 - 0
+ * -------------------------------------------------------------------
+ * IO_P  |  IO_I   | GPIO_I   | PAD_I   | MUX_I
+ * -------------------------------------------------------------------
+ *
+ * Bit 0 to 9 contains MUX_I used to identify the register
+ * offset (0-based. base is IOMUX_module_base) defined in the Section
+ * "sw_pad_ctl & sw_mux_ctl details" of the IC Spec. The
+ * similar field definitions are used for the pad control register.
+ * The IOMUX controller can be split in two parts. At the begeinning,
+ * there is the register definitions for the multiplexing each pin.
+ * Then there is a set of registers (PAD_I) to configure each pin
+ * (pullup, pulldown, etc).
+ * PAD_I defines the offset of the pad register for each pin.
+ * GPIO_I defines, if available, the number of gpio that can be
+ * connected to that pad
+ * IO_I defines the multiplexer mode required to set the pad in gpio mode
+ * IO_P defines the gpio structure (gpio1..gpio4) the pad belongs
+ *
+ * For example, the MX51_PIN_ETM_D0 is defined in the enumeration:
+ *    ( (0x28 - MUX_I_START) << MUX_I)|( (0x250 - PAD_I_START) << PAD_I)
+ * It means the mux control register is at register offset 0x28. The pad control
+ * register offset is: 0x250 and also occupy the least significant bits
+ * within the register.
+ */
+
+/*!
+ * Starting bit position within each entry of \b iomux_pins to represent the
+ * MUX control register offset
+ */
+#define MUX_I                  0
+/*!
+ * Starting bit position within each entry of \b iomux_pins to represent the
+ * PAD control register offset
+ */
+#define PAD_I                  10
+/*!
+ * Starting bit position within each entry of \b iomux_pins to represent which
+ * mux mode is for GPIO (0-based)
+ */
+#define GPIO_I                 21
+
+#define MUX_IO_P                29
+#define MUX_IO_I                24
+#define IOMUX_TO_GPIO(pin)      ((((unsigned int)pin >> MUX_IO_P) * \
+                                       GPIO_NUM_PIN) + ((pin >> MUX_IO_I) &\
+                                       ((1 << (MUX_IO_P - MUX_IO_I)) - 1)))
+#define IOMUX_TO_IRQ(pin)       (MXC_GPIO_INT_BASE + IOMUX_TO_GPIO(pin))
+#define GPIO_TO_PORT(n)         (n / GPIO_NUM_PIN)
+#define GPIO_TO_INDEX(n)        (n % GPIO_NUM_PIN)
+
+#define NON_GPIO_PORT          0x7
+#define PIN_TO_MUX_MASK                ((1 << (PAD_I - MUX_I)) - 1)
+#define PIN_TO_PAD_MASK                ((1 << (GPIO_I - PAD_I)) - 1)
+#define PIN_TO_ALT_GPIO_MASK           ((1 << (MUX_IO_I - GPIO_I)) - 1)
+
+#define NON_MUX_I              PIN_TO_MUX_MASK
+#define MUX_I_START            0x001C
+#define PAD_I_START            0x3F0
+#define INPUT_CTL_START                0x8C4
+#define INPUT_CTL_START_TO1    0x928
+#define MUX_I_END              (PAD_I_START - 4)
+
+#define _MXC_BUILD_PIN(gp, gi, ga, mi, pi) \
+       (((gp) << MUX_IO_P) | ((gi) << MUX_IO_I) | \
+       ((mi) << MUX_I) | \
+       ((pi - PAD_I_START) << PAD_I) | \
+       ((ga) << GPIO_I))
+
+#define _MXC_BUILD_GPIO_PIN(gp, gi, ga, mi, pi) \
+       _MXC_BUILD_PIN(gp, gi, ga, mi, pi)
+
+#define _MXC_BUILD_NON_GPIO_PIN(mi, pi) \
+       _MXC_BUILD_PIN(NON_GPIO_PORT, 0, 0, mi, pi)
+
+#define PIN_TO_IOMUX_MUX(pin)  ((pin >> MUX_I) & PIN_TO_MUX_MASK)
+#define PIN_TO_IOMUX_PAD(pin)  ((pin >> PAD_I) & PIN_TO_PAD_MASK)
+#define PIN_TO_ALT_GPIO(pin)   ((pin >> GPIO_I) & PIN_TO_ALT_GPIO_MASK)
+#define PIN_TO_IOMUX_INDEX(pin)        (PIN_TO_IOMUX_MUX(pin) >> 2)
+
+/*
+ * This enumeration is constructed based on the Section
+ * "sw_pad_ctl & sw_mux_ctl details" of the MX51 IC Spec. Each enumerated
+ * value is constructed based on the rules described above.
+ */
+enum iomux_pins {
+       MX51_PIN_EIM_DA0 = _MXC_BUILD_NON_GPIO_PIN(0x1C, 0x7A8),
+       MX51_PIN_EIM_DA1 = _MXC_BUILD_NON_GPIO_PIN(0x20, 0x7A8),
+       MX51_PIN_EIM_DA2 = _MXC_BUILD_NON_GPIO_PIN(0x24, 0x7A8),
+       MX51_PIN_EIM_DA3 = _MXC_BUILD_NON_GPIO_PIN(0x28, 0x7A8),
+       MX51_PIN_EIM_DA4 = _MXC_BUILD_NON_GPIO_PIN(0x2C, 0x7AC),
+       MX51_PIN_EIM_DA5 = _MXC_BUILD_NON_GPIO_PIN(0x30, 0x7AC),
+       MX51_PIN_EIM_DA6 = _MXC_BUILD_NON_GPIO_PIN(0x34, 0x7AC),
+       MX51_PIN_EIM_DA7 = _MXC_BUILD_NON_GPIO_PIN(0x38, 0x7AC),
+       MX51_PIN_EIM_DA8 = _MXC_BUILD_NON_GPIO_PIN(0x3C, 0x7B0),
+       MX51_PIN_EIM_DA9 = _MXC_BUILD_NON_GPIO_PIN(0x40, 0x7B0),
+       MX51_PIN_EIM_DA10 = _MXC_BUILD_NON_GPIO_PIN(0x44, 0x7B0),
+       MX51_PIN_EIM_DA11 = _MXC_BUILD_NON_GPIO_PIN(0x48, 0x7B0),
+       MX51_PIN_EIM_DA12 = _MXC_BUILD_NON_GPIO_PIN(0x4C, 0x7BC),
+       MX51_PIN_EIM_DA13 = _MXC_BUILD_NON_GPIO_PIN(0x50, 0x7BC),
+       MX51_PIN_EIM_DA14 = _MXC_BUILD_NON_GPIO_PIN(0x54, 0x7BC),
+       MX51_PIN_EIM_DA15 = _MXC_BUILD_NON_GPIO_PIN(0x58, 0x7BC),
+       MX51_PIN_EIM_D16 = _MXC_BUILD_GPIO_PIN(1, 0, 1, 0x5C, 0x3F0),
+       MX51_PIN_EIM_D17 = _MXC_BUILD_GPIO_PIN(1, 1, 1, 0x60, 0x3F4),
+       MX51_PIN_EIM_D18 = _MXC_BUILD_GPIO_PIN(1, 2, 1, 0x64, 0x3F8),
+       MX51_PIN_EIM_D19 = _MXC_BUILD_GPIO_PIN(1, 3, 1, 0x68, 0x3FC),
+       MX51_PIN_EIM_D20 = _MXC_BUILD_GPIO_PIN(1, 4, 1, 0x6C, 0x400),
+       MX51_PIN_EIM_D21 = _MXC_BUILD_GPIO_PIN(1, 5, 1, 0x70, 0x404),
+       MX51_PIN_EIM_D22 = _MXC_BUILD_GPIO_PIN(1, 6, 1, 0x74, 0x408),
+       MX51_PIN_EIM_D23 = _MXC_BUILD_GPIO_PIN(1, 7, 1, 0x78, 0x40C),
+       MX51_PIN_EIM_D24 = _MXC_BUILD_GPIO_PIN(1, 8, 1, 0x7C, 0x410),
+       MX51_PIN_EIM_D25 = _MXC_BUILD_NON_GPIO_PIN(0x80, 0x414),
+       MX51_PIN_EIM_D26 = _MXC_BUILD_NON_GPIO_PIN(0x84, 0x418),
+       MX51_PIN_EIM_D27 = _MXC_BUILD_GPIO_PIN(1, 9, 1, 0x88, 0x41C),
+       MX51_PIN_EIM_D28 = _MXC_BUILD_NON_GPIO_PIN(0x8C, 0x420),
+       MX51_PIN_EIM_D29 = _MXC_BUILD_NON_GPIO_PIN(0x90, 0x424),
+       MX51_PIN_EIM_D30 = _MXC_BUILD_NON_GPIO_PIN(0x94, 0x428),
+       MX51_PIN_EIM_D31 = _MXC_BUILD_NON_GPIO_PIN(0x98, 0x42C),
+       MX51_PIN_EIM_A16 = _MXC_BUILD_GPIO_PIN(1, 10, 1, 0x9C, 0x430),
+       MX51_PIN_EIM_A17 = _MXC_BUILD_GPIO_PIN(1, 11, 1, 0xA0, 0x434),
+       MX51_PIN_EIM_A18 = _MXC_BUILD_GPIO_PIN(1, 12, 1, 0xA4, 0x438),
+       MX51_PIN_EIM_A19 = _MXC_BUILD_GPIO_PIN(1, 13, 1, 0xA8, 0x43C),
+       MX51_PIN_EIM_A20 = _MXC_BUILD_GPIO_PIN(1, 14, 1, 0xAC, 0x440),
+       MX51_PIN_EIM_A21 = _MXC_BUILD_GPIO_PIN(1, 15, 1, 0xB0, 0x444),
+       MX51_PIN_EIM_A22 = _MXC_BUILD_GPIO_PIN(1, 16, 1, 0xB4, 0x448),
+       MX51_PIN_EIM_A23 = _MXC_BUILD_GPIO_PIN(1, 17, 1, 0xB8, 0x44C),
+       MX51_PIN_EIM_A24 = _MXC_BUILD_GPIO_PIN(1, 18, 1, 0xBC, 0x450),
+       MX51_PIN_EIM_A25 = _MXC_BUILD_GPIO_PIN(1, 19, 1, 0xC0, 0x454),
+       MX51_PIN_EIM_A26 = _MXC_BUILD_GPIO_PIN(1, 20, 1, 0xC4, 0x458),
+       MX51_PIN_EIM_A27 = _MXC_BUILD_GPIO_PIN(1, 21, 1, 0xC8, 0x45C),
+       MX51_PIN_EIM_EB0 = _MXC_BUILD_NON_GPIO_PIN(0xCC, 0x460),
+       MX51_PIN_EIM_EB1 = _MXC_BUILD_NON_GPIO_PIN(0xD0, 0x464),
+       MX51_PIN_EIM_EB2 = _MXC_BUILD_GPIO_PIN(1, 22, 1, 0xD4, 0x468),
+       MX51_PIN_EIM_EB3 = _MXC_BUILD_GPIO_PIN(1, 23, 1, 0xD8, 0x46C),
+       MX51_PIN_EIM_OE = _MXC_BUILD_GPIO_PIN(1, 24, 1, 0xDC, 0x470),
+       MX51_PIN_EIM_CS0 = _MXC_BUILD_GPIO_PIN(1, 25, 1, 0xE0, 0x474),
+       MX51_PIN_EIM_CS1 = _MXC_BUILD_GPIO_PIN(1, 26, 1, 0xE4, 0x478),
+       MX51_PIN_EIM_CS2 = _MXC_BUILD_GPIO_PIN(1, 27, 1, 0xE8, 0x47C),
+       MX51_PIN_EIM_CS3 = _MXC_BUILD_GPIO_PIN(1, 28, 1, 0xEC, 0x480),
+       MX51_PIN_EIM_CS4 = _MXC_BUILD_GPIO_PIN(1, 29, 1, 0xF0, 0x484),
+       MX51_PIN_EIM_CS5 = _MXC_BUILD_GPIO_PIN(1, 30, 1, 0xF4, 0x488),
+       MX51_PIN_EIM_DTACK = _MXC_BUILD_GPIO_PIN(1, 31, 1, 0xF8, 0x48C),
+       MX51_PIN_EIM_LBA = _MXC_BUILD_GPIO_PIN(2, 1, 1, 0xFC, 0x494),
+       MX51_PIN_EIM_CRE = _MXC_BUILD_GPIO_PIN(2, 2, 1, 0x100, 0x4A0),
+       MX51_PIN_DRAM_CS1 = _MXC_BUILD_NON_GPIO_PIN(0x104, 0x4D0),
+       MX51_PIN_NANDF_WE_B = _MXC_BUILD_GPIO_PIN(2, 3, 3, 0x108, 0x4E4),
+       MX51_PIN_NANDF_RE_B = _MXC_BUILD_GPIO_PIN(2, 4, 3, 0x10C, 0x4E8),
+       MX51_PIN_NANDF_ALE = _MXC_BUILD_GPIO_PIN(2, 5, 3, 0x110, 0x4EC),
+       MX51_PIN_NANDF_CLE = _MXC_BUILD_GPIO_PIN(2, 6, 3, 0x114, 0x4F0),
+       MX51_PIN_NANDF_WP_B = _MXC_BUILD_GPIO_PIN(2, 7, 3, 0x118, 0x4F4),
+       MX51_PIN_NANDF_RB0 = _MXC_BUILD_GPIO_PIN(2, 8, 3, 0x11C, 0x4F8),
+       MX51_PIN_NANDF_RB1 = _MXC_BUILD_GPIO_PIN(2, 9, 3, 0x120, 0x4FC),
+       MX51_PIN_NANDF_RB2 = _MXC_BUILD_GPIO_PIN(2, 10, 3, 0x124, 0x500),
+       MX51_PIN_NANDF_RB3 = _MXC_BUILD_GPIO_PIN(2, 11, 3, 0x128, 0x504),
+       MX51_PIN_GPIO_NAND = _MXC_BUILD_GPIO_PIN(2, 12, 3, 0x12C, 0x514),
+       MX51_PIN_NANDF_RB4 = MX51_PIN_GPIO_NAND,
+       MX51_PIN_NANDF_RB5 = _MXC_BUILD_GPIO_PIN(2, 13, 3, 0x130, 0x5D8),
+       MX51_PIN_NANDF_RB6 = _MXC_BUILD_GPIO_PIN(2, 14, 3, 0x134, 0x5DC),
+       MX51_PIN_NANDF_RB7 = _MXC_BUILD_GPIO_PIN(2, 15, 3, 0x138, 0x5E0),
+       MX51_PIN_NANDF_CS0 = _MXC_BUILD_GPIO_PIN(2, 16, 3, 0x130, 0x518),
+       MX51_PIN_NANDF_CS1 = _MXC_BUILD_GPIO_PIN(2, 17, 3, 0x134, 0x51C),
+       MX51_PIN_NANDF_CS2 = _MXC_BUILD_GPIO_PIN(2, 18, 3, 0x138, 0x520),
+       MX51_PIN_NANDF_CS3 = _MXC_BUILD_GPIO_PIN(2, 19, 3, 0x13C, 0x524),
+       MX51_PIN_NANDF_CS4 = _MXC_BUILD_GPIO_PIN(2, 20, 3, 0x140, 0x528),
+       MX51_PIN_NANDF_CS5 = _MXC_BUILD_GPIO_PIN(2, 21, 3, 0x144, 0x52C),
+       MX51_PIN_NANDF_CS6 = _MXC_BUILD_GPIO_PIN(2, 22, 3, 0x148, 0x530),
+       MX51_PIN_NANDF_CS7 = _MXC_BUILD_GPIO_PIN(2, 23, 3, 0x14C, 0x534),
+       MX51_PIN_NANDF_RDY_INT = _MXC_BUILD_GPIO_PIN(2, 24, 3, 0x150, 0x538),
+       MX51_PIN_NANDF_D15 = _MXC_BUILD_GPIO_PIN(2, 25, 3, 0x154, 0x53C),
+       MX51_PIN_NANDF_D14 = _MXC_BUILD_GPIO_PIN(2, 26, 3, 0x158, 0x540),
+       MX51_PIN_NANDF_D13 = _MXC_BUILD_GPIO_PIN(2, 27, 3, 0x15C, 0x544),
+       MX51_PIN_NANDF_D12 = _MXC_BUILD_GPIO_PIN(2, 28, 3, 0x160, 0x548),
+       MX51_PIN_NANDF_D11 = _MXC_BUILD_GPIO_PIN(2, 29, 3, 0x164, 0x54C),
+       MX51_PIN_NANDF_D10 = _MXC_BUILD_GPIO_PIN(2, 30, 3, 0x168, 0x550),
+       MX51_PIN_NANDF_D9 = _MXC_BUILD_GPIO_PIN(2, 31, 3, 0x16C, 0x554),
+       MX51_PIN_NANDF_D8 = _MXC_BUILD_GPIO_PIN(3, 0, 3, 0x170, 0x558),
+       MX51_PIN_NANDF_D7 = _MXC_BUILD_GPIO_PIN(3, 1, 3, 0x174, 0x55C),
+       MX51_PIN_NANDF_D6 = _MXC_BUILD_GPIO_PIN(3, 2, 3, 0x178, 0x560),
+       MX51_PIN_NANDF_D5 = _MXC_BUILD_GPIO_PIN(3, 3, 3, 0x17C, 0x564),
+       MX51_PIN_NANDF_D4 = _MXC_BUILD_GPIO_PIN(3, 4, 3, 0x180, 0x568),
+       MX51_PIN_NANDF_D3 = _MXC_BUILD_GPIO_PIN(3, 5, 3, 0x184, 0x56C),
+       MX51_PIN_NANDF_D2 = _MXC_BUILD_GPIO_PIN(3, 6, 3, 0x188, 0x570),
+       MX51_PIN_NANDF_D1 = _MXC_BUILD_GPIO_PIN(3, 7, 3, 0x18C, 0x574),
+       MX51_PIN_NANDF_D0 = _MXC_BUILD_GPIO_PIN(3, 8, 3, 0x190, 0x578),
+       MX51_PIN_CSI1_D8 = _MXC_BUILD_GPIO_PIN(2, 12, 3, 0x194, 0x57C),
+       MX51_PIN_CSI1_D9 = _MXC_BUILD_GPIO_PIN(2, 13, 3, 0x198, 0x580),
+       MX51_PIN_CSI1_D10 = _MXC_BUILD_NON_GPIO_PIN(0x19C, 0x584),
+       MX51_PIN_CSI1_D11 = _MXC_BUILD_NON_GPIO_PIN(0x1A0, 0x588),
+       MX51_PIN_CSI1_D12 = _MXC_BUILD_NON_GPIO_PIN(0x1A4, 0x58C),
+       MX51_PIN_CSI1_D13 = _MXC_BUILD_NON_GPIO_PIN(0x1A8, 0x590),
+       MX51_PIN_CSI1_D14 = _MXC_BUILD_NON_GPIO_PIN(0x1AC, 0x594),
+       MX51_PIN_CSI1_D15 = _MXC_BUILD_NON_GPIO_PIN(0x1B0, 0x598),
+       MX51_PIN_CSI1_D16 = _MXC_BUILD_NON_GPIO_PIN(0x1B4, 0x59C),
+       MX51_PIN_CSI1_D17 = _MXC_BUILD_NON_GPIO_PIN(0x1B8, 0x5A0),
+       MX51_PIN_CSI1_D18 = _MXC_BUILD_NON_GPIO_PIN(0x1BC, 0x5A4),
+       MX51_PIN_CSI1_D19 = _MXC_BUILD_NON_GPIO_PIN(0x1C0, 0x5A8),
+       MX51_PIN_CSI1_VSYNC = _MXC_BUILD_NON_GPIO_PIN(0x1C4, 0x5AC),
+       MX51_PIN_CSI1_HSYNC = _MXC_BUILD_NON_GPIO_PIN(0x1C8, 0x5B0),
+       MX51_PIN_CSI1_PIXCLK = _MXC_BUILD_NON_GPIO_PIN(NON_MUX_I, 0x5B4),
+       MX51_PIN_CSI1_MCLK = _MXC_BUILD_NON_GPIO_PIN(NON_MUX_I, 0x5B8),
+       MX51_PIN_CSI1_PKE0 = _MXC_BUILD_NON_GPIO_PIN(NON_MUX_I, 0x860),
+       MX51_PIN_CSI2_D12 = _MXC_BUILD_GPIO_PIN(3, 9, 3, 0x1CC, 0x5BC),
+       MX51_PIN_CSI2_D13 = _MXC_BUILD_GPIO_PIN(3, 10, 3, 0x1D0, 0x5C0),
+       MX51_PIN_CSI2_D14 = _MXC_BUILD_GPIO_PIN(3, 11, 3, 0x1D4, 0x5C4),
+       MX51_PIN_CSI2_D15 = _MXC_BUILD_GPIO_PIN(3, 12, 3, 0x1D8, 0x5C8),
+       MX51_PIN_CSI2_D16 = _MXC_BUILD_GPIO_PIN(3, 11, 3, 0x1DC, 0x5CC),
+       MX51_PIN_CSI2_D17 = _MXC_BUILD_GPIO_PIN(3, 12, 3, 0x1E0, 0x5D0),
+       MX51_PIN_CSI2_D18 = _MXC_BUILD_GPIO_PIN(3, 11, 3, 0x1E4, 0x5D4),
+       MX51_PIN_CSI2_D19 = _MXC_BUILD_GPIO_PIN(3, 12, 3, 0x1E8, 0x5D8),
+       MX51_PIN_CSI2_VSYNC = _MXC_BUILD_GPIO_PIN(3, 13, 3, 0x1EC, 0x5DC),
+       MX51_PIN_CSI2_HSYNC = _MXC_BUILD_GPIO_PIN(3, 14, 3, 0x1F0, 0x5E0),
+       MX51_PIN_CSI2_PIXCLK = _MXC_BUILD_GPIO_PIN(3, 15, 3, 0x1F4, 0x5E4),
+       MX51_PIN_CSI2_PKE0 = _MXC_BUILD_NON_GPIO_PIN(NON_MUX_I, 0x81C),
+       MX51_PIN_I2C1_CLK = _MXC_BUILD_GPIO_PIN(3, 16, 3, 0x1F8, 0x5E8),
+       MX51_PIN_I2C1_DAT = _MXC_BUILD_GPIO_PIN(3, 17, 3, 0x1FC, 0x5EC),
+       MX51_PIN_AUD3_BB_TXD = _MXC_BUILD_GPIO_PIN(3, 18, 3, 0x200, 0x5F0),
+       MX51_PIN_AUD3_BB_RXD = _MXC_BUILD_GPIO_PIN(3, 19, 3, 0x204, 0x5F4),
+       MX51_PIN_AUD3_BB_CK = _MXC_BUILD_GPIO_PIN(3, 20, 3, 0x208, 0x5F8),
+       MX51_PIN_AUD3_BB_FS = _MXC_BUILD_GPIO_PIN(3, 21, 3, 0x20C, 0x5FC),
+       MX51_PIN_CSPI1_MOSI = _MXC_BUILD_GPIO_PIN(3, 22, 3, 0x210, 0x600),
+       MX51_PIN_CSPI1_MISO = _MXC_BUILD_GPIO_PIN(3, 23, 3, 0x214, 0x604),
+       MX51_PIN_CSPI1_SS0 = _MXC_BUILD_GPIO_PIN(3, 24, 3, 0x218, 0x608),
+       MX51_PIN_CSPI1_SS1 = _MXC_BUILD_GPIO_PIN(3, 25, 3, 0x21C, 0x60C),
+       MX51_PIN_CSPI1_RDY = _MXC_BUILD_GPIO_PIN(3, 26, 3, 0x220, 0x610),
+       MX51_PIN_CSPI1_SCLK = _MXC_BUILD_GPIO_PIN(3, 27, 3, 0x224, 0x614),
+       MX51_PIN_UART1_RXD = _MXC_BUILD_GPIO_PIN(3, 28, 3, 0x228, 0x618),
+       MX51_PIN_UART1_TXD = _MXC_BUILD_GPIO_PIN(3, 29, 3, 0x22C, 0x61C),
+       MX51_PIN_UART1_RTS = _MXC_BUILD_GPIO_PIN(3, 30, 3, 0x230, 0x620),
+       MX51_PIN_UART1_CTS = _MXC_BUILD_GPIO_PIN(3, 31, 3, 0x234, 0x624),
+       MX51_PIN_UART2_RXD = _MXC_BUILD_GPIO_PIN(0, 20, 3, 0x238, 0x628),
+       MX51_PIN_UART2_TXD = _MXC_BUILD_GPIO_PIN(0, 21, 3, 0x23C, 0x62C),
+       MX51_PIN_UART3_RXD = _MXC_BUILD_GPIO_PIN(0, 22, 3, 0x240, 0x630),
+       MX51_PIN_UART3_TXD = _MXC_BUILD_GPIO_PIN(0, 23, 3, 0x244, 0x634),
+       MX51_PIN_OWIRE_LINE = _MXC_BUILD_GPIO_PIN(0, 24, 3, 0x248, 0x638),
+       MX51_PIN_KEY_ROW0 = _MXC_BUILD_NON_GPIO_PIN(0x24C, 0x63C),
+       MX51_PIN_KEY_ROW1 = _MXC_BUILD_NON_GPIO_PIN(0x250, 0x640),
+       MX51_PIN_KEY_ROW2 = _MXC_BUILD_NON_GPIO_PIN(0x254, 0x644),
+       MX51_PIN_KEY_ROW3 = _MXC_BUILD_NON_GPIO_PIN(0x258, 0x648),
+       MX51_PIN_KEY_COL0 = _MXC_BUILD_NON_GPIO_PIN(0x25C, 0x64C),
+       MX51_PIN_KEY_COL1 = _MXC_BUILD_NON_GPIO_PIN(0x260, 0x650),
+       MX51_PIN_KEY_COL2 = _MXC_BUILD_NON_GPIO_PIN(0x264, 0x654),
+       MX51_PIN_KEY_COL3 = _MXC_BUILD_NON_GPIO_PIN(0x268, 0x658),
+       MX51_PIN_KEY_COL4 = _MXC_BUILD_NON_GPIO_PIN(0x26C, 0x65C),
+       MX51_PIN_KEY_COL5 = _MXC_BUILD_NON_GPIO_PIN(0x270, 0x660),
+       MX51_PIN_USBH1_CLK = _MXC_BUILD_GPIO_PIN(0, 25, 2, 0x278, 0x678),
+       MX51_PIN_USBH1_DIR = _MXC_BUILD_GPIO_PIN(0, 26, 2, 0x27C, 0x67C),
+       MX51_PIN_USBH1_STP = _MXC_BUILD_GPIO_PIN(0, 27, 2, 0x280, 0x680),
+       MX51_PIN_USBH1_NXT = _MXC_BUILD_GPIO_PIN(0, 28, 2, 0x284, 0x684),
+       MX51_PIN_USBH1_DATA0 = _MXC_BUILD_GPIO_PIN(0, 11, 2, 0x288, 0x688),
+       MX51_PIN_USBH1_DATA1 = _MXC_BUILD_GPIO_PIN(0, 12, 2, 0x28C, 0x68C),
+       MX51_PIN_USBH1_DATA2 = _MXC_BUILD_GPIO_PIN(0, 13, 2, 0x290, 0x690),
+       MX51_PIN_USBH1_DATA3 = _MXC_BUILD_GPIO_PIN(0, 14, 2, 0x294, 0x694),
+       MX51_PIN_USBH1_DATA4 = _MXC_BUILD_GPIO_PIN(0, 15, 2, 0x298, 0x698),
+       MX51_PIN_USBH1_DATA5 = _MXC_BUILD_GPIO_PIN(0, 16, 2, 0x29C, 0x69C),
+       MX51_PIN_USBH1_DATA6 = _MXC_BUILD_GPIO_PIN(0, 17, 2, 0x2A0, 0x6A0),
+       MX51_PIN_USBH1_DATA7 = _MXC_BUILD_GPIO_PIN(0, 18, 2, 0x2A4, 0x6A4),
+       MX51_PIN_DI1_PIN11 = _MXC_BUILD_GPIO_PIN(2, 0, 4, 0x2A8, 0x6A8),
+       MX51_PIN_DI1_PIN12 = _MXC_BUILD_GPIO_PIN(2, 1, 4, 0x2AC, 0x6AC),
+       MX51_PIN_DI1_PIN13 = _MXC_BUILD_GPIO_PIN(2, 2, 4, 0x2B0, 0x6B0),
+       MX51_PIN_DI1_D0_CS = _MXC_BUILD_GPIO_PIN(2, 3, 4, 0x2B4, 0x6B4),
+       MX51_PIN_DI1_D1_CS = _MXC_BUILD_GPIO_PIN(2, 4, 4, 0x2B8, 0x6B8),
+       MX51_PIN_DISPB2_SER_DIN = _MXC_BUILD_GPIO_PIN(2, 5, 4, 0x2BC, 0x6BC),
+       MX51_PIN_DISPB2_SER_DIO = _MXC_BUILD_GPIO_PIN(2, 6, 4, 0x2C0, 0x6C0),
+       MX51_PIN_DISPB2_SER_CLK = _MXC_BUILD_GPIO_PIN(2, 7, 4, 0x2C4, 0x6C4),
+       MX51_PIN_DISPB2_SER_RS = _MXC_BUILD_GPIO_PIN(2, 8, 4, 0x2C8, 0x6C8),
+       MX51_PIN_DISP1_DAT0 = _MXC_BUILD_NON_GPIO_PIN(0x2CC, 0x6CC),
+       MX51_PIN_DISP1_DAT1 = _MXC_BUILD_NON_GPIO_PIN(0x2D0, 0x6D0),
+       MX51_PIN_DISP1_DAT2 = _MXC_BUILD_NON_GPIO_PIN(0x2D4, 0x6D4),
+       MX51_PIN_DISP1_DAT3 = _MXC_BUILD_NON_GPIO_PIN(0x2D8, 0x6D8),
+       MX51_PIN_DISP1_DAT4 = _MXC_BUILD_NON_GPIO_PIN(0x2DC, 0x6DC),
+       MX51_PIN_DISP1_DAT5 = _MXC_BUILD_NON_GPIO_PIN(0x2E0, 0x6E0),
+       MX51_PIN_DISP1_DAT6 = _MXC_BUILD_NON_GPIO_PIN(0x2E4, 0x6E4),
+       MX51_PIN_DISP1_DAT7 = _MXC_BUILD_NON_GPIO_PIN(0x2E8, 0x6E8),
+       MX51_PIN_DISP1_DAT8 = _MXC_BUILD_NON_GPIO_PIN(0x2EC, 0x6EC),
+       MX51_PIN_DISP1_DAT9 = _MXC_BUILD_NON_GPIO_PIN(0x2F0, 0x6F0),
+       MX51_PIN_DISP1_DAT10 = _MXC_BUILD_NON_GPIO_PIN(0x2F4, 0x6F4),
+       MX51_PIN_DISP1_DAT11 = _MXC_BUILD_NON_GPIO_PIN(0x2F8, 0x6F8),
+       MX51_PIN_DISP1_DAT12 = _MXC_BUILD_NON_GPIO_PIN(0x2FC, 0x6FC),
+       MX51_PIN_DISP1_DAT13 = _MXC_BUILD_NON_GPIO_PIN(0x300, 0x700),
+       MX51_PIN_DISP1_DAT14 = _MXC_BUILD_NON_GPIO_PIN(0x304, 0x704),
+       MX51_PIN_DISP1_DAT15 = _MXC_BUILD_NON_GPIO_PIN(0x308, 0x708),
+       MX51_PIN_DISP1_DAT16 = _MXC_BUILD_NON_GPIO_PIN(0x30C, 0x70C),
+       MX51_PIN_DISP1_DAT17 = _MXC_BUILD_NON_GPIO_PIN(0x310, 0x710),
+       MX51_PIN_DISP1_DAT18 = _MXC_BUILD_NON_GPIO_PIN(0x314, 0x714),
+       MX51_PIN_DISP1_DAT19 = _MXC_BUILD_NON_GPIO_PIN(0x318, 0x718),
+       MX51_PIN_DISP1_DAT20 = _MXC_BUILD_NON_GPIO_PIN(0x31C, 0x71C),
+       MX51_PIN_DISP1_DAT21 = _MXC_BUILD_NON_GPIO_PIN(0x320, 0x720),
+       MX51_PIN_DISP1_DAT22 = _MXC_BUILD_NON_GPIO_PIN(0x324, 0x724),
+       MX51_PIN_DISP1_DAT23 = _MXC_BUILD_NON_GPIO_PIN(0x328, 0x728),
+       MX51_PIN_DI1_PIN3 = _MXC_BUILD_NON_GPIO_PIN(0x32C, 0x72C),
+       MX51_PIN_DI1_PIN2 = _MXC_BUILD_NON_GPIO_PIN(0x330, 0x734),
+       MX51_PIN_DI_GP1 = _MXC_BUILD_NON_GPIO_PIN(0x334, 0x73C),
+       MX51_PIN_DI_GP2 = _MXC_BUILD_NON_GPIO_PIN(0x338, 0x740),
+       MX51_PIN_DI_GP3 = _MXC_BUILD_NON_GPIO_PIN(0x33C, 0x744),
+       MX51_PIN_DI2_PIN4 = _MXC_BUILD_NON_GPIO_PIN(0x340, 0x748),
+       MX51_PIN_DI2_PIN2 = _MXC_BUILD_NON_GPIO_PIN(0x344, 0x74C),
+       MX51_PIN_DI2_PIN3 = _MXC_BUILD_NON_GPIO_PIN(0x348, 0x750),
+       MX51_PIN_DI2_DISP_CLK = _MXC_BUILD_NON_GPIO_PIN(0x34C, 0x754),
+       MX51_PIN_DI_GP4 = _MXC_BUILD_NON_GPIO_PIN(0x350, 0x758),
+       MX51_PIN_DISP2_DAT0 = _MXC_BUILD_NON_GPIO_PIN(0x354, 0x75C),
+       MX51_PIN_DISP2_DAT1 = _MXC_BUILD_NON_GPIO_PIN(0x358, 0x760),
+       MX51_PIN_DISP2_DAT2 = _MXC_BUILD_NON_GPIO_PIN(0x35C, 0x764),
+       MX51_PIN_DISP2_DAT3 = _MXC_BUILD_NON_GPIO_PIN(0x360, 0x768),
+       MX51_PIN_DISP2_DAT4 = _MXC_BUILD_NON_GPIO_PIN(0x364, 0x76C),
+       MX51_PIN_DISP2_DAT5 = _MXC_BUILD_NON_GPIO_PIN(0x368, 0x770),
+       MX51_PIN_DISP2_DAT6 = _MXC_BUILD_GPIO_PIN(0, 19, 5, 0x36C, 0x774),
+       MX51_PIN_DISP2_DAT7 = _MXC_BUILD_GPIO_PIN(0, 29, 5, 0x370, 0x778),
+       MX51_PIN_DISP2_DAT8 = _MXC_BUILD_GPIO_PIN(0, 30, 5, 0x374, 0x77C),
+       MX51_PIN_DISP2_DAT9 = _MXC_BUILD_GPIO_PIN(0, 31, 5, 0x378, 0x780),
+       MX51_PIN_DISP2_DAT10 = _MXC_BUILD_NON_GPIO_PIN(0x37C, 0x784),
+       MX51_PIN_DISP2_DAT11 = _MXC_BUILD_NON_GPIO_PIN(0x380, 0x788),
+       MX51_PIN_DISP2_DAT12 = _MXC_BUILD_NON_GPIO_PIN(0x384, 0x78C),
+       MX51_PIN_DISP2_DAT13 = _MXC_BUILD_NON_GPIO_PIN(0x388, 0x790),
+       MX51_PIN_DISP2_DAT14 = _MXC_BUILD_NON_GPIO_PIN(0x38C, 0x794),
+       MX51_PIN_DISP2_DAT15 = _MXC_BUILD_NON_GPIO_PIN(0x390, 0x798),
+       MX51_PIN_SD1_CMD = _MXC_BUILD_NON_GPIO_PIN(0x394, 0x79C),
+       MX51_PIN_SD1_CLK = _MXC_BUILD_NON_GPIO_PIN(0x398, 0x7A0),
+       MX51_PIN_SD1_DATA0 = _MXC_BUILD_NON_GPIO_PIN(0x39C, 0x7A4),
+       MX51_PIN_SD1_DATA1 = _MXC_BUILD_NON_GPIO_PIN(0x3A0, 0x7A8),
+       MX51_PIN_SD1_DATA2 = _MXC_BUILD_NON_GPIO_PIN(0x3A4, 0x7AC),
+       MX51_PIN_SD1_DATA3 = _MXC_BUILD_NON_GPIO_PIN(0x3A8, 0x7B0),
+       MX51_PIN_GPIO1_0 = _MXC_BUILD_GPIO_PIN(0, 0, 1, 0x3AC, 0x7B4),
+       MX51_PIN_GPIO1_1 = _MXC_BUILD_GPIO_PIN(0, 1, 1, 0x3B0, 0x7B8),
+       MX51_PIN_SD2_CMD = _MXC_BUILD_NON_GPIO_PIN(0x3B4, 0x7BC),
+       MX51_PIN_SD2_CLK = _MXC_BUILD_NON_GPIO_PIN(0x3B8, 0x7C0),
+       MX51_PIN_SD2_DATA0 = _MXC_BUILD_NON_GPIO_PIN(0x3BC, 0x7C4),
+       MX51_PIN_SD2_DATA1 = _MXC_BUILD_NON_GPIO_PIN(0x3C0, 0x7C8),
+       MX51_PIN_SD2_DATA2 = _MXC_BUILD_NON_GPIO_PIN(0x3C4, 0x7CC),
+       MX51_PIN_SD2_DATA3 = _MXC_BUILD_NON_GPIO_PIN(0x3C8, 0x7D0),
+       MX51_PIN_GPIO1_2 = _MXC_BUILD_GPIO_PIN(0, 2, 0, 0x3CC, 0x7D4),
+       MX51_PIN_GPIO1_3 = _MXC_BUILD_GPIO_PIN(0, 3, 0, 0x3D0, 0x7D8),
+       MX51_PIN_PMIC_INT_REQ = _MXC_BUILD_NON_GPIO_PIN(0x3D4, 0x7FC),
+       MX51_PIN_GPIO1_4 = _MXC_BUILD_GPIO_PIN(0, 4, 0, 0x3D8, 0x804),
+       MX51_PIN_GPIO1_5 = _MXC_BUILD_GPIO_PIN(0, 5, 0, 0x3DC, 0x808),
+       MX51_PIN_GPIO1_6 = _MXC_BUILD_GPIO_PIN(0, 6, 0, 0x3E0, 0x80C),
+       MX51_PIN_GPIO1_7 = _MXC_BUILD_GPIO_PIN(0, 7, 0, 0x3E4, 0x810),
+       MX51_PIN_GPIO1_8 = _MXC_BUILD_GPIO_PIN(0, 8, 0, 0x3E8, 0x814),
+       MX51_PIN_GPIO1_9 = _MXC_BUILD_GPIO_PIN(0, 9, 0, 0x3EC, 0x818),
+
+       /* The following are PADS used for drive strength */
+
+       MX51_PIN_CTL_GRP_DDRPKS = _MXC_BUILD_NON_GPIO_PIN(0, 0x820),
+       MX51_PIN_CTL_GRP_PKEDDR = _MXC_BUILD_NON_GPIO_PIN(0, 0x838),
+       MX51_PIN_CTL_GRP_PKEADDR = _MXC_BUILD_NON_GPIO_PIN(0, 0x890),
+       MX51_PIN_CTL_GRP_DDRAPKS = _MXC_BUILD_NON_GPIO_PIN(0, 0x87C),
+       MX51_PIN_CTL_GRP_DDRAPUS = _MXC_BUILD_NON_GPIO_PIN(0, 0x84C),
+       MX51_PIN_CTL_GRP_DDRPUS = _MXC_BUILD_NON_GPIO_PIN(0, 0x884),
+       MX51_PIN_CTL_GRP_HYSDDR0 = _MXC_BUILD_NON_GPIO_PIN(0, 0x85C),
+       MX51_PIN_CTL_GRP_HYSDDR1 = _MXC_BUILD_NON_GPIO_PIN(0, 0x864),
+       MX51_PIN_CTL_GRP_HYSDDR2 = _MXC_BUILD_NON_GPIO_PIN(0, 0x86C),
+       MX51_PIN_CTL_GRP_HYSDDR3 = _MXC_BUILD_NON_GPIO_PIN(0, 0x874),
+       MX51_PIN_CTL_GRP_DDR_SR_B0 = _MXC_BUILD_NON_GPIO_PIN(0, 0x878),
+       MX51_PIN_CTL_GRP_DDR_SR_B1 = _MXC_BUILD_NON_GPIO_PIN(0, 0x880),
+       MX51_PIN_CTL_GRP_DDR_SR_B2 = _MXC_BUILD_NON_GPIO_PIN(0, 0x88C),
+       MX51_PIN_CTL_GRP_DDR_SR_B4 = _MXC_BUILD_NON_GPIO_PIN(0, 0x89C),
+       MX51_PIN_CTL_GRP_DRAM_B0 = _MXC_BUILD_NON_GPIO_PIN(0, 0x8A4),
+       MX51_PIN_CTL_GRP_DRAM_B1 = _MXC_BUILD_NON_GPIO_PIN(0, 0x8AC),
+       MX51_PIN_CTL_GRP_DRAM_B2 = _MXC_BUILD_NON_GPIO_PIN(0, 0x8B8),
+       MX51_PIN_CTL_GRP_DRAM_B4 = _MXC_BUILD_NON_GPIO_PIN(0, 0x82C),
+       MX51_PIN_CTL_GRP_INMODE1 = _MXC_BUILD_NON_GPIO_PIN(0, 0x8A0),
+       MX51_PIN_CTL_GRP_DDR_SR_A0 = _MXC_BUILD_NON_GPIO_PIN(0, 0x8B0),
+       MX51_PIN_CTL_GRP_EMI_DS5 = _MXC_BUILD_NON_GPIO_PIN(0, 0x8B4),
+       MX51_PIN_CTL_GRP_DDR_SR_A1 = _MXC_BUILD_NON_GPIO_PIN(0, 0x8BC),
+       MX51_PIN_CTL_GRP_DDR_A0 = _MXC_BUILD_NON_GPIO_PIN(0, 0x83C),
+       MX51_PIN_CTL_GRP_DDR_A1 = _MXC_BUILD_NON_GPIO_PIN(0, 0x848),
+       MX51_PIN_CTL_GRP_DISP_PKE0 = _MXC_BUILD_NON_GPIO_PIN(0, 0x868),
+       MX51_PIN_CTL_DRAM_RAS = _MXC_BUILD_NON_GPIO_PIN(0, 0x4A4),
+       MX51_PIN_CTL_DRAM_CAS = _MXC_BUILD_NON_GPIO_PIN(0, 0x4A8),
+       MX51_PIN_CTL_DRAM_SDWE = _MXC_BUILD_NON_GPIO_PIN(0, 0x4Ac),
+       MX51_PIN_CTL_DRAM_SDCKE0 = _MXC_BUILD_NON_GPIO_PIN(0, 0x4B0),
+       MX51_PIN_CTL_DRAM_SDCKE1 = _MXC_BUILD_NON_GPIO_PIN(0, 0x4B4),
+       MX51_PIN_CTL_DRAM_SDCLK = _MXC_BUILD_NON_GPIO_PIN(0, 0x4B8),
+       MX51_PIN_CTL_DRAM_SDQS0 = _MXC_BUILD_NON_GPIO_PIN(0, 0x4BC),
+       MX51_PIN_CTL_DRAM_SDQS1 = _MXC_BUILD_NON_GPIO_PIN(0, 0x4C0),
+       MX51_PIN_CTL_DRAM_SDQS2 = _MXC_BUILD_NON_GPIO_PIN(0, 0x4C4),
+       MX51_PIN_CTL_DRAM_SDQS3 = _MXC_BUILD_NON_GPIO_PIN(0, 0x4C8),
+       MX51_PIN_CTL_DRAM_CS0 = _MXC_BUILD_NON_GPIO_PIN(0, 0x4CC),
+       MX51_PIN_CTL_DRAM_CS1 = _MXC_BUILD_NON_GPIO_PIN(0, 0x4D0),
+       MX51_PIN_CTL_DRAM_DQM0 = _MXC_BUILD_NON_GPIO_PIN(0, 0x4D4),
+       MX51_PIN_CTL_DRAM_DQM1 = _MXC_BUILD_NON_GPIO_PIN(0, 0x4D8),
+       MX51_PIN_CTL_DRAM_DQM2 = _MXC_BUILD_NON_GPIO_PIN(0, 0x4DC),
+       MX51_PIN_CTL_DRAM_DQM3 = _MXC_BUILD_NON_GPIO_PIN(0, 0x4E0),
+};
+
+#endif                         /* __ASSEMBLY__ */
+#endif                         /* __ASM_ARCH_MX5_MX5X_PINS_H__ */
diff --git a/arch/arm/include/asm/arch-mx5/sys_proto.h b/arch/arm/include/asm/arch-mx5/sys_proto.h
new file mode 100644 (file)
index 0000000..f687503
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * (C) Copyright 2009
+ * Stefano Babic, DENX Software Engineering, sbabic@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 _SYS_PROTO_H_
+#define _SYS_PROTO_H_
+
+u32 get_cpu_rev(void);
+#define is_soc_rev(rev)        ((get_cpu_rev() & 0xFF) - rev)
+void sdelay(unsigned long);
+
+#endif
diff --git a/arch/arm/include/asm/arch-mx51/asm-offsets.h b/arch/arm/include/asm/arch-mx51/asm-offsets.h
deleted file mode 100644 (file)
index afd2728..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * needed for arch/arm/cpu/armv7/mx51/lowlevel_init.S
- *
- * These should be auto-generated
- */
-/* CCM */
-#define CLKCTL_CCR              0x00
-#define CLKCTL_CCDR             0x04
-#define CLKCTL_CSR              0x08
-#define CLKCTL_CCSR             0x0C
-#define CLKCTL_CACRR            0x10
-#define CLKCTL_CBCDR            0x14
-#define CLKCTL_CBCMR            0x18
-#define CLKCTL_CSCMR1           0x1C
-#define CLKCTL_CSCMR2           0x20
-#define CLKCTL_CSCDR1           0x24
-#define CLKCTL_CS1CDR           0x28
-#define CLKCTL_CS2CDR           0x2C
-#define CLKCTL_CDCDR            0x30
-#define CLKCTL_CHSCCDR          0x34
-#define CLKCTL_CSCDR2           0x38
-#define CLKCTL_CSCDR3           0x3C
-#define CLKCTL_CSCDR4           0x40
-#define CLKCTL_CWDR             0x44
-#define CLKCTL_CDHIPR           0x48
-#define CLKCTL_CDCR             0x4C
-#define CLKCTL_CTOR             0x50
-#define CLKCTL_CLPCR            0x54
-#define CLKCTL_CISR             0x58
-#define CLKCTL_CIMR             0x5C
-#define CLKCTL_CCOSR            0x60
-#define CLKCTL_CGPR             0x64
-#define CLKCTL_CCGR0            0x68
-#define CLKCTL_CCGR1            0x6C
-#define CLKCTL_CCGR2            0x70
-#define CLKCTL_CCGR3            0x74
-#define CLKCTL_CCGR4            0x78
-#define CLKCTL_CCGR5            0x7C
-#define CLKCTL_CCGR6            0x80
-#define CLKCTL_CMEOR            0x84
-
-/* DPLL */
-#define PLL_DP_CTL     0x00
-#define PLL_DP_CONFIG  0x04
-#define PLL_DP_OP      0x08
-#define PLL_DP_MFD     0x0C
-#define PLL_DP_MFN     0x10
-#define PLL_DP_HFS_OP  0x1C
-#define PLL_DP_HFS_MFD 0x20
-#define PLL_DP_HFS_MFN 0x24
diff --git a/arch/arm/include/asm/arch-mx51/clock.h b/arch/arm/include/asm/arch-mx51/clock.h
deleted file mode 100644 (file)
index 1f8a537..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * (C) Copyright 2009
- * Stefano Babic, DENX Software Engineering, sbabic@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 __ASM_ARCH_CLOCK_H
-#define __ASM_ARCH_CLOCK_H
-
-enum mxc_clock {
-       MXC_ARM_CLK = 0,
-       MXC_AHB_CLK,
-       MXC_IPG_CLK,
-       MXC_IPG_PERCLK,
-       MXC_UART_CLK,
-       MXC_CSPI_CLK,
-       MXC_FEC_CLK,
-};
-
-unsigned int imx_decode_pll(unsigned int pll, unsigned int f_ref);
-
-u32 imx_get_uartclk(void);
-u32 imx_get_fecclk(void);
-unsigned int mxc_get_clock(enum mxc_clock clk);
-
-#endif /* __ASM_ARCH_CLOCK_H */
diff --git a/arch/arm/include/asm/arch-mx51/crm_regs.h b/arch/arm/include/asm/arch-mx51/crm_regs.h
deleted file mode 100644 (file)
index 14aa231..0000000
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * (C) Copyright 2009 Freescale Semiconductor, Inc.
- *
- * 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 __ARCH_ARM_MACH_MX51_CRM_REGS_H__
-#define __ARCH_ARM_MACH_MX51_CRM_REGS_H__
-
-#define MXC_CCM_BASE   CCM_BASE_ADDR
-
-/* DPLL register mapping structure */
-struct mxc_pll_reg {
-       u32 ctrl;
-       u32 config;
-       u32 op;
-       u32 mfd;
-       u32 mfn;
-       u32 mfn_minus;
-       u32 mfn_plus;
-       u32 hfs_op;
-       u32 hfs_mfd;
-       u32 hfs_mfn;
-       u32 mfn_togc;
-       u32 destat;
-};
-
-/* Register maping of CCM*/
-struct mxc_ccm_reg {
-       u32 ccr;        /* 0x0000 */
-       u32 ccdr;
-       u32 csr;
-       u32 ccsr;
-       u32 cacrr;      /* 0x0010*/
-       u32 cbcdr;
-       u32 cbcmr;
-       u32 cscmr1;
-       u32 cscmr2;     /* 0x0020 */
-       u32 cscdr1;
-       u32 cs1cdr;
-       u32 cs2cdr;
-       u32 cdcdr;      /* 0x0030 */
-       u32 chscdr;
-       u32 cscdr2;
-       u32 cscdr3;
-       u32 cscdr4;     /* 0x0040 */
-       u32 cwdr;
-       u32 cdhipr;
-       u32 cdcr;
-       u32 ctor;       /* 0x0050 */
-       u32 clpcr;
-       u32 cisr;
-       u32 cimr;
-       u32 ccosr;      /* 0x0060 */
-       u32 cgpr;
-       u32 CCGR0;
-       u32 CCGR1;
-       u32 CCGR2;      /* 0x0070 */
-       u32 CCGR3;
-       u32 CCGR4;
-       u32 CCGR5;
-       u32 CCGR6;      /* 0x0080 */
-       u32 cmeor;
-};
-
-/* Define the bits in register CACRR */
-#define MXC_CCM_CACRR_ARM_PODF_OFFSET          0
-#define MXC_CCM_CACRR_ARM_PODF_MASK            0x7
-
-/* Define the bits in register CBCDR */
-#define MXC_CCM_CBCDR_EMI_CLK_SEL              (0x1 << 26)
-#define MXC_CCM_CBCDR_PERIPH_CLK_SEL           (0x1 << 25)
-#define MXC_CCM_CBCDR_EMI_PODF_OFFSET          22
-#define MXC_CCM_CBCDR_EMI_PODF_MASK            (0x7 << 22)
-#define MXC_CCM_CBCDR_AXI_B_PODF_OFFSET                19
-#define MXC_CCM_CBCDR_AXI_B_PODF_MASK          (0x7 << 19)
-#define MXC_CCM_CBCDR_AXI_A_PODF_OFFSET                16
-#define MXC_CCM_CBCDR_AXI_A_PODF_MASK          (0x7 << 16)
-#define MXC_CCM_CBCDR_NFC_PODF_OFFSET          13
-#define MXC_CCM_CBCDR_NFC_PODF_MASK            (0x7 << 13)
-#define MXC_CCM_CBCDR_AHB_PODF_OFFSET          10
-#define MXC_CCM_CBCDR_AHB_PODF_MASK            (0x7 << 10)
-#define MXC_CCM_CBCDR_IPG_PODF_OFFSET          8
-#define MXC_CCM_CBCDR_IPG_PODF_MASK            (0x3 << 8)
-#define MXC_CCM_CBCDR_PERCLK_PRED1_OFFSET      6
-#define MXC_CCM_CBCDR_PERCLK_PRED1_MASK                (0x3 << 6)
-#define MXC_CCM_CBCDR_PERCLK_PRED2_OFFSET      3
-#define MXC_CCM_CBCDR_PERCLK_PRED2_MASK                (0x7 << 3)
-#define MXC_CCM_CBCDR_PERCLK_PODF_OFFSET       0
-#define MXC_CCM_CBCDR_PERCLK_PODF_MASK         0x7
-
-/* Define the bits in register CSCMR1 */
-#define MXC_CCM_CSCMR1_SSI_EXT2_CLK_SEL_OFFSET         30
-#define MXC_CCM_CSCMR1_SSI_EXT2_CLK_SEL_MASK           (0x3 << 30)
-#define MXC_CCM_CSCMR1_SSI_EXT1_CLK_SEL_OFFSET         28
-#define MXC_CCM_CSCMR1_SSI_EXT1_CLK_SEL_MASK           (0x3 << 28)
-#define MXC_CCM_CSCMR1_USB_PHY_CLK_SEL_OFFSET          26
-#define MXC_CCM_CSCMR1_USB_PHY_CLK_SEL                 (0x1 << 26)
-#define MXC_CCM_CSCMR1_UART_CLK_SEL_OFFSET             24
-#define MXC_CCM_CSCMR1_UART_CLK_SEL_MASK               (0x3 << 24)
-#define MXC_CCM_CSCMR1_USBOH3_CLK_SEL_OFFSET           22
-#define MXC_CCM_CSCMR1_USBOH3_CLK_SEL_MASK             (0x3 << 22)
-#define MXC_CCM_CSCMR1_ESDHC1_MSHC1_CLK_SEL_OFFSET     20
-#define MXC_CCM_CSCMR1_ESDHC1_MSHC1_CLK_SEL_MASK       (0x3 << 20)
-#define MXC_CCM_CSCMR1_ESDHC3_CLK_SEL                  (0x1 << 19)
-#define MXC_CCM_CSCMR1_ESDHC4_CLK_SEL                  (0x1 << 18)
-#define MXC_CCM_CSCMR1_ESDHC2_MSHC2_CLK_SEL_OFFSET     16
-#define MXC_CCM_CSCMR1_ESDHC2_MSHC2_CLK_SEL_MASK       (0x3 << 16)
-#define MXC_CCM_CSCMR1_SSI1_CLK_SEL_OFFSET             14
-#define MXC_CCM_CSCMR1_SSI1_CLK_SEL_MASK               (0x3 << 14)
-#define MXC_CCM_CSCMR1_SSI2_CLK_SEL_OFFSET             12
-#define MXC_CCM_CSCMR1_SSI2_CLK_SEL_MASK               (0x3 << 12)
-#define MXC_CCM_CSCMR1_SSI3_CLK_SEL                    (0x1 << 11)
-#define MXC_CCM_CSCMR1_VPU_RCLK_SEL                    (0x1 << 10)
-#define MXC_CCM_CSCMR1_SSI_APM_CLK_SEL_OFFSET          8
-#define MXC_CCM_CSCMR1_SSI_APM_CLK_SEL_MASK            (0x3 << 8)
-#define MXC_CCM_CSCMR1_TVE_CLK_SEL                     (0x1 << 7)
-#define MXC_CCM_CSCMR1_TVE_EXT_CLK_SEL                 (0x1 << 6)
-#define MXC_CCM_CSCMR1_CSPI_CLK_SEL_OFFSET             4
-#define MXC_CCM_CSCMR1_CSPI_CLK_SEL_MASK               (0x3 << 4)
-#define MXC_CCM_CSCMR1_SPDIF_CLK_SEL_OFFSET            2
-#define MXC_CCM_CSCMR1_SPDIF_CLK_SEL_MASK              (0x3 << 2)
-#define MXC_CCM_CSCMR1_SSI_EXT2_COM_CLK_SEL            (0x1 << 1)
-#define MXC_CCM_CSCMR1_SSI_EXT1_COM_CLK_SEL            0x1
-
-/* Define the bits in register CSCDR2 */
-#define MXC_CCM_CSCDR2_CSPI_CLK_PRED_OFFSET            25
-#define MXC_CCM_CSCDR2_CSPI_CLK_PRED_MASK              (0x7 << 25)
-#define MXC_CCM_CSCDR2_CSPI_CLK_PODF_OFFSET            19
-#define MXC_CCM_CSCDR2_CSPI_CLK_PODF_MASK              (0x3F << 19)
-#define MXC_CCM_CSCDR2_SIM_CLK_PRED_OFFSET             16
-#define MXC_CCM_CSCDR2_SIM_CLK_PRED_MASK               (0x7 << 16)
-#define MXC_CCM_CSCDR2_SIM_CLK_PODF_OFFSET             9
-#define MXC_CCM_CSCDR2_SIM_CLK_PODF_MASK               (0x3F << 9)
-#define MXC_CCM_CSCDR2_SLIMBUS_CLK_PRED_OFFSET         6
-#define MXC_CCM_CSCDR2_SLIMBUS_PRED_MASK               (0x7 << 6)
-#define MXC_CCM_CSCDR2_SLIMBUS_PODF_OFFSET             0
-#define MXC_CCM_CSCDR2_SLIMBUS_PODF_MASK               0x3F
-
-/* Define the bits in register CBCMR */
-#define MXC_CCM_CBCMR_VPU_AXI_CLK_SEL_OFFSET           14
-#define MXC_CCM_CBCMR_VPU_AXI_CLK_SEL_MASK             (0x3 << 14)
-#define MXC_CCM_CBCMR_PERIPH_CLK_SEL_OFFSET            12
-#define MXC_CCM_CBCMR_PERIPH_CLK_SEL_MASK              (0x3 << 12)
-#define MXC_CCM_CBCMR_DDR_CLK_SEL_OFFSET               10
-#define MXC_CCM_CBCMR_DDR_CLK_SEL_MASK                 (0x3 << 10)
-#define MXC_CCM_CBCMR_ARM_AXI_CLK_SEL_OFFSET           8
-#define MXC_CCM_CBCMR_ARM_AXI_CLK_SEL_MASK             (0x3 << 8)
-#define MXC_CCM_CBCMR_IPU_HSP_CLK_SEL_OFFSET           6
-#define MXC_CCM_CBCMR_IPU_HSP_CLK_SEL_MASK             (0x3 << 6)
-#define MXC_CCM_CBCMR_GPU_CLK_SEL_OFFSET               4
-#define MXC_CCM_CBCMR_GPU_CLK_SEL_MASK                 (0x3 << 4)
-#define MXC_CCM_CBCMR_PERCLK_LP_APM_CLK_SEL            (0x1 << 1)
-#define MXC_CCM_CBCMR_PERCLK_IPG_CLK_SEL               (0x1 << 0)
-
-/* Define the bits in register CSCDR1 */
-#define MXC_CCM_CSCDR1_ESDHC2_MSHC2_CLK_PRED_OFFSET    22
-#define MXC_CCM_CSCDR1_ESDHC2_MSHC2_CLK_PRED_MASK      (0x7 << 22)
-#define MXC_CCM_CSCDR1_ESDHC2_MSHC2_CLK_PODF_OFFSET    19
-#define MXC_CCM_CSCDR1_ESDHC2_MSHC2_CLK_PODF_MASK      (0x7 << 19)
-#define MXC_CCM_CSCDR1_ESDHC1_MSHC1_CLK_PRED_OFFSET    16
-#define MXC_CCM_CSCDR1_ESDHC1_MSHC1_CLK_PRED_MASK      (0x7 << 16)
-#define MXC_CCM_CSCDR1_PGC_CLK_PODF_OFFSET             14
-#define MXC_CCM_CSCDR1_PGC_CLK_PODF_MASK               (0x3 << 14)
-#define MXC_CCM_CSCDR1_ESDHC1_MSHC1_CLK_PODF_OFFSET    11
-#define MXC_CCM_CSCDR1_ESDHC1_MSHC1_CLK_PODF_MASK      (0x7 << 11)
-#define MXC_CCM_CSCDR1_USBOH3_CLK_PRED_OFFSET          8
-#define MXC_CCM_CSCDR1_USBOH3_CLK_PRED_MASK            (0x7 << 8)
-#define MXC_CCM_CSCDR1_USBOH3_CLK_PODF_OFFSET          6
-#define MXC_CCM_CSCDR1_USBOH3_CLK_PODF_MASK            (0x3 << 6)
-#define MXC_CCM_CSCDR1_UART_CLK_PRED_OFFSET            3
-#define MXC_CCM_CSCDR1_UART_CLK_PRED_MASK              (0x7 << 3)
-#define MXC_CCM_CSCDR1_UART_CLK_PODF_OFFSET            0
-#define MXC_CCM_CSCDR1_UART_CLK_PODF_MASK              0x7
-
-#endif                         /* __ARCH_ARM_MACH_MX51_CRM_REGS_H__ */
diff --git a/arch/arm/include/asm/arch-mx51/imx-regs.h b/arch/arm/include/asm/arch-mx51/imx-regs.h
deleted file mode 100644 (file)
index 3ddda40..0000000
+++ /dev/null
@@ -1,279 +0,0 @@
-/*
- * (C) Copyright 2009 Freescale Semiconductor, Inc.
- *
- * 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 __ASM_ARCH_MXC_MX51_H__
-#define __ASM_ARCH_MXC_MX51_H__
-
-/*
- * IRAM
- */
-#define IRAM_BASE_ADDR         0x1FFE8000      /* internal ram */
-/*
- * Graphics Memory of GPU
- */
-#define GPU_BASE_ADDR          0x20000000
-#define GPU_CTRL_BASE_ADDR     0x30000000
-#define IPU_CTRL_BASE_ADDR     0x40000000
-/*
- * Debug
- */
-#define DEBUG_BASE_ADDR                0x60000000
-#define ETB_BASE_ADDR          (DEBUG_BASE_ADDR + 0x00001000)
-#define ETM_BASE_ADDR          (DEBUG_BASE_ADDR + 0x00002000)
-#define TPIU_BASE_ADDR         (DEBUG_BASE_ADDR + 0x00003000)
-#define CTI0_BASE_ADDR         (DEBUG_BASE_ADDR + 0x00004000)
-#define CTI1_BASE_ADDR         (DEBUG_BASE_ADDR + 0x00005000)
-#define CTI2_BASE_ADDR         (DEBUG_BASE_ADDR + 0x00006000)
-#define CTI3_BASE_ADDR         (DEBUG_BASE_ADDR + 0x00007000)
-#define CORTEX_DBG_BASE_ADDR   (DEBUG_BASE_ADDR + 0x00008000)
-
-/*
- * SPBA global module enabled #0
- */
-#define SPBA0_BASE_ADDR        0x70000000
-
-#define MMC_SDHC1_BASE_ADDR    (SPBA0_BASE_ADDR + 0x00004000)
-#define MMC_SDHC2_BASE_ADDR    (SPBA0_BASE_ADDR + 0x00008000)
-#define UART3_BASE_ADDR        (SPBA0_BASE_ADDR + 0x0000C000)
-#define CSPI1_BASE_ADDR        (SPBA0_BASE_ADDR + 0x00010000)
-#define SSI2_BASE_ADDR         (SPBA0_BASE_ADDR + 0x00014000)
-#define MMC_SDHC3_BASE_ADDR    (SPBA0_BASE_ADDR + 0x00020000)
-#define MMC_SDHC4_BASE_ADDR    (SPBA0_BASE_ADDR + 0x00024000)
-#define SPDIF_BASE_ADDR                (SPBA0_BASE_ADDR + 0x00028000)
-#define ATA_DMA_BASE_ADDR      (SPBA0_BASE_ADDR + 0x00030000)
-#define SLIM_DMA_BASE_ADDR     (SPBA0_BASE_ADDR + 0x00034000)
-#define HSI2C_DMA_BASE_ADDR    (SPBA0_BASE_ADDR + 0x00038000)
-#define SPBA_CTRL_BASE_ADDR    (SPBA0_BASE_ADDR + 0x0003C000)
-
-/*
- * AIPS 1
- */
-#define AIPS1_BASE_ADDR        0x73F00000
-
-#define OTG_BASE_ADDR          (AIPS1_BASE_ADDR + 0x00080000)
-#define GPIO1_BASE_ADDR                (AIPS1_BASE_ADDR + 0x00084000)
-#define GPIO2_BASE_ADDR                (AIPS1_BASE_ADDR + 0x00088000)
-#define GPIO3_BASE_ADDR                (AIPS1_BASE_ADDR + 0x0008C000)
-#define GPIO4_BASE_ADDR                (AIPS1_BASE_ADDR + 0x00090000)
-#define KPP_BASE_ADDR          (AIPS1_BASE_ADDR + 0x00094000)
-#define WDOG1_BASE_ADDR                (AIPS1_BASE_ADDR + 0x00098000)
-#define WDOG2_BASE_ADDR                (AIPS1_BASE_ADDR + 0x0009C000)
-#define GPT1_BASE_ADDR         (AIPS1_BASE_ADDR + 0x000A0000)
-#define SRTC_BASE_ADDR         (AIPS1_BASE_ADDR + 0x000A4000)
-#define IOMUXC_BASE_ADDR       (AIPS1_BASE_ADDR + 0x000A8000)
-#define EPIT1_BASE_ADDR                (AIPS1_BASE_ADDR + 0x000AC000)
-#define EPIT2_BASE_ADDR                (AIPS1_BASE_ADDR + 0x000B0000)
-#define PWM1_BASE_ADDR         (AIPS1_BASE_ADDR + 0x000B4000)
-#define PWM2_BASE_ADDR         (AIPS1_BASE_ADDR + 0x000B8000)
-#define UART1_BASE_ADDR                (AIPS1_BASE_ADDR + 0x000BC000)
-#define UART2_BASE_ADDR                (AIPS1_BASE_ADDR + 0x000C0000)
-#define SRC_BASE_ADDR          (AIPS1_BASE_ADDR + 0x000D0000)
-#define CCM_BASE_ADDR          (AIPS1_BASE_ADDR + 0x000D4000)
-#define GPC_BASE_ADDR          (AIPS1_BASE_ADDR + 0x000D8000)
-
-/*
- * AIPS 2
- */
-#define AIPS2_BASE_ADDR        0x83F00000
-
-#define PLL1_BASE_ADDR         (AIPS2_BASE_ADDR + 0x00080000)
-#define PLL2_BASE_ADDR         (AIPS2_BASE_ADDR + 0x00084000)
-#define PLL3_BASE_ADDR         (AIPS2_BASE_ADDR + 0x00088000)
-#define AHBMAX_BASE_ADDR       (AIPS2_BASE_ADDR + 0x00094000)
-#define IIM_BASE_ADDR          (AIPS2_BASE_ADDR + 0x00098000)
-#define CSU_BASE_ADDR          (AIPS2_BASE_ADDR + 0x0009C000)
-#define ARM_BASE_ADDR          (AIPS2_BASE_ADDR + 0x000A0000)
-#define OWIRE_BASE_ADDR        (AIPS2_BASE_ADDR + 0x000A4000)
-#define FIRI_BASE_ADDR         (AIPS2_BASE_ADDR + 0x000A8000)
-#define CSPI2_BASE_ADDR                (AIPS2_BASE_ADDR + 0x000AC000)
-#define SDMA_BASE_ADDR         (AIPS2_BASE_ADDR + 0x000B0000)
-#define SCC_BASE_ADDR          (AIPS2_BASE_ADDR + 0x000B4000)
-#define ROMCP_BASE_ADDR                (AIPS2_BASE_ADDR + 0x000B8000)
-#define RTIC_BASE_ADDR         (AIPS2_BASE_ADDR + 0x000BC000)
-#define CSPI3_BASE_ADDR                (AIPS2_BASE_ADDR + 0x000C0000)
-#define I2C2_BASE_ADDR         (AIPS2_BASE_ADDR + 0x000C4000)
-#define I2C1_BASE_ADDR         (AIPS2_BASE_ADDR + 0x000C8000)
-#define SSI1_BASE_ADDR         (AIPS2_BASE_ADDR + 0x000CC000)
-#define AUDMUX_BASE_ADDR       (AIPS2_BASE_ADDR + 0x000D0000)
-#define M4IF_BASE_ADDR         (AIPS2_BASE_ADDR + 0x000D8000)
-#define ESDCTL_BASE_ADDR       (AIPS2_BASE_ADDR + 0x000D9000)
-#define WEIM_BASE_ADDR         (AIPS2_BASE_ADDR + 0x000DA000)
-#define NFC_BASE_ADDR          (AIPS2_BASE_ADDR + 0x000DB000)
-#define EMI_BASE_ADDR          (AIPS2_BASE_ADDR + 0x000DBF00)
-#define MIPI_HSC_BASE_ADDR     (AIPS2_BASE_ADDR + 0x000DC000)
-#define ATA_BASE_ADDR          (AIPS2_BASE_ADDR + 0x000E0000)
-#define SIM_BASE_ADDR          (AIPS2_BASE_ADDR + 0x000E4000)
-#define SSI3BASE_ADDR          (AIPS2_BASE_ADDR + 0x000E8000)
-#define FEC_BASE_ADDR          (AIPS2_BASE_ADDR + 0x000EC000)
-#define TVE_BASE_ADDR          (AIPS2_BASE_ADDR + 0x000F0000)
-#define VPU_BASE_ADDR          (AIPS2_BASE_ADDR + 0x000F4000)
-#define SAHARA_BASE_ADDR       (AIPS2_BASE_ADDR + 0x000F8000)
-
-#define TZIC_BASE_ADDR         0x8FFFC000
-
-/*
- * Memory regions and CS
- */
-#define CSD0_BASE_ADDR         0x90000000
-#define CSD1_BASE_ADDR         0xA0000000
-#define CS0_BASE_ADDR          0xB0000000
-#define CS1_BASE_ADDR          0xB8000000
-#define CS2_BASE_ADDR          0xC0000000
-#define CS3_BASE_ADDR          0xC8000000
-#define CS4_BASE_ADDR          0xCC000000
-#define CS5_BASE_ADDR          0xCE000000
-
-/*
- * NFC
- */
-#define NFC_BASE_ADDR_AXI      0xCFFF0000      /* NAND flash AXI */
-
-/*!
- * Number of GPIO port as defined in the IC Spec
- */
-#define GPIO_PORT_NUM          4
-/*!
- * Number of GPIO pins per port
- */
-#define GPIO_NUM_PIN            32
-
-#define IIM_SREV       0x24
-#define ROM_SI_REV     0x48
-
-#define NFC_BUF_SIZE   0x1000
-
-/* M4IF */
-#define M4IF_FBPM0     0x40
-#define M4IF_FIDBP     0x48
-
-/* Assuming 24MHz input clock with doubler ON */
-/*                            MFI         PDF */
-#define DP_OP_850      ((8 << 4) + ((1 - 1)  << 0))
-#define DP_MFD_850     (48 - 1)
-#define DP_MFN_850     41
-
-#define DP_OP_800      ((8 << 4) + ((1 - 1)  << 0))
-#define DP_MFD_800     (3 - 1)
-#define DP_MFN_800     1
-
-#define DP_OP_700      ((7 << 4) + ((1 - 1)  << 0))
-#define DP_MFD_700     (24 - 1)
-#define DP_MFN_700     7
-
-#define DP_OP_665      ((6 << 4) + ((1 - 1)  << 0))
-#define DP_MFD_665     (96 - 1)
-#define DP_MFN_665     89
-
-#define DP_OP_532      ((5 << 4) + ((1 - 1)  << 0))
-#define DP_MFD_532     (24 - 1)
-#define DP_MFN_532     13
-
-#define DP_OP_400      ((8 << 4) + ((2 - 1)  << 0))
-#define DP_MFD_400     (3 - 1)
-#define DP_MFN_400     1
-
-#define DP_OP_216      ((6 << 4) + ((3 - 1)  << 0))
-#define DP_MFD_216     (4 - 1)
-#define DP_MFN_216     3
-
-#define CHIP_REV_1_0            0x10
-#define CHIP_REV_1_1            0x11
-#define CHIP_REV_2_0            0x20
-#define CHIP_REV_2_5           0x25
-#define CHIP_REV_3_0            0x30
-
-#define BOARD_REV_1_0           0x0
-#define BOARD_REV_2_0           0x1
-
-#if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))
-#include <asm/types.h>
-
-#define __REG(x)       (*((volatile u32 *)(x)))
-#define __REG16(x)     (*((volatile u16 *)(x)))
-#define __REG8(x)      (*((volatile u8 *)(x)))
-
-struct clkctl {
-       u32     ccr;
-       u32     ccdr;
-       u32     csr;
-       u32     ccsr;
-       u32     cacrr;
-       u32     cbcdr;
-       u32     cbcmr;
-       u32     cscmr1;
-       u32     cscmr2;
-       u32     cscdr1;
-       u32     cs1cdr;
-       u32     cs2cdr;
-       u32     cdcdr;
-       u32     chsccdr;
-       u32     cscdr2;
-       u32     cscdr3;
-       u32     cscdr4;
-       u32     cwdr;
-       u32     cdhipr;
-       u32     cdcr;
-       u32     ctor;
-       u32     clpcr;
-       u32     cisr;
-       u32     cimr;
-       u32     ccosr;
-       u32     cgpr;
-       u32     ccgr0;
-       u32     ccgr1;
-       u32     ccgr2;
-       u32     ccgr3;
-       u32     ccgr4;
-       u32     ccgr5;
-       u32     ccgr6;
-       u32     cmeor;
-};
-
-/* WEIM registers */
-struct weim {
-       u32     csgcr1;
-       u32     csgcr2;
-       u32     csrcr1;
-       u32     csrcr2;
-       u32     cswcr1;
-       u32     cswcr2;
-};
-
-/* GPIO Registers */
-struct gpio_regs {
-       u32     gpio_dr;
-       u32     gpio_dir;
-       u32     gpio_psr;
-};
-
-/* System Reset Controller (SRC) */
-struct src {
-       u32     scr;
-       u32     sbmr;
-       u32     srsr;
-       u32     reserved1[2];
-       u32     sisr;
-       u32     simr;
-};
-#endif /* __ASSEMBLER__*/
-
-#endif                         /*  __ASM_ARCH_MXC_MX51_H__ */
diff --git a/arch/arm/include/asm/arch-mx51/iomux.h b/arch/arm/include/asm/arch-mx51/iomux.h
deleted file mode 100644 (file)
index a41c387..0000000
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * (C) Copyright 2008-2009 Freescale Semiconductor, Inc.
- *
- * 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 __MACH_MX51_IOMUX_H__
-#define __MACH_MX51_IOMUX_H__
-
-#include <common.h>
-#include <asm/io.h>
-#include <asm/arch/imx-regs.h>
-#include <asm/arch/mx51_pins.h>
-
-typedef unsigned int iomux_pin_name_t;
-
-/* various IOMUX output functions */
-typedef enum iomux_config {
-       IOMUX_CONFIG_ALT0,      /*!< used as alternate function 0 */
-       IOMUX_CONFIG_ALT1,      /*!< used as alternate function 1 */
-       IOMUX_CONFIG_ALT2,      /*!< used as alternate function 2 */
-       IOMUX_CONFIG_ALT3,      /*!< used as alternate function 3 */
-       IOMUX_CONFIG_ALT4,      /*!< used as alternate function 4 */
-       IOMUX_CONFIG_ALT5,      /*!< used as alternate function 5 */
-       IOMUX_CONFIG_ALT6,      /*!< used as alternate function 6 */
-       IOMUX_CONFIG_ALT7,      /*!< used as alternate function 7 */
-       IOMUX_CONFIG_GPIO,      /*!< added to help user use GPIO mode */
-       IOMUX_CONFIG_SION = 0x1 << 4,   /*!< used as LOOPBACK:MUX SION bit */
-} iomux_pin_cfg_t;
-
-/* various IOMUX pad functions */
-typedef enum iomux_pad_config {
-       PAD_CTL_SRE_SLOW = 0x0 << 0,    /* Slow slew rate */
-       PAD_CTL_SRE_FAST = 0x1 << 0,    /* Fast slew rate */
-       PAD_CTL_DRV_LOW = 0x0 << 1,     /* Low drive strength */
-       PAD_CTL_DRV_MEDIUM = 0x1 << 1,  /* Medium drive strength */
-       PAD_CTL_DRV_HIGH = 0x2 << 1,    /* High drive strength */
-       PAD_CTL_DRV_MAX = 0x3 << 1,     /* Max drive strength */
-       PAD_CTL_ODE_OPENDRAIN_NONE = 0x0 << 3,  /* Opendrain disable */
-       PAD_CTL_ODE_OPENDRAIN_ENABLE = 0x1 << 3,/* Opendrain enable */
-       PAD_CTL_100K_PD = 0x0 << 4,     /* 100Kohm pulldown */
-       PAD_CTL_47K_PU = 0x1 << 4,      /* 47Kohm pullup */
-       PAD_CTL_100K_PU = 0x2 << 4,     /* 100Kohm pullup */
-       PAD_CTL_22K_PU = 0x3 << 4,      /* 22Kohm pullup */
-       PAD_CTL_PUE_KEEPER = 0x0 << 6,  /* enable pulldown */
-       PAD_CTL_PUE_PULL = 0x1 << 6,    /* enable pullup */
-       PAD_CTL_PKE_NONE = 0x0 << 7,    /* Disable pullup/pulldown */
-       PAD_CTL_PKE_ENABLE = 0x1 << 7,  /* Enable pullup/pulldown */
-       PAD_CTL_HYS_NONE = 0x0 << 8,    /* Hysteresis disabled */
-       PAD_CTL_HYS_ENABLE = 0x1 << 8,  /* Hysteresis enabled */
-       PAD_CTL_DDR_INPUT_CMOS = 0x0 << 9,/* DDR input CMOS */
-       PAD_CTL_DDR_INPUT_DDR = 0x1 << 9,/* DDR input DDR */
-       PAD_CTL_DRV_VOT_LOW = 0x0 << 13, /* Low voltage mode */
-       PAD_CTL_DRV_VOT_HIGH = 0x1 << 13,/* High voltage mode */
-} iomux_pad_config_t;
-
-/* various IOMUX input select register index */
-typedef enum iomux_input_select {
-       MUX_IN_AUDMUX_P4_INPUT_DA_AMX_SELECT_I = 0,
-       MUX_IN_AUDMUX_P4_INPUT_DB_AMX_SELECT_I,
-       MUX_IN_AUDMUX_P4_INPUT_TXCLK_AMX_SELECT_INPUT,
-       MUX_IN_AUDMUX_P4_INPUT_TXFS_AMX_SELECT_INPUT,
-       MUX_IN_AUDMUX_P5_INPUT_DA_AMX_SELECT_INPUT,
-       MUX_IN_AUDMUX_P5_INPUT_DB_AMX_SELECT_INPUT,
-       MUX_IN_AUDMUX_P5_INPUT_RXCLK_AMX_SELECT_INPUT,
-       MUX_IN_AUDMUX_P5_INPUT_RXFS_AMX_SELECT,
-       MUX_IN_AUDMUX_P5_INPUT_TXCLK_AMX_SELECT_INPUT,
-       MUX_IN_AUDMUX_P5_INPUT_TXFS_AMX_SELECT_INPUT,
-       MUX_IN_AUDMUX_P6_INPUT_DA_AMX_SELECT_INPUT,
-       MUX_IN_AUDMUX_P6_INPUT_DB_AMX_SELECT_INPUT,
-       MUX_IN_AUDMUX_P6_INPUT_RXCLK_AMX_SELECT_INPUT,
-       MUX_IN_AUDMUX_P6_INPUT_RXFS_AMX_SELECT_INPUT,
-       MUX_IN_AUDMUX_P6_INPUT_TXCLK_AMX_SELECT_INPUT,
-       MUX_IN_AUDMUX_P6_INPUT_TXFS_AMX_SELECT_INPUT,
-       MUX_IN_CCM_IPP_DI_CLK_SELECT_INPUT,
-       /* TO2 */
-       MUX_IN_CCM_IPP_DI1_CLK_SELECT_INPUT,
-       MUX_IN_CCM_PLL1_BYPASS_CLK_SELECT_INPUT,
-       MUX_IN_CCM_PLL2_BYPASS_CLK_SELECT_INPUT,
-       MUX_IN_CSPI_IPP_CSPI_CLK_IN_SELECT_INPUT,
-       MUX_IN_CSPI_IPP_IND_MISO_SELECT_INPUT,
-       MUX_IN_CSPI_IPP_IND_MOSI_SELECT_INPUT,
-       MUX_IN_CSPI_IPP_IND_SS_B_1_SELECT_INPUT,
-       MUX_IN_CSPI_IPP_IND_SS_B_2_SELECT_INPUT,
-       MUX_IN_CSPI_IPP_IND_SS_B_3_SELECT_INPUT,
-       MUX_IN_DPLLIP1_L1T_TOG_EN_SELECT_INPUT,
-       /* TO2 */
-       MUX_IN_ECSPI2_IPP_IND_SS_B_1_SELECT_INPUT,
-       MUX_IN_ECSPI2_IPP_IND_SS_B_3_SELECT_INPUT,
-       MUX_IN_EMI_IPP_IND_RDY_INT_SELECT_INPUT,
-       MUX_IN_ESDHC3_IPP_DAT0_IN_SELECT_INPUT,
-       MUX_IN_ESDHC3_IPP_DAT1_IN_SELECT_INPUT,
-       MUX_IN_ESDHC3_IPP_DAT2_IN_SELECT_INPUT,
-       MUX_IN_ESDHC3_IPP_DAT3_IN_SELECT_INPUT,
-       MUX_IN_FEC_FEC_COL_SELECT_INPUT,
-       MUX_IN_FEC_FEC_CRS_SELECT_INPUT,
-       MUX_IN_FEC_FEC_MDI_SELECT_INPUT,
-       MUX_IN_FEC_FEC_RDATA_0_SELECT_INPUT,
-       MUX_IN_FEC_FEC_RDATA_1_SELECT_INPUT,
-       MUX_IN_FEC_FEC_RDATA_2_SELECT_INPUT,
-       MUX_IN_FEC_FEC_RDATA_3_SELECT_INPUT,
-       MUX_IN_FEC_FEC_RX_CLK_SELECT_INPUT,
-       MUX_IN_FEC_FEC_RX_DV_SELECT_INPUT,
-       MUX_IN_FEC_FEC_RX_ER_SELECT_INPUT,
-       MUX_IN_FEC_FEC_TX_CLK_SELECT_INPUT,
-       MUX_IN_GPIO3_IPP_IND_G_IN_1_SELECT_INPUT,
-       MUX_IN_GPIO3_IPP_IND_G_IN_2_SELECT_INPUT,
-       MUX_IN_GPIO3_IPP_IND_G_IN_3_SELECT_INPUT,
-       MUX_IN_GPIO3_IPP_IND_G_IN_4_SELECT_INPUT,
-       MUX_IN_GPIO3_IPP_IND_G_IN_5_SELECT_INPUT,
-       MUX_IN_GPIO3_IPP_IND_G_IN_6_SELECT_INPUT,
-       MUX_IN_GPIO3_IPP_IND_G_IN_7_SELECT_INPUT,
-       MUX_IN_GPIO3_IPP_IND_G_IN_8_SELECT_INPUT,
-       /* TO2 */
-       MUX_IN_GPIO3_IPP_IND_G_IN_12_SELECT_INPUT,
-       MUX_IN_HSC_MIPI_MIX_IPP_IND_SENS1_DATA_EN_SELECT_INPUT,
-       MUX_IN_HSC_MIPI_MIX_IPP_IND_SENS2_DATA_EN_SELECT_INPUT,
-       /* TO2 */
-       MUX_IN_HSC_MIPI_MIX_PAR_VSYNC_SELECT_INPUT,
-       /* TO2 */
-       MUX_IN_HSC_MIPI_MIX_PAR_DI_WAIT_SELECT_INPUT,
-       MUX_IN_HSC_MIPI_MIX_PAR_SISG_TRIG_SELECT_INPUT,
-       MUX_IN_I2C1_IPP_SCL_IN_SELECT_INPUT,
-       MUX_IN_I2C1_IPP_SDA_IN_SELECT_INPUT,
-       MUX_IN_I2C2_IPP_SCL_IN_SELECT_INPUT,
-       MUX_IN_I2C2_IPP_SDA_IN_SELECT_INPUT,
-
-       MUX_IN_IPU_IPP_DI_0_IND_DISPB_SD_D_SELECT_INPUT,
-
-       MUX_IN_IPU_IPP_DI_1_IND_DISPB_SD_D_SELECT_INPUT,
-
-       MUX_IN_KPP_IPP_IND_COL_6_SELECT_INPUT,
-       MUX_IN_KPP_IPP_IND_COL_7_SELECT_INPUT,
-       MUX_IN_KPP_IPP_IND_ROW_4_SELECT_INPUT,
-       MUX_IN_KPP_IPP_IND_ROW_5_SELECT_INPUT,
-       MUX_IN_KPP_IPP_IND_ROW_6_SELECT_INPUT,
-       MUX_IN_KPP_IPP_IND_ROW_7_SELECT_INPUT,
-       MUX_IN_UART1_IPP_UART_RTS_B_SELECT_INPUT,
-       MUX_IN_UART1_IPP_UART_RXD_MUX_SELECT_INPUT,
-       MUX_IN_UART2_IPP_UART_RTS_B_SELECT_INPUT,
-       MUX_IN_UART2_IPP_UART_RXD_MUX_SELECT_INPUT,
-       MUX_IN_UART3_IPP_UART_RTS_B_SELECT_INPUT,
-       MUX_IN_UART3_IPP_UART_RXD_MUX_SELECT_INPUT,
-       MUX_IN_USBOH3_IPP_IND_UH3_CLK_SELECT_INPUT,
-       MUX_IN_USBOH3_IPP_IND_UH3_DATA_0_SELECT_INPUT,
-       MUX_IN_USBOH3_IPP_IND_UH3_DATA_1_SELECT_INPUT,
-       MUX_IN_USBOH3_IPP_IND_UH3_DATA_2_SELECT_INPUT,
-       MUX_IN_USBOH3_IPP_IND_UH3_DATA_3_SELECT_INPUT,
-       MUX_IN_USBOH3_IPP_IND_UH3_DATA_4_SELECT_INPUT,
-       MUX_IN_USBOH3_IPP_IND_UH3_DATA_5_SELECT_INPUT,
-       MUX_IN_USBOH3_IPP_IND_UH3_DATA_6_SELECT_INPUT,
-       MUX_IN_USBOH3_IPP_IND_UH3_DATA_7_SELECT_INPUT,
-       MUX_IN_USBOH3_IPP_IND_UH3_DIR_SELECT_INPUT,
-       MUX_IN_USBOH3_IPP_IND_UH3_NXT_SELECT_INPUT,
-       MUX_IN_USBOH3_IPP_IND_UH3_STP_SELECT_INPUT,
-       MUX_INPUT_NUM_MUX,
-} iomux_input_select_t;
-
-/* various IOMUX input functions */
-typedef enum iomux_input_config {
-       INPUT_CTL_PATH0 = 0x0,
-       INPUT_CTL_PATH1,
-       INPUT_CTL_PATH2,
-       INPUT_CTL_PATH3,
-       INPUT_CTL_PATH4,
-       INPUT_CTL_PATH5,
-       INPUT_CTL_PATH6,
-       INPUT_CTL_PATH7,
-} iomux_input_config_t;
-
-void mxc_request_iomux(iomux_pin_name_t pin, iomux_pin_cfg_t config);
-void mxc_free_iomux(iomux_pin_name_t pin, iomux_pin_cfg_t config);
-void mxc_iomux_set_pad(iomux_pin_name_t pin, u32 config);
-unsigned int mxc_iomux_get_pad(iomux_pin_name_t pin);
-void mxc_iomux_set_input(iomux_input_select_t input, u32 config);
-
-#endif                         /*  __MACH_MX51_IOMUX_H__ */
diff --git a/arch/arm/include/asm/arch-mx51/mx51_pins.h b/arch/arm/include/asm/arch-mx51/mx51_pins.h
deleted file mode 100644 (file)
index b44ff25..0000000
+++ /dev/null
@@ -1,418 +0,0 @@
-/*
- * (C) Copyright 2008-2009 Freescale Semiconductor, Inc.
- *
- * 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 __ASM_ARCH_MXC_MX51_PINS_H__
-#define __ASM_ARCH_MXC_MX51_PINS_H__
-
-#ifndef __ASSEMBLY__
-
-/*
- * In order to identify pins more effectively, each mux-controlled pin's
- * enumerated value is constructed in the following way:
- *
- * -------------------------------------------------------------------
- * 31-29 | 28 - 24 |  23 - 21 | 20  - 10| 9 - 0
- * -------------------------------------------------------------------
- * IO_P  |  IO_I   | GPIO_I   | PAD_I   | MUX_I
- * -------------------------------------------------------------------
- *
- * Bit 0 to 9 contains MUX_I used to identify the register
- * offset (0-based. base is IOMUX_module_base) defined in the Section
- * "sw_pad_ctl & sw_mux_ctl details" of the IC Spec. The
- * similar field definitions are used for the pad control register.
- * The IOMUX controller can be split in two parts. At the begeinning,
- * there is the register definitions for the multiplexing each pin.
- * Then there is a set of registers (PAD_I) to configure each pin
- * (pullup, pulldown, etc).
- * PAD_I defines the offset of the pad register for each pin.
- * GPIO_I defines, if available, the number of gpio that can be
- * connected to that pad
- * IO_I defines the multiplexer mode required to set the pad in gpio mode
- * IO_P defines the gpio structure (gpio1..gpio4) the pad belongs
- *
- * For example, the MX51_PIN_ETM_D0 is defined in the enumeration:
- *    ( (0x28 - MUX_I_START) << MUX_I)|( (0x250 - PAD_I_START) << PAD_I)
- * It means the mux control register is at register offset 0x28. The pad control
- * register offset is: 0x250 and also occupy the least significant bits
- * within the register.
- */
-
-/*!
- * Starting bit position within each entry of \b iomux_pins to represent the
- * MUX control register offset
- */
-#define MUX_I                  0
-/*!
- * Starting bit position within each entry of \b iomux_pins to represent the
- * PAD control register offset
- */
-#define PAD_I                  10
-/*!
- * Starting bit position within each entry of \b iomux_pins to represent which
- * mux mode is for GPIO (0-based)
- */
-#define GPIO_I                 21
-
-#define MUX_IO_P                29
-#define MUX_IO_I                24
-#define IOMUX_TO_GPIO(pin)      ((((unsigned int)pin >> MUX_IO_P) * \
-                                       GPIO_NUM_PIN) + ((pin >> MUX_IO_I) &\
-                                       ((1 << (MUX_IO_P - MUX_IO_I)) - 1)))
-#define IOMUX_TO_IRQ(pin)       (MXC_GPIO_INT_BASE + IOMUX_TO_GPIO(pin))
-#define GPIO_TO_PORT(n)         (n / GPIO_NUM_PIN)
-#define GPIO_TO_INDEX(n)        (n % GPIO_NUM_PIN)
-
-#define NON_GPIO_PORT          0x7
-#define PIN_TO_MUX_MASK                ((1 << (PAD_I - MUX_I)) - 1)
-#define PIN_TO_PAD_MASK                ((1 << (GPIO_I - PAD_I)) - 1)
-#define PIN_TO_ALT_GPIO_MASK           ((1 << (MUX_IO_I - GPIO_I)) - 1)
-
-#define NON_MUX_I              PIN_TO_MUX_MASK
-#define MUX_I_START            0x001C
-#define PAD_I_START            0x3F0
-#define INPUT_CTL_START                0x8C4
-#define INPUT_CTL_START_TO1    0x928
-#define MUX_I_END              (PAD_I_START - 4)
-
-#define _MXC_BUILD_PIN(gp, gi, ga, mi, pi) \
-       (((gp) << MUX_IO_P) | ((gi) << MUX_IO_I) | \
-       ((mi) << MUX_I) | \
-       ((pi - PAD_I_START) << PAD_I) | \
-       ((ga) << GPIO_I))
-
-#define _MXC_BUILD_GPIO_PIN(gp, gi, ga, mi, pi) \
-       _MXC_BUILD_PIN(gp, gi, ga, mi, pi)
-
-#define _MXC_BUILD_NON_GPIO_PIN(mi, pi) \
-       _MXC_BUILD_PIN(NON_GPIO_PORT, 0, 0, mi, pi)
-
-#define PIN_TO_IOMUX_MUX(pin)  ((pin >> MUX_I) & PIN_TO_MUX_MASK)
-#define PIN_TO_IOMUX_PAD(pin)  ((pin >> PAD_I) & PIN_TO_PAD_MASK)
-#define PIN_TO_ALT_GPIO(pin)   ((pin >> GPIO_I) & PIN_TO_ALT_GPIO_MASK)
-#define PIN_TO_IOMUX_INDEX(pin)        (PIN_TO_IOMUX_MUX(pin) >> 2)
-
-/*
- * This enumeration is constructed based on the Section
- * "sw_pad_ctl & sw_mux_ctl details" of the MX51 IC Spec. Each enumerated
- * value is constructed based on the rules described above.
- */
-enum iomux_pins {
-       MX51_PIN_EIM_DA0 = _MXC_BUILD_NON_GPIO_PIN(0x1C, 0x7A8),
-       MX51_PIN_EIM_DA1 = _MXC_BUILD_NON_GPIO_PIN(0x20, 0x7A8),
-       MX51_PIN_EIM_DA2 = _MXC_BUILD_NON_GPIO_PIN(0x24, 0x7A8),
-       MX51_PIN_EIM_DA3 = _MXC_BUILD_NON_GPIO_PIN(0x28, 0x7A8),
-       MX51_PIN_EIM_DA4 = _MXC_BUILD_NON_GPIO_PIN(0x2C, 0x7AC),
-       MX51_PIN_EIM_DA5 = _MXC_BUILD_NON_GPIO_PIN(0x30, 0x7AC),
-       MX51_PIN_EIM_DA6 = _MXC_BUILD_NON_GPIO_PIN(0x34, 0x7AC),
-       MX51_PIN_EIM_DA7 = _MXC_BUILD_NON_GPIO_PIN(0x38, 0x7AC),
-       MX51_PIN_EIM_DA8 = _MXC_BUILD_NON_GPIO_PIN(0x3C, 0x7B0),
-       MX51_PIN_EIM_DA9 = _MXC_BUILD_NON_GPIO_PIN(0x40, 0x7B0),
-       MX51_PIN_EIM_DA10 = _MXC_BUILD_NON_GPIO_PIN(0x44, 0x7B0),
-       MX51_PIN_EIM_DA11 = _MXC_BUILD_NON_GPIO_PIN(0x48, 0x7B0),
-       MX51_PIN_EIM_DA12 = _MXC_BUILD_NON_GPIO_PIN(0x4C, 0x7BC),
-       MX51_PIN_EIM_DA13 = _MXC_BUILD_NON_GPIO_PIN(0x50, 0x7BC),
-       MX51_PIN_EIM_DA14 = _MXC_BUILD_NON_GPIO_PIN(0x54, 0x7BC),
-       MX51_PIN_EIM_DA15 = _MXC_BUILD_NON_GPIO_PIN(0x58, 0x7BC),
-       MX51_PIN_EIM_D16 = _MXC_BUILD_GPIO_PIN(1, 0, 1, 0x5C, 0x3F0),
-       MX51_PIN_EIM_D17 = _MXC_BUILD_GPIO_PIN(1, 1, 1, 0x60, 0x3F4),
-       MX51_PIN_EIM_D18 = _MXC_BUILD_GPIO_PIN(1, 2, 1, 0x64, 0x3F8),
-       MX51_PIN_EIM_D19 = _MXC_BUILD_GPIO_PIN(1, 3, 1, 0x68, 0x3FC),
-       MX51_PIN_EIM_D20 = _MXC_BUILD_GPIO_PIN(1, 4, 1, 0x6C, 0x400),
-       MX51_PIN_EIM_D21 = _MXC_BUILD_GPIO_PIN(1, 5, 1, 0x70, 0x404),
-       MX51_PIN_EIM_D22 = _MXC_BUILD_GPIO_PIN(1, 6, 1, 0x74, 0x408),
-       MX51_PIN_EIM_D23 = _MXC_BUILD_GPIO_PIN(1, 7, 1, 0x78, 0x40C),
-       MX51_PIN_EIM_D24 = _MXC_BUILD_GPIO_PIN(1, 8, 1, 0x7C, 0x410),
-       MX51_PIN_EIM_D25 = _MXC_BUILD_NON_GPIO_PIN(0x80, 0x414),
-       MX51_PIN_EIM_D26 = _MXC_BUILD_NON_GPIO_PIN(0x84, 0x418),
-       MX51_PIN_EIM_D27 = _MXC_BUILD_GPIO_PIN(1, 9, 1, 0x88, 0x41C),
-       MX51_PIN_EIM_D28 = _MXC_BUILD_NON_GPIO_PIN(0x8C, 0x420),
-       MX51_PIN_EIM_D29 = _MXC_BUILD_NON_GPIO_PIN(0x90, 0x424),
-       MX51_PIN_EIM_D30 = _MXC_BUILD_NON_GPIO_PIN(0x94, 0x428),
-       MX51_PIN_EIM_D31 = _MXC_BUILD_NON_GPIO_PIN(0x98, 0x42C),
-       MX51_PIN_EIM_A16 = _MXC_BUILD_GPIO_PIN(1, 10, 1, 0x9C, 0x430),
-       MX51_PIN_EIM_A17 = _MXC_BUILD_GPIO_PIN(1, 11, 1, 0xA0, 0x434),
-       MX51_PIN_EIM_A18 = _MXC_BUILD_GPIO_PIN(1, 12, 1, 0xA4, 0x438),
-       MX51_PIN_EIM_A19 = _MXC_BUILD_GPIO_PIN(1, 13, 1, 0xA8, 0x43C),
-       MX51_PIN_EIM_A20 = _MXC_BUILD_GPIO_PIN(1, 14, 1, 0xAC, 0x440),
-       MX51_PIN_EIM_A21 = _MXC_BUILD_GPIO_PIN(1, 15, 1, 0xB0, 0x444),
-       MX51_PIN_EIM_A22 = _MXC_BUILD_GPIO_PIN(1, 16, 1, 0xB4, 0x448),
-       MX51_PIN_EIM_A23 = _MXC_BUILD_GPIO_PIN(1, 17, 1, 0xB8, 0x44C),
-       MX51_PIN_EIM_A24 = _MXC_BUILD_GPIO_PIN(1, 18, 1, 0xBC, 0x450),
-       MX51_PIN_EIM_A25 = _MXC_BUILD_GPIO_PIN(1, 19, 1, 0xC0, 0x454),
-       MX51_PIN_EIM_A26 = _MXC_BUILD_GPIO_PIN(1, 20, 1, 0xC4, 0x458),
-       MX51_PIN_EIM_A27 = _MXC_BUILD_GPIO_PIN(1, 21, 1, 0xC8, 0x45C),
-       MX51_PIN_EIM_EB0 = _MXC_BUILD_NON_GPIO_PIN(0xCC, 0x460),
-       MX51_PIN_EIM_EB1 = _MXC_BUILD_NON_GPIO_PIN(0xD0, 0x464),
-       MX51_PIN_EIM_EB2 = _MXC_BUILD_GPIO_PIN(1, 22, 1, 0xD4, 0x468),
-       MX51_PIN_EIM_EB3 = _MXC_BUILD_GPIO_PIN(1, 23, 1, 0xD8, 0x46C),
-       MX51_PIN_EIM_OE = _MXC_BUILD_GPIO_PIN(1, 24, 1, 0xDC, 0x470),
-       MX51_PIN_EIM_CS0 = _MXC_BUILD_GPIO_PIN(1, 25, 1, 0xE0, 0x474),
-       MX51_PIN_EIM_CS1 = _MXC_BUILD_GPIO_PIN(1, 26, 1, 0xE4, 0x478),
-       MX51_PIN_EIM_CS2 = _MXC_BUILD_GPIO_PIN(1, 27, 1, 0xE8, 0x47C),
-       MX51_PIN_EIM_CS3 = _MXC_BUILD_GPIO_PIN(1, 28, 1, 0xEC, 0x480),
-       MX51_PIN_EIM_CS4 = _MXC_BUILD_GPIO_PIN(1, 29, 1, 0xF0, 0x484),
-       MX51_PIN_EIM_CS5 = _MXC_BUILD_GPIO_PIN(1, 30, 1, 0xF4, 0x488),
-       MX51_PIN_EIM_DTACK = _MXC_BUILD_GPIO_PIN(1, 31, 1, 0xF8, 0x48C),
-       MX51_PIN_EIM_LBA = _MXC_BUILD_GPIO_PIN(2, 1, 1, 0xFC, 0x494),
-       MX51_PIN_EIM_CRE = _MXC_BUILD_GPIO_PIN(2, 2, 1, 0x100, 0x4A0),
-       MX51_PIN_DRAM_CS1 = _MXC_BUILD_NON_GPIO_PIN(0x104, 0x4D0),
-       MX51_PIN_NANDF_WE_B = _MXC_BUILD_GPIO_PIN(2, 3, 3, 0x108, 0x4E4),
-       MX51_PIN_NANDF_RE_B = _MXC_BUILD_GPIO_PIN(2, 4, 3, 0x10C, 0x4E8),
-       MX51_PIN_NANDF_ALE = _MXC_BUILD_GPIO_PIN(2, 5, 3, 0x110, 0x4EC),
-       MX51_PIN_NANDF_CLE = _MXC_BUILD_GPIO_PIN(2, 6, 3, 0x114, 0x4F0),
-       MX51_PIN_NANDF_WP_B = _MXC_BUILD_GPIO_PIN(2, 7, 3, 0x118, 0x4F4),
-       MX51_PIN_NANDF_RB0 = _MXC_BUILD_GPIO_PIN(2, 8, 3, 0x11C, 0x4F8),
-       MX51_PIN_NANDF_RB1 = _MXC_BUILD_GPIO_PIN(2, 9, 3, 0x120, 0x4FC),
-       MX51_PIN_NANDF_RB2 = _MXC_BUILD_GPIO_PIN(2, 10, 3, 0x124, 0x500),
-       MX51_PIN_NANDF_RB3 = _MXC_BUILD_GPIO_PIN(2, 11, 3, 0x128, 0x504),
-       MX51_PIN_GPIO_NAND = _MXC_BUILD_GPIO_PIN(2, 12, 3, 0x12C, 0x514),
-       MX51_PIN_NANDF_RB4 = MX51_PIN_GPIO_NAND,
-       MX51_PIN_NANDF_RB5 = _MXC_BUILD_GPIO_PIN(2, 13, 3, 0x130, 0x5D8),
-       MX51_PIN_NANDF_RB6 = _MXC_BUILD_GPIO_PIN(2, 14, 3, 0x134, 0x5DC),
-       MX51_PIN_NANDF_RB7 = _MXC_BUILD_GPIO_PIN(2, 15, 3, 0x138, 0x5E0),
-       MX51_PIN_NANDF_CS0 = _MXC_BUILD_GPIO_PIN(2, 16, 3, 0x130, 0x518),
-       MX51_PIN_NANDF_CS1 = _MXC_BUILD_GPIO_PIN(2, 17, 3, 0x134, 0x51C),
-       MX51_PIN_NANDF_CS2 = _MXC_BUILD_GPIO_PIN(2, 18, 3, 0x138, 0x520),
-       MX51_PIN_NANDF_CS3 = _MXC_BUILD_GPIO_PIN(2, 19, 3, 0x13C, 0x524),
-       MX51_PIN_NANDF_CS4 = _MXC_BUILD_GPIO_PIN(2, 20, 3, 0x140, 0x528),
-       MX51_PIN_NANDF_CS5 = _MXC_BUILD_GPIO_PIN(2, 21, 3, 0x144, 0x52C),
-       MX51_PIN_NANDF_CS6 = _MXC_BUILD_GPIO_PIN(2, 22, 3, 0x148, 0x530),
-       MX51_PIN_NANDF_CS7 = _MXC_BUILD_GPIO_PIN(2, 23, 3, 0x14C, 0x534),
-       MX51_PIN_NANDF_RDY_INT = _MXC_BUILD_GPIO_PIN(2, 24, 3, 0x150, 0x538),
-       MX51_PIN_NANDF_D15 = _MXC_BUILD_GPIO_PIN(2, 25, 3, 0x154, 0x53C),
-       MX51_PIN_NANDF_D14 = _MXC_BUILD_GPIO_PIN(2, 26, 3, 0x158, 0x540),
-       MX51_PIN_NANDF_D13 = _MXC_BUILD_GPIO_PIN(2, 27, 3, 0x15C, 0x544),
-       MX51_PIN_NANDF_D12 = _MXC_BUILD_GPIO_PIN(2, 28, 3, 0x160, 0x548),
-       MX51_PIN_NANDF_D11 = _MXC_BUILD_GPIO_PIN(2, 29, 3, 0x164, 0x54C),
-       MX51_PIN_NANDF_D10 = _MXC_BUILD_GPIO_PIN(2, 30, 3, 0x168, 0x550),
-       MX51_PIN_NANDF_D9 = _MXC_BUILD_GPIO_PIN(2, 31, 3, 0x16C, 0x554),
-       MX51_PIN_NANDF_D8 = _MXC_BUILD_GPIO_PIN(3, 0, 3, 0x170, 0x558),
-       MX51_PIN_NANDF_D7 = _MXC_BUILD_GPIO_PIN(3, 1, 3, 0x174, 0x55C),
-       MX51_PIN_NANDF_D6 = _MXC_BUILD_GPIO_PIN(3, 2, 3, 0x178, 0x560),
-       MX51_PIN_NANDF_D5 = _MXC_BUILD_GPIO_PIN(3, 3, 3, 0x17C, 0x564),
-       MX51_PIN_NANDF_D4 = _MXC_BUILD_GPIO_PIN(3, 4, 3, 0x180, 0x568),
-       MX51_PIN_NANDF_D3 = _MXC_BUILD_GPIO_PIN(3, 5, 3, 0x184, 0x56C),
-       MX51_PIN_NANDF_D2 = _MXC_BUILD_GPIO_PIN(3, 6, 3, 0x188, 0x570),
-       MX51_PIN_NANDF_D1 = _MXC_BUILD_GPIO_PIN(3, 7, 3, 0x18C, 0x574),
-       MX51_PIN_NANDF_D0 = _MXC_BUILD_GPIO_PIN(3, 8, 3, 0x190, 0x578),
-       MX51_PIN_CSI1_D8 = _MXC_BUILD_GPIO_PIN(2, 12, 3, 0x194, 0x57C),
-       MX51_PIN_CSI1_D9 = _MXC_BUILD_GPIO_PIN(2, 13, 3, 0x198, 0x580),
-       MX51_PIN_CSI1_D10 = _MXC_BUILD_NON_GPIO_PIN(0x19C, 0x584),
-       MX51_PIN_CSI1_D11 = _MXC_BUILD_NON_GPIO_PIN(0x1A0, 0x588),
-       MX51_PIN_CSI1_D12 = _MXC_BUILD_NON_GPIO_PIN(0x1A4, 0x58C),
-       MX51_PIN_CSI1_D13 = _MXC_BUILD_NON_GPIO_PIN(0x1A8, 0x590),
-       MX51_PIN_CSI1_D14 = _MXC_BUILD_NON_GPIO_PIN(0x1AC, 0x594),
-       MX51_PIN_CSI1_D15 = _MXC_BUILD_NON_GPIO_PIN(0x1B0, 0x598),
-       MX51_PIN_CSI1_D16 = _MXC_BUILD_NON_GPIO_PIN(0x1B4, 0x59C),
-       MX51_PIN_CSI1_D17 = _MXC_BUILD_NON_GPIO_PIN(0x1B8, 0x5A0),
-       MX51_PIN_CSI1_D18 = _MXC_BUILD_NON_GPIO_PIN(0x1BC, 0x5A4),
-       MX51_PIN_CSI1_D19 = _MXC_BUILD_NON_GPIO_PIN(0x1C0, 0x5A8),
-       MX51_PIN_CSI1_VSYNC = _MXC_BUILD_NON_GPIO_PIN(0x1C4, 0x5AC),
-       MX51_PIN_CSI1_HSYNC = _MXC_BUILD_NON_GPIO_PIN(0x1C8, 0x5B0),
-       MX51_PIN_CSI1_PIXCLK = _MXC_BUILD_NON_GPIO_PIN(NON_MUX_I, 0x5B4),
-       MX51_PIN_CSI1_MCLK = _MXC_BUILD_NON_GPIO_PIN(NON_MUX_I, 0x5B8),
-       MX51_PIN_CSI1_PKE0 = _MXC_BUILD_NON_GPIO_PIN(NON_MUX_I, 0x860),
-       MX51_PIN_CSI2_D12 = _MXC_BUILD_GPIO_PIN(3, 9, 3, 0x1CC, 0x5BC),
-       MX51_PIN_CSI2_D13 = _MXC_BUILD_GPIO_PIN(3, 10, 3, 0x1D0, 0x5C0),
-       MX51_PIN_CSI2_D14 = _MXC_BUILD_GPIO_PIN(3, 11, 3, 0x1D4, 0x5C4),
-       MX51_PIN_CSI2_D15 = _MXC_BUILD_GPIO_PIN(3, 12, 3, 0x1D8, 0x5C8),
-       MX51_PIN_CSI2_D16 = _MXC_BUILD_GPIO_PIN(3, 11, 3, 0x1DC, 0x5CC),
-       MX51_PIN_CSI2_D17 = _MXC_BUILD_GPIO_PIN(3, 12, 3, 0x1E0, 0x5D0),
-       MX51_PIN_CSI2_D18 = _MXC_BUILD_GPIO_PIN(3, 11, 3, 0x1E4, 0x5D4),
-       MX51_PIN_CSI2_D19 = _MXC_BUILD_GPIO_PIN(3, 12, 3, 0x1E8, 0x5D8),
-       MX51_PIN_CSI2_VSYNC = _MXC_BUILD_GPIO_PIN(3, 13, 3, 0x1EC, 0x5DC),
-       MX51_PIN_CSI2_HSYNC = _MXC_BUILD_GPIO_PIN(3, 14, 3, 0x1F0, 0x5E0),
-       MX51_PIN_CSI2_PIXCLK = _MXC_BUILD_GPIO_PIN(3, 15, 3, 0x1F4, 0x5E4),
-       MX51_PIN_CSI2_PKE0 = _MXC_BUILD_NON_GPIO_PIN(NON_MUX_I, 0x81C),
-       MX51_PIN_I2C1_CLK = _MXC_BUILD_GPIO_PIN(3, 16, 3, 0x1F8, 0x5E8),
-       MX51_PIN_I2C1_DAT = _MXC_BUILD_GPIO_PIN(3, 17, 3, 0x1FC, 0x5EC),
-       MX51_PIN_AUD3_BB_TXD = _MXC_BUILD_GPIO_PIN(3, 18, 3, 0x200, 0x5F0),
-       MX51_PIN_AUD3_BB_RXD = _MXC_BUILD_GPIO_PIN(3, 19, 3, 0x204, 0x5F4),
-       MX51_PIN_AUD3_BB_CK = _MXC_BUILD_GPIO_PIN(3, 20, 3, 0x208, 0x5F8),
-       MX51_PIN_AUD3_BB_FS = _MXC_BUILD_GPIO_PIN(3, 21, 3, 0x20C, 0x5FC),
-       MX51_PIN_CSPI1_MOSI = _MXC_BUILD_GPIO_PIN(3, 22, 3, 0x210, 0x600),
-       MX51_PIN_CSPI1_MISO = _MXC_BUILD_GPIO_PIN(3, 23, 3, 0x214, 0x604),
-       MX51_PIN_CSPI1_SS0 = _MXC_BUILD_GPIO_PIN(3, 24, 3, 0x218, 0x608),
-       MX51_PIN_CSPI1_SS1 = _MXC_BUILD_GPIO_PIN(3, 25, 3, 0x21C, 0x60C),
-       MX51_PIN_CSPI1_RDY = _MXC_BUILD_GPIO_PIN(3, 26, 3, 0x220, 0x610),
-       MX51_PIN_CSPI1_SCLK = _MXC_BUILD_GPIO_PIN(3, 27, 3, 0x224, 0x614),
-       MX51_PIN_UART1_RXD = _MXC_BUILD_GPIO_PIN(3, 28, 3, 0x228, 0x618),
-       MX51_PIN_UART1_TXD = _MXC_BUILD_GPIO_PIN(3, 29, 3, 0x22C, 0x61C),
-       MX51_PIN_UART1_RTS = _MXC_BUILD_GPIO_PIN(3, 30, 3, 0x230, 0x620),
-       MX51_PIN_UART1_CTS = _MXC_BUILD_GPIO_PIN(3, 31, 3, 0x234, 0x624),
-       MX51_PIN_UART2_RXD = _MXC_BUILD_GPIO_PIN(0, 20, 3, 0x238, 0x628),
-       MX51_PIN_UART2_TXD = _MXC_BUILD_GPIO_PIN(0, 21, 3, 0x23C, 0x62C),
-       MX51_PIN_UART3_RXD = _MXC_BUILD_GPIO_PIN(0, 22, 3, 0x240, 0x630),
-       MX51_PIN_UART3_TXD = _MXC_BUILD_GPIO_PIN(0, 23, 3, 0x244, 0x634),
-       MX51_PIN_OWIRE_LINE = _MXC_BUILD_GPIO_PIN(0, 24, 3, 0x248, 0x638),
-       MX51_PIN_KEY_ROW0 = _MXC_BUILD_NON_GPIO_PIN(0x24C, 0x63C),
-       MX51_PIN_KEY_ROW1 = _MXC_BUILD_NON_GPIO_PIN(0x250, 0x640),
-       MX51_PIN_KEY_ROW2 = _MXC_BUILD_NON_GPIO_PIN(0x254, 0x644),
-       MX51_PIN_KEY_ROW3 = _MXC_BUILD_NON_GPIO_PIN(0x258, 0x648),
-       MX51_PIN_KEY_COL0 = _MXC_BUILD_NON_GPIO_PIN(0x25C, 0x64C),
-       MX51_PIN_KEY_COL1 = _MXC_BUILD_NON_GPIO_PIN(0x260, 0x650),
-       MX51_PIN_KEY_COL2 = _MXC_BUILD_NON_GPIO_PIN(0x264, 0x654),
-       MX51_PIN_KEY_COL3 = _MXC_BUILD_NON_GPIO_PIN(0x268, 0x658),
-       MX51_PIN_KEY_COL4 = _MXC_BUILD_NON_GPIO_PIN(0x26C, 0x65C),
-       MX51_PIN_KEY_COL5 = _MXC_BUILD_NON_GPIO_PIN(0x270, 0x660),
-       MX51_PIN_USBH1_CLK = _MXC_BUILD_GPIO_PIN(0, 25, 2, 0x278, 0x678),
-       MX51_PIN_USBH1_DIR = _MXC_BUILD_GPIO_PIN(0, 26, 2, 0x27C, 0x67C),
-       MX51_PIN_USBH1_STP = _MXC_BUILD_GPIO_PIN(0, 27, 2, 0x280, 0x680),
-       MX51_PIN_USBH1_NXT = _MXC_BUILD_GPIO_PIN(0, 28, 2, 0x284, 0x684),
-       MX51_PIN_USBH1_DATA0 = _MXC_BUILD_GPIO_PIN(0, 11, 2, 0x288, 0x688),
-       MX51_PIN_USBH1_DATA1 = _MXC_BUILD_GPIO_PIN(0, 12, 2, 0x28C, 0x68C),
-       MX51_PIN_USBH1_DATA2 = _MXC_BUILD_GPIO_PIN(0, 13, 2, 0x290, 0x690),
-       MX51_PIN_USBH1_DATA3 = _MXC_BUILD_GPIO_PIN(0, 14, 2, 0x294, 0x694),
-       MX51_PIN_USBH1_DATA4 = _MXC_BUILD_GPIO_PIN(0, 15, 2, 0x298, 0x698),
-       MX51_PIN_USBH1_DATA5 = _MXC_BUILD_GPIO_PIN(0, 16, 2, 0x29C, 0x69C),
-       MX51_PIN_USBH1_DATA6 = _MXC_BUILD_GPIO_PIN(0, 17, 2, 0x2A0, 0x6A0),
-       MX51_PIN_USBH1_DATA7 = _MXC_BUILD_GPIO_PIN(0, 18, 2, 0x2A4, 0x6A4),
-       MX51_PIN_DI1_PIN11 = _MXC_BUILD_GPIO_PIN(2, 0, 4, 0x2A8, 0x6A8),
-       MX51_PIN_DI1_PIN12 = _MXC_BUILD_GPIO_PIN(2, 1, 4, 0x2AC, 0x6AC),
-       MX51_PIN_DI1_PIN13 = _MXC_BUILD_GPIO_PIN(2, 2, 4, 0x2B0, 0x6B0),
-       MX51_PIN_DI1_D0_CS = _MXC_BUILD_GPIO_PIN(2, 3, 4, 0x2B4, 0x6B4),
-       MX51_PIN_DI1_D1_CS = _MXC_BUILD_GPIO_PIN(2, 4, 4, 0x2B8, 0x6B8),
-       MX51_PIN_DISPB2_SER_DIN = _MXC_BUILD_GPIO_PIN(2, 5, 4, 0x2BC, 0x6BC),
-       MX51_PIN_DISPB2_SER_DIO = _MXC_BUILD_GPIO_PIN(2, 6, 4, 0x2C0, 0x6C0),
-       MX51_PIN_DISPB2_SER_CLK = _MXC_BUILD_GPIO_PIN(2, 7, 4, 0x2C4, 0x6C4),
-       MX51_PIN_DISPB2_SER_RS = _MXC_BUILD_GPIO_PIN(2, 8, 4, 0x2C8, 0x6C8),
-       MX51_PIN_DISP1_DAT0 = _MXC_BUILD_NON_GPIO_PIN(0x2CC, 0x6CC),
-       MX51_PIN_DISP1_DAT1 = _MXC_BUILD_NON_GPIO_PIN(0x2D0, 0x6D0),
-       MX51_PIN_DISP1_DAT2 = _MXC_BUILD_NON_GPIO_PIN(0x2D4, 0x6D4),
-       MX51_PIN_DISP1_DAT3 = _MXC_BUILD_NON_GPIO_PIN(0x2D8, 0x6D8),
-       MX51_PIN_DISP1_DAT4 = _MXC_BUILD_NON_GPIO_PIN(0x2DC, 0x6DC),
-       MX51_PIN_DISP1_DAT5 = _MXC_BUILD_NON_GPIO_PIN(0x2E0, 0x6E0),
-       MX51_PIN_DISP1_DAT6 = _MXC_BUILD_NON_GPIO_PIN(0x2E4, 0x6E4),
-       MX51_PIN_DISP1_DAT7 = _MXC_BUILD_NON_GPIO_PIN(0x2E8, 0x6E8),
-       MX51_PIN_DISP1_DAT8 = _MXC_BUILD_NON_GPIO_PIN(0x2EC, 0x6EC),
-       MX51_PIN_DISP1_DAT9 = _MXC_BUILD_NON_GPIO_PIN(0x2F0, 0x6F0),
-       MX51_PIN_DISP1_DAT10 = _MXC_BUILD_NON_GPIO_PIN(0x2F4, 0x6F4),
-       MX51_PIN_DISP1_DAT11 = _MXC_BUILD_NON_GPIO_PIN(0x2F8, 0x6F8),
-       MX51_PIN_DISP1_DAT12 = _MXC_BUILD_NON_GPIO_PIN(0x2FC, 0x6FC),
-       MX51_PIN_DISP1_DAT13 = _MXC_BUILD_NON_GPIO_PIN(0x300, 0x700),
-       MX51_PIN_DISP1_DAT14 = _MXC_BUILD_NON_GPIO_PIN(0x304, 0x704),
-       MX51_PIN_DISP1_DAT15 = _MXC_BUILD_NON_GPIO_PIN(0x308, 0x708),
-       MX51_PIN_DISP1_DAT16 = _MXC_BUILD_NON_GPIO_PIN(0x30C, 0x70C),
-       MX51_PIN_DISP1_DAT17 = _MXC_BUILD_NON_GPIO_PIN(0x310, 0x710),
-       MX51_PIN_DISP1_DAT18 = _MXC_BUILD_NON_GPIO_PIN(0x314, 0x714),
-       MX51_PIN_DISP1_DAT19 = _MXC_BUILD_NON_GPIO_PIN(0x318, 0x718),
-       MX51_PIN_DISP1_DAT20 = _MXC_BUILD_NON_GPIO_PIN(0x31C, 0x71C),
-       MX51_PIN_DISP1_DAT21 = _MXC_BUILD_NON_GPIO_PIN(0x320, 0x720),
-       MX51_PIN_DISP1_DAT22 = _MXC_BUILD_NON_GPIO_PIN(0x324, 0x724),
-       MX51_PIN_DISP1_DAT23 = _MXC_BUILD_NON_GPIO_PIN(0x328, 0x728),
-       MX51_PIN_DI1_PIN3 = _MXC_BUILD_NON_GPIO_PIN(0x32C, 0x72C),
-       MX51_PIN_DI1_PIN2 = _MXC_BUILD_NON_GPIO_PIN(0x330, 0x734),
-       MX51_PIN_DI_GP1 = _MXC_BUILD_NON_GPIO_PIN(0x334, 0x73C),
-       MX51_PIN_DI_GP2 = _MXC_BUILD_NON_GPIO_PIN(0x338, 0x740),
-       MX51_PIN_DI_GP3 = _MXC_BUILD_NON_GPIO_PIN(0x33C, 0x744),
-       MX51_PIN_DI2_PIN4 = _MXC_BUILD_NON_GPIO_PIN(0x340, 0x748),
-       MX51_PIN_DI2_PIN2 = _MXC_BUILD_NON_GPIO_PIN(0x344, 0x74C),
-       MX51_PIN_DI2_PIN3 = _MXC_BUILD_NON_GPIO_PIN(0x348, 0x750),
-       MX51_PIN_DI2_DISP_CLK = _MXC_BUILD_NON_GPIO_PIN(0x34C, 0x754),
-       MX51_PIN_DI_GP4 = _MXC_BUILD_NON_GPIO_PIN(0x350, 0x758),
-       MX51_PIN_DISP2_DAT0 = _MXC_BUILD_NON_GPIO_PIN(0x354, 0x75C),
-       MX51_PIN_DISP2_DAT1 = _MXC_BUILD_NON_GPIO_PIN(0x358, 0x760),
-       MX51_PIN_DISP2_DAT2 = _MXC_BUILD_NON_GPIO_PIN(0x35C, 0x764),
-       MX51_PIN_DISP2_DAT3 = _MXC_BUILD_NON_GPIO_PIN(0x360, 0x768),
-       MX51_PIN_DISP2_DAT4 = _MXC_BUILD_NON_GPIO_PIN(0x364, 0x76C),
-       MX51_PIN_DISP2_DAT5 = _MXC_BUILD_NON_GPIO_PIN(0x368, 0x770),
-       MX51_PIN_DISP2_DAT6 = _MXC_BUILD_GPIO_PIN(0, 19, 5, 0x36C, 0x774),
-       MX51_PIN_DISP2_DAT7 = _MXC_BUILD_GPIO_PIN(0, 29, 5, 0x370, 0x778),
-       MX51_PIN_DISP2_DAT8 = _MXC_BUILD_GPIO_PIN(0, 30, 5, 0x374, 0x77C),
-       MX51_PIN_DISP2_DAT9 = _MXC_BUILD_GPIO_PIN(0, 31, 5, 0x378, 0x780),
-       MX51_PIN_DISP2_DAT10 = _MXC_BUILD_NON_GPIO_PIN(0x37C, 0x784),
-       MX51_PIN_DISP2_DAT11 = _MXC_BUILD_NON_GPIO_PIN(0x380, 0x788),
-       MX51_PIN_DISP2_DAT12 = _MXC_BUILD_NON_GPIO_PIN(0x384, 0x78C),
-       MX51_PIN_DISP2_DAT13 = _MXC_BUILD_NON_GPIO_PIN(0x388, 0x790),
-       MX51_PIN_DISP2_DAT14 = _MXC_BUILD_NON_GPIO_PIN(0x38C, 0x794),
-       MX51_PIN_DISP2_DAT15 = _MXC_BUILD_NON_GPIO_PIN(0x390, 0x798),
-       MX51_PIN_SD1_CMD = _MXC_BUILD_NON_GPIO_PIN(0x394, 0x79C),
-       MX51_PIN_SD1_CLK = _MXC_BUILD_NON_GPIO_PIN(0x398, 0x7A0),
-       MX51_PIN_SD1_DATA0 = _MXC_BUILD_NON_GPIO_PIN(0x39C, 0x7A4),
-       MX51_PIN_SD1_DATA1 = _MXC_BUILD_NON_GPIO_PIN(0x3A0, 0x7A8),
-       MX51_PIN_SD1_DATA2 = _MXC_BUILD_NON_GPIO_PIN(0x3A4, 0x7AC),
-       MX51_PIN_SD1_DATA3 = _MXC_BUILD_NON_GPIO_PIN(0x3A8, 0x7B0),
-       MX51_PIN_GPIO1_0 = _MXC_BUILD_GPIO_PIN(0, 0, 1, 0x3AC, 0x7B4),
-       MX51_PIN_GPIO1_1 = _MXC_BUILD_GPIO_PIN(0, 1, 1, 0x3B0, 0x7B8),
-       MX51_PIN_SD2_CMD = _MXC_BUILD_NON_GPIO_PIN(0x3B4, 0x7BC),
-       MX51_PIN_SD2_CLK = _MXC_BUILD_NON_GPIO_PIN(0x3B8, 0x7C0),
-       MX51_PIN_SD2_DATA0 = _MXC_BUILD_NON_GPIO_PIN(0x3BC, 0x7C4),
-       MX51_PIN_SD2_DATA1 = _MXC_BUILD_NON_GPIO_PIN(0x3C0, 0x7C8),
-       MX51_PIN_SD2_DATA2 = _MXC_BUILD_NON_GPIO_PIN(0x3C4, 0x7CC),
-       MX51_PIN_SD2_DATA3 = _MXC_BUILD_NON_GPIO_PIN(0x3C8, 0x7D0),
-       MX51_PIN_GPIO1_2 = _MXC_BUILD_GPIO_PIN(0, 2, 0, 0x3CC, 0x7D4),
-       MX51_PIN_GPIO1_3 = _MXC_BUILD_GPIO_PIN(0, 3, 0, 0x3D0, 0x7D8),
-       MX51_PIN_PMIC_INT_REQ = _MXC_BUILD_NON_GPIO_PIN(0x3D4, 0x7FC),
-       MX51_PIN_GPIO1_4 = _MXC_BUILD_GPIO_PIN(0, 4, 0, 0x3D8, 0x804),
-       MX51_PIN_GPIO1_5 = _MXC_BUILD_GPIO_PIN(0, 5, 0, 0x3DC, 0x808),
-       MX51_PIN_GPIO1_6 = _MXC_BUILD_GPIO_PIN(0, 6, 0, 0x3E0, 0x80C),
-       MX51_PIN_GPIO1_7 = _MXC_BUILD_GPIO_PIN(0, 7, 0, 0x3E4, 0x810),
-       MX51_PIN_GPIO1_8 = _MXC_BUILD_GPIO_PIN(0, 8, 0, 0x3E8, 0x814),
-       MX51_PIN_GPIO1_9 = _MXC_BUILD_GPIO_PIN(0, 9, 0, 0x3EC, 0x818),
-
-       /* The following are PADS used for drive strength */
-
-       MX51_PIN_CTL_GRP_DDRPKS = _MXC_BUILD_NON_GPIO_PIN(0, 0x820),
-       MX51_PIN_CTL_GRP_PKEDDR = _MXC_BUILD_NON_GPIO_PIN(0, 0x838),
-       MX51_PIN_CTL_GRP_PKEADDR = _MXC_BUILD_NON_GPIO_PIN(0, 0x890),
-       MX51_PIN_CTL_GRP_DDRAPKS = _MXC_BUILD_NON_GPIO_PIN(0, 0x87C),
-       MX51_PIN_CTL_GRP_DDRAPUS = _MXC_BUILD_NON_GPIO_PIN(0, 0x84C),
-       MX51_PIN_CTL_GRP_DDRPUS = _MXC_BUILD_NON_GPIO_PIN(0, 0x884),
-       MX51_PIN_CTL_GRP_HYSDDR0 = _MXC_BUILD_NON_GPIO_PIN(0, 0x85C),
-       MX51_PIN_CTL_GRP_HYSDDR1 = _MXC_BUILD_NON_GPIO_PIN(0, 0x864),
-       MX51_PIN_CTL_GRP_HYSDDR2 = _MXC_BUILD_NON_GPIO_PIN(0, 0x86C),
-       MX51_PIN_CTL_GRP_HYSDDR3 = _MXC_BUILD_NON_GPIO_PIN(0, 0x874),
-       MX51_PIN_CTL_GRP_DDR_SR_B0 = _MXC_BUILD_NON_GPIO_PIN(0, 0x878),
-       MX51_PIN_CTL_GRP_DDR_SR_B1 = _MXC_BUILD_NON_GPIO_PIN(0, 0x880),
-       MX51_PIN_CTL_GRP_DDR_SR_B2 = _MXC_BUILD_NON_GPIO_PIN(0, 0x88C),
-       MX51_PIN_CTL_GRP_DDR_SR_B4 = _MXC_BUILD_NON_GPIO_PIN(0, 0x89C),
-       MX51_PIN_CTL_GRP_DRAM_B0 = _MXC_BUILD_NON_GPIO_PIN(0, 0x8A4),
-       MX51_PIN_CTL_GRP_DRAM_B1 = _MXC_BUILD_NON_GPIO_PIN(0, 0x8AC),
-       MX51_PIN_CTL_GRP_DRAM_B2 = _MXC_BUILD_NON_GPIO_PIN(0, 0x8B8),
-       MX51_PIN_CTL_GRP_DRAM_B4 = _MXC_BUILD_NON_GPIO_PIN(0, 0x82C),
-       MX51_PIN_CTL_GRP_INMODE1 = _MXC_BUILD_NON_GPIO_PIN(0, 0x8A0),
-       MX51_PIN_CTL_GRP_DDR_SR_A0 = _MXC_BUILD_NON_GPIO_PIN(0, 0x8B0),
-       MX51_PIN_CTL_GRP_EMI_DS5 = _MXC_BUILD_NON_GPIO_PIN(0, 0x8B4),
-       MX51_PIN_CTL_GRP_DDR_SR_A1 = _MXC_BUILD_NON_GPIO_PIN(0, 0x8BC),
-       MX51_PIN_CTL_GRP_DDR_A0 = _MXC_BUILD_NON_GPIO_PIN(0, 0x83C),
-       MX51_PIN_CTL_GRP_DDR_A1 = _MXC_BUILD_NON_GPIO_PIN(0, 0x848),
-       MX51_PIN_CTL_GRP_DISP_PKE0 = _MXC_BUILD_NON_GPIO_PIN(0, 0x868),
-       MX51_PIN_CTL_DRAM_RAS = _MXC_BUILD_NON_GPIO_PIN(0, 0x4A4),
-       MX51_PIN_CTL_DRAM_CAS = _MXC_BUILD_NON_GPIO_PIN(0, 0x4A8),
-       MX51_PIN_CTL_DRAM_SDWE = _MXC_BUILD_NON_GPIO_PIN(0, 0x4Ac),
-       MX51_PIN_CTL_DRAM_SDCKE0 = _MXC_BUILD_NON_GPIO_PIN(0, 0x4B0),
-       MX51_PIN_CTL_DRAM_SDCKE1 = _MXC_BUILD_NON_GPIO_PIN(0, 0x4B4),
-       MX51_PIN_CTL_DRAM_SDCLK = _MXC_BUILD_NON_GPIO_PIN(0, 0x4B8),
-       MX51_PIN_CTL_DRAM_SDQS0 = _MXC_BUILD_NON_GPIO_PIN(0, 0x4BC),
-       MX51_PIN_CTL_DRAM_SDQS1 = _MXC_BUILD_NON_GPIO_PIN(0, 0x4C0),
-       MX51_PIN_CTL_DRAM_SDQS2 = _MXC_BUILD_NON_GPIO_PIN(0, 0x4C4),
-       MX51_PIN_CTL_DRAM_SDQS3 = _MXC_BUILD_NON_GPIO_PIN(0, 0x4C8),
-       MX51_PIN_CTL_DRAM_CS0 = _MXC_BUILD_NON_GPIO_PIN(0, 0x4CC),
-       MX51_PIN_CTL_DRAM_CS1 = _MXC_BUILD_NON_GPIO_PIN(0, 0x4D0),
-       MX51_PIN_CTL_DRAM_DQM0 = _MXC_BUILD_NON_GPIO_PIN(0, 0x4D4),
-       MX51_PIN_CTL_DRAM_DQM1 = _MXC_BUILD_NON_GPIO_PIN(0, 0x4D8),
-       MX51_PIN_CTL_DRAM_DQM2 = _MXC_BUILD_NON_GPIO_PIN(0, 0x4DC),
-       MX51_PIN_CTL_DRAM_DQM3 = _MXC_BUILD_NON_GPIO_PIN(0, 0x4E0),
-};
-
-#endif                         /* __ASSEMBLY__ */
-#endif                         /* __ASM_ARCH_MXC_MX51_PINS_H__ */
diff --git a/arch/arm/include/asm/arch-mx51/sys_proto.h b/arch/arm/include/asm/arch-mx51/sys_proto.h
deleted file mode 100644 (file)
index f687503..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * (C) Copyright 2009
- * Stefano Babic, DENX Software Engineering, sbabic@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 _SYS_PROTO_H_
-#define _SYS_PROTO_H_
-
-u32 get_cpu_rev(void);
-#define is_soc_rev(rev)        ((get_cpu_rev() & 0xFF) - rev)
-void sdelay(unsigned long);
-
-#endif
index c8c479a186923d78f057d9a0d8a6089009a1b4e8..44b800f681638f5f3d6fd090ae55b88a31f25a7d 100644 (file)
 #include <linux/config.h>
 #include <asm/mach-types.h>
 
+/*
+ * Define CONFIG_CPU_MONAHANS in case some CPU of the PXA3xx family is selected.
+ * PXA300/310/320 all have distinct register mappings in some cases, that's why
+ * the exact CPU has to be selected. CONFIG_CPU_MONAHANS is a helper for common
+ * drivers and compatibility glue with old source then.
+ */
+#ifndef        CONFIG_CPU_MONAHANS
+#if    defined(CONFIG_CPU_PXA300) || \
+       defined(CONFIG_CPU_PXA310) || \
+       defined(CONFIG_CPU_PXA320)
+#define        CONFIG_CPU_MONAHANS
+#endif
+#endif
 
 /*
  * These are statically mapped PCMCIA IO space for designs using it as a
  * 0x48000000 - 0x49ffffff <--> 0xfc000000 - 0xfdffffff
  */
 
-/* FIXME: Only this does work for u-boot... find out why... [RS] */
-#define UBOOT_REG_FIX 1
-
-#ifndef UBOOT_REG_FIX
-#ifndef __ASSEMBLY__
-
-#define io_p2v(x)      ( ((x) | 0xbe000000) ^ (~((x) >> 1) & 0x06000000) )
-#define io_v2p( x )    ( ((x) & 0x41ffffff) ^ ( ((x) & 0x06000000) << 1) )
-
-/*
- * This __REG() version gives the same results as the one above,  except
- * that we are fooling gcc somehow so it generates far better and smaller
- * assembly code for access to contigous registers.  It's a shame that gcc
- * doesn't guess this by itself.
- */
-#include <asm/types.h>
-typedef struct { volatile u32 offset[4096]; } __regbase;
-# define __REGP(x)     ((__regbase *)((x)&~4095))->offset[((x)&4095)>>2]
-# define __REG(x)      __REGP(io_p2v(x))
-#endif
-
-/* Let's kick gcc's ass again... */
-# define __REG2(x,y)   \
-       ( __builtin_constant_p(y) ? (__REG((x) + (y))) \
-                                 : (*(volatile u32 *)((u32)&__REG(x) + (y))) )
-
-# define __PREG(x)     (io_v2p((u32)&(x)))
-
-#else
-
-# define __REG(x)      io_p2v(x)
-# define __PREG(x)     io_v2p(x)
-
-# undef io_p2v
-# undef __REG
-# ifndef __ASSEMBLY__
-#  define io_p2v(PhAdd)           (PhAdd)
-#  define __REG(x)     (*((volatile u32 *)io_p2v(x)))
-#  define __REG2(x,y)  (*(volatile u32 *)((u32)&__REG(x) + (y)))
-# else
-#  define __REG(x) (x)
-#  ifdef CONFIG_CPU_MONAHANS /* Hack to make this work with mona's pxa-regs.h */
-#   define __REG_2(x) (x)
-#   define __REG_3(x) (x)
-#  endif
-# endif
-#endif /* UBOOT_REG_FIX */
-
 #include "pxa-regs.h"
 
 #ifndef __ASSEMBLY__
diff --git a/arch/arm/include/asm/arch-pxa/macro.h b/arch/arm/include/asm/arch-pxa/macro.h
deleted file mode 100644 (file)
index 035a57e..0000000
+++ /dev/null
@@ -1,324 +0,0 @@
-/*
- * arch/arm/include/asm/arch-pxa/macro.h
- *
- * Copyright (C) 2010 Marek Vasut <marek.vasut@gmail.com>
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#ifndef __ASM_ARCH_PXA_MACRO_H__
-#define __ASM_ARCH_PXA_MACRO_H__
-#ifdef __ASSEMBLY__
-
-#include <asm/macro.h>
-#include <asm/arch/pxa-regs.h>
-
-/*
- * This macro performs a 32bit write to a memory location and makes sure the
- * write operation really happened by performing a read back.
- *
- * Clobbered regs: r4, r5
- */
-.macro write32rb addr, data
-       ldr     r4, =\addr
-       ldr     r5, =\data
-       str     r5, [r4]
-       ldr     r5, [r4]
-.endm
-
-/*
- * This macro waits according to OSCR incrementation
- *
- * Clobbered regs: r4, r5, r6
- */
-.macro pxa_wait_ticks ticks
-       ldr     r4, =OSCR
-       mov     r5, #0
-       str     r5, [r4]
-       ldr     r5, =\ticks
-1:
-       ldr     r6, [r4]
-       cmp     r5, r6
-       bgt     1b
-.endm
-
-/*
- * This macro sets up the GPIO pins of the PXA2xx/PXA3xx CPU
- *
- * Clobbered regs: r4, r5
- */
-.macro pxa_gpio_setup
-       write32 GPSR0, CONFIG_SYS_GPSR0_VAL
-       write32 GPSR1, CONFIG_SYS_GPSR1_VAL
-       write32 GPSR2, CONFIG_SYS_GPSR2_VAL
-#if defined(CONFIG_PXA27X) || defined(CONFIG_CPU_MONAHANS)
-       write32 GPSR3, CONFIG_SYS_GPSR3_VAL
-#endif
-
-       write32 GPCR0, CONFIG_SYS_GPCR0_VAL
-       write32 GPCR1, CONFIG_SYS_GPCR1_VAL
-       write32 GPCR2, CONFIG_SYS_GPCR2_VAL
-#if defined(CONFIG_PXA27X) || defined(CONFIG_CPU_MONAHANS)
-       write32 GPCR3, CONFIG_SYS_GPCR3_VAL
-#endif
-
-       write32 GPDR0, CONFIG_SYS_GPDR0_VAL
-       write32 GPDR1, CONFIG_SYS_GPDR1_VAL
-       write32 GPDR2, CONFIG_SYS_GPDR2_VAL
-#if defined(CONFIG_PXA27X) || defined(CONFIG_CPU_MONAHANS)
-       write32 GPDR3, CONFIG_SYS_GPDR3_VAL
-#endif
-
-       write32 GAFR0_L, CONFIG_SYS_GAFR0_L_VAL
-       write32 GAFR0_U, CONFIG_SYS_GAFR0_U_VAL
-       write32 GAFR1_L, CONFIG_SYS_GAFR1_L_VAL
-       write32 GAFR1_U, CONFIG_SYS_GAFR1_U_VAL
-       write32 GAFR2_L, CONFIG_SYS_GAFR2_L_VAL
-       write32 GAFR2_U, CONFIG_SYS_GAFR2_U_VAL
-#if defined(CONFIG_PXA27X) || defined(CONFIG_CPU_MONAHANS)
-       write32 GAFR3_L, CONFIG_SYS_GAFR3_L_VAL
-       write32 GAFR3_U, CONFIG_SYS_GAFR3_U_VAL
-#endif
-
-       write32 PSSR, CONFIG_SYS_PSSR_VAL
-.endm
-
-/*
- * This macro sets up the Memory controller of the PXA2xx CPU
- *
- * Clobbered regs: r3, r4, r5
- */
-.macro pxa_mem_setup
-       /* This comes handy when setting MDREFR */
-       ldr     r3, =MEMC_BASE
-
-       /*
-        * 1) Initialize Asynchronous static memory controller
-        */
-
-       /* MSC0: nCS(0,1) */
-       write32rb       (MEMC_BASE + MSC0_OFFSET), CONFIG_SYS_MSC0_VAL
-       /* MSC1: nCS(2,3) */
-       write32rb       (MEMC_BASE + MSC1_OFFSET), CONFIG_SYS_MSC1_VAL
-       /* MSC2: nCS(4,5) */
-       write32rb       (MEMC_BASE + MSC2_OFFSET), CONFIG_SYS_MSC2_VAL
-
-       /*
-        * 2) Initialize Card Interface
-        */
-
-       /* MECR: Memory Expansion Card Register */
-       write32rb       (MEMC_BASE + MECR_OFFSET), CONFIG_SYS_MECR_VAL
-       /* MCMEM0: Card Interface slot 0 timing */
-       write32rb       (MEMC_BASE + MCMEM0_OFFSET), CONFIG_SYS_MCMEM0_VAL
-       /* MCMEM1: Card Interface slot 1 timing */
-       write32rb       (MEMC_BASE + MCMEM1_OFFSET), CONFIG_SYS_MCMEM1_VAL
-       /* MCATT0: Card Interface Attribute Space Timing, slot 0 */
-       write32rb       (MEMC_BASE + MCATT0_OFFSET), CONFIG_SYS_MCATT0_VAL
-       /* MCATT1: Card Interface Attribute Space Timing, slot 1 */
-       write32rb       (MEMC_BASE + MCATT1_OFFSET), CONFIG_SYS_MCATT1_VAL
-       /* MCIO0: Card Interface I/O Space Timing, slot 0 */
-       write32rb       (MEMC_BASE + MCIO0_OFFSET), CONFIG_SYS_MCIO0_VAL
-       /* MCIO1: Card Interface I/O Space Timing, slot 1 */
-       write32rb       (MEMC_BASE + MCIO1_OFFSET), CONFIG_SYS_MCIO1_VAL
-
-       /*
-        * 3) Configure Fly-By DMA register
-        */
-
-       write32rb       (MEMC_BASE + FLYCNFG_OFFSET), CONFIG_SYS_FLYCNFG_VAL
-
-       /*
-        * 4) Initialize Timing for Sync Memory (SDCLK0)
-        */
-
-       /*
-        * Before accessing MDREFR we need a valid DRI field, so we set
-        * this to power on defaults + DRI field.
-        */
-       ldr     r5, [r3, #MDREFR_OFFSET]
-       bic     r5, r5, #0x0ff
-       bic     r5, r5, #0xf00  /* MDREFR user config with zeroed DRI */
-
-       ldr     r4, =CONFIG_SYS_MDREFR_VAL
-       mov     r6, r4
-       lsl     r4, #20
-       lsr     r4, #20         /* Get a valid DRI field */
-
-       orr     r5, r5, r4      /* MDREFR user config with correct DRI */
-
-       orr     r5, #MDREFR_K0RUN
-       orr     r5, #MDREFR_SLFRSH
-       bic     r5, #MDREFR_APD
-       bic     r5, #MDREFR_E1PIN
-
-       str     r5, [r3, #MDREFR_OFFSET]
-       ldr     r4, [r3, #MDREFR_OFFSET]
-
-       /*
-        * 5) Initialize Synchronous Static Memory (Flash/Peripherals)
-        */
-
-       /* Initialize SXCNFG register. Assert the enable bits.
-        *
-        * Write SXMRS to cause an MRS command to all enabled banks of
-        * synchronous static memory. Note that SXLCR need not be written
-        * at this time.
-        */
-       write32rb       (MEMC_BASE + SXCNFG_OFFSET), CONFIG_SYS_SXCNFG_VAL
-
-       /*
-        * 6) Initialize SDRAM
-        */
-
-       bic     r6, #MDREFR_SLFRSH
-       str     r6, [r3, #MDREFR_OFFSET]
-       ldr     r4, [r3, #MDREFR_OFFSET]
-
-       orr     r6, #MDREFR_E1PIN
-       str     r6, [r3, #MDREFR_OFFSET]
-       ldr     r4, [r3, #MDREFR_OFFSET]
-
-       /*
-        * 7) Write MDCNFG with MDCNFG:DEx deasserted (set to 0), to configure
-        *    but not enable each SDRAM partition pair.
-        */
-
-       /* Fetch platform value of MDCNFG */
-       ldr     r4, =CONFIG_SYS_MDCNFG_VAL
-       /* Disable all sdram banks */
-       bic     r4, r4, #(MDCNFG_DE0|MDCNFG_DE1)
-       bic     r4, r4, #(MDCNFG_DE2|MDCNFG_DE3)
-       /* Write initial value of MDCNFG, w/o enabling sdram banks */
-       str     r4, [r3, #MDCNFG_OFFSET]
-       ldr     r4, [r3, #MDCNFG_OFFSET]
-
-       /* Wait for the clock to the SDRAMs to stabilize, 100..200 usec. */
-       pxa_wait_ticks  0x300
-
-       /*
-        * 8) Trigger a number (usually 8) refresh cycles by attempting
-        *    non-burst read or write accesses to disabled SDRAM, as commonly
-        *    specified in the power up sequence documented in SDRAM data
-        *    sheets. The address(es) used for this purpose must not be
-        *    cacheable.
-        */
-
-       ldr     r4, =CONFIG_SYS_DRAM_BASE
-.rept 9
-       str     r5, [r4]
-.endr
-
-       /*
-        * 9) Write MDCNFG with enable bits asserted (MDCNFG:DEx set to 1).
-        */
-
-       ldr     r5, =CONFIG_SYS_MDCNFG_VAL
-       ldr     r4, =(MDCNFG_DE0 | MDCNFG_DE1 | MDCNFG_DE2 | MDCNFG_DE3)
-       and     r5, r5, r4
-       ldr     r4, [r3, #MDCNFG_OFFSET]
-       orr     r4, r4, r5
-       str     r4, [r3, #MDCNFG_OFFSET]
-       ldr     r4, [r3, #MDCNFG_OFFSET]
-
-       /*
-        * 10) Write MDMRS.
-        */
-
-       ldr     r4, =CONFIG_SYS_MDMRS_VAL
-       str     r4, [r3, #MDMRS_OFFSET]
-       ldr     r4, [r3, #MDMRS_OFFSET]
-
-       /*
-        * 11) Enable APD
-        */
-
-       ldr     r4, [r3, #MDREFR_OFFSET]
-       and     r6, r6, #MDREFR_APD
-       orr     r4, r4, r6
-       str     r4, [r3, #MDREFR_OFFSET]
-       ldr     r4, [r3, #MDREFR_OFFSET]
-.endm
-
-/*
- * This macro tests if the CPU woke up from sleep and eventually resumes
- *
- * Clobbered regs: r4, r5
- */
-.macro pxa_wakeup
-       ldr     r4, =RCSR
-       ldr     r5, [r4]
-       and     r5, r5, #(RCSR_GPR | RCSR_SMR | RCSR_WDR | RCSR_HWR)
-       str     r5, [r4]
-       teq     r5, #RCSR_SMR
-
-       bne     pxa_wakeup_exit
-
-       ldr     r4, =PSSR
-       mov     r5, #PSSR_PH
-       str     r5, [r4]
-
-       ldr     r4, =PSPR
-       ldr     pc, [r4]
-pxa_wakeup_exit:
-.endm
-
-/*
- * This macro disables all interupts on PXA2xx/PXA3xx CPU
- *
- * Clobbered regs: r4, r5
- */
-.macro pxa_intr_setup
-       write32 ICLR, 0
-       write32 ICMR, 0
-#if defined(CONFIG_PXA27X) || defined(CONFIG_CPU_MONAHANS)
-       write32 ICLR2, 0
-       write32 ICMR2, 0
-#endif
-.endm
-
-/*
- * This macro configures clock on PXA2xx/PXA3xx CPU
- *
- * Clobbered regs: r4, r5
- */
-.macro pxa_clock_setup
-       /* Disable the peripheral clocks, and set the core clock frequency */
-
-       /* Turn Off ALL on-chip peripheral clocks for re-configuration */
-       write32 CKEN, CONFIG_SYS_CKEN
-
-       /* Write CCCR */
-       write32 CCCR, CONFIG_SYS_CCCR
-
-#ifdef CONFIG_RTC
-       /* enable the 32Khz oscillator for RTC and PowerManager */
-       write32 OSCC, #OSCC_OON
-       ldr     r4, =OSCC
-
-       /* Spin here until OSCC.OOK get set, meaning the PLL has settled. */
-2:
-       ldr     r5, [r4]
-       ands    r5, r5, #1
-       beq     2b
-#endif
-.endm
-
-#endif /* __ASSEMBLY__ */
-#endif /* __ASM_ARCH_PXA_MACRO_H__ */
index d442fb0652e2a2b59172234a132a91365840b682..65a387f9fc9b4e8b4e5e85a3042f6e5014452d34 100644 (file)
@@ -93,42 +93,42 @@ typedef void                (*ExcpHndlr) (void) ;
 /*
  * DMA Controller
  */
-#define DCSR0          __REG(0x40000000)  /* DMA Control / Status Register for Channel 0 */
-#define DCSR1          __REG(0x40000004)  /* DMA Control / Status Register for Channel 1 */
-#define DCSR2          __REG(0x40000008)  /* DMA Control / Status Register for Channel 2 */
-#define DCSR3          __REG(0x4000000c)  /* DMA Control / Status Register for Channel 3 */
-#define DCSR4          __REG(0x40000010)  /* DMA Control / Status Register for Channel 4 */
-#define DCSR5          __REG(0x40000014)  /* DMA Control / Status Register for Channel 5 */
-#define DCSR6          __REG(0x40000018)  /* DMA Control / Status Register for Channel 6 */
-#define DCSR7          __REG(0x4000001c)  /* DMA Control / Status Register for Channel 7 */
-#define DCSR8          __REG(0x40000020)  /* DMA Control / Status Register for Channel 8 */
-#define DCSR9          __REG(0x40000024)  /* DMA Control / Status Register for Channel 9 */
-#define DCSR10         __REG(0x40000028)  /* DMA Control / Status Register for Channel 10 */
-#define DCSR11         __REG(0x4000002c)  /* DMA Control / Status Register for Channel 11 */
-#define DCSR12         __REG(0x40000030)  /* DMA Control / Status Register for Channel 12 */
-#define DCSR13         __REG(0x40000034)  /* DMA Control / Status Register for Channel 13 */
-#define DCSR14         __REG(0x40000038)  /* DMA Control / Status Register for Channel 14 */
-#define DCSR15         __REG(0x4000003c)  /* DMA Control / Status Register for Channel 15 */
-#ifdef CONFIG_CPU_MONAHANS
-#define DCSR16         __REG(0x40000040)  /* DMA Control / Status Register for Channel 16 */
-#define DCSR17         __REG(0x40000044)  /* DMA Control / Status Register for Channel 17 */
-#define DCSR18         __REG(0x40000048)  /* DMA Control / Status Register for Channel 18 */
-#define DCSR19         __REG(0x4000004c)  /* DMA Control / Status Register for Channel 19 */
-#define DCSR20         __REG(0x40000050)  /* DMA Control / Status Register for Channel 20 */
-#define DCSR21         __REG(0x40000054)  /* DMA Control / Status Register for Channel 21 */
-#define DCSR22         __REG(0x40000058)  /* DMA Control / Status Register for Channel 22 */
-#define DCSR23         __REG(0x4000005c)  /* DMA Control / Status Register for Channel 23 */
-#define DCSR24         __REG(0x40000060)  /* DMA Control / Status Register for Channel 24 */
-#define DCSR25         __REG(0x40000064)  /* DMA Control / Status Register for Channel 25 */
-#define DCSR26         __REG(0x40000068)  /* DMA Control / Status Register for Channel 26 */
-#define DCSR27         __REG(0x4000006c)  /* DMA Control / Status Register for Channel 27 */
-#define DCSR28         __REG(0x40000070)  /* DMA Control / Status Register for Channel 28 */
-#define DCSR29         __REG(0x40000074)  /* DMA Control / Status Register for Channel 29 */
-#define DCSR30         __REG(0x40000078)  /* DMA Control / Status Register for Channel 30 */
-#define DCSR31         __REG(0x4000007c)  /* DMA Control / Status Register for Channel 31 */
-#endif /* CONFIG_CPU_MONAHANS */
-
-#define DCSR(x)                __REG2(0x40000000, (x) << 2)
+#define DCSR0          0x40000000  /* DMA Control / Status Register for Channel 0 */
+#define DCSR1          0x40000004  /* DMA Control / Status Register for Channel 1 */
+#define DCSR2          0x40000008  /* DMA Control / Status Register for Channel 2 */
+#define DCSR3          0x4000000c  /* DMA Control / Status Register for Channel 3 */
+#define DCSR4          0x40000010  /* DMA Control / Status Register for Channel 4 */
+#define DCSR5          0x40000014  /* DMA Control / Status Register for Channel 5 */
+#define DCSR6          0x40000018  /* DMA Control / Status Register for Channel 6 */
+#define DCSR7          0x4000001c  /* DMA Control / Status Register for Channel 7 */
+#define DCSR8          0x40000020  /* DMA Control / Status Register for Channel 8 */
+#define DCSR9          0x40000024  /* DMA Control / Status Register for Channel 9 */
+#define DCSR10         0x40000028  /* DMA Control / Status Register for Channel 10 */
+#define DCSR11         0x4000002c  /* DMA Control / Status Register for Channel 11 */
+#define DCSR12         0x40000030  /* DMA Control / Status Register for Channel 12 */
+#define DCSR13         0x40000034  /* DMA Control / Status Register for Channel 13 */
+#define DCSR14         0x40000038  /* DMA Control / Status Register for Channel 14 */
+#define DCSR15         0x4000003c  /* DMA Control / Status Register for Channel 15 */
+#if defined(CONFIG_PXA27X) || defined(CONFIG_CPU_MONAHANS)
+#define DCSR16         0x40000040  /* DMA Control / Status Register for Channel 16 */
+#define DCSR17         0x40000044  /* DMA Control / Status Register for Channel 17 */
+#define DCSR18         0x40000048  /* DMA Control / Status Register for Channel 18 */
+#define DCSR19         0x4000004c  /* DMA Control / Status Register for Channel 19 */
+#define DCSR20         0x40000050  /* DMA Control / Status Register for Channel 20 */
+#define DCSR21         0x40000054  /* DMA Control / Status Register for Channel 21 */
+#define DCSR22         0x40000058  /* DMA Control / Status Register for Channel 22 */
+#define DCSR23         0x4000005c  /* DMA Control / Status Register for Channel 23 */
+#define DCSR24         0x40000060  /* DMA Control / Status Register for Channel 24 */
+#define DCSR25         0x40000064  /* DMA Control / Status Register for Channel 25 */
+#define DCSR26         0x40000068  /* DMA Control / Status Register for Channel 26 */
+#define DCSR27         0x4000006c  /* DMA Control / Status Register for Channel 27 */
+#define DCSR28         0x40000070  /* DMA Control / Status Register for Channel 28 */
+#define DCSR29         0x40000074  /* DMA Control / Status Register for Channel 29 */
+#define DCSR30         0x40000078  /* DMA Control / Status Register for Channel 30 */
+#define DCSR31         0x4000007c  /* DMA Control / Status Register for Channel 31 */
+#endif /* CONFIG_PXA27X || CONFIG_CPU_MONAHANS */
+
+#define DCSR(x)                (0x40000000 | ((x) << 2))
 
 #define DCSR_RUN       (1 << 31)       /* Run Bit (read / write) */
 #define DCSR_NODESC    (1 << 30)       /* No-Descriptor Fetch (read / write) */
@@ -150,52 +150,52 @@ typedef void              (*ExcpHndlr) (void) ;
 #define DCSR_STARTINTR (1 << 1)        /* Start Interrupt (read / write) */
 #define DCSR_BUSERR    (1 << 0)        /* Bus Error Interrupt (read / write) */
 
-#define DINT           __REG(0x400000f0)  /* DMA Interrupt Register */
-
-#define DRCMR0         __REG(0x40000100)  /* Request to Channel Map Register for DREQ 0 */
-#define DRCMR1         __REG(0x40000104)  /* Request to Channel Map Register for DREQ 1 */
-#define DRCMR2         __REG(0x40000108)  /* Request to Channel Map Register for I2S receive Request */
-#define DRCMR3         __REG(0x4000010c)  /* Request to Channel Map Register for I2S transmit Request */
-#define DRCMR4         __REG(0x40000110)  /* Request to Channel Map Register for BTUART receive Request */
-#define DRCMR5         __REG(0x40000114)  /* Request to Channel Map Register for BTUART transmit Request. */
-#define DRCMR6         __REG(0x40000118)  /* Request to Channel Map Register for FFUART receive Request */
-#define DRCMR7         __REG(0x4000011c)  /* Request to Channel Map Register for FFUART transmit Request */
-#define DRCMR8         __REG(0x40000120)  /* Request to Channel Map Register for AC97 microphone Request */
-#define DRCMR9         __REG(0x40000124)  /* Request to Channel Map Register for AC97 modem receive Request */
-#define DRCMR10                __REG(0x40000128)  /* Request to Channel Map Register for AC97 modem transmit Request */
-#define DRCMR11                __REG(0x4000012c)  /* Request to Channel Map Register for AC97 audio receive Request */
-#define DRCMR12                __REG(0x40000130)  /* Request to Channel Map Register for AC97 audio transmit Request */
-#define DRCMR13                __REG(0x40000134)  /* Request to Channel Map Register for SSP receive Request */
-#define DRCMR14                __REG(0x40000138)  /* Request to Channel Map Register for SSP transmit Request */
-#define DRCMR15                __REG(0x4000013c)  /* Reserved */
-#define DRCMR16                __REG(0x40000140)  /* Reserved */
-#define DRCMR17                __REG(0x40000144)  /* Request to Channel Map Register for ICP receive Request */
-#define DRCMR18                __REG(0x40000148)  /* Request to Channel Map Register for ICP transmit Request */
-#define DRCMR19                __REG(0x4000014c)  /* Request to Channel Map Register for STUART receive Request */
-#define DRCMR20                __REG(0x40000150)  /* Request to Channel Map Register for STUART transmit Request */
-#define DRCMR21                __REG(0x40000154)  /* Request to Channel Map Register for MMC receive Request */
-#define DRCMR22                __REG(0x40000158)  /* Request to Channel Map Register for MMC transmit Request */
-#define DRCMR23                __REG(0x4000015c)  /* Reserved */
-#define DRCMR24                __REG(0x40000160)  /* Reserved */
-#define DRCMR25                __REG(0x40000164)  /* Request to Channel Map Register for USB endpoint 1 Request */
-#define DRCMR26                __REG(0x40000168)  /* Request to Channel Map Register for USB endpoint 2 Request */
-#define DRCMR27                __REG(0x4000016C)  /* Request to Channel Map Register for USB endpoint 3 Request */
-#define DRCMR28                __REG(0x40000170)  /* Request to Channel Map Register for USB endpoint 4 Request */
-#define DRCMR29                __REG(0x40000174)  /* Reserved */
-#define DRCMR30                __REG(0x40000178)  /* Request to Channel Map Register for USB endpoint 6 Request */
-#define DRCMR31                __REG(0x4000017C)  /* Request to Channel Map Register for USB endpoint 7 Request */
-#define DRCMR32                __REG(0x40000180)  /* Request to Channel Map Register for USB endpoint 8 Request */
-#define DRCMR33                __REG(0x40000184)  /* Request to Channel Map Register for USB endpoint 9 Request */
-#define DRCMR34                __REG(0x40000188)  /* Reserved */
-#define DRCMR35                __REG(0x4000018C)  /* Request to Channel Map Register for USB endpoint 11 Request */
-#define DRCMR36                __REG(0x40000190)  /* Request to Channel Map Register for USB endpoint 12 Request */
-#define DRCMR37                __REG(0x40000194)  /* Request to Channel Map Register for USB endpoint 13 Request */
-#define DRCMR38                __REG(0x40000198)  /* Request to Channel Map Register for USB endpoint 14 Request */
-#define DRCMR39                __REG(0x4000019C)  /* Reserved */
-
-#define DRCMR68                       __REG(0x40001110)  /* Request to Channel Map Register for Camera FIFO 0 Request */
-#define DRCMR69                       __REG(0x40001114)  /* Request to Channel Map Register for Camera FIFO 1 Request */
-#define DRCMR70                       __REG(0x40001118)  /* Request to Channel Map Register for Camera FIFO 2 Request */
+#define DINT           0x400000f0  /* DMA Interrupt Register */
+
+#define DRCMR0         0x40000100  /* Request to Channel Map Register for DREQ 0 */
+#define DRCMR1         0x40000104  /* Request to Channel Map Register for DREQ 1 */
+#define DRCMR2         0x40000108  /* Request to Channel Map Register for I2S receive Request */
+#define DRCMR3         0x4000010c  /* Request to Channel Map Register for I2S transmit Request */
+#define DRCMR4         0x40000110  /* Request to Channel Map Register for BTUART receive Request */
+#define DRCMR5         0x40000114  /* Request to Channel Map Register for BTUART transmit Request. */
+#define DRCMR6         0x40000118  /* Request to Channel Map Register for FFUART receive Request */
+#define DRCMR7         0x4000011c  /* Request to Channel Map Register for FFUART transmit Request */
+#define DRCMR8         0x40000120  /* Request to Channel Map Register for AC97 microphone Request */
+#define DRCMR9         0x40000124  /* Request to Channel Map Register for AC97 modem receive Request */
+#define DRCMR10                0x40000128  /* Request to Channel Map Register for AC97 modem transmit Request */
+#define DRCMR11                0x4000012c  /* Request to Channel Map Register for AC97 audio receive Request */
+#define DRCMR12                0x40000130  /* Request to Channel Map Register for AC97 audio transmit Request */
+#define DRCMR13                0x40000134  /* Request to Channel Map Register for SSP receive Request */
+#define DRCMR14                0x40000138  /* Request to Channel Map Register for SSP transmit Request */
+#define DRCMR15                0x4000013c  /* Reserved */
+#define DRCMR16                0x40000140  /* Reserved */
+#define DRCMR17                0x40000144  /* Request to Channel Map Register for ICP receive Request */
+#define DRCMR18                0x40000148  /* Request to Channel Map Register for ICP transmit Request */
+#define DRCMR19                0x4000014c  /* Request to Channel Map Register for STUART receive Request */
+#define DRCMR20                0x40000150  /* Request to Channel Map Register for STUART transmit Request */
+#define DRCMR21                0x40000154  /* Request to Channel Map Register for MMC receive Request */
+#define DRCMR22                0x40000158  /* Request to Channel Map Register for MMC transmit Request */
+#define DRCMR23                0x4000015c  /* Reserved */
+#define DRCMR24                0x40000160  /* Reserved */
+#define DRCMR25                0x40000164  /* Request to Channel Map Register for USB endpoint 1 Request */
+#define DRCMR26                0x40000168  /* Request to Channel Map Register for USB endpoint 2 Request */
+#define DRCMR27                0x4000016C  /* Request to Channel Map Register for USB endpoint 3 Request */
+#define DRCMR28                0x40000170  /* Request to Channel Map Register for USB endpoint 4 Request */
+#define DRCMR29                0x40000174  /* Reserved */
+#define DRCMR30                0x40000178  /* Request to Channel Map Register for USB endpoint 6 Request */
+#define DRCMR31                0x4000017C  /* Request to Channel Map Register for USB endpoint 7 Request */
+#define DRCMR32                0x40000180  /* Request to Channel Map Register for USB endpoint 8 Request */
+#define DRCMR33                0x40000184  /* Request to Channel Map Register for USB endpoint 9 Request */
+#define DRCMR34                0x40000188  /* Reserved */
+#define DRCMR35                0x4000018C  /* Request to Channel Map Register for USB endpoint 11 Request */
+#define DRCMR36                0x40000190  /* Request to Channel Map Register for USB endpoint 12 Request */
+#define DRCMR37                0x40000194  /* Request to Channel Map Register for USB endpoint 13 Request */
+#define DRCMR38                0x40000198  /* Request to Channel Map Register for USB endpoint 14 Request */
+#define DRCMR39                0x4000019C  /* Reserved */
+
+#define DRCMR68                       0x40001110  /* Request to Channel Map Register for Camera FIFO 0 Request */
+#define DRCMR69                       0x40001114  /* Request to Channel Map Register for Camera FIFO 1 Request */
+#define DRCMR70                       0x40001118  /* Request to Channel Map Register for Camera FIFO 2 Request */
 
 #define DRCMRRXSADR    DRCMR2
 #define DRCMRTXSADR    DRCMR3
@@ -220,75 +220,75 @@ typedef void              (*ExcpHndlr) (void) ;
 #define DRCMR_MAPVLD   (1 << 7)        /* Map Valid (read / write) */
 #define DRCMR_CHLNUM   0x0f            /* mask for Channel Number (read / write) */
 
-#define DDADR0         __REG(0x40000200)  /* DMA Descriptor Address Register Channel 0 */
-#define DSADR0         __REG(0x40000204)  /* DMA Source Address Register Channel 0 */
-#define DTADR0         __REG(0x40000208)  /* DMA Target Address Register Channel 0 */
-#define DCMD0          __REG(0x4000020c)  /* DMA Command Address Register Channel 0 */
-#define DDADR1         __REG(0x40000210)  /* DMA Descriptor Address Register Channel 1 */
-#define DSADR1         __REG(0x40000214)  /* DMA Source Address Register Channel 1 */
-#define DTADR1         __REG(0x40000218)  /* DMA Target Address Register Channel 1 */
-#define DCMD1          __REG(0x4000021c)  /* DMA Command Address Register Channel 1 */
-#define DDADR2         __REG(0x40000220)  /* DMA Descriptor Address Register Channel 2 */
-#define DSADR2         __REG(0x40000224)  /* DMA Source Address Register Channel 2 */
-#define DTADR2         __REG(0x40000228)  /* DMA Target Address Register Channel 2 */
-#define DCMD2          __REG(0x4000022c)  /* DMA Command Address Register Channel 2 */
-#define DDADR3         __REG(0x40000230)  /* DMA Descriptor Address Register Channel 3 */
-#define DSADR3         __REG(0x40000234)  /* DMA Source Address Register Channel 3 */
-#define DTADR3         __REG(0x40000238)  /* DMA Target Address Register Channel 3 */
-#define DCMD3          __REG(0x4000023c)  /* DMA Command Address Register Channel 3 */
-#define DDADR4         __REG(0x40000240)  /* DMA Descriptor Address Register Channel 4 */
-#define DSADR4         __REG(0x40000244)  /* DMA Source Address Register Channel 4 */
-#define DTADR4         __REG(0x40000248)  /* DMA Target Address Register Channel 4 */
-#define DCMD4          __REG(0x4000024c)  /* DMA Command Address Register Channel 4 */
-#define DDADR5         __REG(0x40000250)  /* DMA Descriptor Address Register Channel 5 */
-#define DSADR5         __REG(0x40000254)  /* DMA Source Address Register Channel 5 */
-#define DTADR5         __REG(0x40000258)  /* DMA Target Address Register Channel 5 */
-#define DCMD5          __REG(0x4000025c)  /* DMA Command Address Register Channel 5 */
-#define DDADR6         __REG(0x40000260)  /* DMA Descriptor Address Register Channel 6 */
-#define DSADR6         __REG(0x40000264)  /* DMA Source Address Register Channel 6 */
-#define DTADR6         __REG(0x40000268)  /* DMA Target Address Register Channel 6 */
-#define DCMD6          __REG(0x4000026c)  /* DMA Command Address Register Channel 6 */
-#define DDADR7         __REG(0x40000270)  /* DMA Descriptor Address Register Channel 7 */
-#define DSADR7         __REG(0x40000274)  /* DMA Source Address Register Channel 7 */
-#define DTADR7         __REG(0x40000278)  /* DMA Target Address Register Channel 7 */
-#define DCMD7          __REG(0x4000027c)  /* DMA Command Address Register Channel 7 */
-#define DDADR8         __REG(0x40000280)  /* DMA Descriptor Address Register Channel 8 */
-#define DSADR8         __REG(0x40000284)  /* DMA Source Address Register Channel 8 */
-#define DTADR8         __REG(0x40000288)  /* DMA Target Address Register Channel 8 */
-#define DCMD8          __REG(0x4000028c)  /* DMA Command Address Register Channel 8 */
-#define DDADR9         __REG(0x40000290)  /* DMA Descriptor Address Register Channel 9 */
-#define DSADR9         __REG(0x40000294)  /* DMA Source Address Register Channel 9 */
-#define DTADR9         __REG(0x40000298)  /* DMA Target Address Register Channel 9 */
-#define DCMD9          __REG(0x4000029c)  /* DMA Command Address Register Channel 9 */
-#define DDADR10                __REG(0x400002a0)  /* DMA Descriptor Address Register Channel 10 */
-#define DSADR10                __REG(0x400002a4)  /* DMA Source Address Register Channel 10 */
-#define DTADR10                __REG(0x400002a8)  /* DMA Target Address Register Channel 10 */
-#define DCMD10         __REG(0x400002ac)  /* DMA Command Address Register Channel 10 */
-#define DDADR11                __REG(0x400002b0)  /* DMA Descriptor Address Register Channel 11 */
-#define DSADR11                __REG(0x400002b4)  /* DMA Source Address Register Channel 11 */
-#define DTADR11                __REG(0x400002b8)  /* DMA Target Address Register Channel 11 */
-#define DCMD11         __REG(0x400002bc)  /* DMA Command Address Register Channel 11 */
-#define DDADR12                __REG(0x400002c0)  /* DMA Descriptor Address Register Channel 12 */
-#define DSADR12                __REG(0x400002c4)  /* DMA Source Address Register Channel 12 */
-#define DTADR12                __REG(0x400002c8)  /* DMA Target Address Register Channel 12 */
-#define DCMD12         __REG(0x400002cc)  /* DMA Command Address Register Channel 12 */
-#define DDADR13                __REG(0x400002d0)  /* DMA Descriptor Address Register Channel 13 */
-#define DSADR13                __REG(0x400002d4)  /* DMA Source Address Register Channel 13 */
-#define DTADR13                __REG(0x400002d8)  /* DMA Target Address Register Channel 13 */
-#define DCMD13         __REG(0x400002dc)  /* DMA Command Address Register Channel 13 */
-#define DDADR14                __REG(0x400002e0)  /* DMA Descriptor Address Register Channel 14 */
-#define DSADR14                __REG(0x400002e4)  /* DMA Source Address Register Channel 14 */
-#define DTADR14                __REG(0x400002e8)  /* DMA Target Address Register Channel 14 */
-#define DCMD14         __REG(0x400002ec)  /* DMA Command Address Register Channel 14 */
-#define DDADR15                __REG(0x400002f0)  /* DMA Descriptor Address Register Channel 15 */
-#define DSADR15                __REG(0x400002f4)  /* DMA Source Address Register Channel 15 */
-#define DTADR15                __REG(0x400002f8)  /* DMA Target Address Register Channel 15 */
-#define DCMD15         __REG(0x400002fc)  /* DMA Command Address Register Channel 15 */
-
-#define DDADR(x)       __REG2(0x40000200, (x) << 4)
-#define DSADR(x)       __REG2(0x40000204, (x) << 4)
-#define DTADR(x)       __REG2(0x40000208, (x) << 4)
-#define DCMD(x)                __REG2(0x4000020c, (x) << 4)
+#define DDADR0         0x40000200  /* DMA Descriptor Address Register Channel 0 */
+#define DSADR0         0x40000204  /* DMA Source Address Register Channel 0 */
+#define DTADR0         0x40000208  /* DMA Target Address Register Channel 0 */
+#define DCMD0          0x4000020c  /* DMA Command Address Register Channel 0 */
+#define DDADR1         0x40000210  /* DMA Descriptor Address Register Channel 1 */
+#define DSADR1         0x40000214  /* DMA Source Address Register Channel 1 */
+#define DTADR1         0x40000218  /* DMA Target Address Register Channel 1 */
+#define DCMD1          0x4000021c  /* DMA Command Address Register Channel 1 */
+#define DDADR2         0x40000220  /* DMA Descriptor Address Register Channel 2 */
+#define DSADR2         0x40000224  /* DMA Source Address Register Channel 2 */
+#define DTADR2         0x40000228  /* DMA Target Address Register Channel 2 */
+#define DCMD2          0x4000022c  /* DMA Command Address Register Channel 2 */
+#define DDADR3         0x40000230  /* DMA Descriptor Address Register Channel 3 */
+#define DSADR3         0x40000234  /* DMA Source Address Register Channel 3 */
+#define DTADR3         0x40000238  /* DMA Target Address Register Channel 3 */
+#define DCMD3          0x4000023c  /* DMA Command Address Register Channel 3 */
+#define DDADR4         0x40000240  /* DMA Descriptor Address Register Channel 4 */
+#define DSADR4         0x40000244  /* DMA Source Address Register Channel 4 */
+#define DTADR4         0x40000248  /* DMA Target Address Register Channel 4 */
+#define DCMD4          0x4000024c  /* DMA Command Address Register Channel 4 */
+#define DDADR5         0x40000250  /* DMA Descriptor Address Register Channel 5 */
+#define DSADR5         0x40000254  /* DMA Source Address Register Channel 5 */
+#define DTADR5         0x40000258  /* DMA Target Address Register Channel 5 */
+#define DCMD5          0x4000025c  /* DMA Command Address Register Channel 5 */
+#define DDADR6         0x40000260  /* DMA Descriptor Address Register Channel 6 */
+#define DSADR6         0x40000264  /* DMA Source Address Register Channel 6 */
+#define DTADR6         0x40000268  /* DMA Target Address Register Channel 6 */
+#define DCMD6          0x4000026c  /* DMA Command Address Register Channel 6 */
+#define DDADR7         0x40000270  /* DMA Descriptor Address Register Channel 7 */
+#define DSADR7         0x40000274  /* DMA Source Address Register Channel 7 */
+#define DTADR7         0x40000278  /* DMA Target Address Register Channel 7 */
+#define DCMD7          0x4000027c  /* DMA Command Address Register Channel 7 */
+#define DDADR8         0x40000280  /* DMA Descriptor Address Register Channel 8 */
+#define DSADR8         0x40000284  /* DMA Source Address Register Channel 8 */
+#define DTADR8         0x40000288  /* DMA Target Address Register Channel 8 */
+#define DCMD8          0x4000028c  /* DMA Command Address Register Channel 8 */
+#define DDADR9         0x40000290  /* DMA Descriptor Address Register Channel 9 */
+#define DSADR9         0x40000294  /* DMA Source Address Register Channel 9 */
+#define DTADR9         0x40000298  /* DMA Target Address Register Channel 9 */
+#define DCMD9          0x4000029c  /* DMA Command Address Register Channel 9 */
+#define DDADR10                0x400002a0  /* DMA Descriptor Address Register Channel 10 */
+#define DSADR10                0x400002a4  /* DMA Source Address Register Channel 10 */
+#define DTADR10                0x400002a8  /* DMA Target Address Register Channel 10 */
+#define DCMD10         0x400002ac  /* DMA Command Address Register Channel 10 */
+#define DDADR11                0x400002b0  /* DMA Descriptor Address Register Channel 11 */
+#define DSADR11                0x400002b4  /* DMA Source Address Register Channel 11 */
+#define DTADR11                0x400002b8  /* DMA Target Address Register Channel 11 */
+#define DCMD11         0x400002bc  /* DMA Command Address Register Channel 11 */
+#define DDADR12                0x400002c0  /* DMA Descriptor Address Register Channel 12 */
+#define DSADR12                0x400002c4  /* DMA Source Address Register Channel 12 */
+#define DTADR12                0x400002c8  /* DMA Target Address Register Channel 12 */
+#define DCMD12         0x400002cc  /* DMA Command Address Register Channel 12 */
+#define DDADR13                0x400002d0  /* DMA Descriptor Address Register Channel 13 */
+#define DSADR13                0x400002d4  /* DMA Source Address Register Channel 13 */
+#define DTADR13                0x400002d8  /* DMA Target Address Register Channel 13 */
+#define DCMD13         0x400002dc  /* DMA Command Address Register Channel 13 */
+#define DDADR14                0x400002e0  /* DMA Descriptor Address Register Channel 14 */
+#define DSADR14                0x400002e4  /* DMA Source Address Register Channel 14 */
+#define DTADR14                0x400002e8  /* DMA Target Address Register Channel 14 */
+#define DCMD14         0x400002ec  /* DMA Command Address Register Channel 14 */
+#define DDADR15                0x400002f0  /* DMA Descriptor Address Register Channel 15 */
+#define DSADR15                0x400002f4  /* DMA Source Address Register Channel 15 */
+#define DTADR15                0x400002f8  /* DMA Target Address Register Channel 15 */
+#define DCMD15         0x400002fc  /* DMA Command Address Register Channel 15 */
+
+#define DDADR(x)       (0x40000200 | ((x) << 4))
+#define DSADR(x)       (0x40000204 | ((x) << 4))
+#define DTADR(x)       (0x40000208 | ((x) << 4))
+#define DCMD(x)                (0x4000020c | ((x) << 4))
 
 #define DDADR_DESCADDR 0xfffffff0      /* Address of next descriptor (mask) */
 #define DDADR_STOP     (1 << 0)        /* Stop (read / write) */
@@ -313,56 +313,57 @@ typedef void              (*ExcpHndlr) (void) ;
 #define DCMD_RXMCDR    (DCMD_INCTRGADDR|DCMD_FLOWSRC|DCMD_BURST32|DCMD_WIDTH4)
 #define DCMD_TXPCDR    (DCMD_INCSRCADDR|DCMD_FLOWTRG|DCMD_BURST32|DCMD_WIDTH4)
 
+/******************************************************************************/
 /*
  * UARTs
  */
 /* Full Function UART (FFUART) */
 #define FFUART         FFRBR
-#define FFRBR          __REG(0x40100000)  /* Receive Buffer Register (read only) */
-#define FFTHR          __REG(0x40100000)  /* Transmit Holding Register (write only) */
-#define FFIER          __REG(0x40100004)  /* Interrupt Enable Register (read/write) */
-#define FFIIR          __REG(0x40100008)  /* Interrupt ID Register (read only) */
-#define FFFCR          __REG(0x40100008)  /* FIFO Control Register (write only) */
-#define FFLCR          __REG(0x4010000C)  /* Line Control Register (read/write) */
-#define FFMCR          __REG(0x40100010)  /* Modem Control Register (read/write) */
-#define FFLSR          __REG(0x40100014)  /* Line Status Register (read only) */
-#define FFMSR          __REG(0x40100018)  /* Modem Status Register (read only) */
-#define FFSPR          __REG(0x4010001C)  /* Scratch Pad Register (read/write) */
-#define FFISR          __REG(0x40100020)  /* Infrared Selection Register (read/write) */
-#define FFDLL          __REG(0x40100000)  /* Divisor Latch Low Register (DLAB = 1) (read/write) */
-#define FFDLH          __REG(0x40100004)  /* Divisor Latch High Register (DLAB = 1) (read/write) */
+#define FFRBR          0x40100000  /* Receive Buffer Register (read only) */
+#define FFTHR          0x40100000  /* Transmit Holding Register (write only) */
+#define FFIER          0x40100004  /* Interrupt Enable Register (read/write) */
+#define FFIIR          0x40100008  /* Interrupt ID Register (read only) */
+#define FFFCR          0x40100008  /* FIFO Control Register (write only) */
+#define FFLCR          0x4010000C  /* Line Control Register (read/write) */
+#define FFMCR          0x40100010  /* Modem Control Register (read/write) */
+#define FFLSR          0x40100014  /* Line Status Register (read only) */
+#define FFMSR          0x40100018  /* Modem Status Register (read only) */
+#define FFSPR          0x4010001C  /* Scratch Pad Register (read/write) */
+#define FFISR          0x40100020  /* Infrared Selection Register (read/write) */
+#define FFDLL          0x40100000  /* Divisor Latch Low Register (DLAB = 1) (read/write) */
+#define FFDLH          0x40100004  /* Divisor Latch High Register (DLAB = 1) (read/write) */
 
 /* Bluetooth UART (BTUART) */
 #define BTUART         BTRBR
-#define BTRBR          __REG(0x40200000)  /* Receive Buffer Register (read only) */
-#define BTTHR          __REG(0x40200000)  /* Transmit Holding Register (write only) */
-#define BTIER          __REG(0x40200004)  /* Interrupt Enable Register (read/write) */
-#define BTIIR          __REG(0x40200008)  /* Interrupt ID Register (read only) */
-#define BTFCR          __REG(0x40200008)  /* FIFO Control Register (write only) */
-#define BTLCR          __REG(0x4020000C)  /* Line Control Register (read/write) */
-#define BTMCR          __REG(0x40200010)  /* Modem Control Register (read/write) */
-#define BTLSR          __REG(0x40200014)  /* Line Status Register (read only) */
-#define BTMSR          __REG(0x40200018)  /* Modem Status Register (read only) */
-#define BTSPR          __REG(0x4020001C)  /* Scratch Pad Register (read/write) */
-#define BTISR          __REG(0x40200020)  /* Infrared Selection Register (read/write) */
-#define BTDLL          __REG(0x40200000)  /* Divisor Latch Low Register (DLAB = 1) (read/write) */
-#define BTDLH          __REG(0x40200004)  /* Divisor Latch High Register (DLAB = 1) (read/write) */
+#define BTRBR          0x40200000  /* Receive Buffer Register (read only) */
+#define BTTHR          0x40200000  /* Transmit Holding Register (write only) */
+#define BTIER          0x40200004  /* Interrupt Enable Register (read/write) */
+#define BTIIR          0x40200008  /* Interrupt ID Register (read only) */
+#define BTFCR          0x40200008  /* FIFO Control Register (write only) */
+#define BTLCR          0x4020000C  /* Line Control Register (read/write) */
+#define BTMCR          0x40200010  /* Modem Control Register (read/write) */
+#define BTLSR          0x40200014  /* Line Status Register (read only) */
+#define BTMSR          0x40200018  /* Modem Status Register (read only) */
+#define BTSPR          0x4020001C  /* Scratch Pad Register (read/write) */
+#define BTISR          0x40200020  /* Infrared Selection Register (read/write) */
+#define BTDLL          0x40200000  /* Divisor Latch Low Register (DLAB = 1) (read/write) */
+#define BTDLH          0x40200004  /* Divisor Latch High Register (DLAB = 1) (read/write) */
 
 /* Standard UART (STUART) */
 #define STUART         STRBR
-#define STRBR          __REG(0x40700000)  /* Receive Buffer Register (read only) */
-#define STTHR          __REG(0x40700000)  /* Transmit Holding Register (write only) */
-#define STIER          __REG(0x40700004)  /* Interrupt Enable Register (read/write) */
-#define STIIR          __REG(0x40700008)  /* Interrupt ID Register (read only) */
-#define STFCR          __REG(0x40700008)  /* FIFO Control Register (write only) */
-#define STLCR          __REG(0x4070000C)  /* Line Control Register (read/write) */
-#define STMCR          __REG(0x40700010)  /* Modem Control Register (read/write) */
-#define STLSR          __REG(0x40700014)  /* Line Status Register (read only) */
-#define STMSR          __REG(0x40700018)  /* Reserved */
-#define STSPR          __REG(0x4070001C)  /* Scratch Pad Register (read/write) */
-#define STISR          __REG(0x40700020)  /* Infrared Selection Register (read/write) */
-#define STDLL          __REG(0x40700000)  /* Divisor Latch Low Register (DLAB = 1) (read/write) */
-#define STDLH          __REG(0x40700004)  /* Divisor Latch High Register (DLAB = 1) (read/write) */
+#define STRBR          0x40700000  /* Receive Buffer Register (read only) */
+#define STTHR          0x40700000  /* Transmit Holding Register (write only) */
+#define STIER          0x40700004  /* Interrupt Enable Register (read/write) */
+#define STIIR          0x40700008  /* Interrupt ID Register (read only) */
+#define STFCR          0x40700008  /* FIFO Control Register (write only) */
+#define STLCR          0x4070000C  /* Line Control Register (read/write) */
+#define STMCR          0x40700010  /* Modem Control Register (read/write) */
+#define STLSR          0x40700014  /* Line Status Register (read only) */
+#define STMSR          0x40700018  /* Reserved */
+#define STSPR          0x4070001C  /* Scratch Pad Register (read/write) */
+#define STISR          0x40700020  /* Infrared Selection Register (read/write) */
+#define STDLL          0x40700000  /* Divisor Latch Low Register (DLAB = 1) (read/write) */
+#define STDLH          0x40700004  /* Divisor Latch High Register (DLAB = 1) (read/write) */
 
 #define IER_DMAE       (1 << 7)        /* DMA Requests Enable */
 #define IER_UUE                (1 << 6)        /* UART Unit Enable */
@@ -408,7 +409,7 @@ typedef void                (*ExcpHndlr) (void) ;
 #define LSR_OE         (1 << 1)        /* Overrun Error */
 #define LSR_DR         (1 << 0)        /* Data Ready */
 
-#define MCR_LOOP       (1 << 4)        */
+#define MCR_LOOP       (1 << 4)        /* */
 #define MCR_OUT2       (1 << 3)        /* force MSR_DCD in loopback mode */
 #define MCR_OUT1       (1 << 2)        /* force MSR_RI in loopback mode */
 #define MCR_RTS                (1 << 1)        /* Request to Send */
@@ -423,6 +424,7 @@ typedef void                (*ExcpHndlr) (void) ;
 #define MSR_DDSR       (1 << 1)        /* Delta Data Set Ready */
 #define MSR_DCTS       (1 << 0)        /* Delta Clear To Send */
 
+/******************************************************************************/
 /*
  * IrSR (Infrared Selection Register)
  */
@@ -456,17 +458,25 @@ typedef void              (*ExcpHndlr) (void) ;
 /*
  * I2C registers
  */
-#define IBMR           __REG(0x40301680)  /* I2C Bus Monitor Register - IBMR */
-#define IDBR           __REG(0x40301688)  /* I2C Data Buffer Register - IDBR */
-#define ICR            __REG(0x40301690)  /* I2C Control Register - ICR */
-#define ISR            __REG(0x40301698)  /* I2C Status Register - ISR */
-#define ISAR           __REG(0x403016A0)  /* I2C Slave Address Register - ISAR */
-
-#define PWRIBMR                __REG(0x40f00180)  /* Power I2C Bus Monitor Register-IBMR */
-#define PWRIDBR                __REG(0x40f00188)  /* Power I2C Data Buffer Register-IDBR */
-#define PWRICR         __REG(0x40f00190)  /* Power I2C Control Register - ICR */
-#define PWRISR         __REG(0x40f00198)  /* Power I2C Status Register - ISR */
-#define PWRISAR                __REG(0x40f001A0)  /* Power I2C Slave Address Register-ISAR */
+#define IBMR           0x40301680  /* I2C Bus Monitor Register - IBMR */
+#define IDBR           0x40301688  /* I2C Data Buffer Register - IDBR */
+#define ICR            0x40301690  /* I2C Control Register - ICR */
+#define ISR            0x40301698  /* I2C Status Register - ISR */
+#define ISAR           0x403016A0  /* I2C Slave Address Register - ISAR */
+
+#ifdef CONFIG_CPU_MONAHANS
+#define PWRIBMR                0x40f500C0  /* Power I2C Bus Monitor Register-IBMR */
+#define PWRIDBR                0x40f500C4  /* Power I2C Data Buffer Register-IDBR */
+#define PWRICR         0x40f500C8  /* Power I2C Control Register - ICR */
+#define PWRISR         0x40f500CC  /* Power I2C Status Register - ISR */
+#define PWRISAR                0x40f500D0  /* Power I2C Slave Address Register-ISAR */
+#else
+#define PWRIBMR                0x40f00180  /* Power I2C Bus Monitor Register-IBMR */
+#define PWRIDBR                0x40f00188  /* Power I2C Data Buffer Register-IDBR */
+#define PWRICR         0x40f00190  /* Power I2C Control Register - ICR */
+#define PWRISR         0x40f00198  /* Power I2C Status Register - ISR */
+#define PWRISAR                0x40f001A0  /* Power I2C Slave Address Register-ISAR */
+#endif
 
 /* ----- Control register bits ---------------------------------------- */
 
@@ -507,28 +517,27 @@ typedef void              (*ExcpHndlr) (void) ;
 /* FIXME the audio defines collide w/ the SA1111 defines.  I don't like these
  * short defines because there is too much chance of namespace collision
  */
-/*#define SACR0                __REG(0x40400000)  /  Global Control Register */
-/*#define SACR1                __REG(0x40400004)  /  Serial Audio I 2 S/MSB-Justified Control Register */
-/*#define SASR0                __REG(0x4040000C)  /  Serial Audio I 2 S/MSB-Justified Interface and FIFO Status Register */
-/*#define SAIMR                __REG(0x40400014)  /  Serial Audio Interrupt Mask Register */
-/*#define SAICR                __REG(0x40400018)  /  Serial Audio Interrupt Clear Register */
-/*#define SADIV                __REG(0x40400060)  /  Audio Clock Divider Register. */
-/*#define SADR         __REG(0x40400080)  /  Serial Audio Data Register (TX and RX FIFO access Register). */
-
+#define SACR0          0x40400000  /*  Global Control Register */
+#define SACR1          0x40400004  /*  Serial Audio I 2 S/MSB-Justified Control Register */
+#define SASR0          0x4040000C  /*  Serial Audio I 2 S/MSB-Justified Interface and FIFO Status Register */
+#define SAIMR          0x40400014  /*  Serial Audio Interrupt Mask Register */
+#define SAICR          0x40400018  /*  Serial Audio Interrupt Clear Register */
+#define SADIV          0x40400060  /*  Audio Clock Divider Register. */
+#define SADR           0x40400080  /*  Serial Audio Data Register (TX and RX FIFO access Register). */
 
 /*
  * AC97 Controller registers
  */
-#define POCR           __REG(0x40500000)  /* PCM Out Control Register */
+#define POCR           0x40500000  /* PCM Out Control Register */
 #define POCR_FEIE      (1 << 3)        /* FIFO Error Interrupt Enable */
 
-#define PICR           __REG(0x40500004)  /* PCM In Control Register */
+#define PICR           0x40500004  /* PCM In Control Register */
 #define PICR_FEIE      (1 << 3)        /* FIFO Error Interrupt Enable */
 
-#define MCCR           __REG(0x40500008)  /* Mic In Control Register */
+#define MCCR           0x40500008  /* Mic In Control Register */
 #define MCCR_FEIE      (1 << 3)        /* FIFO Error Interrupt Enable */
 
-#define GCR            __REG(0x4050000C)  /* Global Control Register */
+#define GCR            0x4050000C  /* Global Control Register */
 #define GCR_CDONE_IE   (1 << 19)       /* Command Done Interrupt Enable */
 #define GCR_SDONE_IE   (1 << 18)       /* Status Done Interrupt Enable */
 #define GCR_SECRDY_IEN (1 << 9)        /* Secondary Ready Interrupt Enable */
@@ -540,16 +549,16 @@ typedef void              (*ExcpHndlr) (void) ;
 #define GCR_COLD_RST   (1 << 1)        /* AC'97 Cold Reset (0 = active) */
 #define GCR_GIE                (1 << 0)        /* Codec GPI Interrupt Enable */
 
-#define POSR           __REG(0x40500010)  /* PCM Out Status Register */
+#define POSR           0x40500010  /* PCM Out Status Register */
 #define POSR_FIFOE     (1 << 4)        /* FIFO error */
 
-#define PISR           __REG(0x40500014)  /* PCM In Status Register */
+#define PISR           0x40500014  /* PCM In Status Register */
 #define PISR_FIFOE     (1 << 4)        /* FIFO error */
 
-#define MCSR           __REG(0x40500018)  /* Mic In Status Register */
+#define MCSR           0x40500018  /* Mic In Status Register */
 #define MCSR_FIFOE     (1 << 4)        /* FIFO error */
 
-#define GSR            __REG(0x4050001C)  /* Global Status Register */
+#define GSR            0x4050001C  /* Global Status Register */
 #define GSR_CDONE      (1 << 19)       /* Command Done */
 #define GSR_SDONE      (1 << 18)       /* Status Done */
 #define GSR_RDCS       (1 << 15)       /* Read Completion Status */
@@ -567,38 +576,38 @@ typedef void              (*ExcpHndlr) (void) ;
 #define GSR_MIINT      (1 << 1)        /* Modem In Interrupt */
 #define GSR_GSCI       (1 << 0)        /* Codec GPI Status Change Interrupt */
 
-#define CAR            __REG(0x40500020)  /* CODEC Access Register */
+#define CAR            0x40500020  /* CODEC Access Register */
 #define CAR_CAIP       (1 << 0)        /* Codec Access In Progress */
 
-#define PCDR           __REG(0x40500040)  /* PCM FIFO Data Register */
-#define MCDR           __REG(0x40500060)  /* Mic-in FIFO Data Register */
+#define PCDR           0x40500040  /* PCM FIFO Data Register */
+#define MCDR           0x40500060  /* Mic-in FIFO Data Register */
 
-#define MOCR           __REG(0x40500100)  /* Modem Out Control Register */
+#define MOCR           0x40500100  /* Modem Out Control Register */
 #define MOCR_FEIE      (1 << 3)        /* FIFO Error */
 
-#define MICR           __REG(0x40500108)  /* Modem In Control Register */
+#define MICR           0x40500108  /* Modem In Control Register */
 #define MICR_FEIE      (1 << 3)        /* FIFO Error */
 
-#define MOSR           __REG(0x40500110)  /* Modem Out Status Register */
+#define MOSR           0x40500110  /* Modem Out Status Register */
 #define MOSR_FIFOE     (1 << 4)        /* FIFO error */
 
-#define MISR           __REG(0x40500118)  /* Modem In Status Register */
+#define MISR           0x40500118  /* Modem In Status Register */
 #define MISR_FIFOE     (1 << 4)        /* FIFO error */
 
-#define MODR           __REG(0x40500140)  /* Modem FIFO Data Register */
+#define MODR           0x40500140  /* Modem FIFO Data Register */
 
-#define PAC_REG_BASE   __REG(0x40500200)  /* Primary Audio Codec */
-#define SAC_REG_BASE   __REG(0x40500300)  /* Secondary Audio Codec */
-#define PMC_REG_BASE   __REG(0x40500400)  /* Primary Modem Codec */
-#define SMC_REG_BASE   __REG(0x40500500)  /* Secondary Modem Codec */
+#define PAC_REG_BASE   0x40500200  /* Primary Audio Codec */
+#define SAC_REG_BASE   0x40500300  /* Secondary Audio Codec */
+#define PMC_REG_BASE   0x40500400  /* Primary Modem Codec */
+#define SMC_REG_BASE   0x40500500  /* Secondary Modem Codec */
 
 
 /*
  * USB Device Controller
  */
-#ifdef CONFIG_PXA27X
+#if defined(CONFIG_PXA27X) || defined(CONFIG_CPU_MONAHANS)
 
-#define UDCCR          __REG(0x40600000)       /* UDC Control Register */
+#define UDCCR          0x40600000      /* UDC Control Register */
 #define UDCCR_UDE      (1 << 0)                /* UDC enable */
 #define UDCCR_UDA      (1 << 1)                /* UDC active */
 #define UDCCR_RSM      (1 << 2)                /* Device resume */
@@ -623,7 +632,7 @@ typedef void                (*ExcpHndlr) (void) ;
 #define UDCCR_AAISN    (0x07 << 5)             /* Active UDC Alternate Interface  Setting Number */
 #define UDCCR_AAISN_S  5
 
-#define UDCCS0         __REG(0x40600100)       /* UDC Endpoint 0 Control/Status Register */
+#define UDCCS0         0x40600100      /* UDC Endpoint 0 Control/Status Register */
 #define UDCCS0_OPR     (1 << 0)                /* OUT packet ready */
 #define UDCCS0_IPR     (1 << 1)                /* IN packet ready */
 #define UDCCS0_FTF     (1 << 2)                /* Flush Tx FIFO */
@@ -634,9 +643,9 @@ typedef void                (*ExcpHndlr) (void) ;
 #define UDCCS0_SA      (1 << 7)                /* Setup active */
 
 /* Bulk IN - Endpoint 1,6,11 */
-#define UDCCS1         __REG(0x40600104)  /* UDC Endpoint 1 (IN) Control/Status Register */
-#define UDCCS6         __REG(0x40600028)  /* UDC Endpoint 6 (IN) Control/Status Register */
-#define UDCCS11                __REG(0x4060003C)  /* UDC Endpoint 11 (IN) Control/Status Register */
+#define UDCCS1         0x40600104  /* UDC Endpoint 1 (IN) Control/Status Register */
+#define UDCCS6         0x40600028  /* UDC Endpoint 6 (IN) Control/Status Register */
+#define UDCCS11                0x4060003C  /* UDC Endpoint 11 (IN) Control/Status Register */
 
 #define UDCCS_BI_TFS   (1 << 0)        /* Transmit FIFO service */
 #define UDCCS_BI_TPC   (1 << 1)        /* Transmit packet complete */
@@ -647,9 +656,9 @@ typedef void                (*ExcpHndlr) (void) ;
 #define UDCCS_BI_TSP   (1 << 7)        /* Transmit short packet */
 
 /* Bulk OUT - Endpoint 2,7,12 */
-#define UDCCS2         __REG(0x40600108)  /* UDC Endpoint 2 (OUT) Control/Status Register */
-#define UDCCS7         __REG(0x4060002C)  /* UDC Endpoint 7 (OUT) Control/Status Register */
-#define UDCCS12                __REG(0x40600040)  /* UDC Endpoint 12 (OUT) Control/Status Register */
+#define UDCCS2         0x40600108  /* UDC Endpoint 2 (OUT) Control/Status Register */
+#define UDCCS7         0x4060002C  /* UDC Endpoint 7 (OUT) Control/Status Register */
+#define UDCCS12                0x40600040  /* UDC Endpoint 12 (OUT) Control/Status Register */
 
 #define UDCCS_BO_RFS   (1 << 0)        /* Receive FIFO service */
 #define UDCCS_BO_RPC   (1 << 1)        /* Receive packet complete */
@@ -660,9 +669,9 @@ typedef void                (*ExcpHndlr) (void) ;
 #define UDCCS_BO_RSP   (1 << 7)        /* Receive short packet */
 
 /* Isochronous IN - Endpoint 3,8,13 */
-#define UDCCS3         __REG(0x4060001C)  /* UDC Endpoint 3 (IN) Control/Status Register */
-#define UDCCS8         __REG(0x40600030)  /* UDC Endpoint 8 (IN) Control/Status Register */
-#define UDCCS13                __REG(0x40600044)  /* UDC Endpoint 13 (IN) Control/Status Register */
+#define UDCCS3         0x4060001C  /* UDC Endpoint 3 (IN) Control/Status Register */
+#define UDCCS8         0x40600030  /* UDC Endpoint 8 (IN) Control/Status Register */
+#define UDCCS13                0x40600044  /* UDC Endpoint 13 (IN) Control/Status Register */
 
 #define UDCCS_II_TFS   (1 << 0)        /* Transmit FIFO service */
 #define UDCCS_II_TPC   (1 << 1)        /* Transmit packet complete */
@@ -671,9 +680,9 @@ typedef void                (*ExcpHndlr) (void) ;
 #define UDCCS_II_TSP   (1 << 7)        /* Transmit short packet */
 
 /* Isochronous OUT - Endpoint 4,9,14 */
-#define UDCCS4         __REG(0x40600020)  /* UDC Endpoint 4 (OUT) Control/Status Register */
-#define UDCCS9         __REG(0x40600034)  /* UDC Endpoint 9 (OUT) Control/Status Register */
-#define UDCCS14                __REG(0x40600048)  /* UDC Endpoint 14 (OUT) Control/Status Register */
+#define UDCCS4         0x40600020  /* UDC Endpoint 4 (OUT) Control/Status Register */
+#define UDCCS9         0x40600034  /* UDC Endpoint 9 (OUT) Control/Status Register */
+#define UDCCS14                0x40600048  /* UDC Endpoint 14 (OUT) Control/Status Register */
 
 #define UDCCS_IO_RFS   (1 << 0)        /* Receive FIFO service */
 #define UDCCS_IO_RPC   (1 << 1)        /* Receive packet complete */
@@ -683,9 +692,9 @@ typedef void                (*ExcpHndlr) (void) ;
 #define UDCCS_IO_RSP   (1 << 7)        /* Receive short packet */
 
 /* Interrupt IN - Endpoint 5,10,15 */
-#define UDCCS5         __REG(0x40600024)  /* UDC Endpoint 5 (Interrupt) Control/Status Register */
-#define UDCCS10                __REG(0x40600038)  /* UDC Endpoint 10 (Interrupt) Control/Status Register */
-#define UDCCS15                __REG(0x4060004C)  /* UDC Endpoint 15 (Interrupt) Control/Status Register */
+#define UDCCS5         0x40600024  /* UDC Endpoint 5 (Interrupt) Control/Status Register */
+#define UDCCS10                0x40600038  /* UDC Endpoint 10 (Interrupt) Control/Status Register */
+#define UDCCS15                0x4060004C  /* UDC Endpoint 15 (Interrupt) Control/Status Register */
 
 #define UDCCS_INT_TFS  (1 << 0)        /* Transmit FIFO service */
 #define UDCCS_INT_TPC  (1 << 1)        /* Transmit packet complete */
@@ -695,32 +704,32 @@ typedef void              (*ExcpHndlr) (void) ;
 #define UDCCS_INT_FST  (1 << 5)        /* Force stall */
 #define UDCCS_INT_TSP  (1 << 7)        /* Transmit short packet */
 
-#define UFNRH          __REG(0x40600060)  /* UDC Frame Number Register High */
-#define UFNRL          __REG(0x40600014)  /* UDC Frame Number Register Low */
-#define UBCR2          __REG(0x40600208)  /* UDC Byte Count Reg 2 */
-#define UBCR4          __REG(0x4060006c)  /* UDC Byte Count Reg 4 */
-#define UBCR7          __REG(0x40600070)  /* UDC Byte Count Reg 7 */
-#define UBCR9          __REG(0x40600074)  /* UDC Byte Count Reg 9 */
-#define UBCR12         __REG(0x40600078)  /* UDC Byte Count Reg 12 */
-#define UBCR14         __REG(0x4060007c)  /* UDC Byte Count Reg 14 */
-#define UDDR0          __REG(0x40600300)  /* UDC Endpoint 0 Data Register */
-#define UDDR1          __REG(0x40600304)  /* UDC Endpoint 1 Data Register */
-#define UDDR2          __REG(0x40600308)  /* UDC Endpoint 2 Data Register */
-#define UDDR3          __REG(0x40600200)  /* UDC Endpoint 3 Data Register */
-#define UDDR4          __REG(0x40600400)  /* UDC Endpoint 4 Data Register */
-#define UDDR5          __REG(0x406000A0)  /* UDC Endpoint 5 Data Register */
-#define UDDR6          __REG(0x40600600)  /* UDC Endpoint 6 Data Register */
-#define UDDR7          __REG(0x40600680)  /* UDC Endpoint 7 Data Register */
-#define UDDR8          __REG(0x40600700)  /* UDC Endpoint 8 Data Register */
-#define UDDR9          __REG(0x40600900)  /* UDC Endpoint 9 Data Register */
-#define UDDR10         __REG(0x406000C0)  /* UDC Endpoint 10 Data Register */
-#define UDDR11         __REG(0x40600B00)  /* UDC Endpoint 11 Data Register */
-#define UDDR12         __REG(0x40600B80)  /* UDC Endpoint 12 Data Register */
-#define UDDR13         __REG(0x40600C00)  /* UDC Endpoint 13 Data Register */
-#define UDDR14         __REG(0x40600E00)  /* UDC Endpoint 14 Data Register */
-#define UDDR15         __REG(0x406000E0)  /* UDC Endpoint 15 Data Register */
-
-#define UICR0          __REG(0x40600004)  /* UDC Interrupt Control Register 0 */
+#define UFNRH          0x40600060  /* UDC Frame Number Register High */
+#define UFNRL          0x40600014  /* UDC Frame Number Register Low */
+#define UBCR2          0x40600208  /* UDC Byte Count Reg 2 */
+#define UBCR4          0x4060006c  /* UDC Byte Count Reg 4 */
+#define UBCR7          0x40600070  /* UDC Byte Count Reg 7 */
+#define UBCR9          0x40600074  /* UDC Byte Count Reg 9 */
+#define UBCR12         0x40600078  /* UDC Byte Count Reg 12 */
+#define UBCR14         0x4060007c  /* UDC Byte Count Reg 14 */
+#define UDDR0          0x40600300  /* UDC Endpoint 0 Data Register */
+#define UDDR1          0x40600304  /* UDC Endpoint 1 Data Register */
+#define UDDR2          0x40600308  /* UDC Endpoint 2 Data Register */
+#define UDDR3          0x40600200  /* UDC Endpoint 3 Data Register */
+#define UDDR4          0x40600400  /* UDC Endpoint 4 Data Register */
+#define UDDR5          0x406000A0  /* UDC Endpoint 5 Data Register */
+#define UDDR6          0x40600600  /* UDC Endpoint 6 Data Register */
+#define UDDR7          0x40600680  /* UDC Endpoint 7 Data Register */
+#define UDDR8          0x40600700  /* UDC Endpoint 8 Data Register */
+#define UDDR9          0x40600900  /* UDC Endpoint 9 Data Register */
+#define UDDR10         0x406000C0  /* UDC Endpoint 10 Data Register */
+#define UDDR11         0x40600B00  /* UDC Endpoint 11 Data Register */
+#define UDDR12         0x40600B80  /* UDC Endpoint 12 Data Register */
+#define UDDR13         0x40600C00  /* UDC Endpoint 13 Data Register */
+#define UDDR14         0x40600E00  /* UDC Endpoint 14 Data Register */
+#define UDDR15         0x406000E0  /* UDC Endpoint 15 Data Register */
+
+#define UICR0          0x40600004  /* UDC Interrupt Control Register 0 */
 
 #define UICR0_IM0      (1 << 0)        /* Interrupt mask ep 0 */
 #define UICR0_IM1      (1 << 1)        /* Interrupt mask ep 1 */
@@ -731,7 +740,7 @@ typedef void                (*ExcpHndlr) (void) ;
 #define UICR0_IM6      (1 << 6)        /* Interrupt mask ep 6 */
 #define UICR0_IM7      (1 << 7)        /* Interrupt mask ep 7 */
 
-#define UICR1          __REG(0x40600008)  /* UDC Interrupt Control Register 1 */
+#define UICR1          0x40600008  /* UDC Interrupt Control Register 1 */
 
 #define UICR1_IM8      (1 << 0)        /* Interrupt mask ep 8 */
 #define UICR1_IM9      (1 << 1)        /* Interrupt mask ep 9 */
@@ -742,7 +751,7 @@ typedef void                (*ExcpHndlr) (void) ;
 #define UICR1_IM14     (1 << 6)        /* Interrupt mask ep 14 */
 #define UICR1_IM15     (1 << 7)        /* Interrupt mask ep 15 */
 
-#define USIR0          __REG(0x4060000C)  /* UDC Status Interrupt Register 0 */
+#define USIR0          0x4060000C  /* UDC Status Interrupt Register 0 */
 
 #define USIR0_IR0      (1 << 0)        /* Interrup request ep 0 */
 #define USIR0_IR1      (1 << 2)        /* Interrup request ep 1 */
@@ -753,7 +762,7 @@ typedef void                (*ExcpHndlr) (void) ;
 #define USIR0_IR6      (1 << 6)        /* Interrup request ep 6 */
 #define USIR0_IR7      (1 << 7)        /* Interrup request ep 7 */
 
-#define USIR1          __REG(0x40600010)  /* UDC Status Interrupt Register 1 */
+#define USIR1          0x40600010  /* UDC Status Interrupt Register 1 */
 
 #define USIR1_IR8      (1 << 0)        /* Interrup request ep 8 */
 #define USIR1_IR9      (1 << 1)        /* Interrup request ep 9 */
@@ -765,8 +774,8 @@ typedef void                (*ExcpHndlr) (void) ;
 #define USIR1_IR15     (1 << 7)        /* Interrup request ep 15 */
 
 
-#define UDCICR0         __REG(0x40600004)      /* UDC Interrupt Control Register0 */
-#define UDCICR1         __REG(0x40600008)      /* UDC Interrupt Control Register1 */
+#define UDCICR0         0x40600004     /* UDC Interrupt Control Register0 */
+#define UDCICR1         0x40600008     /* UDC Interrupt Control Register1 */
 #define UDCICR_FIFOERR (1 << 1)                        /* FIFO Error interrupt for EP */
 #define UDCICR_PKTCOMPL (1 << 0)                       /* Packet Complete interrupt for EP */
 
@@ -777,8 +786,8 @@ typedef void                (*ExcpHndlr) (void) ;
 #define UDCICR1_IESU   (1 << 28)       /* IntEn - Suspend */
 #define UDCICR1_IERS   (1 << 27)       /* IntEn - Reset */
 
-#define UDCISR0         __REG(0x4060000C) /* UDC Interrupt Status Register 0 */
-#define UDCISR1         __REG(0x40600010) /* UDC Interrupt Status Register 1 */
+#define UDCISR0         0x4060000C /* UDC Interrupt Status Register 0 */
+#define UDCISR1         0x40600010 /* UDC Interrupt Status Register 1 */
 #define UDCISR_INT(n, intr) (((intr) & 0x03) << (((n) & 0x0F) * 2))
 #define UDCISR1_IRCC   (1 << 31)       /* IntEn - Configuration Change */
 #define UDCISR1_IRSOF  (1 << 30)       /* IntEn - Start of Frame */
@@ -787,8 +796,8 @@ typedef void                (*ExcpHndlr) (void) ;
 #define UDCISR1_IRRS   (1 << 27)       /* IntEn - Reset */
 
 
-#define UDCFNR                 __REG(0x40600014) /* UDC Frame Number Register */
-#define UDCOTGICR              __REG(0x40600018) /* UDC On-The-Go interrupt control */
+#define UDCFNR                 0x40600014 /* UDC Frame Number Register */
+#define UDCOTGICR              0x40600018 /* UDC On-The-Go interrupt control */
 #define UDCOTGICR_IESF         (1 << 24)       /* OTG SET_FEATURE command recvd */
 #define UDCOTGICR_IEXR         (1 << 17)       /* Extra Transciever Interrupt Rising Edge Interrupt Enable */
 #define UDCOTGICR_IEXF         (1 << 16)       /* Extra Transciever Interrupt Falling Edge Interrupt Enable */
@@ -804,7 +813,7 @@ typedef void                (*ExcpHndlr) (void) ;
 #define UDCOTGICR_IEIDF                (1 << 0)        /* OTG ID Change Falling Edge Interrupt Enable */
 
 #define UDCCSN(x)      __REG2(0x40600100, (x) << 2)
-#define UDCCSR0                __REG(0x40600100) /* UDC Control/Status register - Endpoint 0 */
+#define UDCCSR0                0x40600100 /* UDC Control/Status register - Endpoint 0 */
 
 #define UDCCSR0_SA     (1 << 7)        /* Setup Active */
 #define UDCCSR0_RNE    (1 << 6)        /* Receive FIFO Not Empty */
@@ -815,29 +824,29 @@ typedef void              (*ExcpHndlr) (void) ;
 #define UDCCSR0_IPR    (1 << 1)        /* IN Packet Ready */
 #define UDCCSR0_OPC    (1 << 0)        /* OUT Packet Complete */
 
-#define UDCCSRA         __REG(0x40600104) /* UDC Control/Status register - Endpoint A */
-#define UDCCSRB         __REG(0x40600108) /* UDC Control/Status register - Endpoint B */
-#define UDCCSRC         __REG(0x4060010C) /* UDC Control/Status register - Endpoint C */
-#define UDCCSRD         __REG(0x40600110) /* UDC Control/Status register - Endpoint D */
-#define UDCCSRE         __REG(0x40600114) /* UDC Control/Status register - Endpoint E */
-#define UDCCSRF         __REG(0x40600118) /* UDC Control/Status register - Endpoint F */
-#define UDCCSRG         __REG(0x4060011C) /* UDC Control/Status register - Endpoint G */
-#define UDCCSRH         __REG(0x40600120) /* UDC Control/Status register - Endpoint H */
-#define UDCCSRI         __REG(0x40600124) /* UDC Control/Status register - Endpoint I */
-#define UDCCSRJ         __REG(0x40600128) /* UDC Control/Status register - Endpoint J */
-#define UDCCSRK         __REG(0x4060012C) /* UDC Control/Status register - Endpoint K */
-#define UDCCSRL         __REG(0x40600130) /* UDC Control/Status register - Endpoint L */
-#define UDCCSRM         __REG(0x40600134) /* UDC Control/Status register - Endpoint M */
-#define UDCCSRN         __REG(0x40600138) /* UDC Control/Status register - Endpoint N */
-#define UDCCSRP         __REG(0x4060013C) /* UDC Control/Status register - Endpoint P */
-#define UDCCSRQ         __REG(0x40600140) /* UDC Control/Status register - Endpoint Q */
-#define UDCCSRR         __REG(0x40600144) /* UDC Control/Status register - Endpoint R */
-#define UDCCSRS         __REG(0x40600148) /* UDC Control/Status register - Endpoint S */
-#define UDCCSRT         __REG(0x4060014C) /* UDC Control/Status register - Endpoint T */
-#define UDCCSRU         __REG(0x40600150) /* UDC Control/Status register - Endpoint U */
-#define UDCCSRV         __REG(0x40600154) /* UDC Control/Status register - Endpoint V */
-#define UDCCSRW         __REG(0x40600158) /* UDC Control/Status register - Endpoint W */
-#define UDCCSRX         __REG(0x4060015C) /* UDC Control/Status register - Endpoint X */
+#define UDCCSRA         0x40600104 /* UDC Control/Status register - Endpoint A */
+#define UDCCSRB         0x40600108 /* UDC Control/Status register - Endpoint B */
+#define UDCCSRC         0x4060010C /* UDC Control/Status register - Endpoint C */
+#define UDCCSRD         0x40600110 /* UDC Control/Status register - Endpoint D */
+#define UDCCSRE         0x40600114 /* UDC Control/Status register - Endpoint E */
+#define UDCCSRF         0x40600118 /* UDC Control/Status register - Endpoint F */
+#define UDCCSRG         0x4060011C /* UDC Control/Status register - Endpoint G */
+#define UDCCSRH         0x40600120 /* UDC Control/Status register - Endpoint H */
+#define UDCCSRI         0x40600124 /* UDC Control/Status register - Endpoint I */
+#define UDCCSRJ         0x40600128 /* UDC Control/Status register - Endpoint J */
+#define UDCCSRK         0x4060012C /* UDC Control/Status register - Endpoint K */
+#define UDCCSRL         0x40600130 /* UDC Control/Status register - Endpoint L */
+#define UDCCSRM         0x40600134 /* UDC Control/Status register - Endpoint M */
+#define UDCCSRN         0x40600138 /* UDC Control/Status register - Endpoint N */
+#define UDCCSRP         0x4060013C /* UDC Control/Status register - Endpoint P */
+#define UDCCSRQ         0x40600140 /* UDC Control/Status register - Endpoint Q */
+#define UDCCSRR         0x40600144 /* UDC Control/Status register - Endpoint R */
+#define UDCCSRS         0x40600148 /* UDC Control/Status register - Endpoint S */
+#define UDCCSRT         0x4060014C /* UDC Control/Status register - Endpoint T */
+#define UDCCSRU         0x40600150 /* UDC Control/Status register - Endpoint U */
+#define UDCCSRV         0x40600154 /* UDC Control/Status register - Endpoint V */
+#define UDCCSRW         0x40600158 /* UDC Control/Status register - Endpoint W */
+#define UDCCSRX         0x4060015C /* UDC Control/Status register - Endpoint X */
 
 #define UDCCSR_DPE     (1 << 9)        /* Data Packet Error */
 #define UDCCSR_FEF     (1 << 8)        /* Flush Endpoint FIFO */
@@ -852,81 +861,81 @@ typedef void              (*ExcpHndlr) (void) ;
 #define UDCCSR_FS      (1 << 0)        /* FIFO needs service */
 
 #define UDCBCN(x)      __REG2(0x40600200, (x)<<2)
-#define UDCBCR0         __REG(0x40600200) /* Byte Count Register - EP0 */
-#define UDCBCRA         __REG(0x40600204) /* Byte Count Register - EPA */
-#define UDCBCRB         __REG(0x40600208) /* Byte Count Register - EPB */
-#define UDCBCRC         __REG(0x4060020C) /* Byte Count Register - EPC */
-#define UDCBCRD         __REG(0x40600210) /* Byte Count Register - EPD */
-#define UDCBCRE         __REG(0x40600214) /* Byte Count Register - EPE */
-#define UDCBCRF         __REG(0x40600218) /* Byte Count Register - EPF */
-#define UDCBCRG         __REG(0x4060021C) /* Byte Count Register - EPG */
-#define UDCBCRH         __REG(0x40600220) /* Byte Count Register - EPH */
-#define UDCBCRI         __REG(0x40600224) /* Byte Count Register - EPI */
-#define UDCBCRJ         __REG(0x40600228) /* Byte Count Register - EPJ */
-#define UDCBCRK         __REG(0x4060022C) /* Byte Count Register - EPK */
-#define UDCBCRL         __REG(0x40600230) /* Byte Count Register - EPL */
-#define UDCBCRM         __REG(0x40600234) /* Byte Count Register - EPM */
-#define UDCBCRN         __REG(0x40600238) /* Byte Count Register - EPN */
-#define UDCBCRP         __REG(0x4060023C) /* Byte Count Register - EPP */
-#define UDCBCRQ         __REG(0x40600240) /* Byte Count Register - EPQ */
-#define UDCBCRR         __REG(0x40600244) /* Byte Count Register - EPR */
-#define UDCBCRS         __REG(0x40600248) /* Byte Count Register - EPS */
-#define UDCBCRT         __REG(0x4060024C) /* Byte Count Register - EPT */
-#define UDCBCRU         __REG(0x40600250) /* Byte Count Register - EPU */
-#define UDCBCRV         __REG(0x40600254) /* Byte Count Register - EPV */
-#define UDCBCRW         __REG(0x40600258) /* Byte Count Register - EPW */
-#define UDCBCRX         __REG(0x4060025C) /* Byte Count Register - EPX */
+#define UDCBCR0         0x40600200 /* Byte Count Register - EP0 */
+#define UDCBCRA         0x40600204 /* Byte Count Register - EPA */
+#define UDCBCRB         0x40600208 /* Byte Count Register - EPB */
+#define UDCBCRC         0x4060020C /* Byte Count Register - EPC */
+#define UDCBCRD         0x40600210 /* Byte Count Register - EPD */
+#define UDCBCRE         0x40600214 /* Byte Count Register - EPE */
+#define UDCBCRF         0x40600218 /* Byte Count Register - EPF */
+#define UDCBCRG         0x4060021C /* Byte Count Register - EPG */
+#define UDCBCRH         0x40600220 /* Byte Count Register - EPH */
+#define UDCBCRI         0x40600224 /* Byte Count Register - EPI */
+#define UDCBCRJ         0x40600228 /* Byte Count Register - EPJ */
+#define UDCBCRK         0x4060022C /* Byte Count Register - EPK */
+#define UDCBCRL         0x40600230 /* Byte Count Register - EPL */
+#define UDCBCRM         0x40600234 /* Byte Count Register - EPM */
+#define UDCBCRN         0x40600238 /* Byte Count Register - EPN */
+#define UDCBCRP         0x4060023C /* Byte Count Register - EPP */
+#define UDCBCRQ         0x40600240 /* Byte Count Register - EPQ */
+#define UDCBCRR         0x40600244 /* Byte Count Register - EPR */
+#define UDCBCRS         0x40600248 /* Byte Count Register - EPS */
+#define UDCBCRT         0x4060024C /* Byte Count Register - EPT */
+#define UDCBCRU         0x40600250 /* Byte Count Register - EPU */
+#define UDCBCRV         0x40600254 /* Byte Count Register - EPV */
+#define UDCBCRW         0x40600258 /* Byte Count Register - EPW */
+#define UDCBCRX         0x4060025C /* Byte Count Register - EPX */
 
 #define UDCDN(x)       __REG2(0x40600300, (x)<<2)
-#define UDCDR0          __REG(0x40600300) /* Data Register - EP0 */
-#define UDCDRA          __REG(0x40600304) /* Data Register - EPA */
-#define UDCDRB          __REG(0x40600308) /* Data Register - EPB */
-#define UDCDRC          __REG(0x4060030C) /* Data Register - EPC */
-#define UDCDRD          __REG(0x40600310) /* Data Register - EPD */
-#define UDCDRE          __REG(0x40600314) /* Data Register - EPE */
-#define UDCDRF          __REG(0x40600318) /* Data Register - EPF */
-#define UDCDRG          __REG(0x4060031C) /* Data Register - EPG */
-#define UDCDRH          __REG(0x40600320) /* Data Register - EPH */
-#define UDCDRI          __REG(0x40600324) /* Data Register - EPI */
-#define UDCDRJ          __REG(0x40600328) /* Data Register - EPJ */
-#define UDCDRK          __REG(0x4060032C) /* Data Register - EPK */
-#define UDCDRL          __REG(0x40600330) /* Data Register - EPL */
-#define UDCDRM          __REG(0x40600334) /* Data Register - EPM */
-#define UDCDRN          __REG(0x40600338) /* Data Register - EPN */
-#define UDCDRP          __REG(0x4060033C) /* Data Register - EPP */
-#define UDCDRQ          __REG(0x40600340) /* Data Register - EPQ */
-#define UDCDRR          __REG(0x40600344) /* Data Register - EPR */
-#define UDCDRS          __REG(0x40600348) /* Data Register - EPS */
-#define UDCDRT          __REG(0x4060034C) /* Data Register - EPT */
-#define UDCDRU          __REG(0x40600350) /* Data Register - EPU */
-#define UDCDRV          __REG(0x40600354) /* Data Register - EPV */
-#define UDCDRW          __REG(0x40600358) /* Data Register - EPW */
-#define UDCDRX          __REG(0x4060035C) /* Data Register - EPX */
+#define UDCDR0          0x40600300 /* Data Register - EP0 */
+#define UDCDRA          0x40600304 /* Data Register - EPA */
+#define UDCDRB          0x40600308 /* Data Register - EPB */
+#define UDCDRC          0x4060030C /* Data Register - EPC */
+#define UDCDRD          0x40600310 /* Data Register - EPD */
+#define UDCDRE          0x40600314 /* Data Register - EPE */
+#define UDCDRF          0x40600318 /* Data Register - EPF */
+#define UDCDRG          0x4060031C /* Data Register - EPG */
+#define UDCDRH          0x40600320 /* Data Register - EPH */
+#define UDCDRI          0x40600324 /* Data Register - EPI */
+#define UDCDRJ          0x40600328 /* Data Register - EPJ */
+#define UDCDRK          0x4060032C /* Data Register - EPK */
+#define UDCDRL          0x40600330 /* Data Register - EPL */
+#define UDCDRM          0x40600334 /* Data Register - EPM */
+#define UDCDRN          0x40600338 /* Data Register - EPN */
+#define UDCDRP          0x4060033C /* Data Register - EPP */
+#define UDCDRQ          0x40600340 /* Data Register - EPQ */
+#define UDCDRR          0x40600344 /* Data Register - EPR */
+#define UDCDRS          0x40600348 /* Data Register - EPS */
+#define UDCDRT          0x4060034C /* Data Register - EPT */
+#define UDCDRU          0x40600350 /* Data Register - EPU */
+#define UDCDRV          0x40600354 /* Data Register - EPV */
+#define UDCDRW          0x40600358 /* Data Register - EPW */
+#define UDCDRX          0x4060035C /* Data Register - EPX */
 
 #define UDCCN(x)       __REG2(0x40600400, (x)<<2)
-#define UDCCRA          __REG(0x40600404) /* Configuration register EPA */
-#define UDCCRB          __REG(0x40600408) /* Configuration register EPB */
-#define UDCCRC          __REG(0x4060040C) /* Configuration register EPC */
-#define UDCCRD          __REG(0x40600410) /* Configuration register EPD */
-#define UDCCRE          __REG(0x40600414) /* Configuration register EPE */
-#define UDCCRF          __REG(0x40600418) /* Configuration register EPF */
-#define UDCCRG          __REG(0x4060041C) /* Configuration register EPG */
-#define UDCCRH          __REG(0x40600420) /* Configuration register EPH */
-#define UDCCRI          __REG(0x40600424) /* Configuration register EPI */
-#define UDCCRJ          __REG(0x40600428) /* Configuration register EPJ */
-#define UDCCRK          __REG(0x4060042C) /* Configuration register EPK */
-#define UDCCRL          __REG(0x40600430) /* Configuration register EPL */
-#define UDCCRM          __REG(0x40600434) /* Configuration register EPM */
-#define UDCCRN          __REG(0x40600438) /* Configuration register EPN */
-#define UDCCRP          __REG(0x4060043C) /* Configuration register EPP */
-#define UDCCRQ          __REG(0x40600440) /* Configuration register EPQ */
-#define UDCCRR          __REG(0x40600444) /* Configuration register EPR */
-#define UDCCRS          __REG(0x40600448) /* Configuration register EPS */
-#define UDCCRT          __REG(0x4060044C) /* Configuration register EPT */
-#define UDCCRU          __REG(0x40600450) /* Configuration register EPU */
-#define UDCCRV          __REG(0x40600454) /* Configuration register EPV */
-#define UDCCRW          __REG(0x40600458) /* Configuration register EPW */
-#define UDCCRX          __REG(0x4060045C) /* Configuration register EPX */
+#define UDCCRA          0x40600404 /* Configuration register EPA */
+#define UDCCRB          0x40600408 /* Configuration register EPB */
+#define UDCCRC          0x4060040C /* Configuration register EPC */
+#define UDCCRD          0x40600410 /* Configuration register EPD */
+#define UDCCRE          0x40600414 /* Configuration register EPE */
+#define UDCCRF          0x40600418 /* Configuration register EPF */
+#define UDCCRG          0x4060041C /* Configuration register EPG */
+#define UDCCRH          0x40600420 /* Configuration register EPH */
+#define UDCCRI          0x40600424 /* Configuration register EPI */
+#define UDCCRJ          0x40600428 /* Configuration register EPJ */
+#define UDCCRK          0x4060042C /* Configuration register EPK */
+#define UDCCRL          0x40600430 /* Configuration register EPL */
+#define UDCCRM          0x40600434 /* Configuration register EPM */
+#define UDCCRN          0x40600438 /* Configuration register EPN */
+#define UDCCRP          0x4060043C /* Configuration register EPP */
+#define UDCCRQ          0x40600440 /* Configuration register EPQ */
+#define UDCCRR          0x40600444 /* Configuration register EPR */
+#define UDCCRS          0x40600448 /* Configuration register EPS */
+#define UDCCRT          0x4060044C /* Configuration register EPT */
+#define UDCCRU          0x40600450 /* Configuration register EPU */
+#define UDCCRV          0x40600454 /* Configuration register EPV */
+#define UDCCRW          0x40600458 /* Configuration register EPW */
+#define UDCCRX          0x4060045C /* Configuration register EPX */
 
 #define UDCCONR_CN     (0x03 << 25)    /* Configuration Number */
 #define UDCCONR_CN_S   (25)
@@ -959,38 +968,39 @@ typedef void              (*ExcpHndlr) (void) ;
 
 #if defined(CONFIG_PXA27X) || defined(CONFIG_CPU_MONAHANS)
 
+/******************************************************************************/
 /*
  * USB Host Controller
  */
 #define OHCI_REGS_BASE 0x4C000000      /* required for ohci driver */
-#define UHCREV         __REG(0x4C000000)
-#define UHCHCON                __REG(0x4C000004)
-#define UHCCOMS                __REG(0x4C000008)
-#define UHCINTS                __REG(0x4C00000C)
-#define UHCINTE                __REG(0x4C000010)
-#define UHCINTD                __REG(0x4C000014)
-#define UHCHCCA                __REG(0x4C000018)
-#define UHCPCED                __REG(0x4C00001C)
-#define UHCCHED                __REG(0x4C000020)
-#define UHCCCED                __REG(0x4C000024)
-#define UHCBHED                __REG(0x4C000028)
-#define UHCBCED                __REG(0x4C00002C)
-#define UHCDHEAD       __REG(0x4C000030)
-#define UHCFMI         __REG(0x4C000034)
-#define UHCFMR         __REG(0x4C000038)
-#define UHCFMN         __REG(0x4C00003C)
-#define UHCPERS                __REG(0x4C000040)
-#define UHCLST         __REG(0x4C000044)
-#define UHCRHDA                __REG(0x4C000048)
-#define UHCRHDB                __REG(0x4C00004C)
-#define UHCRHS         __REG(0x4C000050)
-#define UHCRHPS1       __REG(0x4C000054)
-#define UHCRHPS2       __REG(0x4C000058)
-#define UHCRHPS3       __REG(0x4C00005C)
-#define UHCSTAT                __REG(0x4C000060)
-#define UHCHR          __REG(0x4C000064)
-#define UHCHIE         __REG(0x4C000068)
-#define UHCHIT         __REG(0x4C00006C)
+#define UHCREV         0x4C000000
+#define UHCHCON                0x4C000004
+#define UHCCOMS                0x4C000008
+#define UHCINTS                0x4C00000C
+#define UHCINTE                0x4C000010
+#define UHCINTD                0x4C000014
+#define UHCHCCA                0x4C000018
+#define UHCPCED                0x4C00001C
+#define UHCCHED                0x4C000020
+#define UHCCCED                0x4C000024
+#define UHCBHED                0x4C000028
+#define UHCBCED                0x4C00002C
+#define UHCDHEAD       0x4C000030
+#define UHCFMI         0x4C000034
+#define UHCFMR         0x4C000038
+#define UHCFMN         0x4C00003C
+#define UHCPERS                0x4C000040
+#define UHCLST         0x4C000044
+#define UHCRHDA                0x4C000048
+#define UHCRHDB                0x4C00004C
+#define UHCRHS         0x4C000050
+#define UHCRHPS1       0x4C000054
+#define UHCRHPS2       0x4C000058
+#define UHCRHPS3       0x4C00005C
+#define UHCSTAT                0x4C000060
+#define UHCHR          0x4C000064
+#define UHCHIE         0x4C000068
+#define UHCHIT         0x4C00006C
 
 #define UHCHR_FSBIR    (1<<0)
 #define UHCHR_FHR      (1<<1)
@@ -1011,9 +1021,7 @@ typedef void              (*ExcpHndlr) (void) ;
 #define UHCHIE_HBAIE   (1<<8)
 #define UHCHIE_RWIE    (1<<7)
 
-#if defined(CONFIG_CPU_MONAHANS) || defined(CONFIG_PXA27X)
-#define UP2OCR         __REG(0x40600020)
-#endif
+#define UP2OCR         0x40600020
 
 #define UP2OCR_HXOE    (1<<17)
 #define UP2OCR_HXS     (1<<16)
@@ -1029,36 +1037,37 @@ typedef void            (*ExcpHndlr) (void) ;
 #define UP2OCR_CPVPE   (1<<1)
 #define UP2OCR_CPVEN   (1<<0)
 
-#endif
+#endif /* CONFIG_PXA27X || CONFIG_CPU_MONAHANS */
 
+/******************************************************************************/
 /*
  * Fast Infrared Communication Port
  */
-#define ICCR0          __REG(0x40800000)  /* ICP Control Register 0 */
-#define ICCR1          __REG(0x40800004)  /* ICP Control Register 1 */
-#define ICCR2          __REG(0x40800008)  /* ICP Control Register 2 */
-#define ICDR           __REG(0x4080000c)  /* ICP Data Register */
-#define ICSR0          __REG(0x40800014)  /* ICP Status Register 0 */
-#define ICSR1          __REG(0x40800018)  /* ICP Status Register 1 */
+#define ICCR0          0x40800000  /* ICP Control Register 0 */
+#define ICCR1          0x40800004  /* ICP Control Register 1 */
+#define ICCR2          0x40800008  /* ICP Control Register 2 */
+#define ICDR           0x4080000c  /* ICP Data Register */
+#define ICSR0          0x40800014  /* ICP Status Register 0 */
+#define ICSR1          0x40800018  /* ICP Status Register 1 */
 
 /*
  * Real Time Clock
  */
-#define RCNR           __REG(0x40900000)  /* RTC Count Register */
-#define RTAR           __REG(0x40900004)  /* RTC Alarm Register */
-#define RTSR           __REG(0x40900008)  /* RTC Status Register */
-#define RTTR           __REG(0x4090000C)  /* RTC Timer Trim Register */
-#define RDAR1          __REG(0x40900018)  /* Wristwatch Day Alarm Reg 1 */
-#define RDAR2          __REG(0x40900020)  /* Wristwatch Day Alarm Reg 2 */
-#define RYAR1          __REG(0x4090001C)  /* Wristwatch Year Alarm Reg 1 */
-#define RYAR2          __REG(0x40900024)  /* Wristwatch Year Alarm Reg 2 */
-#define SWAR1          __REG(0x4090002C)  /* Stopwatch Alarm Register 1 */
-#define SWAR2          __REG(0x40900030)  /* Stopwatch Alarm Register 2 */
-#define PIAR           __REG(0x40900038)  /* Periodic Interrupt Alarm Register */
-#define RDCR           __REG(0x40900010)  /* RTC Day Count Register. */
-#define RYCR           __REG(0x40900014)  /* RTC Year Count Register. */
-#define SWCR           __REG(0x40900028)  /* Stopwatch Count Register */
-#define RTCPICR                __REG(0x40900034)  /* Periodic Interrupt Counter Register */
+#define RCNR           0x40900000  /* RTC Count Register */
+#define RTAR           0x40900004  /* RTC Alarm Register */
+#define RTSR           0x40900008  /* RTC Status Register */
+#define RTTR           0x4090000C  /* RTC Timer Trim Register */
+#define RDAR1          0x40900018  /* Wristwatch Day Alarm Reg 1 */
+#define RDAR2          0x40900020  /* Wristwatch Day Alarm Reg 2 */
+#define RYAR1          0x4090001C  /* Wristwatch Year Alarm Reg 1 */
+#define RYAR2          0x40900024  /* Wristwatch Year Alarm Reg 2 */
+#define SWAR1          0x4090002C  /* Stopwatch Alarm Register 1 */
+#define SWAR2          0x40900030  /* Stopwatch Alarm Register 2 */
+#define PIAR           0x40900038  /* Periodic Interrupt Alarm Register */
+#define RDCR           0x40900010  /* RTC Day Count Register. */
+#define RYCR           0x40900014  /* RTC Year Count Register. */
+#define SWCR           0x40900028  /* Stopwatch Count Register */
+#define RTCPICR                0x40900034  /* Periodic Interrupt Counter Register */
 
 #define RTSR_PICE      (1 << 15)       /* Peridoc interrupt count enable */
 #define RTSR_PIALE     (1 << 14)       /* Peridoc interrupt Alarm enable */
@@ -1068,48 +1077,48 @@ typedef void            (*ExcpHndlr) (void) ;
 #define RTSR_HZ                (1 << 1)        /* HZ rising-edge detected */
 #define RTSR_AL                (1 << 0)        /* RTC alarm detected */
 
+/******************************************************************************/
 /*
  * OS Timer & Match Registers
  */
-#define OSMR0          __REG(0x40A00000)  /* OS Timer Match Register 0 */
-#define OSMR1          __REG(0x40A00004)  /* OS Timer Match Register 1 */
-#define OSMR2          __REG(0x40A00008)  /* OS Timer Match Register 2 */
-#define OSMR3          __REG(0x40A0000C)  /* OS Timer Match Register 3 */
-#define OSCR           __REG(0x40A00010)  /* OS Timer Counter Register */
-#define OSSR           __REG(0x40A00014)  /* OS Timer Status Register */
-#define OWER           __REG(0x40A00018)  /* OS Timer Watchdog Enable Register */
-#define OIER           __REG(0x40A0001C)  /* OS Timer Interrupt Enable Register */
+#define OSMR0          0x40A00000  /* OS Timer Match Register 0 */
+#define OSMR1          0x40A00004  /* OS Timer Match Register 1 */
+#define OSMR2          0x40A00008  /* OS Timer Match Register 2 */
+#define OSMR3          0x40A0000C  /* OS Timer Match Register 3 */
+#define OSCR           0x40A00010  /* OS Timer Counter Register */
+#define OSSR           0x40A00014  /* OS Timer Status Register */
+#define OWER           0x40A00018  /* OS Timer Watchdog Enable Register */
+#define OIER           0x40A0001C  /* OS Timer Interrupt Enable Register */
 
-#ifdef CONFIG_CPU_MONAHANS
-#define OSCR4          __REG(0x40A00040)  /* OS Timer Counter Register 4 */
-#define OSCR5          __REG(0x40A00044)  /* OS Timer Counter Register 5 */
-#define OSCR6          __REG(0x40A00048)  /* OS Timer Counter Register 6 */
-#define OSCR7          __REG(0x40A0004C)  /* OS Timer Counter Register 7 */
-#define OSCR8          __REG(0x40A00050)  /* OS Timer Counter Register 8 */
-#define OSCR9          __REG(0x40A00054)  /* OS Timer Counter Register 9 */
-#define OSCR10         __REG(0x40A00058)  /* OS Timer Counter Register 10 */
-#define OSCR11         __REG(0x40A0005C)  /* OS Timer Counter Register 11 */
-
-#define OSMR4          __REG(0x40A00080)  /* OS Timer Match Register 4 */
-#define OSMR5          __REG(0x40A00084)  /* OS Timer Match Register 5 */
-#define OSMR6          __REG(0x40A00088)  /* OS Timer Match Register 6 */
-#define OSMR7          __REG(0x40A0008C)  /* OS Timer Match Register 7 */
-#define OSMR8          __REG(0x40A00090)  /* OS Timer Match Register 8 */
-#define OSMR9          __REG(0x40A00094)  /* OS Timer Match Register 9 */
-#define OSMR10         __REG(0x40A00098)  /* OS Timer Match Register 10 */
-#define OSMR11         __REG(0x40A0009C)  /* OS Timer Match Register 11 */
-
-#define OMCR4          __REG(0x40A000C0)  /* OS Match Control Register 4 */
-#define OMCR5          __REG(0x40A000C4)  /* OS Match Control Register 5 */
-#define OMCR6          __REG(0x40A000C8)  /* OS Match Control Register 6 */
-#define OMCR7          __REG(0x40A000CC)  /* OS Match Control Register 7 */
-#define OMCR8          __REG(0x40A000D0)  /* OS Match Control Register 8 */
-#define OMCR9          __REG(0x40A000D4)  /* OS Match Control Register 9 */
-#define OMCR10         __REG(0x40A000D8)  /* OS Match Control Register 10 */
-#define OMCR11         __REG(0x40A000DC)  /* OS Match Control Register 11 */
-
-#define OSCR_CLK_FREQ   3250              /* kHz = 3.25 MHz */
-#endif /* CONFIG_CPU_MONAHANS */
+#if defined(CONFIG_PXA27X) || defined(CONFIG_CPU_MONAHANS)
+#define OSCR4          0x40A00040  /* OS Timer Counter Register 4 */
+#define OSCR5          0x40A00044  /* OS Timer Counter Register 5 */
+#define OSCR6          0x40A00048  /* OS Timer Counter Register 6 */
+#define OSCR7          0x40A0004C  /* OS Timer Counter Register 7 */
+#define OSCR8          0x40A00050  /* OS Timer Counter Register 8 */
+#define OSCR9          0x40A00054  /* OS Timer Counter Register 9 */
+#define OSCR10         0x40A00058  /* OS Timer Counter Register 10 */
+#define OSCR11         0x40A0005C  /* OS Timer Counter Register 11 */
+
+#define OSMR4          0x40A00080  /* OS Timer Match Register 4 */
+#define OSMR5          0x40A00084  /* OS Timer Match Register 5 */
+#define OSMR6          0x40A00088  /* OS Timer Match Register 6 */
+#define OSMR7          0x40A0008C  /* OS Timer Match Register 7 */
+#define OSMR8          0x40A00090  /* OS Timer Match Register 8 */
+#define OSMR9          0x40A00094  /* OS Timer Match Register 9 */
+#define OSMR10         0x40A00098  /* OS Timer Match Register 10 */
+#define OSMR11         0x40A0009C  /* OS Timer Match Register 11 */
+
+#define OMCR4          0x40A000C0  /* OS Match Control Register 4 */
+#define OMCR5          0x40A000C4  /* OS Match Control Register 5 */
+#define OMCR6          0x40A000C8  /* OS Match Control Register 6 */
+#define OMCR7          0x40A000CC  /* OS Match Control Register 7 */
+#define OMCR8          0x40A000D0  /* OS Match Control Register 8 */
+#define OMCR9          0x40A000D4  /* OS Match Control Register 9 */
+#define OMCR10         0x40A000D8  /* OS Match Control Register 10 */
+#define OMCR11         0x40A000DC  /* OS Match Control Register 11 */
+
+#endif /* CONFIG_PXA27X || CONFIG_CPU_MONAHANS */
 
 #define OSSR_M4                (1 << 4)        /* Match status channel 4 */
 #define OSSR_M3                (1 << 3)        /* Match status channel 3 */
@@ -1125,321 +1134,696 @@ typedef void          (*ExcpHndlr) (void) ;
 #define OIER_E1                (1 << 1)        /* Interrupt enable channel 1 */
 #define OIER_E0                (1 << 0)        /* Interrupt enable channel 0 */
 
+#define        OSCR_CLK_FREQ   3250
+
+/******************************************************************************/
 /*
- * Pulse Width Modulator
+ * Core Clock
  */
-#define PWM_CTRL0      __REG(0x40B00000)  /* PWM 0 Control Register */
-#define PWM_PWDUTY0    __REG(0x40B00004)  /* PWM 0 Duty Cycle Register */
-#define PWM_PERVAL0    __REG(0x40B00008)  /* PWM 0 Period Control Register */
 
-#define PWM_CTRL1      __REG(0x40C00000)  /* PWM 1 Control Register */
-#define PWM_PWDUTY1    __REG(0x40C00004)  /* PWM 1 Duty Cycle Register */
-#define PWM_PERVAL1    __REG(0x40C00008)  /* PWM 1 Period Control Register */
+#if defined(CONFIG_CPU_MONAHANS)
+#define ACCR           0x41340000  /* Application Subsystem Clock Configuration Register */
+#define ACSR           0x41340004  /* Application Subsystem Clock Status Register */
+#define AICSR          0x41340008  /* Application Subsystem Interrupt Control/Status Register */
+#define CKENA          0x4134000C  /* A Clock Enable Register */
+#define CKENB          0x41340010  /* B Clock Enable Register */
+#define AC97_DIV       0x41340014  /* AC97 clock divisor value register */
+
+#define ACCR_SMC_MASK  0x03800000      /* Static Memory Controller Frequency Select */
+#define ACCR_SRAM_MASK 0x000c0000      /* SRAM Controller Frequency Select */
+#define ACCR_FC_MASK   0x00030000      /* Frequency Change Frequency Select */
+#define ACCR_HSIO_MASK 0x0000c000      /* High Speed IO Frequency Select */
+#define ACCR_DDR_MASK  0x00003000      /* DDR Memory Controller Frequency Select */
+#define ACCR_XN_MASK   0x00000700      /* Run Mode Frequency to Turbo Mode Frequency Multiplier */
+#define ACCR_XL_MASK   0x0000001f      /* Crystal Frequency to Memory Frequency Multiplier */
+#define ACCR_XPDIS     (1 << 31)
+#define ACCR_SPDIS     (1 << 30)
+#define ACCR_13MEND1   (1 << 27)
+#define ACCR_D0CS      (1 << 26)
+#define ACCR_13MEND2   (1 << 21)
+#define ACCR_PCCE      (1 << 11)
+
+#define CKENA_30_MSL0  (1 << 30)       /* MSL0 Interface Unit Clock Enable */
+#define CKENA_29_SSP4  (1 << 29)       /* SSP3 Unit Clock Enable */
+#define CKENA_28_SSP3  (1 << 28)       /* SSP2 Unit Clock Enable */
+#define CKENA_27_SSP2  (1 << 27)       /* SSP1 Unit Clock Enable */
+#define CKENA_26_SSP1  (1 << 26)       /* SSP0 Unit Clock Enable */
+#define CKENA_25_TSI   (1 << 25)       /* TSI Clock Enable */
+#define CKENA_24_AC97  (1 << 24)       /* AC97 Unit Clock Enable */
+#define CKENA_23_STUART        (1 << 23)       /* STUART Unit Clock Enable */
+#define CKENA_22_FFUART        (1 << 22)       /* FFUART Unit Clock Enable */
+#define CKENA_21_BTUART        (1 << 21)       /* BTUART Unit Clock Enable */
+#define CKENA_20_UDC   (1 << 20)       /* UDC Clock Enable */
+#define CKENA_19_TPM   (1 << 19)       /* TPM Unit Clock Enable */
+#define CKENA_18_USIM1 (1 << 18)       /* USIM1 Unit Clock Enable */
+#define CKENA_17_USIM0 (1 << 17)       /* USIM0 Unit Clock Enable */
+#define CKENA_15_CIR   (1 << 15)       /* Consumer IR Clock Enable */
+#define CKENA_14_KEY   (1 << 14)       /* Keypad Controller Clock Enable */
+#define CKENA_13_MMC1  (1 << 13)       /* MMC1 Clock Enable */
+#define CKENA_12_MMC0  (1 << 12)       /* MMC0 Clock Enable */
+#define CKENA_11_FLASH (1 << 11)       /* Boot ROM Clock Enable */
+#define CKENA_10_SRAM  (1 << 10)       /* SRAM Controller Clock Enable */
+#define CKENA_9_SMC    (1 << 9)        /* Static Memory Controller */
+#define CKENA_8_DMC    (1 << 8)        /* Dynamic Memory Controller */
+#define CKENA_7_GRAPHICS (1 << 7)      /* 2D Graphics Clock Enable */
+#define CKENA_6_USBCLI (1 << 6)        /* USB Client Unit Clock Enable */
+#define CKENA_4_NAND   (1 << 4)        /* NAND Flash Controller Clock Enable */
+#define CKENA_3_CAMERA (1 << 3)        /* Camera Interface Clock Enable */
+#define CKENA_2_USBHOST        (1 << 2)        /* USB Host Unit Clock Enable */
+#define CKENA_1_LCD    (1 << 1)        /* LCD Unit Clock Enable */
+
+#define CKENB_9_SYSBUS2        (1 << 9)        /* System bus 2 */
+#define CKENB_8_1WIRE  (1 << 8)        /* One Wire Interface Unit Clock Enable */
+#define CKENB_7_GPIO   (1 << 7)        /* GPIO Clock Enable */
+#define CKENB_6_IRQ    (1 << 6)        /* Interrupt Controller Clock Enable */
+#define CKENB_4_I2C    (1 << 4)        /* I2C Unit Clock Enable */
+#define CKENB_1_PWM1   (1 << 1)        /* PWM2 & PWM3 Clock Enable */
+#define CKENB_0_PWM0   (1 << 0)        /* PWM0 & PWM1 Clock Enable */
+
+#else /* if defined CONFIG_CPU_MONAHANS */
+
+#define CCCR           0x41300000  /* Core Clock Configuration Register */
+#define CKEN           0x41300004  /* Clock Enable Register */
+#define OSCC           0x41300008  /* Oscillator Configuration Register */
+#define CCSR           0x4130000C /* Core Clock Status Register */
+
+#define CKEN23_SSP1    (1 << 23) /* SSP1 Unit Clock Enable */
+#define CKEN22_MEMC    (1 << 22) /* Memory Controler */
+#define CKEN21_MSHC    (1 << 21) /* Memery Stick Host Controller */
+#define CKEN20_IM      (1 << 20) /* Internal Memory Clock Enable */
+#define CKEN19_KEYPAD  (1 << 19) /* Keypad Interface Clock Enable */
+#define CKEN18_USIM    (1 << 18) /* USIM Unit Clock Enable */
+#define CKEN17_MSL     (1 << 17) /* MSL Interface Unit Clock Enable */
+#define CKEN15_PWR_I2C (1 << 15) /* PWR_I2C Unit Clock Enable */
+#define CKEN9_OST      (1 << 9)  /* OS Timer Unit Clock Enable */
+#define CKEN4_SSP3     (1 << 4)  /* SSP3 Unit Clock Enable */
+
+#define CCCR_N_MASK    0x0380          /* Run Mode Frequency to Turbo Mode Frequency Multiplier */
+#if !defined(CONFIG_PXA27X)
+#define CCCR_M_MASK    0x0060          /* Memory Frequency to Run Mode Frequency Multiplier */
+#endif
+#define CCCR_L_MASK    0x001f          /* Crystal Frequency to Memory Frequency Multiplier */
+
+#define CKEN24_CAMERA  (1 << 24)       /* Camera Interface Clock Enable */
+#define CKEN23_SSP1    (1 << 23)       /* SSP1 Unit Clock Enable */
+#define CKEN22_MEMC    (1 << 22)       /* Memory Controller Clock Enable */
+#define CKEN21_MEMSTK  (1 << 21)       /* Memory Stick Host Controller */
+#define CKEN20_IM      (1 << 20)       /* Internal Memory Clock Enable */
+#define CKEN19_KEYPAD  (1 << 19)       /* Keypad Interface Clock Enable */
+#define CKEN18_USIM    (1 << 18)       /* USIM Unit Clock Enable */
+#define CKEN17_MSL     (1 << 17)       /* MSL Unit Clock Enable */
+#define CKEN16_LCD     (1 << 16)       /* LCD Unit Clock Enable */
+#define CKEN15_PWRI2C  (1 << 15)       /* PWR I2C Unit Clock Enable */
+#define CKEN14_I2C     (1 << 14)       /* I2C Unit Clock Enable */
+#define CKEN13_FICP    (1 << 13)       /* FICP Unit Clock Enable */
+#define CKEN12_MMC     (1 << 12)       /* MMC Unit Clock Enable */
+#define CKEN11_USB     (1 << 11)       /* USB Unit Clock Enable */
+#if defined(CONFIG_PXA27X)
+#define CKEN10_USBHOST (1 << 10)       /* USB Host Unit Clock Enable */
+#define CKEN24_CAMERA  (1 << 24)       /* Camera Unit Clock Enable */
+#endif
+#define CKEN8_I2S      (1 << 8)        /* I2S Unit Clock Enable */
+#define CKEN7_BTUART   (1 << 7)        /* BTUART Unit Clock Enable */
+#define CKEN6_FFUART   (1 << 6)        /* FFUART Unit Clock Enable */
+#define CKEN5_STUART   (1 << 5)        /* STUART Unit Clock Enable */
+#define CKEN3_SSP      (1 << 3)        /* SSP Unit Clock Enable */
+#define CKEN2_AC97     (1 << 2)        /* AC97 Unit Clock Enable */
+#define CKEN1_PWM1     (1 << 1)        /* PWM1 Clock Enable */
+#define CKEN0_PWM0     (1 << 0)        /* PWM0 Clock Enable */
+
+#define OSCC_OON       (1 << 1)        /* 32.768kHz OON (write-once only bit) */
+#define OSCC_OOK       (1 << 0)        /* 32.768kHz OOK (read-only bit) */
+
+#if !defined(CONFIG_PXA27X)
+#define         CCCR_L09      (0x1F)
+#define         CCCR_L27      (0x1)
+#define         CCCR_L32      (0x2)
+#define         CCCR_L36      (0x3)
+#define         CCCR_L40      (0x4)
+#define         CCCR_L45      (0x5)
+
+#define         CCCR_M1       (0x1 << 5)
+#define         CCCR_M2       (0x2 << 5)
+#define         CCCR_M4       (0x3 << 5)
 
-#define PWM_CTRL2      __REG(0x40B00010)  /* PWM 2 Control Register */
-#define PWM_PWDUTY2    __REG(0x40B00014)  /* PWM 2 Duty Cycle Register */
-#define PWM_PERVAL2    __REG(0x40B00018)  /* PWM 2 Period Control Register */
+#define         CCCR_N10      (0x2 << 7)
+#define         CCCR_N15      (0x3 << 7)
+#define         CCCR_N20      (0x4 << 7)
+#define         CCCR_N25      (0x5 << 7)
+#define         CCCR_N30      (0x6 << 7)
+#endif
 
-#define PWM_CTRL3      __REG(0x40C00010)  /* PWM 3 Control Register */
-#define PWM_PWDUTY3    __REG(0x40C00014)  /* PWM 3 Duty Cycle Register */
-#define PWM_PERVAL3    __REG(0x40C00018)  /* PWM 3 Period Control Register */
+#endif /* CONFIG_CPU_MONAHANS */
 
+/******************************************************************************/
 /*
- * Interrupt Controller
+ * Pulse Width Modulator
  */
-#define ICIP           __REG(0x40D00000)  /* Interrupt Controller IRQ Pending Register */
-#define ICMR           __REG(0x40D00004)  /* Interrupt Controller Mask Register */
-#define ICLR           __REG(0x40D00008)  /* Interrupt Controller Level Register */
-#define ICFP           __REG(0x40D0000C)  /* Interrupt Controller FIQ Pending Register */
-#define ICPR           __REG(0x40D00010)  /* Interrupt Controller Pending Register */
-#define ICCR           __REG(0x40D00014)  /* Interrupt Controller Control Register */
+#define PWM_CTRL0      0x40B00000  /* PWM 0 Control Register */
+#define PWM_PWDUTY0    0x40B00004  /* PWM 0 Duty Cycle Register */
+#define PWM_PERVAL0    0x40B00008  /* PWM 0 Period Control Register */
 
-#ifdef CONFIG_CPU_MONAHANS
-#define ICHP           __REG(0x40D00018)  /* Interrupt Controller Highest Priority Register */
-/* Missing: 32 Interrupt priority registers
- * These are the same as beneath for PXA27x: maybe can be merged if
- * GPIO Stuff is same too.
+#define PWM_CTRL1      0x40C00000  /* PWM 1 Control Register */
+#define PWM_PWDUTY1    0x40C00004  /* PWM 1 Duty Cycle Register */
+#define PWM_PERVAL1    0x40C00008  /* PWM 1 Period Control Register */
+
+#if defined(CONFIG_PXA27X) || defined(CONFIG_CPU_MONAHANS)
+#define PWM_CTRL2      0x40B00010  /* PWM 2 Control Register */
+#define PWM_PWDUTY2    0x40B00014  /* PWM 2 Duty Cycle Register */
+#define PWM_PERVAL2    0x40B00018  /* PWM 2 Period Control Register */
+
+#define PWM_CTRL3      0x40C00010  /* PWM 3 Control Register */
+#define PWM_PWDUTY3    0x40C00014  /* PWM 3 Duty Cycle Register */
+#define PWM_PERVAL3    0x40C00018  /* PWM 3 Period Control Register */
+#endif /* CONFIG_PXA27X || CONFIG_CPU_MONAHANS */
+
+/*
+ * Interrupt Controller
  */
-#define ICIP2          __REG(0x40D0009C)  /* Interrupt Controller IRQ Pending Register 2 */
-#define ICMR2          __REG(0x40D000A0)  /* Interrupt Controller Mask Register 2 */
-#define ICLR2          __REG(0x40D000A4)  /* Interrupt Controller Level Register 2 */
-#define ICFP2          __REG(0x40D000A8)  /* Interrupt Controller FIQ Pending Register 2 */
-#define ICPR2          __REG(0x40D000AC)  /* Interrupt Controller Pending Register 2 */
-/* Missing: 2 Interrupt priority registers */
-#endif /* CONFIG_CPU_MONAHANS */
+#define ICIP           0x40D00000  /* Interrupt Controller IRQ Pending Register */
+#define ICMR           0x40D00004  /* Interrupt Controller Mask Register */
+#define ICLR           0x40D00008  /* Interrupt Controller Level Register */
+#define ICFP           0x40D0000C  /* Interrupt Controller FIQ Pending Register */
+#define ICPR           0x40D00010  /* Interrupt Controller Pending Register */
+#define ICCR           0x40D00014  /* Interrupt Controller Control Register */
 
+#if defined(CONFIG_PXA27X) || defined(CONFIG_CPU_MONAHANS)
+#define ICHP           0x40D00018  /* Interrupt Controller Highest Priority Register */
+#define ICIP2          0x40D0009C  /* Interrupt Controller IRQ Pending Register 2 */
+#define ICMR2          0x40D000A0  /* Interrupt Controller Mask Register 2 */
+#define ICLR2          0x40D000A4  /* Interrupt Controller Level Register 2 */
+#define ICFP2          0x40D000A8  /* Interrupt Controller FIQ Pending Register 2 */
+#define ICPR2          0x40D000AC  /* Interrupt Controller Pending Register 2 */
+#endif /* CONFIG_PXA27X || CONFIG_CPU_MONAHANS */
+
+/******************************************************************************/
 /*
  * General Purpose I/O
  */
-#define GPLR0          __REG(0x40E00000)  /* GPIO Pin-Level Register GPIO<31:0> */
-#define GPLR1          __REG(0x40E00004)  /* GPIO Pin-Level Register GPIO<63:32> */
-#define GPLR2          __REG(0x40E00008)  /* GPIO Pin-Level Register GPIO<80:64> */
+#define GPLR0          0x40E00000  /* GPIO Pin-Level Register GPIO<31:0> */
+#define GPLR1          0x40E00004  /* GPIO Pin-Level Register GPIO<63:32> */
+#define GPLR2          0x40E00008  /* GPIO Pin-Level Register GPIO<80:64> */
 
-#define GPDR0          __REG(0x40E0000C)  /* GPIO Pin Direction Register GPIO<31:0> */
-#define GPDR1          __REG(0x40E00010)  /* GPIO Pin Direction Register GPIO<63:32> */
-#define GPDR2          __REG(0x40E00014)  /* GPIO Pin Direction Register GPIO<80:64> */
+#define GPDR0          0x40E0000C  /* GPIO Pin Direction Register GPIO<31:0> */
+#define GPDR1          0x40E00010  /* GPIO Pin Direction Register GPIO<63:32> */
+#define GPDR2          0x40E00014  /* GPIO Pin Direction Register GPIO<80:64> */
 
-#define GPSR0          __REG(0x40E00018)  /* GPIO Pin Output Set Register GPIO<31:0> */
-#define GPSR1          __REG(0x40E0001C)  /* GPIO Pin Output Set Register GPIO<63:32> */
-#define GPSR2          __REG(0x40E00020)  /* GPIO Pin Output Set Register GPIO<80:64> */
+#define GPSR0          0x40E00018  /* GPIO Pin Output Set Register GPIO<31:0> */
+#define GPSR1          0x40E0001C  /* GPIO Pin Output Set Register GPIO<63:32> */
+#define GPSR2          0x40E00020  /* GPIO Pin Output Set Register GPIO<80:64> */
 
-#define GPCR0          __REG(0x40E00024)  /* GPIO Pin Output Clear Register GPIO<31:0> */
-#define GPCR1          __REG(0x40E00028)  /* GPIO Pin Output Clear Register GPIO <63:32> */
-#define GPCR2          __REG(0x40E0002C)  /* GPIO Pin Output Clear Register GPIO <80:64> */
+#define GPCR0          0x40E00024  /* GPIO Pin Output Clear Register GPIO<31:0> */
+#define GPCR1          0x40E00028  /* GPIO Pin Output Clear Register GPIO <63:32> */
+#define GPCR2          0x40E0002C  /* GPIO Pin Output Clear Register GPIO <80:64> */
 
-#define GRER0          __REG(0x40E00030)  /* GPIO Rising-Edge Detect Register GPIO<31:0> */
-#define GRER1          __REG(0x40E00034)  /* GPIO Rising-Edge Detect Register GPIO<63:32> */
-#define GRER2          __REG(0x40E00038)  /* GPIO Rising-Edge Detect Register GPIO<80:64> */
+#define GRER0          0x40E00030  /* GPIO Rising-Edge Detect Register GPIO<31:0> */
+#define GRER1          0x40E00034  /* GPIO Rising-Edge Detect Register GPIO<63:32> */
+#define GRER2          0x40E00038  /* GPIO Rising-Edge Detect Register GPIO<80:64> */
 
-#define GFER0          __REG(0x40E0003C)  /* GPIO Falling-Edge Detect Register GPIO<31:0> */
-#define GFER1          __REG(0x40E00040)  /* GPIO Falling-Edge Detect Register GPIO<63:32> */
-#define GFER2          __REG(0x40E00044)  /* GPIO Falling-Edge Detect Register GPIO<80:64> */
+#define GFER0          0x40E0003C  /* GPIO Falling-Edge Detect Register GPIO<31:0> */
+#define GFER1          0x40E00040  /* GPIO Falling-Edge Detect Register GPIO<63:32> */
+#define GFER2          0x40E00044  /* GPIO Falling-Edge Detect Register GPIO<80:64> */
 
-#define GEDR0          __REG(0x40E00048)  /* GPIO Edge Detect Status Register GPIO<31:0> */
-#define GEDR1          __REG(0x40E0004C)  /* GPIO Edge Detect Status Register GPIO<63:32> */
-#define GEDR2          __REG(0x40E00050)  /* GPIO Edge Detect Status Register GPIO<80:64> */
+#define GEDR0          0x40E00048  /* GPIO Edge Detect Status Register GPIO<31:0> */
+#define GEDR1          0x40E0004C  /* GPIO Edge Detect Status Register GPIO<63:32> */
+#define GEDR2          0x40E00050  /* GPIO Edge Detect Status Register GPIO<80:64> */
+
+#define GAFR0_L                0x40E00054  /* GPIO Alternate Function Select Register GPIO<15:0> */
+#define GAFR0_U                0x40E00058  /* GPIO Alternate Function Select Register GPIO<31:16> */
+#define GAFR1_L                0x40E0005C  /* GPIO Alternate Function Select Register GPIO<47:32> */
+#define GAFR1_U                0x40E00060  /* GPIO Alternate Function Select Register GPIO<63:48> */
+#define GAFR2_L                0x40E00064  /* GPIO Alternate Function Select Register GPIO<79:64> */
+#define GAFR2_U                0x40E00068  /* GPIO Alternate Function Select Register GPIO 80 */
+
+#if defined(CONFIG_PXA27X) || defined(CONFIG_CPU_MONAHANS)
+#define GPLR3          0x40E00100  /* GPIO Pin-Level Register GPIO<127:96> */
+#define GPDR3          0x40E0010C  /* GPIO Pin Direction Register GPIO<127:96> */
+#define GPSR3          0x40E00118  /* GPIO Pin Output Set Register GPIO<127:96> */
+#define GPCR3          0x40E00124  /* GPIO Pin Output Clear Register GPIO<127:96> */
+#define GRER3          0x40E00130  /* GPIO Rising-Edge Detect Register GPIO<127:96> */
+#define GFER3          0x40E0013C  /* GPIO Falling-Edge Detect Register GPIO<127:96> */
+#define GEDR3          0x40E00148  /* GPIO Edge Detect Status Register GPIO<127:96> */
+#define GAFR3_L                0x40E0006C  /* GPIO Alternate Function Select Register GPIO<111:96> */
+#define GAFR3_U                0x40E00070  /* GPIO Alternate Function Select Register GPIO<127:112> */
+#endif /* CONFIG_PXA27X || CONFIG_CPU_MONAHANS */
 
 #ifdef CONFIG_CPU_MONAHANS
-#define GPLR3          __REG(0x40E00100)  /* GPIO Pin-Level Register GPIO<127:96> */
-#define GPDR3          __REG(0x40E0010C)  /* GPIO Pin Direction Register GPIO<127:96> */
-#define GPSR3          __REG(0x40E00118)  /* GPIO Pin Output Set Register GPIO<127:96> */
-#define GPCR3          __REG(0x40E00124)  /* GPIO Pin Output Clear Register GPIO<127:96> */
-#define GRER3          __REG(0x40E00130)  /* GPIO Rising-Edge Detect Register GPIO<127:96> */
-#define GFER3          __REG(0x40E0013C)  /* GPIO Falling-Edge Detect Register GPIO<127:96> */
-#define GEDR3          __REG(0x40E00148)  /* GPIO Edge Detect Status Register GPIO<127:96> */
-
-#define GSDR0          __REG(0x40E00400) /* Bit-wise Set of GPDR[31:0] */
-#define GSDR1          __REG(0x40E00404) /* Bit-wise Set of GPDR[63:32] */
-#define GSDR2          __REG(0x40E00408) /* Bit-wise Set of GPDR[95:64] */
-#define GSDR3          __REG(0x40E0040C) /* Bit-wise Set of GPDR[127:96] */
-
-#define GCDR0          __REG(0x40E00420) /* Bit-wise Clear of GPDR[31:0] */
-#define GCDR1          __REG(0x40E00424) /* Bit-wise Clear of GPDR[63:32] */
-#define GCDR2          __REG(0x40E00428) /* Bit-wise Clear of GPDR[95:64] */
-#define GCDR3          __REG(0x40E0042C) /* Bit-wise Clear of GPDR[127:96] */
-
-#define GSRER0         __REG(0x40E00440) /* Set Rising Edge Det. Enable [31:0] */
-#define GSRER1         __REG(0x40E00444) /* Set Rising Edge Det. Enable [63:32] */
-#define GSRER2         __REG(0x40E00448) /* Set Rising Edge Det. Enable [95:64] */
-#define GSRER3         __REG(0x40E0044C) /* Set Rising Edge Det. Enable [127:96] */
-
-#define GCRER0         __REG(0x40E00460) /* Clear Rising Edge Det. Enable [31:0] */
-#define GCRER1         __REG(0x40E00464) /* Clear Rising Edge Det. Enable [63:32] */
-#define GCRER2         __REG(0x40E00468) /* Clear Rising Edge Det. Enable [95:64] */
-#define GCRER3         __REG(0x40E0046C) /* Clear Rising Edge Det. Enable[127:96] */
-
-#define GSFER0         __REG(0x40E00480) /* Set Falling Edge Det. Enable [31:0] */
-#define GSFER1         __REG(0x40E00484) /* Set Falling Edge Det. Enable [63:32] */
-#define GSFER2         __REG(0x40E00488) /* Set Falling Edge Det. Enable [95:64] */
-#define GSFER3         __REG(0x40E0048C) /* Set Falling Edge Det. Enable[127:96] */
-
-#define GCFER0         __REG(0x40E004A0) /* Clr Falling Edge Det. Enable [31:0] */
-#define GCFER1         __REG(0x40E004A4) /* Clr Falling Edge Det. Enable [63:32] */
-#define GCFER2         __REG(0x40E004A8) /* Clr Falling Edge Det. Enable [95:64] */
-#define GCFER3         __REG(0x40E004AC) /* Clr Falling Edge Det. Enable[127:96] */
-
-#define GSDR(x)                __REG2(0x40E00400, ((x) & 0x60) >> 3)
-#define GCDR(x)                __REG2(0x40E00420, ((x) & 0x60) >> 3)
-
-/* Multi-funktion Pin Registers, uncomplete, only:
- *    - GPIO
- *    - Data Flash DF_* pins defined.
+#define GSDR0          0x40E00400 /* Bit-wise Set of GPDR[31:0] */
+#define GSDR1          0x40E00404 /* Bit-wise Set of GPDR[63:32] */
+#define GSDR2          0x40E00408 /* Bit-wise Set of GPDR[95:64] */
+#define GSDR3          0x40E0040C /* Bit-wise Set of GPDR[127:96] */
+
+#define GCDR0          0x40E00420 /* Bit-wise Clear of GPDR[31:0] */
+#define GCDR1          0x40E00424 /* Bit-wise Clear of GPDR[63:32] */
+#define GCDR2          0x40E00428 /* Bit-wise Clear of GPDR[95:64] */
+#define GCDR3          0x40E0042C /* Bit-wise Clear of GPDR[127:96] */
+
+#define GSRER0         0x40E00440 /* Set Rising Edge Det. Enable [31:0] */
+#define GSRER1         0x40E00444 /* Set Rising Edge Det. Enable [63:32] */
+#define GSRER2         0x40E00448 /* Set Rising Edge Det. Enable [95:64] */
+#define GSRER3         0x40E0044C /* Set Rising Edge Det. Enable [127:96] */
+
+#define GCRER0         0x40E00460 /* Clear Rising Edge Det. Enable [31:0] */
+#define GCRER1         0x40E00464 /* Clear Rising Edge Det. Enable [63:32] */
+#define GCRER2         0x40E00468 /* Clear Rising Edge Det. Enable [95:64] */
+#define GCRER3         0x40E0046C /* Clear Rising Edge Det. Enable[127:96] */
+
+#define GSFER0         0x40E00480 /* Set Falling Edge Det. Enable [31:0] */
+#define GSFER1         0x40E00484 /* Set Falling Edge Det. Enable [63:32] */
+#define GSFER2         0x40E00488 /* Set Falling Edge Det. Enable [95:64] */
+#define GSFER3         0x40E0048C /* Set Falling Edge Det. Enable[127:96] */
+
+#define GCFER0         0x40E004A0 /* Clr Falling Edge Det. Enable [31:0] */
+#define GCFER1         0x40E004A4 /* Clr Falling Edge Det. Enable [63:32] */
+#define GCFER2         0x40E004A8 /* Clr Falling Edge Det. Enable [95:64] */
+#define GCFER3         0x40E004AC /* Clr Falling Edge Det. Enable[127:96] */
+
+#define GSDR(x)                (0x40E00400 | ((x) & 0x60) >> 3)
+#define GCDR(x)                (0x40E00420 | ((x) & 0x60) >> 3)
+#endif
+
+#define _GPLR(x)       (0x40E00000 + (((x) & 0x60) >> 3))
+#define _GPDR(x)       (0x40E0000C + (((x) & 0x60) >> 3))
+#define _GPSR(x)       (0x40E00018 + (((x) & 0x60) >> 3))
+#define _GPCR(x)       (0x40E00024 + (((x) & 0x60) >> 3))
+#define _GRER(x)       (0x40E00030 + (((x) & 0x60) >> 3))
+#define _GFER(x)       (0x40E0003C + (((x) & 0x60) >> 3))
+#define _GEDR(x)       (0x40E00048 + (((x) & 0x60) >> 3))
+#define _GAFR(x)       (0x40E00054 + (((x) & 0x70) >> 2))
+
+#if defined(CONFIG_PXA27X) || defined(CONFIG_CPU_MONAHANS)
+#define GPLR(x)                (((((x) & 0x7f) < 96) ? _GPLR(x) : GPLR3))
+#define GPDR(x)                (((((x) & 0x7f) < 96) ? _GPDR(x) : GPDR3))
+#define GPSR(x)                (((((x) & 0x7f) < 96) ? _GPSR(x) : GPSR3))
+#define GPCR(x)                (((((x) & 0x7f) < 96) ? _GPCR(x) : GPCR3))
+#define GRER(x)                (((((x) & 0x7f) < 96) ? _GRER(x) : GRER3))
+#define GFER(x)                (((((x) & 0x7f) < 96) ? _GFER(x) : GFER3))
+#define GEDR(x)                (((((x) & 0x7f) < 96) ? _GEDR(x) : GEDR3))
+#define GAFR(x)                (((((x) & 0x7f) < 96) ? _GAFR(x) : \
+                       ((((x) & 0x7f) < 112) ? GAFR3_L : GAFR3_U)))
+#else
+#define GPLR(x)                _GPLR(x)
+#define GPDR(x)                _GPDR(x)
+#define GPSR(x)                _GPSR(x)
+#define GPCR(x)                _GPCR(x)
+#define GRER(x)                _GRER(x)
+#define GFER(x)                _GFER(x)
+#define GEDR(x)                _GEDR(x)
+#define GAFR(x)                _GAFR(x)
+#endif
+
+#define GPIO_bit(x)    (1 << ((x) & 0x1f))
+
+/******************************************************************************/
+/*
+ * Multi-function Pin Registers:
  */
-#define GPIO0          __REG(0x40e10124)
-#define GPIO1          __REG(0x40e10128)
-#define GPIO2          __REG(0x40e1012c)
-#define GPIO3          __REG(0x40e10130)
-#define GPIO4          __REG(0x40e10134)
-#define nXCVREN                __REG(0x40e10138)
-
-#define DF_CLE_NOE     __REG(0x40e10204)
-#define DF_ALE_WE1     __REG(0x40e10208)
-
-#define DF_SCLK_E      __REG(0x40e10210)
-#define nBE0           __REG(0x40e10214)
-#define nBE1           __REG(0x40e10218)
-#define DF_ALE_WE2     __REG(0x40e1021c)
-#define DF_INT_RnB     __REG(0x40e10220)
-#define DF_nCS0                __REG(0x40e10224)
-#define DF_nCS1                __REG(0x40e10228)
-#define DF_nWE         __REG(0x40e1022c)
-#define DF_nRE         __REG(0x40e10230)
-#define nLUA           __REG(0x40e10234)
-#define nLLA           __REG(0x40e10238)
-#define DF_ADDR0       __REG(0x40e1023c)
-#define DF_ADDR1       __REG(0x40e10240)
-#define DF_ADDR2       __REG(0x40e10244)
-#define DF_ADDR3       __REG(0x40e10248)
-#define DF_IO0         __REG(0x40e1024c)
-#define DF_IO8         __REG(0x40e10250)
-#define DF_IO1         __REG(0x40e10254)
-#define DF_IO9         __REG(0x40e10258)
-#define DF_IO2         __REG(0x40e1025c)
-#define DF_IO10                __REG(0x40e10260)
-#define DF_IO3         __REG(0x40e10264)
-#define DF_IO11                __REG(0x40e10268)
-#define DF_IO4         __REG(0x40e1026c)
-#define DF_IO12                __REG(0x40e10270)
-#define DF_IO5         __REG(0x40e10274)
-#define DF_IO13                __REG(0x40e10278)
-#define DF_IO6         __REG(0x40e1027c)
-#define DF_IO14                __REG(0x40e10280)
-#define DF_IO7         __REG(0x40e10284)
-#define DF_IO15                __REG(0x40e10288)
-
-#define GPIO5          __REG(0x40e1028c)
-#define GPIO6          __REG(0x40e10290)
-#define GPIO7          __REG(0x40e10294)
-#define GPIO8          __REG(0x40e10298)
-#define GPIO9          __REG(0x40e1029c)
-
-#define GPIO11         __REG(0x40e102a0)
-#define GPIO12         __REG(0x40e102a4)
-#define GPIO13         __REG(0x40e102a8)
-#define GPIO14         __REG(0x40e102ac)
-#define GPIO15         __REG(0x40e102b0)
-#define GPIO16         __REG(0x40e102b4)
-#define GPIO17         __REG(0x40e102b8)
-#define GPIO18         __REG(0x40e102bc)
-#define GPIO19         __REG(0x40e102c0)
-#define GPIO20         __REG(0x40e102c4)
-#define GPIO21         __REG(0x40e102c8)
-#define GPIO22         __REG(0x40e102cc)
-#define GPIO23         __REG(0x40e102d0)
-#define GPIO24         __REG(0x40e102d4)
-#define GPIO25         __REG(0x40e102d8)
-#define GPIO26         __REG(0x40e102dc)
-
-#define GPIO27         __REG(0x40e10400)
-#define GPIO28         __REG(0x40e10404)
-#define GPIO29         __REG(0x40e10408)
-#define GPIO30         __REG(0x40e1040c)
-#define GPIO31         __REG(0x40e10410)
-#define GPIO32         __REG(0x40e10414)
-#define GPIO33         __REG(0x40e10418)
-#define GPIO34         __REG(0x40e1041c)
-#define GPIO35         __REG(0x40e10420)
-#define GPIO36         __REG(0x40e10424)
-#define GPIO37         __REG(0x40e10428)
-#define GPIO38         __REG(0x40e1042c)
-#define GPIO39         __REG(0x40e10430)
-#define GPIO40         __REG(0x40e10434)
-#define GPIO41         __REG(0x40e10438)
-#define GPIO42         __REG(0x40e1043c)
-#define GPIO43         __REG(0x40e10440)
-#define GPIO44         __REG(0x40e10444)
-#define GPIO45         __REG(0x40e10448)
-#define GPIO46         __REG(0x40e1044c)
-#define GPIO47         __REG(0x40e10450)
-#define GPIO48         __REG(0x40e10454)
-
-#define GPIO10         __REG(0x40e10458)
-
-#define GPIO49         __REG(0x40e1045c)
-#define GPIO50         __REG(0x40e10460)
-#define GPIO51         __REG(0x40e10464)
-#define GPIO52         __REG(0x40e10468)
-#define GPIO53         __REG(0x40e1046c)
-#define GPIO54         __REG(0x40e10470)
-#define GPIO55         __REG(0x40e10474)
-#define GPIO56         __REG(0x40e10478)
-#define GPIO57         __REG(0x40e1047c)
-#define GPIO58         __REG(0x40e10480)
-#define GPIO59         __REG(0x40e10484)
-#define GPIO60         __REG(0x40e10488)
-#define GPIO61         __REG(0x40e1048c)
-#define GPIO62         __REG(0x40e10490)
-
-#define GPIO6_2                __REG(0x40e10494)
-#define GPIO7_2                __REG(0x40e10498)
-#define GPIO8_2                __REG(0x40e1049c)
-#define GPIO9_2                __REG(0x40e104a0)
-#define GPIO10_2       __REG(0x40e104a4)
-#define GPIO11_2       __REG(0x40e104a8)
-#define GPIO12_2       __REG(0x40e104ac)
-#define GPIO13_2       __REG(0x40e104b0)
-
-#define GPIO63         __REG(0x40e104b4)
-#define GPIO64         __REG(0x40e104b8)
-#define GPIO65         __REG(0x40e104bc)
-#define GPIO66         __REG(0x40e104c0)
-#define GPIO67         __REG(0x40e104c4)
-#define GPIO68         __REG(0x40e104c8)
-#define GPIO69         __REG(0x40e104cc)
-#define GPIO70         __REG(0x40e104d0)
-#define GPIO71         __REG(0x40e104d4)
-#define GPIO72         __REG(0x40e104d8)
-#define GPIO73         __REG(0x40e104dc)
-
-#define GPIO14_2       __REG(0x40e104e0)
-#define GPIO15_2       __REG(0x40e104e4)
-#define GPIO16_2       __REG(0x40e104e8)
-#define GPIO17_2       __REG(0x40e104ec)
-
-#define GPIO74         __REG(0x40e104f0)
-#define GPIO75         __REG(0x40e104f4)
-#define GPIO76         __REG(0x40e104f8)
-#define GPIO77         __REG(0x40e104fc)
-#define GPIO78         __REG(0x40e10500)
-#define GPIO79         __REG(0x40e10504)
-#define GPIO80         __REG(0x40e10508)
-#define GPIO81         __REG(0x40e1050c)
-#define GPIO82         __REG(0x40e10510)
-#define GPIO83         __REG(0x40e10514)
-#define GPIO84         __REG(0x40e10518)
-#define GPIO85         __REG(0x40e1051c)
-#define GPIO86         __REG(0x40e10520)
-#define GPIO87         __REG(0x40e10524)
-#define GPIO88         __REG(0x40e10528)
-#define GPIO89         __REG(0x40e1052c)
-#define GPIO90         __REG(0x40e10530)
-#define GPIO91         __REG(0x40e10534)
-#define GPIO92         __REG(0x40e10538)
-#define GPIO93         __REG(0x40e1053c)
-#define GPIO94         __REG(0x40e10540)
-#define GPIO95         __REG(0x40e10544)
-#define GPIO96         __REG(0x40e10548)
-#define GPIO97         __REG(0x40e1054c)
-#define GPIO98         __REG(0x40e10550)
-
-#define GPIO99         __REG(0x40e10600)
-#define GPIO100                __REG(0x40e10604)
-#define GPIO101                __REG(0x40e10608)
-#define GPIO102                __REG(0x40e1060c)
-#define GPIO103                __REG(0x40e10610)
-#define GPIO104                __REG(0x40e10614)
-#define GPIO105                __REG(0x40e10618)
-#define GPIO106                __REG(0x40e1061c)
-#define GPIO107                __REG(0x40e10620)
-#define GPIO108                __REG(0x40e10624)
-#define GPIO109                __REG(0x40e10628)
-#define GPIO110                __REG(0x40e1062c)
-#define GPIO111                __REG(0x40e10630)
-#define GPIO112                __REG(0x40e10634)
-
-#define GPIO113                __REG(0x40e10638)
-#define GPIO114                __REG(0x40e1063c)
-#define GPIO115                __REG(0x40e10640)
-#define GPIO116                __REG(0x40e10644)
-#define GPIO117                __REG(0x40e10648)
-#define GPIO118                __REG(0x40e1064c)
-#define GPIO119                __REG(0x40e10650)
-#define GPIO120                __REG(0x40e10654)
-#define GPIO121                __REG(0x40e10658)
-#define GPIO122                __REG(0x40e1065c)
-#define GPIO123                __REG(0x40e10660)
-#define GPIO124                __REG(0x40e10664)
-#define GPIO125                __REG(0x40e10668)
-#define GPIO126                __REG(0x40e1066c)
-#define GPIO127                __REG(0x40e10670)
-
-#define GPIO0_2                __REG(0x40e10674)
-#define GPIO1_2                __REG(0x40e10678)
-#define GPIO2_2                __REG(0x40e1067c)
-#define GPIO3_2                __REG(0x40e10680)
-#define GPIO4_2                __REG(0x40e10684)
-#define GPIO5_2                __REG(0x40e10688)
+/* PXA320 */
+#if defined(CONFIG_CPU_PXA320)
+#define        DF_IO0          0x40e1024c
+#define        DF_IO1          0x40e10254
+#define        DF_IO2          0x40e1025c
+#define        DF_IO3          0x40e10264
+#define        DF_IO4          0x40e1026c
+#define        DF_IO5          0x40e10274
+#define        DF_IO6          0x40e1027c
+#define        DF_IO7          0x40e10284
+#define        DF_IO8          0x40e10250
+#define        DF_IO9          0x40e10258
+#define        DF_IO10         0x40e10260
+#define        DF_IO11         0x40e10268
+#define        DF_IO12         0x40e10270
+#define        DF_IO13         0x40e10278
+#define        DF_IO14         0x40e10280
+#define        DF_IO15         0x40e10288
+#define        DF_CLE_nOE      0x40e10204
+#define        DF_ALE_nWE1     0x40e10208
+#define        DF_ALE_nWE2     0x40e1021c
+#define        DF_SCLK_E       0x40e10210
+#define        DF_nCS0         0x40e10224
+#define        DF_nCS1         0x40e10228
+#define        nBE0            0x40e10214
+#define        nBE1            0x40e10218
+#define        nLUA            0x40e10234
+#define        nLLA            0x40e10238
+#define        DF_ADDR0        0x40e1023c
+#define        DF_ADDR1        0x40e10240
+#define        DF_ADDR2        0x40e10244
+#define        DF_ADDR3        0x40e10248
+#define        DF_INT_RnB      0x40e10220
+#define        DF_nCS0         0x40e10224
+#define        DF_nCS1         0x40e10228
+#define        DF_nWE          0x40e1022c
+#define        DF_nRE          0x40e10230
+
+#define        nXCVREN         0x40e10138
+
+#define        GPIO0           0x40e10124
+#define        GPIO1           0x40e10128
+#define        GPIO2           0x40e1012c
+#define        GPIO3           0x40e10130
+#define        GPIO4           0x40e10134
+#define        GPIO5           0x40e1028c
+#define        GPIO6           0x40e10290
+#define        GPIO7           0x40e10294
+#define        GPIO8           0x40e10298
+#define        GPIO9           0x40e1029c
+#define        GPIO10          0x40e10458
+#define        GPIO11          0x40e102a0
+#define        GPIO12          0x40e102a4
+#define        GPIO13          0x40e102a8
+#define        GPIO14          0x40e102ac
+#define        GPIO15          0x40e102b0
+#define        GPIO16          0x40e102b4
+#define        GPIO17          0x40e102b8
+#define        GPIO18          0x40e102bc
+#define        GPIO19          0x40e102c0
+#define        GPIO20          0x40e102c4
+#define        GPIO21          0x40e102c8
+#define        GPIO22          0x40e102cc
+#define        GPIO23          0x40e102d0
+#define        GPIO24          0x40e102d4
+#define        GPIO25          0x40e102d8
+#define        GPIO26          0x40e102dc
+
+#define        GPIO27          0x40e10400
+#define        GPIO28          0x40e10404
+#define        GPIO29          0x40e10408
+#define        GPIO30          0x40e1040c
+#define        GPIO31          0x40e10410
+#define        GPIO32          0x40e10414
+#define        GPIO33          0x40e10418
+#define        GPIO34          0x40e1041c
+#define        GPIO35          0x40e10420
+#define        GPIO36          0x40e10424
+#define        GPIO37          0x40e10428
+#define        GPIO38          0x40e1042c
+#define        GPIO39          0x40e10430
+#define        GPIO40          0x40e10434
+#define        GPIO41          0x40e10438
+#define        GPIO42          0x40e1043c
+#define        GPIO43          0x40e10440
+#define        GPIO44          0x40e10444
+#define        GPIO45          0x40e10448
+#define        GPIO46          0x40e1044c
+#define        GPIO47          0x40e10450
+#define        GPIO48          0x40e10454
+#define        GPIO49          0x40e1045c
+#define        GPIO50          0x40e10460
+#define        GPIO51          0x40e10464
+#define        GPIO52          0x40e10468
+#define        GPIO53          0x40e1046c
+#define        GPIO54          0x40e10470
+#define        GPIO55          0x40e10474
+#define        GPIO56          0x40e10478
+#define        GPIO57          0x40e1047c
+#define        GPIO58          0x40e10480
+#define        GPIO59          0x40e10484
+#define        GPIO60          0x40e10488
+#define        GPIO61          0x40e1048c
+#define        GPIO62          0x40e10490
+
+#define        GPIO6_2         0x40e10494
+#define        GPIO7_2         0x40e10498
+#define        GPIO8_2         0x40e1049c
+#define        GPIO9_2         0x40e104a0
+#define        GPIO10_2        0x40e104a4
+#define        GPIO11_2        0x40e104a8
+#define        GPIO12_2        0x40e104ac
+#define        GPIO13_2        0x40e104b0
+
+#define        GPIO63          0x40e104b4
+#define        GPIO64          0x40e104b8
+#define        GPIO65          0x40e104bc
+#define        GPIO66          0x40e104c0
+#define        GPIO67          0x40e104c4
+#define        GPIO68          0x40e104c8
+#define        GPIO69          0x40e104cc
+#define        GPIO70          0x40e104d0
+#define        GPIO71          0x40e104d4
+#define        GPIO72          0x40e104d8
+#define        GPIO73          0x40e104dc
+
+#define        GPIO14_2        0x40e104e0
+#define        GPIO15_2        0x40e104e4
+#define        GPIO16_2        0x40e104e8
+#define        GPIO17_2        0x40e104ec
+
+#define        GPIO74          0x40e104f0
+#define        GPIO75          0x40e104f4
+#define        GPIO76          0x40e104f8
+#define        GPIO77          0x40e104fc
+#define        GPIO78          0x40e10500
+#define        GPIO79          0x40e10504
+#define        GPIO80          0x40e10508
+#define        GPIO81          0x40e1050c
+#define        GPIO82          0x40e10510
+#define        GPIO83          0x40e10514
+#define        GPIO84          0x40e10518
+#define        GPIO85          0x40e1051c
+#define        GPIO86          0x40e10520
+#define        GPIO87          0x40e10524
+#define        GPIO88          0x40e10528
+#define        GPIO89          0x40e1052c
+#define        GPIO90          0x40e10530
+#define        GPIO91          0x40e10534
+#define        GPIO92          0x40e10538
+#define        GPIO93          0x40e1053c
+#define        GPIO94          0x40e10540
+#define        GPIO95          0x40e10544
+#define        GPIO96          0x40e10548
+#define        GPIO97          0x40e1054c
+#define        GPIO98          0x40e10550
+
+#define        GPIO99          0x40e10600
+#define        GPIO100         0x40e10604
+#define        GPIO101         0x40e10608
+#define        GPIO102         0x40e1060c
+#define        GPIO103         0x40e10610
+#define        GPIO104         0x40e10614
+#define        GPIO105         0x40e10618
+#define        GPIO106         0x40e1061c
+#define        GPIO107         0x40e10620
+#define        GPIO108         0x40e10624
+#define        GPIO109         0x40e10628
+#define        GPIO110         0x40e1062c
+#define        GPIO111         0x40e10630
+#define        GPIO112         0x40e10634
+
+#define        GPIO113         0x40e10638
+#define        GPIO114         0x40e1063c
+#define        GPIO115         0x40e10640
+#define        GPIO116         0x40e10644
+#define        GPIO117         0x40e10648
+#define        GPIO118         0x40e1064c
+#define        GPIO119         0x40e10650
+#define        GPIO120         0x40e10654
+#define        GPIO121         0x40e10658
+#define        GPIO122         0x40e1065c
+#define        GPIO123         0x40e10660
+#define        GPIO124         0x40e10664
+#define        GPIO125         0x40e10668
+#define        GPIO126         0x40e1066c
+#define        GPIO127         0x40e10670
+
+#define        GPIO0_2         0x40e10674
+#define        GPIO1_2         0x40e10678
+#define        GPIO2_2         0x40e1067c
+#define        GPIO3_2         0x40e10680
+#define        GPIO4_2         0x40e10684
+#define        GPIO5_2         0x40e10688
+
+/* PXA300 and PXA310 */
+#elif  defined(CONFIG_CPU_PXA300) || defined(CONFIG_CPU_PXA310)
+#define        DF_IO0          0x40e10220
+#define        DF_IO1          0x40e10228
+#define        DF_IO2          0x40e10230
+#define        DF_IO3          0x40e10238
+#define        DF_IO4          0x40e10258
+#define        DF_IO5          0x40e10260
+#define        DF_IO7          0x40e10270
+#define        DF_IO6          0x40e10268
+#define        DF_IO8          0x40e10224
+#define        DF_IO9          0x40e1022c
+#define        DF_IO10         0x40e10234
+#define        DF_IO11         0x40e1023c
+#define        DF_IO12         0x40e1025c
+#define        DF_IO13         0x40e10264
+#define        DF_IO14         0x40e1026c
+#define        DF_IO15         0x40e10274
+#define        DF_CLE_NOE      0x40e10240
+#define        DF_ALE_nWE      0x40e1020c
+#define        DF_SCLK_E       0x40e10250
+#define        nCS0            0x40e100c4
+#define        nCS1            0x40e100c0
+#define        nBE0            0x40e10204
+#define        nBE1            0x40e10208
+#define        nLUA            0x40e10244
+#define        nLLA            0x40e10254
+#define        DF_ADDR0        0x40e10210
+#define        DF_ADDR1        0x40e10214
+#define        DF_ADDR2        0x40e10218
+#define        DF_ADDR3        0x40e1021c
+#define        DF_INT_RnB      0x40e100c8
+#define        DF_nCS0         0x40e10248
+#define        DF_nCS1         0x40e10278
+#define        DF_nWE          0x40e100cc
+#define        DF_nRE          0x40e10200
+
+#define        GPIO0           0x40e100b4
+#define        GPIO1           0x40e100b8
+#define        GPIO2           0x40e100bc
+#define        GPIO3           0x40e1027c
+#define        GPIO4           0x40e10280
+
+#define        GPIO5           0x40e10284
+#define        GPIO6           0x40e10288
+#define        GPIO7           0x40e1028c
+#define        GPIO8           0x40e10290
+#define        GPIO9           0x40e10294
+#define        GPIO10          0x40e10298
+#define        GPIO11          0x40e1029c
+#define        GPIO12          0x40e102a0
+#define        GPIO13          0x40e102a4
+#define        GPIO14          0x40e102a8
+#define        GPIO15          0x40e102ac
+#define        GPIO16          0x40e102b0
+#define        GPIO17          0x40e102b4
+#define        GPIO18          0x40e102b8
+#define        GPIO19          0x40e102bc
+#define        GPIO20          0x40e102c0
+#define        GPIO21          0x40e102c4
+#define        GPIO22          0x40e102c8
+#define        GPIO23          0x40e102cc
+#define        GPIO24          0x40e102d0
+#define        GPIO25          0x40e102d4
+#define        GPIO26          0x40e102d8
+
+#define        GPIO27          0x40e10400
+#define        GPIO28          0x40e10404
+#define        GPIO29          0x40e10408
+#define        ULPI_STP        0x40e1040c
+#define        ULPI_NXT        0x40e10410
+#define        ULPI_DIR        0x40e10414
+#define        GPIO30          0x40e10418
+#define        GPIO31          0x40e1041c
+#define        GPIO32          0x40e10420
+#define        GPIO33          0x40e10424
+#define        GPIO34          0x40e10428
+#define        GPIO35          0x40e1042c
+#define        GPIO36          0x40e10430
+#define        GPIO37          0x40e10434
+#define        GPIO38          0x40e10438
+#define        GPIO39          0x40e1043c
+#define        GPIO40          0x40e10440
+#define        GPIO41          0x40e10444
+#define        GPIO42          0x40e10448
+#define        GPIO43          0x40e1044c
+#define        GPIO44          0x40e10450
+#define        GPIO45          0x40e10454
+#define        GPIO46          0x40e10458
+#define        GPIO47          0x40e1045c
+#define        GPIO48          0x40e10460
+
+#define        GPIO49          0x40e10464
+#define        GPIO50          0x40e10468
+#define        GPIO51          0x40e1046c
+#define        GPIO52          0x40e10470
+#define        GPIO53          0x40e10474
+#define        GPIO54          0x40e10478
+#define        GPIO55          0x40e1047c
+#define        GPIO56          0x40e10480
+#define        GPIO57          0x40e10484
+#define        GPIO58          0x40e10488
+#define        GPIO59          0x40e1048c
+#define        GPIO60          0x40e10490
+#define        GPIO61          0x40e10494
+#define        GPIO62          0x40e10498
+#define        GPIO63          0x40e1049c
+#define        GPIO64          0x40e104a0
+#define        GPIO65          0x40e104a4
+#define        GPIO66          0x40e104a8
+#define        GPIO67          0x40e104ac
+#define        GPIO68          0x40e104b0
+#define        GPIO69          0x40e104b4
+#define        GPIO70          0x40e104b8
+#define        GPIO71          0x40e104bc
+#define        GPIO72          0x40e104c0
+#define        GPIO73          0x40e104c4
+#define        GPIO74          0x40e104c8
+#define        GPIO75          0x40e104cc
+#define        GPIO76          0x40e104d0
+#define        GPIO77          0x40e104d4
+#define        GPIO78          0x40e104d8
+#define        GPIO79          0x40e104dc
+#define        GPIO80          0x40e104e0
+#define        GPIO81          0x40e104e4
+#define        GPIO82          0x40e104e8
+#define        GPIO83          0x40e104ec
+#define        GPIO84          0x40e104f0
+#define        GPIO85          0x40e104f4
+#define        GPIO86          0x40e104f8
+#define        GPIO87          0x40e104fc
+#define        GPIO88          0x40e10500
+#define        GPIO89          0x40e10504
+#define        GPIO90          0x40e10508
+#define        GPIO91          0x40e1050c
+#define        GPIO92          0x40e10510
+#define        GPIO93          0x40e10514
+#define        GPIO94          0x40e10518
+#define        GPIO95          0x40e1051c
+#define        GPIO96          0x40e10520
+#define        GPIO97          0x40e10524
+#define        GPIO98          0x40e10528
+
+#define        GPIO99          0x40e10600
+#define        GPIO100         0x40e10604
+#define        GPIO101         0x40e10608
+#define        GPIO102         0x40e1060c
+#define        GPIO103         0x40e10610
+#define        GPIO104         0x40e10614
+#define        GPIO105         0x40e10618
+#define        GPIO106         0x40e1061c
+#define        GPIO107         0x40e10620
+#define        GPIO108         0x40e10624
+#define        GPIO109         0x40e10628
+#define        GPIO110         0x40e1062c
+#define        GPIO111         0x40e10630
+#define        GPIO112         0x40e10634
+
+#define        GPIO113         0x40e10638
+#define        GPIO114         0x40e1063c
+#define        GPIO115         0x40e10640
+#define        GPIO116         0x40e10644
+#define        GPIO117         0x40e10648
+#define        GPIO118         0x40e1064c
+#define        GPIO119         0x40e10650
+#define        GPIO120         0x40e10654
+#define        GPIO121         0x40e10658
+#define        GPIO122         0x40e1065c
+#define        GPIO123         0x40e10660
+#define        GPIO124         0x40e10664
+#define        GPIO125         0x40e10668
+#define        GPIO126         0x40e1066c
+#define        GPIO127         0x40e10670
+
+#define        GPIO0_2         0x40e10674
+#define        GPIO1_2         0x40e10678
+#define        GPIO2_2         0x40e102dc
+#define        GPIO3_2         0x40e102e0
+#define        GPIO4_2         0x40e102e4
+#define        GPIO5_2         0x40e102e8
+#define        GPIO6_2         0x40e102ec
+
+#ifndef        CONFIG_CPU_PXA300       /* PXA310 only */
+#define        GPIO7_2         0x40e1052c
+#define        GPIO8_2         0x40e10530
+#define        GPIO9_2         0x40e10534
+#define        GPIO10_2        0x40e10538
+#endif
+#endif
 
+#ifdef CONFIG_CPU_MONAHANS
 /* MFPR Bit Definitions, see 4-10, Vol. 1 */
 #define PULL_SEL       0x8000
 #define PULLUP_EN      0x4000
@@ -1470,62 +1854,8 @@ typedef void             (*ExcpHndlr) (void) ;
 #define AF_SEL_6       0x6     /* Alternate function 6 */
 #define AF_SEL_7       0x7     /* Alternate function 7 */
 
-
-#else /* CONFIG_CPU_MONAHANS */
-
-#define GAFR0_L                __REG(0x40E00054)  /* GPIO Alternate Function Select Register GPIO<15:0> */
-#define GAFR0_U                __REG(0x40E00058)  /* GPIO Alternate Function Select Register GPIO<31:16> */
-#define GAFR1_L                __REG(0x40E0005C)  /* GPIO Alternate Function Select Register GPIO<47:32> */
-#define GAFR1_U                __REG(0x40E00060)  /* GPIO Alternate Function Select Register GPIO<63:48> */
-#define GAFR2_L                __REG(0x40E00064)  /* GPIO Alternate Function Select Register GPIO<79:64> */
-#define GAFR2_U                __REG(0x40E00068)  /* GPIO Alternate Function Select Register GPIO 80 */
 #endif /* CONFIG_CPU_MONAHANS */
 
-/* More handy macros.  The argument is a literal GPIO number. */
-
-#define GPIO_bit(x)    (1 << ((x) & 0x1f))
-
-#ifdef CONFIG_PXA27X
-
-/* Interrupt Controller */
-
-#define ICIP2          __REG(0x40D0009C)  /* Interrupt Controller IRQ Pending Register 2 */
-#define ICMR2          __REG(0x40D000A0)  /* Interrupt Controller Mask Register 2 */
-#define ICLR2          __REG(0x40D000A4)  /* Interrupt Controller Level Register 2 */
-#define ICFP2          __REG(0x40D000A8)  /* Interrupt Controller FIQ Pending Register 2 */
-#define ICPR2          __REG(0x40D000AC)  /* Interrupt Controller Pending Register 2 */
-
-#define _GPLR(x)       __REG2(0x40E00000, ((x) & 0x60) >> 3)
-#define _GPDR(x)       __REG2(0x40E0000C, ((x) & 0x60) >> 3)
-#define _GPSR(x)       __REG2(0x40E00018, ((x) & 0x60) >> 3)
-#define _GPCR(x)       __REG2(0x40E00024, ((x) & 0x60) >> 3)
-#define _GRER(x)       __REG2(0x40E00030, ((x) & 0x60) >> 3)
-#define _GFER(x)       __REG2(0x40E0003C, ((x) & 0x60) >> 3)
-#define _GEDR(x)       __REG2(0x40E00048, ((x) & 0x60) >> 3)
-#define _GAFR(x)       __REG2(0x40E00054, ((x) & 0x70) >> 2)
-
-#define GPLR(x)                (*((((x) & 0x7f) < 96) ? &_GPLR(x) : &GPLR3))
-#define GPDR(x)                (*((((x) & 0x7f) < 96) ? &_GPDR(x) : &GPDR3))
-#define GPSR(x)                (*((((x) & 0x7f) < 96) ? &_GPSR(x) : &GPSR3))
-#define GPCR(x)                (*((((x) & 0x7f) < 96) ? &_GPCR(x) : &GPCR3))
-#define GRER(x)                (*((((x) & 0x7f) < 96) ? &_GRER(x) : &GRER3))
-#define GFER(x)                (*((((x) & 0x7f) < 96) ? &_GFER(x) : &GFER3))
-#define GEDR(x)                (*((((x) & 0x7f) < 96) ? &_GEDR(x) : &GEDR3))
-#define GAFR(x)                (*((((x) & 0x7f) < 96) ? &_GAFR(x) : \
-                       ((((x) & 0x7f) < 112) ? &GAFR3_L : &GAFR3_U)))
-#else
-
-#define GPLR(x)                __REG2(0x40E00000, ((x) & 0x60) >> 3)
-#define GPDR(x)                __REG2(0x40E0000C, ((x) & 0x60) >> 3)
-#define GPSR(x)                __REG2(0x40E00018, ((x) & 0x60) >> 3)
-#define GPCR(x)                __REG2(0x40E00024, ((x) & 0x60) >> 3)
-#define GRER(x)                __REG2(0x40E00030, ((x) & 0x60) >> 3)
-#define GFER(x)                __REG2(0x40E0003C, ((x) & 0x60) >> 3)
-#define GEDR(x)                __REG2(0x40E00048, ((x) & 0x60) >> 3)
-#define GAFR(x)                __REG2(0x40E00054, ((x) & 0x70) >> 2)
-
-#endif
-
 /* GPIO alternate function assignments */
 
 #define GPIO1_RST              1       /* reset */
@@ -1732,63 +2062,63 @@ typedef void            (*ExcpHndlr) (void) ;
  */
 #ifdef CONFIG_CPU_MONAHANS
 
-#define ASCR           __REG(0x40F40000)  /* Application Subsystem Power Status/Control Register */
-#define ARSR           __REG(0x40F40004)  /* Application Subsystem Reset Status Register */
-#define AD3ER          __REG(0x40F40008)  /* Application Subsystem D3 state Wakeup Enable Register */
-#define AD3SR          __REG(0x40F4000C)  /* Application Subsystem D3 state Wakeup Status Register */
-#define AD2D0ER                __REG(0x40F40010)  /* Application Subsystem D2 to D0 state Wakeup Enable Register */
-#define AD2D0SR                __REG(0x40F40014)  /* Application Subsystem D2 to D0 state Wakeup Status Register */
-#define AD2D1ER                __REG(0x40F40018)  /* Application Subsystem D2 to D1 state Wakeup Enable Register */
-#define AD2D1SR                __REG(0x40F4001C)  /* Application Subsystem D2 to D1 state Wakeup Status Register */
-#define AD1D0ER                __REG(0x40F40020)  /* Application Subsystem D1 to D0 state Wakeup Enable Register */
-#define AD1D0SR                __REG(0x40F40024)  /* Application Subsystem D1 to D0 state Wakeup Status Register */
-#define ASDCNT         __REG(0x40F40028)  /* Application Subsystem SRAM Drowsy Count Register */
-#define AD3R           __REG(0x40F40030)  /* Application Subsystem D3 State Configuration Register */
-#define AD2R           __REG(0x40F40034)  /* Application Subsystem D2 State Configuration Register */
-#define AD1R           __REG(0x40F40038)  /* Application Subsystem D1 State Configuration Register */
-
-#define PMCR           __REG(0x40F50000)  /* Power Manager Control Register */
-#define PSR            __REG(0x40F50004)  /* Power Manager S2 Status Register */
-#define PSPR           __REG(0x40F50008)  /* Power Manager Scratch Pad Register */
-#define PCFR           __REG(0x40F5000C)  /* Power Manager General Configuration Register */
-#define PWER           __REG(0x40F50010)  /* Power Manager Wake-up Enable Register */
-#define PWSR           __REG(0x40F50014)  /* Power Manager Wake-up Status Register */
-#define PECR           __REG(0x40F50018)  /* Power Manager EXT_WAKEUP[1:0] Control Register */
-#define DCDCSR         __REG(0x40F50080)  /* DC-DC Controller Status Register */
-#define PVCR           __REG(0x40F50100)  /* Power Manager Voltage Change Control Register */
-#define    PCMD(x) __REG(0x40F50110 + x*4)
-#define    PCMD0   __REG(0x40F50110 + 0 * 4)
-#define    PCMD1   __REG(0x40F50110 + 1 * 4)
-#define    PCMD2   __REG(0x40F50110 + 2 * 4)
-#define    PCMD3   __REG(0x40F50110 + 3 * 4)
-#define    PCMD4   __REG(0x40F50110 + 4 * 4)
-#define    PCMD5   __REG(0x40F50110 + 5 * 4)
-#define    PCMD6   __REG(0x40F50110 + 6 * 4)
-#define    PCMD7   __REG(0x40F50110 + 7 * 4)
-#define    PCMD8   __REG(0x40F50110 + 8 * 4)
-#define    PCMD9   __REG(0x40F50110 + 9 * 4)
-#define    PCMD10  __REG(0x40F50110 + 10 * 4)
-#define    PCMD11  __REG(0x40F50110 + 11 * 4)
-#define    PCMD12  __REG(0x40F50110 + 12 * 4)
-#define    PCMD13  __REG(0x40F50110 + 13 * 4)
-#define    PCMD14  __REG(0x40F50110 + 14 * 4)
-#define    PCMD15  __REG(0x40F50110 + 15 * 4)
-#define    PCMD16  __REG(0x40F50110 + 16 * 4)
-#define    PCMD17  __REG(0x40F50110 + 17 * 4)
-#define    PCMD18  __REG(0x40F50110 + 18 * 4)
-#define    PCMD19  __REG(0x40F50110 + 19 * 4)
-#define    PCMD20  __REG(0x40F50110 + 20 * 4)
-#define    PCMD21  __REG(0x40F50110 + 21 * 4)
-#define    PCMD22  __REG(0x40F50110 + 22 * 4)
-#define    PCMD23  __REG(0x40F50110 + 23 * 4)
-#define    PCMD24  __REG(0x40F50110 + 24 * 4)
-#define    PCMD25  __REG(0x40F50110 + 25 * 4)
-#define    PCMD26  __REG(0x40F50110 + 26 * 4)
-#define    PCMD27  __REG(0x40F50110 + 27 * 4)
-#define    PCMD28  __REG(0x40F50110 + 28 * 4)
-#define    PCMD29  __REG(0x40F50110 + 29 * 4)
-#define    PCMD30  __REG(0x40F50110 + 30 * 4)
-#define    PCMD31  __REG(0x40F50110 + 31 * 4)
+#define ASCR           0x40F40000  /* Application Subsystem Power Status/Control Register */
+#define ARSR           0x40F40004  /* Application Subsystem Reset Status Register */
+#define AD3ER          0x40F40008  /* Application Subsystem D3 state Wakeup Enable Register */
+#define AD3SR          0x40F4000C  /* Application Subsystem D3 state Wakeup Status Register */
+#define AD2D0ER                0x40F40010  /* Application Subsystem D2 to D0 state Wakeup Enable Register */
+#define AD2D0SR                0x40F40014  /* Application Subsystem D2 to D0 state Wakeup Status Register */
+#define AD2D1ER                0x40F40018  /* Application Subsystem D2 to D1 state Wakeup Enable Register */
+#define AD2D1SR                0x40F4001C  /* Application Subsystem D2 to D1 state Wakeup Status Register */
+#define AD1D0ER                0x40F40020  /* Application Subsystem D1 to D0 state Wakeup Enable Register */
+#define AD1D0SR                0x40F40024  /* Application Subsystem D1 to D0 state Wakeup Status Register */
+#define ASDCNT         0x40F40028  /* Application Subsystem SRAM Drowsy Count Register */
+#define AD3R           0x40F40030  /* Application Subsystem D3 State Configuration Register */
+#define AD2R           0x40F40034  /* Application Subsystem D2 State Configuration Register */
+#define AD1R           0x40F40038  /* Application Subsystem D1 State Configuration Register */
+
+#define PMCR           0x40F50000  /* Power Manager Control Register */
+#define PSR            0x40F50004  /* Power Manager S2 Status Register */
+#define PSPR           0x40F50008  /* Power Manager Scratch Pad Register */
+#define PCFR           0x40F5000C  /* Power Manager General Configuration Register */
+#define PWER           0x40F50010  /* Power Manager Wake-up Enable Register */
+#define PWSR           0x40F50014  /* Power Manager Wake-up Status Register */
+#define PECR           0x40F50018  /* Power Manager EXT_WAKEUP[1:0] Control Register */
+#define DCDCSR         0x40F50080  /* DC-DC Controller Status Register */
+#define PVCR           0x40F50100  /* Power Manager Voltage Change Control Register */
+#define    PCMD(x) (0x40F50110 + x*4)
+#define    PCMD0   (0x40F50110 + 0 * 4)
+#define    PCMD1   (0x40F50110 + 1 * 4)
+#define    PCMD2   (0x40F50110 + 2 * 4)
+#define    PCMD3   (0x40F50110 + 3 * 4)
+#define    PCMD4   (0x40F50110 + 4 * 4)
+#define    PCMD5   (0x40F50110 + 5 * 4)
+#define    PCMD6   (0x40F50110 + 6 * 4)
+#define    PCMD7   (0x40F50110 + 7 * 4)
+#define    PCMD8   (0x40F50110 + 8 * 4)
+#define    PCMD9   (0x40F50110 + 9 * 4)
+#define    PCMD10  (0x40F50110 + 10 * 4)
+#define    PCMD11  (0x40F50110 + 11 * 4)
+#define    PCMD12  (0x40F50110 + 12 * 4)
+#define    PCMD13  (0x40F50110 + 13 * 4)
+#define    PCMD14  (0x40F50110 + 14 * 4)
+#define    PCMD15  (0x40F50110 + 15 * 4)
+#define    PCMD16  (0x40F50110 + 16 * 4)
+#define    PCMD17  (0x40F50110 + 17 * 4)
+#define    PCMD18  (0x40F50110 + 18 * 4)
+#define    PCMD19  (0x40F50110 + 19 * 4)
+#define    PCMD20  (0x40F50110 + 20 * 4)
+#define    PCMD21  (0x40F50110 + 21 * 4)
+#define    PCMD22  (0x40F50110 + 22 * 4)
+#define    PCMD23  (0x40F50110 + 23 * 4)
+#define    PCMD24  (0x40F50110 + 24 * 4)
+#define    PCMD25  (0x40F50110 + 25 * 4)
+#define    PCMD26  (0x40F50110 + 26 * 4)
+#define    PCMD27  (0x40F50110 + 27 * 4)
+#define    PCMD28  (0x40F50110 + 28 * 4)
+#define    PCMD29  (0x40F50110 + 29 * 4)
+#define    PCMD30  (0x40F50110 + 30 * 4)
+#define    PCMD31  (0x40F50110 + 31 * 4)
 
 #define    PCMD_MBC    (1<<12)
 #define    PCMD_DCE    (1<<11)
@@ -1798,64 +2128,64 @@ typedef void            (*ExcpHndlr) (void) ;
 #define PVCR_FVC                   (0x1 << 28)
 #define PVCR_VCSA                  (0x1<<14)
 #define PVCR_CommandDelay          (0xf80)
-#define PVCR_ReadPointer           (0x01f00000)
+#define PVCR_ReadPointer           0x01f00000
 #define PVCR_SlaveAddress          (0x7f)
 
 #else /* ifdef CONFIG_CPU_MONAHANS */
 
-#define PMCR           __REG(0x40F00000)  /* Power Manager Control Register */
-#define PSSR           __REG(0x40F00004)  /* Power Manager Sleep Status Register */
-#define PSPR           __REG(0x40F00008)  /* Power Manager Scratch Pad Register */
-#define PWER           __REG(0x40F0000C)  /* Power Manager Wake-up Enable Register */
-#define PRER           __REG(0x40F00010)  /* Power Manager GPIO Rising-Edge Detect Enable Register */
-#define PFER           __REG(0x40F00014)  /* Power Manager GPIO Falling-Edge Detect Enable Register */
-#define PEDR           __REG(0x40F00018)  /* Power Manager GPIO Edge Detect Status Register */
-#define PCFR           __REG(0x40F0001C)  /* Power Manager General Configuration Register */
-#define PGSR0          __REG(0x40F00020)  /* Power Manager GPIO Sleep State Register for GP[31-0] */
-#define PGSR1          __REG(0x40F00024)  /* Power Manager GPIO Sleep State Register for GP[63-32] */
-#define PGSR2          __REG(0x40F00028)  /* Power Manager GPIO Sleep State Register for GP[84-64] */
-#define PGSR3          __REG(0x40F0002C)  /* Power Manager GPIO Sleep State Register for GP[118-96] */
-#define RCSR           __REG(0x40F00030)  /* Reset Controller Status Register */
-
-#define           PSLR    __REG(0x40F00034)    /* Power Manager Sleep Config Register */
-#define           PSTR    __REG(0x40F00038)    /* Power Manager Standby Config Register */
-#define           PSNR    __REG(0x40F0003C)    /* Power Manager Sense Config Register */
-#define           PVCR    __REG(0x40F00040)    /* Power Manager VoltageControl Register */
-#define           PKWR    __REG(0x40F00050)    /* Power Manager KB Wake-up Enable Reg */
-#define           PKSR    __REG(0x40F00054)    /* Power Manager KB Level-Detect Register */
-#define           PCMD(x) __REG(0x40F00080 + x*4)
-#define           PCMD0   __REG(0x40F00080 + 0 * 4)
-#define           PCMD1   __REG(0x40F00080 + 1 * 4)
-#define           PCMD2   __REG(0x40F00080 + 2 * 4)
-#define           PCMD3   __REG(0x40F00080 + 3 * 4)
-#define           PCMD4   __REG(0x40F00080 + 4 * 4)
-#define           PCMD5   __REG(0x40F00080 + 5 * 4)
-#define           PCMD6   __REG(0x40F00080 + 6 * 4)
-#define           PCMD7   __REG(0x40F00080 + 7 * 4)
-#define           PCMD8   __REG(0x40F00080 + 8 * 4)
-#define           PCMD9   __REG(0x40F00080 + 9 * 4)
-#define           PCMD10  __REG(0x40F00080 + 10 * 4)
-#define           PCMD11  __REG(0x40F00080 + 11 * 4)
-#define           PCMD12  __REG(0x40F00080 + 12 * 4)
-#define           PCMD13  __REG(0x40F00080 + 13 * 4)
-#define           PCMD14  __REG(0x40F00080 + 14 * 4)
-#define           PCMD15  __REG(0x40F00080 + 15 * 4)
-#define           PCMD16  __REG(0x40F00080 + 16 * 4)
-#define           PCMD17  __REG(0x40F00080 + 17 * 4)
-#define           PCMD18  __REG(0x40F00080 + 18 * 4)
-#define           PCMD19  __REG(0x40F00080 + 19 * 4)
-#define           PCMD20  __REG(0x40F00080 + 20 * 4)
-#define           PCMD21  __REG(0x40F00080 + 21 * 4)
-#define           PCMD22  __REG(0x40F00080 + 22 * 4)
-#define           PCMD23  __REG(0x40F00080 + 23 * 4)
-#define           PCMD24  __REG(0x40F00080 + 24 * 4)
-#define           PCMD25  __REG(0x40F00080 + 25 * 4)
-#define           PCMD26  __REG(0x40F00080 + 26 * 4)
-#define           PCMD27  __REG(0x40F00080 + 27 * 4)
-#define           PCMD28  __REG(0x40F00080 + 28 * 4)
-#define           PCMD29  __REG(0x40F00080 + 29 * 4)
-#define           PCMD30  __REG(0x40F00080 + 30 * 4)
-#define           PCMD31  __REG(0x40F00080 + 31 * 4)
+#define PMCR           0x40F00000  /* Power Manager Control Register */
+#define PSSR           0x40F00004  /* Power Manager Sleep Status Register */
+#define PSPR           0x40F00008  /* Power Manager Scratch Pad Register */
+#define PWER           0x40F0000C  /* Power Manager Wake-up Enable Register */
+#define PRER           0x40F00010  /* Power Manager GPIO Rising-Edge Detect Enable Register */
+#define PFER           0x40F00014  /* Power Manager GPIO Falling-Edge Detect Enable Register */
+#define PEDR           0x40F00018  /* Power Manager GPIO Edge Detect Status Register */
+#define PCFR           0x40F0001C  /* Power Manager General Configuration Register */
+#define PGSR0          0x40F00020  /* Power Manager GPIO Sleep State Register for GP[31-0] */
+#define PGSR1          0x40F00024  /* Power Manager GPIO Sleep State Register for GP[63-32] */
+#define PGSR2          0x40F00028  /* Power Manager GPIO Sleep State Register for GP[84-64] */
+#define PGSR3          0x40F0002C  /* Power Manager GPIO Sleep State Register for GP[118-96] */
+#define RCSR           0x40F00030  /* Reset Controller Status Register */
+
+#define           PSLR    0x40F00034   /* Power Manager Sleep Config Register */
+#define           PSTR    0x40F00038   /* Power Manager Standby Config Register */
+#define           PSNR    0x40F0003C   /* Power Manager Sense Config Register */
+#define           PVCR    0x40F00040   /* Power Manager VoltageControl Register */
+#define           PKWR    0x40F00050   /* Power Manager KB Wake-up Enable Reg */
+#define           PKSR    0x40F00054   /* Power Manager KB Level-Detect Register */
+#define           PCMD(x) (0x40F00080 + x*4)
+#define           PCMD0   (0x40F00080 + 0 * 4)
+#define           PCMD1   (0x40F00080 + 1 * 4)
+#define           PCMD2   (0x40F00080 + 2 * 4)
+#define           PCMD3   (0x40F00080 + 3 * 4)
+#define           PCMD4   (0x40F00080 + 4 * 4)
+#define           PCMD5   (0x40F00080 + 5 * 4)
+#define           PCMD6   (0x40F00080 + 6 * 4)
+#define           PCMD7   (0x40F00080 + 7 * 4)
+#define           PCMD8   (0x40F00080 + 8 * 4)
+#define           PCMD9   (0x40F00080 + 9 * 4)
+#define           PCMD10  (0x40F00080 + 10 * 4)
+#define           PCMD11  (0x40F00080 + 11 * 4)
+#define           PCMD12  (0x40F00080 + 12 * 4)
+#define           PCMD13  (0x40F00080 + 13 * 4)
+#define           PCMD14  (0x40F00080 + 14 * 4)
+#define           PCMD15  (0x40F00080 + 15 * 4)
+#define           PCMD16  (0x40F00080 + 16 * 4)
+#define           PCMD17  (0x40F00080 + 17 * 4)
+#define           PCMD18  (0x40F00080 + 18 * 4)
+#define           PCMD19  (0x40F00080 + 19 * 4)
+#define           PCMD20  (0x40F00080 + 20 * 4)
+#define           PCMD21  (0x40F00080 + 21 * 4)
+#define           PCMD22  (0x40F00080 + 22 * 4)
+#define           PCMD23  (0x40F00080 + 23 * 4)
+#define           PCMD24  (0x40F00080 + 24 * 4)
+#define           PCMD25  (0x40F00080 + 25 * 4)
+#define           PCMD26  (0x40F00080 + 26 * 4)
+#define           PCMD27  (0x40F00080 + 27 * 4)
+#define           PCMD28  (0x40F00080 + 28 * 4)
+#define           PCMD29  (0x40F00080 + 29 * 4)
+#define           PCMD30  (0x40F00080 + 30 * 4)
+#define           PCMD31  (0x40F00080 + 31 * 4)
 
 #define           PCMD_MBC    (1<<12)
 #define           PCMD_DCE    (1<<11)
@@ -1891,183 +2221,58 @@ typedef void           (*ExcpHndlr) (void) ;
 /*
  * SSP Serial Port Registers
  */
-#define SSCR0          __REG(0x41000000)  /* SSP Control Register 0 */
-#define SSCR1          __REG(0x41000004)  /* SSP Control Register 1 */
-#define SSSR           __REG(0x41000008)  /* SSP Status Register */
-#define SSITR          __REG(0x4100000C)  /* SSP Interrupt Test Register */
-#define SSDR           __REG(0x41000010)  /* (Write / Read) SSP Data Write Register/SSP Data Read Register */
+#define SSCR0          0x41000000  /* SSP Control Register 0 */
+#define SSCR1          0x41000004  /* SSP Control Register 1 */
+#define SSSR           0x41000008  /* SSP Status Register */
+#define SSITR          0x4100000C  /* SSP Interrupt Test Register */
+#define SSDR           0x41000010  /* (Write / Read) SSP Data Write Register/SSP Data Read Register */
 
 /*
  * MultiMediaCard (MMC) controller
  */
-#define MMC_STRPCL     __REG(0x41100000)  /* Control to start and stop MMC clock */
-#define MMC_STAT       __REG(0x41100004)  /* MMC Status Register (read only) */
-#define MMC_CLKRT      __REG(0x41100008)  /* MMC clock rate */
-#define MMC_SPI                __REG(0x4110000c)  /* SPI mode control bits */
-#define MMC_CMDAT      __REG(0x41100010)  /* Command/response/data sequence control */
-#define MMC_RESTO      __REG(0x41100014)  /* Expected response time out */
-#define MMC_RDTO       __REG(0x41100018)  /* Expected data read time out */
-#define MMC_BLKLEN     __REG(0x4110001c)  /* Block length of data transaction */
-#define MMC_NOB                __REG(0x41100020)  /* Number of blocks, for block mode */
-#define MMC_PRTBUF     __REG(0x41100024)  /* Partial MMC_TXFIFO FIFO written */
-#define MMC_I_MASK     __REG(0x41100028)  /* Interrupt Mask */
-#define MMC_I_REG      __REG(0x4110002c)  /* Interrupt Register (read only) */
-#define MMC_CMD                __REG(0x41100030)  /* Index of current command */
-#define MMC_ARGH       __REG(0x41100034)  /* MSW part of the current command argument */
-#define MMC_ARGL       __REG(0x41100038)  /* LSW part of the current command argument */
-#define MMC_RES                __REG(0x4110003c)  /* Response FIFO (read only) */
-#define MMC_RXFIFO     __REG(0x41100040)  /* Receive FIFO (read only) */
-#define MMC_TXFIFO     __REG(0x41100044)  /* Transmit FIFO (write only) */
-
-/*
- * Core Clock
- */
-
-#if defined(CONFIG_CPU_MONAHANS)
-#define ACCR           __REG(0x41340000)  /* Application Subsystem Clock Configuration Register */
-#define ACSR           __REG(0x41340004)  /* Application Subsystem Clock Status Register */
-#define AICSR          __REG(0x41340008)  /* Application Subsystem Interrupt Control/Status Register */
-#define CKENA          __REG(0x4134000C)  /* A Clock Enable Register */
-#define CKENB          __REG(0x41340010)  /* B Clock Enable Register */
-#define AC97_DIV       __REG(0x41340014)  /* AC97 clock divisor value register */
-
-#define ACCR_SMC_MASK  0x03800000      /* Static Memory Controller Frequency Select */
-#define ACCR_SRAM_MASK 0x000c0000      /* SRAM Controller Frequency Select */
-#define ACCR_FC_MASK   0x00030000      /* Frequency Change Frequency Select */
-#define ACCR_HSIO_MASK 0x0000c000      /* High Speed IO Frequency Select */
-#define ACCR_DDR_MASK  0x00003000      /* DDR Memory Controller Frequency Select */
-#define ACCR_XN_MASK   0x00000700      /* Run Mode Frequency to Turbo Mode Frequency Multiplier */
-#define ACCR_XL_MASK   0x0000001f      /* Crystal Frequency to Memory Frequency Multiplier */
-#define ACCR_XPDIS     (1 << 31)
-#define ACCR_SPDIS     (1 << 30)
-#define ACCR_13MEND1   (1 << 27)
-#define ACCR_D0CS      (1 << 26)
-#define ACCR_13MEND2   (1 << 21)
-#define ACCR_PCCE      (1 << 11)
-
-#define CKENA_30_MSL0  (1 << 30)       /* MSL0 Interface Unit Clock Enable */
-#define CKENA_29_SSP4  (1 << 29)       /* SSP3 Unit Clock Enable */
-#define CKENA_28_SSP3  (1 << 28)       /* SSP2 Unit Clock Enable */
-#define CKENA_27_SSP2  (1 << 27)       /* SSP1 Unit Clock Enable */
-#define CKENA_26_SSP1  (1 << 26)       /* SSP0 Unit Clock Enable */
-#define CKENA_25_TSI   (1 << 25)       /* TSI Clock Enable */
-#define CKENA_24_AC97  (1 << 24)       /* AC97 Unit Clock Enable */
-#define CKENA_23_STUART        (1 << 23)       /* STUART Unit Clock Enable */
-#define CKENA_22_FFUART        (1 << 22)       /* FFUART Unit Clock Enable */
-#define CKENA_21_BTUART        (1 << 21)       /* BTUART Unit Clock Enable */
-#define CKENA_20_UDC   (1 << 20)       /* UDC Clock Enable */
-#define CKENA_19_TPM   (1 << 19)       /* TPM Unit Clock Enable */
-#define CKENA_18_USIM1 (1 << 18)       /* USIM1 Unit Clock Enable */
-#define CKENA_17_USIM0 (1 << 17)       /* USIM0 Unit Clock Enable */
-#define CKENA_15_CIR   (1 << 15)       /* Consumer IR Clock Enable */
-#define CKENA_14_KEY   (1 << 14)       /* Keypad Controller Clock Enable */
-#define CKENA_13_MMC1  (1 << 13)       /* MMC1 Clock Enable */
-#define CKENA_12_MMC0  (1 << 12)       /* MMC0 Clock Enable */
-#define CKENA_11_FLASH (1 << 11)       /* Boot ROM Clock Enable */
-#define CKENA_10_SRAM  (1 << 10)       /* SRAM Controller Clock Enable */
-#define CKENA_9_SMC    (1 << 9)        /* Static Memory Controller */
-#define CKENA_8_DMC    (1 << 8)        /* Dynamic Memory Controller */
-#define CKENA_7_GRAPHICS (1 << 7)      /* 2D Graphics Clock Enable */
-#define CKENA_6_USBCLI (1 << 6)        /* USB Client Unit Clock Enable */
-#define CKENA_4_NAND   (1 << 4)        /* NAND Flash Controller Clock Enable */
-#define CKENA_3_CAMERA (1 << 3)        /* Camera Interface Clock Enable */
-#define CKENA_2_USBHOST        (1 << 2)        /* USB Host Unit Clock Enable */
-#define CKENA_1_LCD    (1 << 1)        /* LCD Unit Clock Enable */
-
-#define CKENB_9_SYSBUS2        (1 << 9)        /* System bus 2 */
-#define CKENB_8_1WIRE  (1 << 8)        /* One Wire Interface Unit Clock Enable */
-#define CKENB_7_GPIO   (1 << 7)        /* GPIO Clock Enable */
-#define CKENB_6_IRQ    (1 << 6)        /* Interrupt Controller Clock Enable */
-#define CKENB_4_I2C    (1 << 4)        /* I2C Unit Clock Enable */
-#define CKENB_1_PWM1   (1 << 1)        /* PWM2 & PWM3 Clock Enable */
-#define CKENB_0_PWM0   (1 << 0)        /* PWM0 & PWM1 Clock Enable */
-
-#else /* if defined CONFIG_CPU_MONAHANS */
-
-#define CCCR           __REG(0x41300000)  /* Core Clock Configuration Register */
-#define CKEN           __REG(0x41300004)  /* Clock Enable Register */
-#define OSCC           __REG(0x41300008)  /* Oscillator Configuration Register */
-
-#define CCCR_N_MASK    0x0380          /* Run Mode Frequency to Turbo Mode Frequency Multiplier */
-#if !defined(CONFIG_PXA27X)
-#define CCCR_M_MASK    0x0060          /* Memory Frequency to Run Mode Frequency Multiplier */
-#endif
-#define CCCR_L_MASK    0x001f          /* Crystal Frequency to Memory Frequency Multiplier */
-
-#define CKEN24_CAMERA  (1 << 24)       /* Camera Interface Clock Enable */
-#define CKEN23_SSP1    (1 << 23)       /* SSP1 Unit Clock Enable */
-#define CKEN22_MEMC    (1 << 22)       /* Memory Controller Clock Enable */
-#define CKEN21_MEMSTK  (1 << 21)       /* Memory Stick Host Controller */
-#define CKEN20_IM      (1 << 20)       /* Internal Memory Clock Enable */
-#define CKEN19_KEYPAD  (1 << 19)       /* Keypad Interface Clock Enable */
-#define CKEN18_USIM    (1 << 18)       /* USIM Unit Clock Enable */
-#define CKEN17_MSL     (1 << 17)       /* MSL Unit Clock Enable */
-#define CKEN16_LCD     (1 << 16)       /* LCD Unit Clock Enable */
-#define CKEN15_PWRI2C  (1 << 15)       /* PWR I2C Unit Clock Enable */
-#define CKEN14_I2C     (1 << 14)       /* I2C Unit Clock Enable */
-#define CKEN13_FICP    (1 << 13)       /* FICP Unit Clock Enable */
-#define CKEN12_MMC     (1 << 12)       /* MMC Unit Clock Enable */
-#define CKEN11_USB     (1 << 11)       /* USB Unit Clock Enable */
-#if defined(CONFIG_PXA27X)
-#define CKEN10_USBHOST (1 << 10)       /* USB Host Unit Clock Enable */
-#define CKEN24_CAMERA  (1 << 24)       /* Camera Unit Clock Enable */
-#endif
-#define CKEN8_I2S      (1 << 8)        /* I2S Unit Clock Enable */
-#define CKEN7_BTUART   (1 << 7)        /* BTUART Unit Clock Enable */
-#define CKEN6_FFUART   (1 << 6)        /* FFUART Unit Clock Enable */
-#define CKEN5_STUART   (1 << 5)        /* STUART Unit Clock Enable */
-#define CKEN3_SSP      (1 << 3)        /* SSP Unit Clock Enable */
-#define CKEN2_AC97     (1 << 2)        /* AC97 Unit Clock Enable */
-#define CKEN1_PWM1     (1 << 1)        /* PWM1 Clock Enable */
-#define CKEN0_PWM0     (1 << 0)        /* PWM0 Clock Enable */
-
-#define OSCC_OON       (1 << 1)        /* 32.768kHz OON (write-once only bit) */
-#define OSCC_OOK       (1 << 0)        /* 32.768kHz OOK (read-only bit) */
-
-#if !defined(CONFIG_PXA27X)
-#define         CCCR_L09      (0x1F)
-#define         CCCR_L27      (0x1)
-#define         CCCR_L32      (0x2)
-#define         CCCR_L36      (0x3)
-#define         CCCR_L40      (0x4)
-#define         CCCR_L45      (0x5)
-
-#define         CCCR_M1       (0x1 << 5)
-#define         CCCR_M2       (0x2 << 5)
-#define         CCCR_M4       (0x3 << 5)
-
-#define         CCCR_N10      (0x2 << 7)
-#define         CCCR_N15      (0x3 << 7)
-#define         CCCR_N20      (0x4 << 7)
-#define         CCCR_N25      (0x5 << 7)
-#define         CCCR_N30      (0x6 << 7)
-#endif
+#define MMC_STRPCL     0x41100000  /* Control to start and stop MMC clock */
+#define MMC_STAT       0x41100004  /* MMC Status Register (read only) */
+#define MMC_CLKRT      0x41100008  /* MMC clock rate */
+#define MMC_SPI                0x4110000c  /* SPI mode control bits */
+#define MMC_CMDAT      0x41100010  /* Command/response/data sequence control */
+#define MMC_RESTO      0x41100014  /* Expected response time out */
+#define MMC_RDTO       0x41100018  /* Expected data read time out */
+#define MMC_BLKLEN     0x4110001c  /* Block length of data transaction */
+#define MMC_NOB                0x41100020  /* Number of blocks, for block mode */
+#define MMC_PRTBUF     0x41100024  /* Partial MMC_TXFIFO FIFO written */
+#define MMC_I_MASK     0x41100028  /* Interrupt Mask */
+#define MMC_I_REG      0x4110002c  /* Interrupt Register (read only) */
+#define MMC_CMD                0x41100030  /* Index of current command */
+#define MMC_ARGH       0x41100034  /* MSW part of the current command argument */
+#define MMC_ARGL       0x41100038  /* LSW part of the current command argument */
+#define MMC_RES                0x4110003c  /* Response FIFO (read only) */
+#define MMC_RXFIFO     0x41100040  /* Receive FIFO (read only) */
+#define MMC_TXFIFO     0x41100044  /* Transmit FIFO (write only) */
 
-#endif /* CONFIG_CPU_MONAHANS */
 
 /*
  * LCD
  */
-#define LCCR0          __REG(0x44000000)  /* LCD Controller Control Register 0 */
-#define LCCR1          __REG(0x44000004)  /* LCD Controller Control Register 1 */
-#define LCCR2          __REG(0x44000008)  /* LCD Controller Control Register 2 */
-#define LCCR3          __REG(0x4400000C)  /* LCD Controller Control Register 3 */
-#define DFBR0          __REG(0x44000020)  /* DMA Channel 0 Frame Branch Register */
-#define DFBR1          __REG(0x44000024)  /* DMA Channel 1 Frame Branch Register */
-#define LCSR0          __REG(0x44000038)  /* LCD Controller Status Register */
-#define LCSR1          __REG(0x44000034)  /* LCD Controller Status Register */
-#define LIIDR          __REG(0x4400003C)  /* LCD Controller Interrupt ID Register */
-#define TMEDRGBR       __REG(0x44000040)  /* TMED RGB Seed Register */
-#define TMEDCR         __REG(0x44000044)  /* TMED Control Register */
-
-#define FDADR0         __REG(0x44000200)  /* DMA Channel 0 Frame Descriptor Address Register */
-#define FSADR0         __REG(0x44000204)  /* DMA Channel 0 Frame Source Address Register */
-#define FIDR0          __REG(0x44000208)  /* DMA Channel 0 Frame ID Register */
-#define LDCMD0         __REG(0x4400020C)  /* DMA Channel 0 Command Register */
-#define FDADR1         __REG(0x44000210)  /* DMA Channel 1 Frame Descriptor Address Register */
-#define FSADR1         __REG(0x44000214)  /* DMA Channel 1 Frame Source Address Register */
-#define FIDR1          __REG(0x44000218)  /* DMA Channel 1 Frame ID Register */
-#define LDCMD1         __REG(0x4400021C)  /* DMA Channel 1 Command Register */
+#define LCCR0          0x44000000  /* LCD Controller Control Register 0 */
+#define LCCR1          0x44000004  /* LCD Controller Control Register 1 */
+#define LCCR2          0x44000008  /* LCD Controller Control Register 2 */
+#define LCCR3          0x4400000C  /* LCD Controller Control Register 3 */
+#define DFBR0          0x44000020  /* DMA Channel 0 Frame Branch Register */
+#define DFBR1          0x44000024  /* DMA Channel 1 Frame Branch Register */
+#define LCSR0          0x44000038  /* LCD Controller Status Register */
+#define LCSR1          0x44000034  /* LCD Controller Status Register */
+#define LIIDR          0x4400003C  /* LCD Controller Interrupt ID Register */
+#define TMEDRGBR       0x44000040  /* TMED RGB Seed Register */
+#define TMEDCR         0x44000044  /* TMED Control Register */
+
+#define FDADR0         0x44000200  /* DMA Channel 0 Frame Descriptor Address Register */
+#define FSADR0         0x44000204  /* DMA Channel 0 Frame Source Address Register */
+#define FIDR0          0x44000208  /* DMA Channel 0 Frame ID Register */
+#define LDCMD0         0x4400020C  /* DMA Channel 0 Command Register */
+#define FDADR1         0x44000210  /* DMA Channel 1 Frame Descriptor Address Register */
+#define FSADR1         0x44000214  /* DMA Channel 1 Frame Source Address Register */
+#define FIDR1          0x44000218  /* DMA Channel 1 Frame ID Register */
+#define LDCMD1         0x4400021C  /* DMA Channel 1 Command Register */
 
 #define LCCR0_ENB      (1 << 0)        /* LCD Controller enable */
 #define LCCR0_CMS      (1 << 1)        /* Color = 0, Monochrome = 1 */
@@ -2135,22 +2340,12 @@ typedef void            (*ExcpHndlr) (void) ;
                                        /*  [0..255 Tln]                   */ \
                        ((Tln) << FShft (LCCR2_BFW))
 
-#if 0
-#define LCCR3_PCD      (0xff)          /* Pixel clock divisor */
-#define LCCR3_ACB      (0xff << 8)     /* AC Bias pin frequency */
-#define LCCR3_ACB_S    8
-#endif
-
 #define LCCR3_API      (0xf << 16)     /* AC Bias pin trasitions per interrupt */
 #define LCCR3_API_S    16
 #define LCCR3_VSP      (1 << 20)       /* vertical sync polarity */
 #define LCCR3_HSP      (1 << 21)       /* horizontal sync polarity */
 #define LCCR3_PCP      (1 << 22)       /* pixel clock polarity */
 #define LCCR3_OEP      (1 << 23)       /* output enable polarity */
-#if 0
-#define LCCR3_BPP      (7 << 24)       /* bits per pixel */
-#define LCCR3_BPP_S    24
-#endif
 #define LCCR3_DPC      (1 << 27)       /* double pixel clock mode */
 
 #define LCCR3_PDFOR_0   (0 << 30)
@@ -2231,46 +2426,49 @@ typedef void            (*ExcpHndlr) (void) ;
  */
 
 #ifdef CONFIG_CPU_MONAHANS
+
+/* PXA3xx */
+
 /* Static Memory Controller Registers */
-#define MSC0           __REG_2(0x4A000008)  /* Static Memory Control Register 0 */
-#define MSC1           __REG_2(0x4A00000C)  /* Static Memory Control Register 1 */
-#define MECR           __REG_2(0x4A000014)  /* Expansion Memory (PCMCIA/Compact Flash) Bus Configuration */
-#define SXCNFG         __REG_2(0x4A00001C)  /* Synchronous Static Memory Control Register */
-#define MCMEM0         __REG_2(0x4A000028)  /* Card interface Common Memory Space Socket 0 Timing */
-#define MCATT0         __REG_2(0x4A000030)  /* Card interface Attribute Space Socket 0 Timing Configuration */
-#define MCIO0          __REG_2(0x4A000038)  /* Card interface I/O Space Socket 0 Timing Configuration */
-#define MEMCLKCFG      __REG_2(0x4A000068)  /* SCLK speed configuration */
-#define CSADRCFG0      __REG_2(0x4A000080)  /* Address Configuration for chip select 0 */
-#define CSADRCFG1      __REG_2(0x4A000084)  /* Address Configuration for chip select 1 */
-#define CSADRCFG2      __REG_2(0x4A000088)  /* Address Configuration for chip select 2 */
-#define CSADRCFG3      __REG_2(0x4A00008C)  /* Address Configuration for chip select 3 */
-#define CSADRCFG_P     __REG_2(0x4A000090)  /* Address Configuration for pcmcia card interface */
-#define CSMSADRCFG     __REG_2(0x4A0000A0)  /* Master Address Configuration Register */
-#define CLK_RET_DEL    __REG_2(0x4A0000B0)  /* Delay line and mux selects for return data latching for sync. flash */
-#define ADV_RET_DEL    __REG_2(0x4A0000B4)  /* Delay line and mux selects for return data latching for sync. flash */
+#define        MSC0            0x4A000008 /* Static Memory Control Register 0 */
+#define        MSC1            0x4A00000C /* Static Memory Control Register 1 */
+#define        MECR            0x4A000014 /* Expansion Memory (PCMCIA/Compact Flash) Bus Configuration */
+#define        SXCNFG          0x4A00001C /* Synchronous Static Memory Control Register */
+#define        MCMEM0          0x4A000028 /* Card interface Common Memory Space Socket 0 Timing */
+#define        MCATT0          0x4A000030 /* Card interface Attribute Space Socket 0 Timing Configuration */
+#define        MCIO0           0x4A000038 /* Card interface I/O Space Socket 0 Timing Configuration */
+#define        MEMCLKCFG       0x4A000068 /* SCLK speed configuration */
+#define        CSADRCFG0       0x4A000080 /* Address Configuration for chip select 0 */
+#define        CSADRCFG1       0x4A000084 /* Address Configuration for chip select 1 */
+#define        CSADRCFG2       0x4A000088 /* Address Configuration for chip select 2 */
+#define        CSADRCFG3       0x4A00008C /* Address Configuration for chip select 3 */
+#define        CSADRCFG_P      0x4A000090 /* Address Configuration for pcmcia card interface */
+#define        CSMSADRCFG      0x4A0000A0 /* Master Address Configuration Register */
+#define        CLK_RET_DEL     0x4A0000B0 /* Delay line and mux selects for return data latching for sync. flash */
+#define        ADV_RET_DEL     0x4A0000B4 /* Delay line and mux selects for return data latching for sync. flash */
 
 /* Dynamic Memory Controller Registers */
-#define MDCNFG         __REG_2(0x48100000)  /* SDRAM Configuration Register 0 */
-#define MDREFR         __REG_2(0x48100004)  /* SDRAM Refresh Control Register */
-#define FLYCNFG                __REG_2(0x48100020)  /* Fly-by DMA DVAL[1:0] polarities */
-#define MDMRS          __REG_2(0x48100040)  /* MRS value to be written to SDRAM */
-#define        DDR_SCAL        __REG_2(0x48100050)  /* Software Delay Line Calibration/Configuration for external DDR memory. */
-#define        DDR_HCAL        __REG_2(0x48100060)  /* Hardware Delay Line Calibration/Configuration for external DDR memory. */
-#define        DDR_WCAL        __REG_2(0x48100068)  /* DDR Write Strobe Calibration Register */
-#define        DMCIER          __REG_2(0x48100070)  /* Dynamic MC Interrupt Enable Register. */
-#define        DMCISR          __REG_2(0x48100078)  /* Dynamic MC Interrupt Status Register. */
-#define        DDR_DLS         __REG_2(0x48100080)  /* DDR Delay Line Value Status register for external DDR memory. */
-#define        EMPI            __REG_2(0x48100090)  /* EMPI Control Register */
-#define RCOMP           __REG_2(0x48100100)
-#define PAD_MA          __REG_2(0x48100110)
-#define PAD_MDMSB       __REG_2(0x48100114)
-#define PAD_MDLSB       __REG_2(0x48100118)
-#define PAD_DMEM        __REG_2(0x4810011c)
-#define PAD_SDCLK       __REG_2(0x48100120)
-#define PAD_SDCS        __REG_2(0x48100124)
-#define PAD_SMEM        __REG_2(0x48100128)
-#define PAD_SCLK        __REG_2(0x4810012C)
-#define TAI            __REG_2(0x48100F00) /* TAI Tavor Address Isolation Register */
+#define        MDCNFG          0x48100000 /* SDRAM Configuration Register 0 */
+#define        MDREFR          0x48100004 /* SDRAM Refresh Control Register */
+#define        FLYCNFG         0x48100020 /* Fly-by DMA DVAL[1:0] polarities */
+#define        MDMRS           0x48100040 /* MRS value to be written to SDRAM */
+#define        DDR_SCAL        0x48100050 /* Software Delay Line Calibration/Configuration for external DDR memory. */
+#define        DDR_HCAL        0x48100060 /* Hardware Delay Line Calibration/Configuration for external DDR memory. */
+#define        DDR_WCAL        0x48100068 /* DDR Write Strobe Calibration Register */
+#define        DMCIER          0x48100070 /* Dynamic MC Interrupt Enable Register. */
+#define        DMCISR          0x48100078 /* Dynamic MC Interrupt Status Register. */
+#define        DDR_DLS         0x48100080 /* DDR Delay Line Value Status register for external DDR memory. */
+#define        EMPI            0x48100090 /* EMPI Control Register */
+#define        RCOMP           0x48100100
+#define        PAD_MA          0x48100110
+#define        PAD_MDMSB       0x48100114
+#define        PAD_MDLSB       0x48100118
+#define        PAD_DMEM        0x4810011c
+#define        PAD_SDCLK       0x48100120
+#define        PAD_SDCS        0x48100124
+#define        PAD_SMEM        0x48100128
+#define        PAD_SCLK        0x4810012C
+#define        TAI             0x48100F00 /* TAI Tavor Address Isolation Register */
 
 /* Some frequently used bits */
 #define MDCNFG_DMAP    0x80000000      /* SDRAM 1GB Memory Map Enable */
@@ -2298,19 +2496,19 @@ typedef void            (*ExcpHndlr) (void) ;
 
 /* Data Flash Controller Registers */
 
-#define NDCR           __REG(0x43100000)  /* Data Flash Control register */
-#define NDTR0CS0       __REG(0x43100004)  /* Data Controller Timing Parameter 0 Register for ND_nCS0 */
-/* #define NDTR0CS1    __REG(0x43100008)  /\* Data Controller Timing Parameter 0 Register for ND_nCS1 *\/ */
-#define NDTR1CS0       __REG(0x4310000C)  /* Data Controller Timing Parameter 1 Register for ND_nCS0 */
-/* #define NDTR1CS1    __REG(0x43100010)  /\* Data Controller Timing Parameter 1 Register for ND_nCS1 *\/ */
-#define NDSR           __REG(0x43100014)  /* Data Controller Status Register */
-#define NDPCR          __REG(0x43100018)  /* Data Controller Page Count Register */
-#define NDBDR0         __REG(0x4310001C)  /* Data Controller Bad Block Register 0 */
-#define NDBDR1         __REG(0x43100020)  /* Data Controller Bad Block Register 1 */
-#define NDDB           __REG(0x43100040)  /* Data Controller Data Buffer */
-#define NDCB0          __REG(0x43100048)  /* Data Controller Command Buffer0 */
-#define NDCB1          __REG(0x4310004C)  /* Data Controller Command Buffer1 */
-#define NDCB2          __REG(0x43100050)  /* Data Controller Command Buffer2 */
+#define NDCR           0x43100000  /* Data Flash Control register */
+#define NDTR0CS0       0x43100004  /* Data Controller Timing Parameter 0 Register for ND_nCS0 */
+/* #define NDTR0CS1    0x43100008  /\* Data Controller Timing Parameter 0 Register for ND_nCS1 *\/ */
+#define NDTR1CS0       0x4310000C  /* Data Controller Timing Parameter 1 Register for ND_nCS0 */
+/* #define NDTR1CS1    0x43100010  /\* Data Controller Timing Parameter 1 Register for ND_nCS1 *\/ */
+#define NDSR           0x43100014  /* Data Controller Status Register */
+#define NDPCR          0x43100018  /* Data Controller Page Count Register */
+#define NDBDR0         0x4310001C  /* Data Controller Bad Block Register 0 */
+#define NDBDR1         0x43100020  /* Data Controller Bad Block Register 1 */
+#define NDDB           0x43100040  /* Data Controller Data Buffer */
+#define NDCB0          0x43100048  /* Data Controller Command Buffer0 */
+#define NDCB1          0x4310004C  /* Data Controller Command Buffer1 */
+#define NDCB2          0x43100050  /* Data Controller Command Buffer2 */
 
 #define NDCR_SPARE_EN  (0x1<<31)
 #define NDCR_ECC_EN    (0x1<<30)
@@ -2386,7 +2584,9 @@ typedef void              (*ExcpHndlr) (void) ;
 
 #else /* CONFIG_CPU_MONAHANS */
 
-#define MEMC_BASE      __REG(0x48000000)  /* Base of Memory Controller */
+/* PXA2xx */
+
+#define MEMC_BASE      0x48000000  /* Base of Memory Controller */
 #define MDCNFG_OFFSET  0x0
 #define MDREFR_OFFSET  0x4
 #define MSC0_OFFSET    0x8
@@ -2405,29 +2605,30 @@ typedef void            (*ExcpHndlr) (void) ;
 #define MCIO1_OFFSET   0x3C
 #define MDMRS_OFFSET   0x40
 
-#define MDCNFG         __REG(0x48000000)  /* SDRAM Configuration Register 0 */
+#define MDCNFG         0x48000000  /* SDRAM Configuration Register 0 */
 #define MDCNFG_DE0     0x00000001
 #define MDCNFG_DE1     0x00000002
 #define MDCNFG_DE2     0x00010000
 #define MDCNFG_DE3     0x00020000
 #define MDCNFG_DWID0   0x00000004
 
-#define MDREFR         __REG(0x48000004)  /* SDRAM Refresh Control Register */
-#define MSC0           __REG(0x48000008)  /* Static Memory Control Register 0 */
-#define MSC1           __REG(0x4800000C)  /* Static Memory Control Register 1 */
-#define MSC2           __REG(0x48000010)  /* Static Memory Control Register 2 */
-#define MECR           __REG(0x48000014)  /* Expansion Memory (PCMCIA/Compact Flash) Bus Configuration */
-#define SXLCR          __REG(0x48000018)  /* LCR value to be written to SDRAM-Timing Synchronous Flash */
-#define SXCNFG         __REG(0x4800001C)  /* Synchronous Static Memory Control Register */
-#define SXMRS          __REG(0x48000024)  /* MRS value to be written to Synchronous Flash or SMROM */
-#define MCMEM0         __REG(0x48000028)  /* Card interface Common Memory Space Socket 0 Timing */
-#define MCMEM1         __REG(0x4800002C)  /* Card interface Common Memory Space Socket 1 Timing */
-#define MCATT0         __REG(0x48000030)  /* Card interface Attribute Space Socket 0 Timing Configuration */
-#define MCATT1         __REG(0x48000034)  /* Card interface Attribute Space Socket 1 Timing Configuration */
-#define MCIO0          __REG(0x48000038)  /* Card interface I/O Space Socket 0 Timing Configuration */
-#define MCIO1          __REG(0x4800003C)  /* Card interface I/O Space Socket 1 Timing Configuration */
-#define MDMRS          __REG(0x48000040)  /* MRS value to be written to SDRAM */
-#define BOOT_DEF       __REG(0x48000044)  /* Read-Only Boot-Time Register. Contains BOOT_SEL and PKG_SEL */
+#define MDREFR         0x48000004  /* SDRAM Refresh Control Register */
+#define MSC0           0x48000008  /* Static Memory Control Register 0 */
+#define MSC1           0x4800000C  /* Static Memory Control Register 1 */
+#define MSC2           0x48000010  /* Static Memory Control Register 2 */
+#define MECR           0x48000014  /* Expansion Memory (PCMCIA/Compact Flash) Bus Configuration */
+#define SXLCR          0x48000018  /* LCR value to be written to SDRAM-Timing Synchronous Flash */
+#define SXCNFG         0x4800001C  /* Synchronous Static Memory Control Register */
+#define FLYCNFG                0x48000020
+#define SXMRS          0x48000024  /* MRS value to be written to Synchronous Flash or SMROM */
+#define MCMEM0         0x48000028  /* Card interface Common Memory Space Socket 0 Timing */
+#define MCMEM1         0x4800002C  /* Card interface Common Memory Space Socket 1 Timing */
+#define MCATT0         0x48000030  /* Card interface Attribute Space Socket 0 Timing Configuration */
+#define MCATT1         0x48000034  /* Card interface Attribute Space Socket 1 Timing Configuration */
+#define MCIO0          0x48000038  /* Card interface I/O Space Socket 0 Timing Configuration */
+#define MCIO1          0x4800003C  /* Card interface I/O Space Socket 1 Timing Configuration */
+#define MDMRS          0x48000040  /* MRS value to be written to SDRAM */
+#define BOOT_DEF       0x48000044  /* Read-Only Boot-Time Register. Contains BOOT_SEL and PKG_SEL */
 
 #define MDREFR_ALTREFA (1 << 31)       /* Exiting Alternate Bus Master Mode Refresh Control */
 #define MDREFR_ALTREFB (1 << 30)       /* Entering Alternate Bus Master Mode Refresh Control */
@@ -2448,7 +2649,7 @@ typedef void              (*ExcpHndlr) (void) ;
 
 #if defined(CONFIG_PXA27X)
 
-#define ARB_CNTRL      __REG(0x48000048)  /* Arbiter Control Register */
+#define ARB_CNTRL      0x48000048  /* Arbiter Control Register */
 
 #define ARB_DMA_SLV_PARK       (1<<31)    /* Be parked with DMA slave when idle */
 #define ARB_CI_PARK            (1<<30)    /* Be parked with Camera Interface when idle */
@@ -2460,80 +2661,41 @@ typedef void            (*ExcpHndlr) (void) ;
 #define ARB_CORE_PARK          (1<<24)    /* Be parked with core when idle */
 #define ARB_LOCK_FLAG          (1<<23)    /* Only Locking masters gain access to the bus */
 
-#endif /* CONFIG_CPU_MONAHANS */
-
-/* Interrupt Controller */
-
-#define ICIP2          __REG(0x40D0009C)  /* Interrupt Controller IRQ Pending Register 2 */
-#define ICMR2          __REG(0x40D000A0)  /* Interrupt Controller Mask Register 2 */
-#define ICLR2          __REG(0x40D000A4)  /* Interrupt Controller Level Register 2 */
-#define ICFP2          __REG(0x40D000A8)  /* Interrupt Controller FIQ Pending Register 2 */
-#define ICPR2          __REG(0x40D000AC)  /* Interrupt Controller Pending Register 2 */
-
-/* General Purpose I/O */
-
-#define GAFR3_L                __REG(0x40E0006C)  /* GPIO Alternate Function Select Register GPIO<111:96> */
-#define GAFR3_U                __REG(0x40E00070)  /* GPIO Alternate Function Select Register GPIO<127:112> */
-#define GPLR3          __REG(0x40E00100)  /* GPIO Pin-Level Register GPIO<127:96> */
-#define GPDR3          __REG(0x40E0010C)  /* GPIO Pin Direction Register GPIO<127:96> */
-#define GPSR3          __REG(0x40E00118)  /* GPIO Pin Output Set Register GPIO<127:96> */
-#define GPCR3          __REG(0x40E00124)  /* GPIO Pin Output Clear Register GPIO <127:96> */
-#define GRER3          __REG(0x40E00130)  /* GPIO Rising-Edge Detect Register GPIO<127:96> */
-#define GFER3          __REG(0x40E0013C)  /* GPIO Falling-Edge Detect Register GPIO<31:0> */
-#define GEDR3          __REG(0x40E00148)  /* GPIO Edge Detect Status Register GPIO<127:96> */
-
-/* Core Clock */
-
-#define CCSR           __REG(0x4130000C) /* Core Clock Status Register */
-
-#define CKEN23_SSP1    (1 << 23) /* SSP1 Unit Clock Enable */
-#define CKEN22_MEMC    (1 << 22) /* Memory Controler */
-#define CKEN21_MSHC    (1 << 21) /* Memery Stick Host Controller */
-#define CKEN20_IM      (1 << 20) /* Internal Memory Clock Enable */
-#define CKEN19_KEYPAD  (1 << 19) /* Keypad Interface Clock Enable */
-#define CKEN18_USIM    (1 << 18) /* USIM Unit Clock Enable */
-#define CKEN17_MSL     (1 << 17) /* MSL Interface Unit Clock Enable */
-#define CKEN15_PWR_I2C (1 << 15) /* PWR_I2C Unit Clock Enable */
-#define CKEN9_OST      (1 << 9)  /* OS Timer Unit Clock Enable */
-#define CKEN4_SSP3     (1 << 4)  /* SSP3 Unit Clock Enable */
-
-/* Memory controller */
-
-#define MDREFR_K0DB4   (1 << 29)         /* SDCLK[0] divide by 4 */
+#endif /* CONFIG_PXA27X */
 
 /* LCD registers */
-#define LCCR4          __REG(0x44000010)  /* LCD Controller Control Register 4 */
-#define LCCR5          __REG(0x44000014)  /* LCD Controller Control Register 5 */
-#define FBR0           __REG(0x44000020)  /* DMA Channel 0 Frame Branch Register */
-#define FBR1           __REG(0x44000024)  /* DMA Channel 1 Frame Branch Register */
-#define FBR2           __REG(0x44000028)  /* DMA Channel 2 Frame Branch Register */
-#define FBR3           __REG(0x4400002C)  /* DMA Channel 3 Frame Branch Register */
-#define FBR4           __REG(0x44000030)  /* DMA Channel 4 Frame Branch Register */
-#define FDADR2         __REG(0x44000220)  /* DMA Channel 2 Frame Descriptor Address Register */
-#define FSADR2         __REG(0x44000224)  /* DMA Channel 2 Frame Source Address Register */
-#define FIDR2          __REG(0x44000228)  /* DMA Channel 2 Frame ID Register */
-#define LDCMD2         __REG(0x4400022C)  /* DMA Channel 2 Command Register */
-#define FDADR3         __REG(0x44000230)  /* DMA Channel 3 Frame Descriptor Address Register */
-#define FSADR3         __REG(0x44000234)  /* DMA Channel 3 Frame Source Address Register */
-#define FIDR3          __REG(0x44000238)  /* DMA Channel 3 Frame ID Register */
-#define LDCMD3         __REG(0x4400023C)  /* DMA Channel 3 Command Register */
-#define FDADR4         __REG(0x44000240)  /* DMA Channel 4 Frame Descriptor Address Register */
-#define FSADR4         __REG(0x44000244)  /* DMA Channel 4 Frame Source Address Register */
-#define FIDR4          __REG(0x44000248)  /* DMA Channel 4 Frame ID Register */
-#define LDCMD4         __REG(0x4400024C)  /* DMA Channel 4 Command Register */
-#define FDADR5         __REG(0x44000250)  /* DMA Channel 5 Frame Descriptor Address Register */
-#define FSADR5         __REG(0x44000254)  /* DMA Channel 5 Frame Source Address Register */
-#define FIDR5          __REG(0x44000258)  /* DMA Channel 5 Frame ID Register */
-#define LDCMD5         __REG(0x4400025C)  /* DMA Channel 5 Command Register */
-
-#define OVL1C1         __REG(0x44000050)  /* Overlay 1 Control Register 1 */
-#define OVL1C2         __REG(0x44000060)  /* Overlay 1 Control Register 2 */
-#define OVL2C1         __REG(0x44000070)  /* Overlay 2 Control Register 1 */
-#define OVL2C2         __REG(0x44000080)  /* Overlay 2 Control Register 2 */
-#define CCR            __REG(0x44000090)  /* Cursor Control Register */
-
-#define FBR5           __REG(0x44000110)  /* DMA Channel 5 Frame Branch Register */
-#define FBR6           __REG(0x44000114)  /* DMA Channel 6 Frame Branch Register */
+#define LCCR4          0x44000010  /* LCD Controller Control Register 4 */
+#define LCCR5          0x44000014  /* LCD Controller Control Register 5 */
+#define FBR0           0x44000020  /* DMA Channel 0 Frame Branch Register */
+#define FBR1           0x44000024  /* DMA Channel 1 Frame Branch Register */
+#define FBR2           0x44000028  /* DMA Channel 2 Frame Branch Register */
+#define FBR3           0x4400002C  /* DMA Channel 3 Frame Branch Register */
+#define FBR4           0x44000030  /* DMA Channel 4 Frame Branch Register */
+#define FDADR2         0x44000220  /* DMA Channel 2 Frame Descriptor Address Register */
+#define FSADR2         0x44000224  /* DMA Channel 2 Frame Source Address Register */
+#define FIDR2          0x44000228  /* DMA Channel 2 Frame ID Register */
+#define LDCMD2         0x4400022C  /* DMA Channel 2 Command Register */
+#define FDADR3         0x44000230  /* DMA Channel 3 Frame Descriptor Address Register */
+#define FSADR3         0x44000234  /* DMA Channel 3 Frame Source Address Register */
+#define FIDR3          0x44000238  /* DMA Channel 3 Frame ID Register */
+#define LDCMD3         0x4400023C  /* DMA Channel 3 Command Register */
+#define FDADR4         0x44000240  /* DMA Channel 4 Frame Descriptor Address Register */
+#define FSADR4         0x44000244  /* DMA Channel 4 Frame Source Address Register */
+#define FIDR4          0x44000248  /* DMA Channel 4 Frame ID Register */
+#define LDCMD4         0x4400024C  /* DMA Channel 4 Command Register */
+#define FDADR5         0x44000250  /* DMA Channel 5 Frame Descriptor Address Register */
+#define FSADR5         0x44000254  /* DMA Channel 5 Frame Source Address Register */
+#define FIDR5          0x44000258  /* DMA Channel 5 Frame ID Register */
+#define LDCMD5         0x4400025C  /* DMA Channel 5 Command Register */
+
+#define OVL1C1         0x44000050  /* Overlay 1 Control Register 1 */
+#define OVL1C2         0x44000060  /* Overlay 1 Control Register 2 */
+#define OVL2C1         0x44000070  /* Overlay 2 Control Register 1 */
+#define OVL2C2         0x44000080  /* Overlay 2 Control Register 2 */
+#define CCR            0x44000090  /* Cursor Control Register */
+
+#define FBR5           0x44000110  /* DMA Channel 5 Frame Branch Register */
+#define FBR6           0x44000114  /* DMA Channel 6 Frame Branch Register */
 
 #define LCCR0_LDDALT   (1<<26)         /* LDD Alternate mapping bit when base pixel is RGBT16 */
 #define LCCR0_OUC      (1<<25)         /* Overlay Underlay Control Bit */
@@ -2572,16 +2734,16 @@ typedef void            (*ExcpHndlr) (void) ;
 
 /* Keypad controller */
 
-#define KPC            __REG(0x41500000) /* Keypad Interface Control register */
-#define KPDK           __REG(0x41500008) /* Keypad Interface Direct Key register */
-#define KPREC          __REG(0x41500010) /* Keypad Intefcace Rotary Encoder register */
-#define KPMK           __REG(0x41500018) /* Keypad Intefcace Matrix Key register */
-#define KPAS           __REG(0x41500020) /* Keypad Interface Automatic Scan register */
-#define KPASMKP0       __REG(0x41500028) /* Keypad Interface Automatic Scan Multiple Key Presser register 0 */
-#define KPASMKP1       __REG(0x41500030) /* Keypad Interface Automatic Scan Multiple Key Presser register 1 */
-#define KPASMKP2       __REG(0x41500038) /* Keypad Interface Automatic Scan Multiple Key Presser register 2 */
-#define KPASMKP3       __REG(0x41500040) /* Keypad Interface Automatic Scan Multiple Key Presser register 3 */
-#define KPKDI          __REG(0x41500048) /* Keypad Interface Key Debounce Interval register */
+#define KPC            0x41500000 /* Keypad Interface Control register */
+#define KPDK           0x41500008 /* Keypad Interface Direct Key register */
+#define KPREC          0x41500010 /* Keypad Intefcace Rotary Encoder register */
+#define KPMK           0x41500018 /* Keypad Intefcace Matrix Key register */
+#define KPAS           0x41500020 /* Keypad Interface Automatic Scan register */
+#define KPASMKP0       0x41500028 /* Keypad Interface Automatic Scan Multiple Key Presser register 0 */
+#define KPASMKP1       0x41500030 /* Keypad Interface Automatic Scan Multiple Key Presser register 1 */
+#define KPASMKP2       0x41500038 /* Keypad Interface Automatic Scan Multiple Key Presser register 2 */
+#define KPASMKP3       0x41500040 /* Keypad Interface Automatic Scan Multiple Key Presser register 3 */
+#define KPKDI          0x41500048 /* Keypad Interface Key Debounce Interval register */
 
 #define KPC_AS         (0x1 << 30)  /* Automatic Scan bit */
 #define KPC_ASACT      (0x1 << 29)  /* Automatic Scan on Activity */
@@ -2623,15 +2785,15 @@ typedef void            (*ExcpHndlr) (void) ;
 #define KPASMKPx_SO    (0x1 << 31)
 
 #define GPIO113_BIT    (1 << 17)/* GPIO113 in GPSR, GPCR, bit 17 */
-#define PSLR           __REG(0x40F00034)
-#define PSTR           __REG(0x40F00038)  /* Power Manager Standby Configuration Reg */
-#define PSNR           __REG(0x40F0003C)  /* Power Manager Sense Configuration Reg */
-#define PVCR           __REG(0x40F00040)  /* Power Manager Voltage Change Control Reg */
-#define PKWR           __REG(0x40F00050)  /* Power Manager KB Wake-Up Enable Reg */
-#define PKSR           __REG(0x40F00054)  /* Power Manager KB Level-Detect Status Reg */
-#define OSMR4          __REG(0x40A00080)  /* */
-#define OSCR4          __REG(0x40A00040)  /* OS Timer Counter Register */
-#define OMCR4          __REG(0x40A000C0)  /* */
+#define PSLR           0x40F00034
+#define PSTR           0x40F00038  /* Power Manager Standby Configuration Reg */
+#define PSNR           0x40F0003C  /* Power Manager Sense Configuration Reg */
+#define PVCR           0x40F00040  /* Power Manager Voltage Change Control Reg */
+#define PKWR           0x40F00050  /* Power Manager KB Wake-Up Enable Reg */
+#define PKSR           0x40F00054  /* Power Manager KB Level-Detect Status Reg */
+#define OSMR4          0x40A00080  /* */
+#define OSCR4          0x40A00040  /* OS Timer Counter Register */
+#define OMCR4          0x40A000C0  /* */
 
 #endif /* CONFIG_PXA27X */
 
index d8e33fc5135d6f74fedb89ca574396d9ea95f2bc..c60dba26bfaf2efdb7d420e01dccd6fa4ddf4b09 100644 (file)
 #ifndef _ASM_CONFIG_H_
 #define _ASM_CONFIG_H_
 
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-/* Relocation to SDRAM works on all ARM boards */
-#define CONFIG_RELOC_FIXUP_WORKS
-#endif
 #define CONFIG_LMB
 #define CONFIG_SYS_BOOT_RAMDISK_HIGH
 #endif
index 6152f348f3389239744e08ab7045aa435f6ed2d8..ada3fbb6415cfe6d5a6d7b032743971c9e5be9c7 100644 (file)
@@ -30,7 +30,7 @@
  * global variables during system initialization (until we have set
  * up the memory controller so that we can use RAM).
  *
- * Keep it *SMALL* and remember to set CONFIG_SYS_GBL_DATA_SIZE > sizeof(gd_t)
+ * Keep it *SMALL* and remember to set GENERATED_GBL_DATA_SIZE > sizeof(gd_t)
  */
 
 typedef        struct  global_data {
@@ -47,7 +47,20 @@ typedef      struct  global_data {
 #ifdef CONFIG_FSL_ESDHC
        unsigned long   sdhc_clk;
 #endif
-#if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
+#ifdef CONFIG_AT91FAMILY
+       /* "static data" needed by at91's clock.c */
+       unsigned long   cpu_clk_rate_hz;
+       unsigned long   main_clk_rate_hz;
+       unsigned long   mck_rate_hz;
+       unsigned long   plla_rate_hz;
+       unsigned long   pllb_rate_hz;
+       unsigned long   at91_pllb_usb_init;
+       /* "static data" needed by at91's timer.c */
+       unsigned long   timer_rate_hz;
+       unsigned long   tbl;
+       unsigned long   tbu;
+       unsigned long long      timer_reset_value;
+#endif
        unsigned long   relocaddr;      /* Start address of U-Boot in RAM */
        phys_size_t     ram_size;       /* RAM size */
        unsigned long   mon_len;        /* monitor len */
@@ -56,7 +69,6 @@ typedef       struct  global_data {
        unsigned long   reloc_off;
 #if !(defined(CONFIG_SYS_NO_ICACHE) && defined(CONFIG_SYS_NO_DCACHE))
        unsigned long   tlb_addr;
-#endif
 #endif
        void            **jt;           /* jump table */
        char            env_buf[32];    /* buffer for getenv() before reloc. */
index faf800a17be98b7eccadc8a16f88afc4c4999aa2..33973a32e0b029ce61fb201d9cd3ea7e5b801221 100644 (file)
 #define _U_BOOT_ARM_H_ 1
 
 /* for the following variables, see start.S */
-extern ulong _bss_start;       /* code + data end == BSS start */
-extern ulong _bss_end;         /* BSS end */
+extern ulong _bss_start_ofs;   /* BSS start relative to _start */
+extern ulong _bss_end_ofs;             /* BSS end relative to _start */
 extern ulong IRQ_STACK_START;  /* top of IRQ stack */
 extern ulong FIQ_STACK_START;  /* top of FIQ stack */
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-extern ulong _armboot_start;   /* code start */
-#else
 extern ulong _TEXT_BASE;       /* code start */
-extern ulong _datarel_start;
-extern ulong _datarelrolocal_start;
-extern ulong _datarellocal_start;
-extern ulong _datarelro_start;
+extern ulong _datarel_start_ofs;
+extern ulong _datarelrolocal_start_ofs;
+extern ulong _datarellocal_start_ofs;
+extern ulong _datarelro_start_ofs;
 extern ulong IRQ_STACK_START_IN;       /* 8 bytes in IRQ stack */
-#endif
 
 /* cpu/.../cpu.c */
 int    cpu_init(void);
@@ -56,9 +52,7 @@ int   arch_misc_init(void);
 /* board/.../... */
 int    board_init(void);
 int    dram_init (void);
-#if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
 void   dram_init_banksize (void);
-#endif
 void   setup_serial_tag (struct tag **params);
 void   setup_revision_tag (struct tag **params);
 
index 108e6c40c4cf84daa8a544a2c19bf65d8a522f9f..1fd5f8362f7a3e1a076c44e9f554e6c0297dfdb0 100644 (file)
@@ -127,11 +127,7 @@ static int init_baudrate (void)
        char tmp[64];   /* long enough for environment variables */
        int i = getenv_f("baudrate", tmp, sizeof (tmp));
 
-#if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
        gd->baudrate = (i > 0)
-#else
-       gd->bd->bi_baudrate = gd->baudrate = (i > 0)
-#endif
                        ? (int) simple_strtoul (tmp, NULL, 10)
                        : CONFIG_BAUDRATE;
 
@@ -142,12 +138,8 @@ static int display_banner (void)
 {
        printf ("\n\n%s\n\n", version_string);
        debug ("U-Boot code: %08lX -> %08lX  BSS: -> %08lX\n",
-#if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
               _TEXT_BASE,
-#else
-              _armboot_start,
-#endif
-              _bss_start, _bss_end);
+              _bss_start_ofs+_TEXT_BASE, _bss_end_ofs+_TEXT_BASE);
 #ifdef CONFIG_MODEM_SUPPORT
        debug ("Modem Support enabled\n");
 #endif
@@ -190,16 +182,6 @@ static int display_dram_config (void)
        return (0);
 }
 
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-#ifndef CONFIG_SYS_NO_FLASH
-static void display_flash_config (ulong size)
-{
-       puts ("Flash: ");
-       print_size (size, "\n");
-}
-#endif /* CONFIG_SYS_NO_FLASH */
-#endif
-
 #if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C)
 static int init_func_i2c (void)
 {
@@ -246,214 +228,6 @@ typedef int (init_fnc_t) (void);
 
 int print_cpuinfo (void);
 
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-init_fnc_t *init_sequence[] = {
-#if defined(CONFIG_ARCH_CPU_INIT)
-       arch_cpu_init,          /* basic arch cpu dependent setup */
-#endif
-       board_init,             /* basic board dependent setup */
-#if defined(CONFIG_USE_IRQ)
-       interrupt_init,         /* set up exceptions */
-#endif
-       timer_init,             /* initialize timer */
-#ifdef CONFIG_FSL_ESDHC
-       get_clocks,
-#endif
-       env_init,               /* initialize environment */
-       init_baudrate,          /* initialze baudrate settings */
-       serial_init,            /* serial communications setup */
-       console_init_f,         /* stage 1 init of console */
-       display_banner,         /* say that we are here */
-#if defined(CONFIG_DISPLAY_CPUINFO)
-       print_cpuinfo,          /* display cpu info (and speed) */
-#endif
-#if defined(CONFIG_DISPLAY_BOARDINFO)
-       checkboard,             /* display board info */
-#endif
-#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C)
-       init_func_i2c,
-#endif
-       dram_init,              /* configure available RAM banks */
-#if defined(CONFIG_CMD_PCI) || defined (CONFIG_PCI)
-       arm_pci_init,
-#endif
-       display_dram_config,
-       NULL,
-};
-
-void start_armboot (void)
-{
-       init_fnc_t **init_fnc_ptr;
-       char *s;
-#if defined(CONFIG_VFD) || defined(CONFIG_LCD)
-       unsigned long addr;
-#endif
-
-       /* Pointer is writable since we allocated a register for it */
-       gd = (gd_t*)(_armboot_start - CONFIG_SYS_MALLOC_LEN - sizeof(gd_t));
-       /* compiler optimization barrier needed for GCC >= 3.4 */
-       __asm__ __volatile__("": : :"memory");
-
-       memset ((void*)gd, 0, sizeof (gd_t));
-       gd->bd = (bd_t*)((char*)gd - sizeof(bd_t));
-       memset (gd->bd, 0, sizeof (bd_t));
-
-       gd->flags |= GD_FLG_RELOC;
-
-       monitor_flash_len = _bss_start - _armboot_start;
-
-       for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
-               if ((*init_fnc_ptr)() != 0) {
-                       hang ();
-               }
-       }
-
-       /* armboot_start is defined in the board-specific linker script */
-       mem_malloc_init (_armboot_start - CONFIG_SYS_MALLOC_LEN,
-                       CONFIG_SYS_MALLOC_LEN);
-
-#ifndef CONFIG_SYS_NO_FLASH
-       /* configure available FLASH banks */
-       display_flash_config (flash_init ());
-#endif /* CONFIG_SYS_NO_FLASH */
-
-#ifdef CONFIG_VFD
-#      ifndef PAGE_SIZE
-#        define PAGE_SIZE 4096
-#      endif
-       /*
-        * reserve memory for VFD display (always full pages)
-        */
-       /* bss_end is defined in the board-specific linker script */
-       addr = (_bss_end + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1);
-       vfd_setmem (addr);
-       gd->fb_base = addr;
-#endif /* CONFIG_VFD */
-
-#ifdef CONFIG_LCD
-       /* board init may have inited fb_base */
-       if (!gd->fb_base) {
-#              ifndef PAGE_SIZE
-#                define PAGE_SIZE 4096
-#              endif
-               /*
-                * reserve memory for LCD display (always full pages)
-                */
-               /* bss_end is defined in the board-specific linker script */
-               addr = (_bss_end + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1);
-               lcd_setmem (addr);
-               gd->fb_base = addr;
-       }
-#endif /* CONFIG_LCD */
-
-#if defined(CONFIG_CMD_NAND)
-       puts ("NAND:  ");
-       nand_init();            /* go init the NAND */
-#endif
-
-#if defined(CONFIG_CMD_ONENAND)
-       onenand_init();
-#endif
-
-#ifdef CONFIG_HAS_DATAFLASH
-       AT91F_DataflashInit();
-       dataflash_print_info();
-#endif
-
-#ifdef CONFIG_GENERIC_MMC
-/*
- * MMC initialization is called before relocating env.
- * Thus It is required that operations like pin multiplexer
- * be put in board_init.
- */
-       puts ("MMC:   ");
-       mmc_initialize (gd->bd);
-#endif
-
-       /* initialize environment */
-       env_relocate ();
-
-#ifdef CONFIG_VFD
-       /* must do this after the framebuffer is allocated */
-       drv_vfd_init();
-#endif /* CONFIG_VFD */
-
-#ifdef CONFIG_SERIAL_MULTI
-       serial_initialize();
-#endif
-
-       /* IP Address */
-       gd->bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
-
-       stdio_init ();  /* get the devices list going. */
-
-       jumptable_init ();
-
-#if defined(CONFIG_API)
-       /* Initialize API */
-       api_init ();
-#endif
-
-       console_init_r ();      /* fully init console as a device */
-
-#if defined(CONFIG_ARCH_MISC_INIT)
-       /* miscellaneous arch dependent initialisations */
-       arch_misc_init ();
-#endif
-#if defined(CONFIG_MISC_INIT_R)
-       /* miscellaneous platform dependent initialisations */
-       misc_init_r ();
-#endif
-
-       /* enable exceptions */
-       enable_interrupts ();
-
-       /* Perform network card initialisation if necessary */
-
-#if defined(CONFIG_DRIVER_SMC91111) || defined (CONFIG_DRIVER_LAN91C96)
-       /* XXX: this needs to be moved to board init */
-       if (getenv ("ethaddr")) {
-               uchar enetaddr[6];
-               eth_getenv_enetaddr("ethaddr", enetaddr);
-               smc_set_mac_addr(enetaddr);
-       }
-#endif /* CONFIG_DRIVER_SMC91111 || CONFIG_DRIVER_LAN91C96 */
-
-       /* Initialize from environment */
-       if ((s = getenv ("loadaddr")) != NULL) {
-               load_addr = simple_strtoul (s, NULL, 16);
-       }
-#if defined(CONFIG_CMD_NET)
-       if ((s = getenv ("bootfile")) != NULL) {
-               copy_filename (BootFile, s, sizeof (BootFile));
-       }
-#endif
-
-#ifdef BOARD_LATE_INIT
-       board_late_init ();
-#endif
-
-#ifdef CONFIG_BITBANGMII
-       bb_miiphy_init();
-#endif
-#if defined(CONFIG_CMD_NET)
-#if defined(CONFIG_NET_MULTI)
-       puts ("Net:   ");
-#endif
-       eth_initialize(gd->bd);
-#if defined(CONFIG_RESET_PHY_R)
-       debug ("Reset Ethernet PHY\n");
-       reset_phy();
-#endif
-#endif
-       /* main_loop() can return to retry autoboot, if so just run it again. */
-       for (;;) {
-               main_loop ();
-       }
-
-       /* NOTREACHED - no way out of command loop except booting */
-}
-#else
 void __dram_init_banksize(void)
 {
        gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
@@ -508,7 +282,7 @@ void board_init_f (ulong bootflag)
 
        memset ((void*)gd, 0, sizeof (gd_t));
 
-       gd->mon_len = _bss_end - _TEXT_BASE;
+       gd->mon_len = _bss_end_ofs;
 
        for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
                if ((*init_fnc_ptr)() != 0) {
@@ -670,6 +444,7 @@ static char *failed = "*** failed ***\n";
  *
  ************************************************************************
  */
+
 void board_init_r (gd_t *id, ulong dest_addr)
 {
        char *s;
@@ -677,15 +452,6 @@ void board_init_r (gd_t *id, ulong dest_addr)
        ulong malloc_start;
 #if !defined(CONFIG_SYS_NO_FLASH)
        ulong flash_size;
-#endif
-#if !defined(CONFIG_RELOC_FIXUP_WORKS)
-       extern void malloc_bin_reloc (void);
-#if defined(CONFIG_CMD_BMP)
-       extern void bmp_reloc(void);
-#endif
-#if defined(CONFIG_CMD_I2C)
-       extern void i2c_reloc(void);
-#endif
 #endif
 
        gd = id;
@@ -693,7 +459,7 @@ void board_init_r (gd_t *id, ulong dest_addr)
 
        gd->flags |= GD_FLG_RELOC;      /* tell others: relocation done */
 
-       monitor_flash_len = _bss_start - _TEXT_BASE;
+       monitor_flash_len = _bss_start_ofs;
        debug ("monitor flash len: %08lX\n", monitor_flash_len);
        board_init();   /* Setup chipselects */
 
@@ -703,36 +469,16 @@ void board_init_r (gd_t *id, ulong dest_addr)
 
        debug ("Now running in RAM - U-Boot at: %08lx\n", dest_addr);
 
-#if !defined(CONFIG_RELOC_FIXUP_WORKS)
-       /*
-        * We have to relocate the command table manually
-        */
-       fixup_cmdtable(&__u_boot_cmd_start,
-               (ulong)(&__u_boot_cmd_end - &__u_boot_cmd_start));
-#if defined(CONFIG_CMD_BMP)
-       bmp_reloc();
-#endif
-#if defined(CONFIG_CMD_I2C)
-       i2c_reloc();
-#endif
-#endif /* !defined(CONFIG_RELOC_FIXUP_WORKS) */
-
 #ifdef CONFIG_LOGBUFFER
        logbuff_init_ptrs ();
 #endif
 #ifdef CONFIG_POST
        post_output_backlog ();
-#ifndef CONFIG_RELOC_FIXUP_WORKS
-       post_reloc ();
-#endif
 #endif
 
        /* The Malloc area is immediately below the monitor copy in DRAM */
        malloc_start = dest_addr - TOTAL_MALLOC_LEN;
        mem_malloc_init (malloc_start, TOTAL_MALLOC_LEN);
-#if !defined(CONFIG_RELOC_FIXUP_WORKS)
-       malloc_bin_reloc ();
-#endif
 
 #if !defined(CONFIG_SYS_NO_FLASH)
        puts ("FLASH: ");
@@ -895,7 +641,6 @@ void board_init_r (gd_t *id, ulong dest_addr)
 
        /* NOTREACHED - no way out of command loop except booting */
 }
-#endif /* defined(CONFIG_SYS_ARM_WITHOUT_RELOC) */
 
 void hang (void)
 {
index 2e7b2e1f33f27b472cbf30528301be67ff9733fb..a1649eef0d1a905cf4a4fe6db13da8588e62a63e 100644 (file)
@@ -177,8 +177,6 @@ static int fixup_memory_node(void *blob)
 static int bootm_linux_fdt(int machid, bootm_headers_t *images)
 {
        ulong rd_len;
-       bd_t *bd = gd->bd;
-       char *s;
        void (*kernel_entry)(int zero, int dt_machid, void *dtblob);
        ulong bootmap_base = getenv_bootm_low();
        ulong of_size = images->ft_len;
index fe6d45987bf32dde88c3e346c3b772c07ba1fae0..d9175f058327fabf4f91ee0d751a043e4b0c0133 100644 (file)
@@ -44,7 +44,6 @@ static void cp_delay (void)
        asm volatile("" : : : "memory");
 }
 
-#if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
 static inline void dram_bank_mmu_setup(int bank)
 {
        u32 *page_table = (u32 *)gd->tlb_addr;
@@ -58,18 +57,11 @@ static inline void dram_bank_mmu_setup(int bank)
                page_table[i] = i << 20 | (3 << 10) | CACHE_SETUP;
        }
 }
-#endif
 
 /* to activate the MMU we need to set up virtual memory: use 1M areas */
 static inline void mmu_setup(void)
 {
-#if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
        u32 *page_table = (u32 *)gd->tlb_addr;
-#else
-       static u32 __attribute__((aligned(16384))) page_table[4096];
-       bd_t *bd = gd->bd;
-       int j;
-#endif
        int i;
        u32 reg;
 
@@ -77,20 +69,9 @@ static inline void mmu_setup(void)
        for (i = 0; i < 4096; i++)
                page_table[i] = i << 20 | (3 << 10) | 0x12;
 
-#if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
        for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
                dram_bank_mmu_setup(i);
        }
-#else
-       /* Then, enable cacheable and bufferable for RAM only */
-       for (j = 0; j < CONFIG_NR_DRAM_BANKS; j++) {
-               for (i = bd->bi_dram[j].start >> 20;
-                       i < (bd->bi_dram[j].start + bd->bi_dram[j].size) >> 20;
-                       i++) {
-                       page_table[i] = i << 20 | (3 << 10) | CACHE_SETUP;
-               }
-       }
-#endif
 
        /* Copy the page table address to cp15 */
        asm volatile("mcr p15, 0, %0, c2, c0, 0"
index 55b633ee0013c9a7a4220057eb8c93d7075e01c6..57151689a90dbadf65420212882341005b8a8831 100644 (file)
@@ -38,7 +38,7 @@ void  flush_cache (unsigned long dummy1, unsigned long dummy2)
        /* disable write buffer as well (page 2-22) */
        asm("mcr p15, 0, %0, c7, c10, 4" : : "r" (0));
 #endif
-#ifdef CONFIG_ARMCORTEXA8
+#ifdef CONFIG_ARMV7
        void v7_flush_cache_all(void);
 
        v7_flush_cache_all();
index 9a21e7b40a02629fcffb2a03bef549f074cde954..74ff5ce1c442564303ae09944f543517e5f3ce6e 100644 (file)
@@ -46,12 +46,8 @@ int interrupt_init (void)
        /*
         * setup up stacks if necessary
         */
-#if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
        IRQ_STACK_START = gd->irq_sp - 4;
        IRQ_STACK_START_IN = gd->irq_sp + 8;
-#else
-       IRQ_STACK_START = _armboot_start - CONFIG_SYS_MALLOC_LEN - CONFIG_SYS_GBL_DATA_SIZE - 4;
-#endif
        FIQ_STACK_START = IRQ_STACK_START - CONFIG_STACKSIZE_IRQ;
 
        return arch_interrupt_init();
@@ -86,7 +82,6 @@ int disable_interrupts (void)
        return (old & 0x80) == 0;
 }
 #else
-#if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
 int interrupt_init (void)
 {
        /*
@@ -96,7 +91,6 @@ int interrupt_init (void)
 
        return 0;
 }
-#endif
 
 void enable_interrupts (void)
 {
index 06bf4c692d8e4d848d93d06689bd67a446091242..97140e93ebb8fa2917375e5dbd1585f47764d8c7 100644 (file)
@@ -19,6 +19,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  * MA 02111-1307 USA
  */
+#include <asm-offsets.h>
 #include <config.h>
 #include <asm/ptrace.h>
 #include <asm/sysreg.h>
index 049c44eaf84de0ce67d86afcf0cd016d4bd6c407..02fbfb3abfea8ae55e4aef175d3e4e525cef5a79 100644 (file)
@@ -21,4 +21,6 @@
 #ifndef _ASM_CONFIG_H_
 #define _ASM_CONFIG_H_
 
+#define CONFIG_NEEDS_MANUAL_RELOC
+
 #endif
index 5a7aed94e1460d34b0fafb2a7bdf90588bb6ef56..4ef8fc570f34524691e59a6f03da60e2dac1fe92 100644 (file)
@@ -29,7 +29,7 @@
  * global variables during system initialization (until we have set
  * up the memory controller so that we can use RAM).
  *
- * Keep it *SMALL* and remember to set CONFIG_SYS_GBL_DATA_SIZE > sizeof(gd_t)
+ * Keep it *SMALL* and remember to set GENERATED_GBL_DATA_SIZE > sizeof(gd_t)
  */
 
 typedef        struct  global_data {
index e6b81cca73645538c92edd4d95d1835dd5c8933d..8b56237f1893d705807ad5735c0e0d78664ca9fd 100644 (file)
@@ -257,7 +257,6 @@ void board_init_r(gd_t *new_gd, ulong dest_addr)
        extern char * env_name_spec;
 #endif
        char *s;
-       cmd_tbl_t *cmdtp;
        bd_t *bd;
 
        gd = new_gd;
@@ -273,13 +272,13 @@ void board_init_r(gd_t *new_gd, ulong dest_addr)
 
        monitor_flash_len = _edata - _text;
 
-#if !defined(CONFIG_RELOC_FIXUP_WORKS)
+#if defined(CONFIG_NEEDS_MANUAL_RELOC)
        /*
         * We have to relocate the command table manually
         */
        fixup_cmdtable(&__u_boot_cmd_start,
                (ulong)(&__u_boot_cmd_end - &__u_boot_cmd_start));
-#endif /* !defined(CONFIG_RELOC_FIXUP_WORKS) */
+#endif /* defined(CONFIG_NEEDS_MANUAL_RELOC) */
 
        /* there are some other pointer constants we must deal with */
 #ifndef CONFIG_ENV_IS_NOWHERE
index a3300841a0c3bb4349b3cd58353f94bae0febfe3..ab117ca5ad5227314b4619dc310d7d47413a5847 100644 (file)
@@ -26,8 +26,6 @@ CROSS_COMPILE ?= bfin-uclinux-
 STANDALONE_LOAD_ADDR = 0x1000 -m elf32bfin
 
 CONFIG_BFIN_BOOT_MODE := $(strip $(subst ",,$(CONFIG_BFIN_BOOT_MODE)))
-CONFIG_ENV_OFFSET := $(strip $(subst ",,$(CONFIG_ENV_OFFSET)))
-CONFIG_ENV_SIZE := $(strip $(subst ",,$(CONFIG_ENV_SIZE)))
 
 PLATFORM_RELFLAGS += -ffixed-P3 -fomit-frame-pointer -mno-fdpic
 PLATFORM_CPPFLAGS += -DCONFIG_BLACKFIN
index 215e0f29183fbb51e0631b0d9c28d68a6e71e8fb..04372525cc2470f8bb0141945e6675e7863a9d57 100644 (file)
@@ -9,13 +9,13 @@
 #ifndef __ASM_BLACKFIN_CONFIG_POST_H__
 #define __ASM_BLACKFIN_CONFIG_POST_H__
 
+/* Some of our defines use this (like CONFIG_SYS_GBL_DATA_ADDR) */
+#include <asm-offsets.h>
+
 #ifndef CONFIG_BFIN_SCRATCH_REG
 # define CONFIG_BFIN_SCRATCH_REG retn
 #endif
 
-/* Relocation to SDRAM works on all Blackfin boards */
-#define CONFIG_RELOC_FIXUP_WORKS
-
 /* Make sure the structure is properly aligned */
 #if ((CONFIG_SYS_GBL_DATA_ADDR & -4) != CONFIG_SYS_GBL_DATA_ADDR)
 # error CONFIG_SYS_GBL_DATA_ADDR: must be 4 byte aligned
 #ifndef CONFIG_SYS_MALLOC_BASE
 # define CONFIG_SYS_MALLOC_BASE (CONFIG_SYS_MONITOR_BASE - CONFIG_SYS_MALLOC_LEN)
 #endif
-#ifndef CONFIG_SYS_GBL_DATA_SIZE
-# define CONFIG_SYS_GBL_DATA_SIZE (128)
-#endif
 #ifndef CONFIG_SYS_GBL_DATA_ADDR
-# define CONFIG_SYS_GBL_DATA_ADDR (CONFIG_SYS_MALLOC_BASE - CONFIG_SYS_GBL_DATA_SIZE)
+# define CONFIG_SYS_GBL_DATA_ADDR (CONFIG_SYS_MALLOC_BASE - GENERATED_GBL_DATA_SIZE)
 #endif
 #ifndef CONFIG_STACKBASE
 # define CONFIG_STACKBASE (CONFIG_SYS_GBL_DATA_ADDR - 4)
index d5514b0dffb17737fa67ccd6545df3bf36bcf8d1..eba5e93e212c0199be859697d3dcc5057cf9b752 100644 (file)
@@ -37,7 +37,7 @@
  * global variables during system initialization (until we have set
  * up the memory controller so that we can use RAM).
  *
- * Keep it *SMALL* and remember to set CONFIG_SYS_GBL_DATA_SIZE > sizeof(gd_t)
+ * Keep it *SMALL* and remember to set GENERATED_GBL_DATA_SIZE > sizeof(gd_t)
  */
 typedef struct global_data {
        bd_t *bd;
index fcfd1746a59f78dd872ae8319f98e4c070c7f57d..8eca7d6fb64d4cd1490c3c1063e16e774ca6c82d 100644 (file)
@@ -237,12 +237,12 @@ void board_init_f(ulong bootflag)
 #endif
 
 #ifdef DEBUG
-       if (CONFIG_SYS_GBL_DATA_SIZE < sizeof(*gd))
+       if (GENERATED_GBL_DATA_SIZE < sizeof(*gd))
                hang();
 #endif
        serial_early_puts("Init global data\n");
        gd = (gd_t *) (CONFIG_SYS_GBL_DATA_ADDR);
-       memset((void *)gd, 0, CONFIG_SYS_GBL_DATA_SIZE);
+       memset((void *)gd, 0, GENERATED_GBL_DATA_SIZE);
 
        /* Board data initialization */
        addr = (CONFIG_SYS_GBL_DATA_ADDR + sizeof(gd_t));
index 1952de79f8ae121030414d64ffb7c3f919be27d7..049c44eaf84de0ce67d86afcf0cd016d4bd6c407 100644 (file)
@@ -21,6 +21,4 @@
 #ifndef _ASM_CONFIG_H_
 #define _ASM_CONFIG_H_
 
-#define CONFIG_RELOC_FIXUP_WORKS
-
 #endif
index 597112318f567d373d2d85df459f66ff8b9df208..e3f8a25efb600352cd139756f0ae51a18f52d289 100644 (file)
@@ -30,7 +30,7 @@
  * global variables during system initialization (until we have set
  * up the memory controller so that we can use RAM).
  *
- * Keep it *SMALL* and remember to set CONFIG_SYS_GBL_DATA_SIZE > sizeof(gd_t)
+ * Keep it *SMALL* and remember to set GENERATED_GBL_DATA_SIZE > sizeof(gd_t)
  */
 
 #ifndef __ASSEMBLY__
index ac710969bba05b918e7acaace5962f6608f1d2d6..d09d49274ebc188c6e864483c9ff7d3d5357f457 100644 (file)
@@ -21,6 +21,7 @@
  * MA 02111-1307 USA
  */
 
+#include <asm-offsets.h>
 #include <config.h>
 #include <timestamp.h>
 #include "version.h"
index 20b50e7579e0e79f7525636aac8b5bf122a8570a..a726b59846dc2a16ed6997d5554d38cac50e841e 100644 (file)
@@ -21,6 +21,7 @@
  * MA 02111-1307 USA
  */
 
+#include <asm-offsets.h>
 #include <config.h>
 #include <timestamp.h>
 #include "version.h"
index d1f3d83270f71a8a3f5456325830a5796ed3fa86..f0cfa6ffe059ebe28940eb5994d9fca89ec2ea63 100644 (file)
@@ -21,6 +21,7 @@
  * MA 02111-1307 USA
  */
 
+#include <asm-offsets.h>
 #include <config.h>
 #include <timestamp.h>
 #include "version.h"
index a80b0a99464bdd4847a1ac076e4f9e5dcd7ef1a0..53ac471a416905352622ed16581eb174d004a516 100644 (file)
@@ -24,6 +24,7 @@
  * MA 02111-1307 USA
  */
 
+#include <asm-offsets.h>
 #include <config.h>
 #include <timestamp.h>
 #include "version.h"
index 8b69d1f46b3dff7de70bf356adc7bd1a9e8db691..5255f374d5e6b3ec8977d8b38cd9728dd7982210 100644 (file)
@@ -21,6 +21,7 @@
  * MA 02111-1307 USA
  */
 
+#include <asm-offsets.h>
 #include <config.h>
 #include <timestamp.h>
 #include "version.h"
index 84118629e27a7cd349eafc5a73d77f419344e451..e30923fac7f33c24ea3987e50dcdebf064dc60c1 100644 (file)
@@ -21,6 +21,7 @@
  * MA 02111-1307 USA
  */
 
+#include <asm-offsets.h>
 #include <config.h>
 #include <timestamp.h>
 #include "version.h"
index ec2cc16bebaa395d649bfcfaf77dd8cfccf8f0b6..51050a39a3e99b7b4bd03531142a1f7f4b39e11c 100644 (file)
@@ -21,6 +21,8 @@
 #ifndef _ASM_CONFIG_H_
 #define _ASM_CONFIG_H_
 
+#define CONFIG_NEEDS_MANUAL_RELOC
+
 #define CONFIG_LMB
 #define CONFIG_SYS_BOOT_RAMDISK_HIGH
 #define CONFIG_SYS_BOOT_GET_CMDLINE
index 3a36f8225486ba992dad65a4ea2399e567b7d12b..fc486fda58ddf52f00f857380f4f8f498b7574b8 100644 (file)
@@ -30,7 +30,7 @@
  * global variables during system initialization (until we have set
  * up the memory controller so that we can use RAM).
  *
- * Keep it *SMALL* and remember to set CONFIG_SYS_GBL_DATA_SIZE > sizeof(gd_t)
+ * Keep it *SMALL* and remember to set GENERATED_GBL_DATA_SIZE > sizeof(gd_t)
  */
 
 typedef        struct  global_data {
index eba2435a59786615c21635b4c0732d22cd2ea599..9a519088582145e338774762f7c24c5c0c001386 100644 (file)
@@ -341,7 +341,7 @@ board_init_f (ulong bootflag)
        bd->bi_memsize   = gd->ram_size;        /* size  of  DRAM memory in bytes */
 #ifdef CONFIG_SYS_INIT_RAM_ADDR
        bd->bi_sramstart = CONFIG_SYS_INIT_RAM_ADDR;    /* start of  SRAM memory        */
-       bd->bi_sramsize  = CONFIG_SYS_INIT_RAM_END;     /* size  of  SRAM memory        */
+       bd->bi_sramsize  = CONFIG_SYS_INIT_RAM_SIZE;    /* size  of  SRAM memory        */
 #endif
        bd->bi_mbar_base = CONFIG_SYS_MBAR;             /* base of internal registers */
 
@@ -393,7 +393,6 @@ board_init_f (ulong bootflag)
  */
 void board_init_r (gd_t *id, ulong dest_addr)
 {
-       cmd_tbl_t *cmdtp;
        char *s;
        bd_t *bd;
        extern void malloc_bin_reloc (void);
@@ -421,13 +420,13 @@ void board_init_r (gd_t *id, ulong dest_addr)
 
        monitor_flash_len = (ulong)&__init_end - dest_addr;
 
-#if !defined(CONFIG_RELOC_FIXUP_WORKS)
+#if defined(CONFIG_NEEDS_MANUAL_RELOC)
        /*
         * We have to relocate the command table manually
         */
        fixup_cmdtable(&__u_boot_cmd_start,
                (ulong)(&__u_boot_cmd_end - &__u_boot_cmd_start));
-#endif /* !defined(CONFIG_RELOC_FIXUP_WORKS) */
+#endif /* defined(CONFIG_NEEDS_MANUAL_RELOC) */
 
        /* there are some other pointer constants we must deal with */
 #ifndef CONFIG_ENV_IS_NOWHERE
index 98c248fdb3cfdf07afa1f982d16467522f2cd2ff..93a9efdf1065d72f6cf8f22c2369c0e4b543e609 100644 (file)
@@ -24,6 +24,7 @@
  * MA 02111-1307 USA
  */
 
+#include <asm-offsets.h>
 #include <config.h>
 
        .text
@@ -97,7 +98,7 @@ _start:
         * 0xC: 0xB808XXXX
         *
         * then it is necessary to count address for storing the most significant
-        * 16bits from _exception_handler address and copy it to 
+        * 16bits from _exception_handler address and copy it to
         * 0xa address. Big endian use offset in r10=0 that's why is it just
         * 0xa address. The same is done for the least significant 16 bits
         * for 0xe address.
index 8a9064b3c888565b4ed2492e27139b99cd59fcc7..049c44eaf84de0ce67d86afcf0cd016d4bd6c407 100644 (file)
@@ -21,7 +21,4 @@
 #ifndef _ASM_CONFIG_H_
 #define _ASM_CONFIG_H_
 
-/* Relocation to SDRAM works on all Microblaze boards */
-#define CONFIG_RELOC_FIXUP_WORKS
-
 #endif
index 03444ef339d707511b67f68a76cb3e94180233f2..557ad27e9d4aec121ea646f8e9baf3875752e102 100644 (file)
@@ -31,7 +31,7 @@
  * global variables during system initialization (until we have set
  * up the memory controller so that we can use RAM).
  *
- * Keep it *SMALL* and remember to set CONFIG_SYS_GBL_DATA_SIZE > sizeof(gd_t)
+ * Keep it *SMALL* and remember to set GENERATED_GBL_DATA_SIZE > sizeof(gd_t)
  */
 
 typedef        struct  global_data {
index 84267cd7f5b239127e475d6e7d71bc47de41c1b3..eeef579dcca640e0d5374c7491e7906fd4a9dee1 100644 (file)
@@ -96,7 +96,7 @@ void board_init (void)
        ulong flash_size = 0;
 #endif
        asm ("nop");    /* FIXME gd is not initialize - wait */
-       memset ((void *)gd, 0, CONFIG_SYS_GBL_DATA_SIZE);
+       memset ((void *)gd, 0, GENERATED_GBL_DATA_SIZE);
        gd->bd = (bd_t *) (gd + 1);     /* At end of global data */
        gd->baudrate = CONFIG_BAUDRATE;
        bd = gd->bd;
index ff4f11cf7878e9718bb372b1a4dc3c39c0491f67..4b30c89b1481bc1b009cb35d2b5b567c6281916e 100644 (file)
@@ -22,6 +22,7 @@
  * MA 02111-1307 USA
  */
 
+#include <asm-offsets.h>
 #include <config.h>
 #include <asm/asm.h>
 #include <asm/regdef.h>
index 57db589b94f266e7057ca966a72b6487918cd186..d6bcef6b5624dee914c97bdd39a36021b4967d64 100644 (file)
@@ -22,6 +22,7 @@
  * MA 02111-1307 USA
  */
 
+#include <asm-offsets.h>
 #include <config.h>
 #include <asm/regdef.h>
 #include <asm/mipsregs.h>
index 049c44eaf84de0ce67d86afcf0cd016d4bd6c407..02fbfb3abfea8ae55e4aef175d3e4e525cef5a79 100644 (file)
@@ -21,4 +21,6 @@
 #ifndef _ASM_CONFIG_H_
 #define _ASM_CONFIG_H_
 
+#define CONFIG_NEEDS_MANUAL_RELOC
+
 #endif
index bf1bfc390f82bc267de60f85e8d8ff8c7ab81608..271a290a51c392926bd41f198997c77c999578d0 100644 (file)
@@ -33,7 +33,7 @@
  * global variables during system initialization (until we have set
  * up the memory controller so that we can use RAM).
  *
- * Keep it *SMALL* and remember to set CONFIG_SYS_GBL_DATA_SIZE > sizeof(gd_t)
+ * Keep it *SMALL* and remember to set GENERATED_GBL_DATA_SIZE > sizeof(gd_t)
  */
 
 typedef        struct  global_data {
index 0044b19450170f87cbfa7341c30c9198b520703d..f3171241556a9e3ae59eb3b4058d1379cfa00146 100644 (file)
@@ -276,7 +276,6 @@ void board_init_f(ulong bootflag)
 
 void board_init_r (gd_t *id, ulong dest_addr)
 {
-       cmd_tbl_t *cmdtp;
 #ifndef CONFIG_SYS_NO_FLASH
        ulong size;
 #endif
@@ -296,13 +295,13 @@ void board_init_r (gd_t *id, ulong dest_addr)
 
        monitor_flash_len = (ulong)&uboot_end_data - dest_addr;
 
-#if !defined(CONFIG_RELOC_FIXUP_WORKS)
+#if defined(CONFIG_NEEDS_MANUAL_RELOC)
        /*
         * We have to relocate the command table manually
         */
        fixup_cmdtable(&__u_boot_cmd_start,
                (ulong)(&__u_boot_cmd_end - &__u_boot_cmd_start));
-#endif /* !defined(CONFIG_RELOC_FIXUP_WORKS) */
+#endif /* defined(CONFIG_NEEDS_MANUAL_RELOC) */
 
        /* there are some other pointer constants we must deal with */
 #ifndef CONFIG_ENV_IS_NOWHERE
index 76d3b521547f1d8c793514ea38ea52018dbf9697..9b0f52da566b57594dae96363a99c5487549afba 100644 (file)
@@ -21,7 +21,7 @@
  * MA 02111-1307 USA
  */
 
-
+#include <asm-offsets.h>
 #include <config.h>
 #include <timestamp.h>
 #include <version.h>
index 011d603a4b8342b056e8a1eb249ca585c553dd33..049c44eaf84de0ce67d86afcf0cd016d4bd6c407 100644 (file)
@@ -21,7 +21,4 @@
 #ifndef _ASM_CONFIG_H_
 #define _ASM_CONFIG_H_
 
-/* Relocation to SDRAM works on all NIOS2 boards */
-#define CONFIG_RELOC_FIXUP_WORKS
-
 #endif
index f83e691a3498219c49e79576b06cbc7f5e7cf391..f6c6bc166b766235059d459b5a2e684e3672fe0f 100644 (file)
@@ -95,7 +95,7 @@ void board_init (void)
        /* compiler optimization barrier needed for GCC >= 3.4 */
        __asm__ __volatile__("": : :"memory");
 
-       memset( gd, 0, CONFIG_SYS_GBL_DATA_SIZE );
+       memset( gd, 0, GENERATED_GBL_DATA_SIZE );
 
        gd->bd = (bd_t *)(gd+1);        /* At end of global data */
        gd->baudrate = CONFIG_BAUDRATE;
index 573e6d08219860d51bc5843f8e384e403a50abd3..280781e165d8f669fe1f7bfb8507a99697263493 100644 (file)
@@ -32,6 +32,7 @@
  *  board_init lies at a quite high address and when the cpu has
  *  jumped there, everything is ok.
  */
+#include <asm-offsets.h>
 #include <config.h>
 #include <74xx_7xx.h>
 #include <timestamp.h>
@@ -819,7 +820,7 @@ lock_ram_in_cache:
         */
        lis     r3, (CONFIG_SYS_INIT_RAM_ADDR & ~31)@h
        ori     r3, r3, (CONFIG_SYS_INIT_RAM_ADDR & ~31)@l
-       li      r4, ((CONFIG_SYS_INIT_RAM_END & ~31) + \
+       li      r4, ((CONFIG_SYS_INIT_RAM_SIZE & ~31) + \
                     (CONFIG_SYS_INIT_RAM_ADDR & 31) + 31) / 32
        mtctr   r4
 1:
@@ -840,7 +841,7 @@ unlock_ram_in_cache:
        /* invalidate the INIT_RAM section */
        lis     r3, (CONFIG_SYS_INIT_RAM_ADDR & ~31)@h
        ori     r3, r3, (CONFIG_SYS_INIT_RAM_ADDR & ~31)@l
-       li      r4, ((CONFIG_SYS_INIT_RAM_END & ~31) + \
+       li      r4, ((CONFIG_SYS_INIT_RAM_SIZE & ~31) + \
                     (CONFIG_SYS_INIT_RAM_ADDR & 31) + 31) / 32
        mtctr   r4
 1:     icbi    r0, r3
index 2265c8cc11099ed49e2e34ae76feec0512a4341d..fe35190e796ac4b30f0ff0775e0b0305f00c2385 100644 (file)
@@ -29,6 +29,7 @@
  *  U-Boot - Startup Code for MPC512x based Embedded Boards
  */
 
+#include <asm-offsets.h>
 #include <config.h>
 #include <timestamp.h>
 #include <version.h>
index da42557224da101ae06ec6f4cf7f5bd94f56a138..63449c3d4deb5a2f9138cfcee1011eb42e238235 100644 (file)
@@ -30,6 +30,7 @@
  *
  */
 
+#include <asm-offsets.h>
 #include <config.h>
 #include <mpc5xx.h>
 #include <timestamp.h>
index 92858fce3a4e600f91f88632ad4cc27716e44e22..ad546771fa3192f838689b2cde48a8c3ff26207d 100644 (file)
@@ -25,6 +25,7 @@
 /*
  *  U-Boot - Startup Code for MPC5xxx CPUs
  */
+#include <asm-offsets.h>
 #include <config.h>
 #include <mpc5xxx.h>
 #include <timestamp.h>
index b5c160b607aae2c81184fbe7d36fbabd6b37824a..b029e84178860cef0a588583e9dd2f9c678e0b4f 100644 (file)
@@ -25,6 +25,7 @@
 /*
  *  U-Boot - Startup Code for MPC8220 CPUs
  */
+#include <asm-offsets.h>
 #include <config.h>
 #include <mpc8220.h>
 #include <timestamp.h>
index d10231ee9485fc4da9932343f4aa5f7f0b77cd50..616de58fb718ecccee73c7d42865c66570493370 100644 (file)
@@ -37,6 +37,7 @@
  * board_init will change CS0 to be positioned at the correct
  * address and (s)dram will be positioned at address 0
  */
+#include <asm-offsets.h>
 #include <config.h>
 #include <mpc824x.h>
 #include <timestamp.h>
index 55c64ea60c05ecc72316b877b50abe931590e4bc..521a6399b2be1d146d59c6087af267a9306a1fa5 100644 (file)
@@ -25,6 +25,7 @@
 /*
  *  U-Boot - Startup Code for MPC8260 PowerPC based Embedded Boards
  */
+#include <asm-offsets.h>
 #include <config.h>
 #include <mpc8260.h>
 #include <timestamp.h>
index f01c09a91bf90e7f20cba4d305d1aee0aafb6cc7..7a1cae75da086e8ec443cdf231d75b95e2f50a65 100644 (file)
@@ -329,7 +329,7 @@ void cpu_init_f (volatile immap_t * im)
 #ifdef CONFIG_USB_EHCI_FSL
 #ifndef CONFIG_MPC834x
        uint32_t temp;
-       struct usb_ehci *ehci = (struct usb_ehci *)CONFIG_SYS_MPC8xxx_USB_ADDR;
+       struct usb_ehci *ehci = (struct usb_ehci *)CONFIG_SYS_FSL_USB_ADDR;
 
        /* Configure interface. */
        setbits_be32(&ehci->control, REFSEL_16MHZ | UTMI_PHY_EN);
index 536604f46252b586a896ec940d9d8da19cea75d4..a35697da0a73de8c4d1c673f59c1f2790457d792 100644 (file)
@@ -27,6 +27,7 @@
  *  U-Boot - Startup Code for MPC83xx PowerPC based Embedded Boards
  */
 
+#include <asm-offsets.h>
 #include <config.h>
 #include <mpc83xx.h>
 #include <timestamp.h>
@@ -1072,7 +1073,7 @@ lock_ram_in_cache:
         */
        lis     r3, (CONFIG_SYS_INIT_RAM_ADDR & ~31)@h
        ori     r3, r3, (CONFIG_SYS_INIT_RAM_ADDR & ~31)@l
-       li      r4, ((CONFIG_SYS_INIT_RAM_END & ~31) + \
+       li      r4, ((CONFIG_SYS_INIT_RAM_SIZE & ~31) + \
                     (CONFIG_SYS_INIT_RAM_ADDR & 31) + 31) / 32
        mtctr   r4
 1:
@@ -1094,7 +1095,7 @@ unlock_ram_in_cache:
        /* invalidate the INIT_RAM section */
        lis     r3, (CONFIG_SYS_INIT_RAM_ADDR & ~31)@h
        ori     r3, r3, (CONFIG_SYS_INIT_RAM_ADDR & ~31)@l
-       li      r4, ((CONFIG_SYS_INIT_RAM_END & ~31) + \
+       li      r4, ((CONFIG_SYS_INIT_RAM_SIZE & ~31) + \
                     (CONFIG_SYS_INIT_RAM_ADDR & 31) + 31) / 32
        mtctr   r4
 1:     icbi    r0, r3
index f07d9209a7be46879f1620c432bb316595ef7e36..ce4376b1004049d7850a10e0994f9215546f23a5 100644 (file)
@@ -25,6 +25,10 @@ PLATFORM_RELFLAGS += -fPIC -meabi
 
 PLATFORM_CPPFLAGS += -ffixed-r2 -Wa,-me500 -msoft-float -mno-string
 
+# Enable gc-sections to enable generation of smaller images.
+PLATFORM_LDFLAGS += --gc-sections
+PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
+
 # -mspe=yes is needed to have -mno-spe accepted by a buggy GCC;
 # see "[PATCH,rs6000] make -mno-spe work as expected" on
 # http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00311.html
index 3f80700711de39105a63b7b6e8a92307e890706f..fc5d951e9aa562d6d64aa18a3db4abf561e48fe8 100644 (file)
@@ -34,6 +34,9 @@
 #include <asm/io.h>
 #include <asm/mmu.h>
 #include <asm/fsl_law.h>
+#include <post.h>
+#include <asm/processor.h>
+#include <asm/fsl_ddr_sdram.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -282,3 +285,219 @@ void mpc85xx_reginfo(void)
        print_laws();
        print_lbc_regs();
 }
+
+#if CONFIG_POST & CONFIG_SYS_POST_MEMORY
+
+/* Board-specific functions defined in each board's ddr.c */
+void fsl_ddr_get_spd(generic_spd_eeprom_t *ctrl_dimms_spd,
+       unsigned int ctrl_num);
+void read_tlbcam_entry(int idx, u32 *valid, u32 *tsize, unsigned long *epn,
+                      phys_addr_t *rpn);
+unsigned int
+       setup_ddr_tlbs_phys(phys_addr_t p_addr, unsigned int memsize_in_meg);
+
+static void dump_spd_ddr_reg(void)
+{
+       int i, j, k, m;
+       u8 *p_8;
+       u32 *p_32;
+       ccsr_ddr_t *ddr[CONFIG_NUM_DDR_CONTROLLERS];
+       generic_spd_eeprom_t
+               spd[CONFIG_NUM_DDR_CONTROLLERS][CONFIG_DIMM_SLOTS_PER_CTLR];
+
+       for (i = 0; i < CONFIG_NUM_DDR_CONTROLLERS; i++)
+               fsl_ddr_get_spd(spd[i], i);
+
+       puts("SPD data of all dimms (zero vaule is omitted)...\n");
+       puts("Byte (hex)  ");
+       k = 1;
+       for (i = 0; i < CONFIG_NUM_DDR_CONTROLLERS; i++) {
+               for (j = 0; j < CONFIG_DIMM_SLOTS_PER_CTLR; j++)
+                       printf("Dimm%d ", k++);
+       }
+       puts("\n");
+       for (k = 0; k < sizeof(generic_spd_eeprom_t); k++) {
+               m = 0;
+               printf("%3d (0x%02x)  ", k, k);
+               for (i = 0; i < CONFIG_NUM_DDR_CONTROLLERS; i++) {
+                       for (j = 0; j < CONFIG_DIMM_SLOTS_PER_CTLR; j++) {
+                               p_8 = (u8 *) &spd[i][j];
+                               if (p_8[k]) {
+                                       printf("0x%02x  ", p_8[k]);
+                                       m++;
+                               } else
+                                       puts("      ");
+                       }
+               }
+               if (m)
+                       puts("\n");
+               else
+                       puts("\r");
+       }
+
+       for (i = 0; i < CONFIG_NUM_DDR_CONTROLLERS; i++) {
+               switch (i) {
+               case 0:
+                       ddr[i] = (void *)CONFIG_SYS_MPC85xx_DDR_ADDR;
+                       break;
+#ifdef CONFIG_SYS_MPC85xx_DDR2_ADDR
+               case 1:
+                       ddr[i] = (void *)CONFIG_SYS_MPC85xx_DDR2_ADDR;
+                       break;
+#endif
+               default:
+                       printf("%s unexpected controller number = %u\n",
+                               __func__, i);
+                       return;
+               }
+       }
+       printf("DDR registers dump for all controllers "
+               "(zero vaule is omitted)...\n");
+       puts("Offset (hex)   ");
+       for (i = 0; i < CONFIG_NUM_DDR_CONTROLLERS; i++)
+               printf("     Base + 0x%04x", (u32)ddr[i] & 0xFFFF);
+       puts("\n");
+       for (k = 0; k < sizeof(ccsr_ddr_t)/4; k++) {
+               m = 0;
+               printf("%6d (0x%04x)", k * 4, k * 4);
+               for (i = 0; i < CONFIG_NUM_DDR_CONTROLLERS; i++) {
+                       p_32 = (u32 *) ddr[i];
+                       if (p_32[k]) {
+                               printf("        0x%08x", p_32[k]);
+                               m++;
+                       } else
+                               puts("                  ");
+               }
+               if (m)
+                       puts("\n");
+               else
+                       puts("\r");
+       }
+       puts("\n");
+}
+
+/* invalid the TLBs for DDR and setup new ones to cover p_addr */
+static int reset_tlb(phys_addr_t p_addr, u32 size, phys_addr_t *phys_offset)
+{
+       u32 vstart = CONFIG_SYS_DDR_SDRAM_BASE;
+       unsigned long epn;
+       u32 tsize, valid, ptr;
+       phys_addr_t rpn = 0;
+       int ddr_esel;
+
+       ptr = vstart;
+
+       while (ptr < (vstart + size)) {
+               ddr_esel = find_tlb_idx((void *)ptr, 1);
+               if (ddr_esel != -1) {
+                       read_tlbcam_entry(ddr_esel, &valid, &tsize, &epn, &rpn);
+                       disable_tlb(ddr_esel);
+               }
+               ptr += TSIZE_TO_BYTES(tsize);
+       }
+
+       /* Setup new tlb to cover the physical address */
+       setup_ddr_tlbs_phys(p_addr, size>>20);
+
+       ptr = vstart;
+       ddr_esel = find_tlb_idx((void *)ptr, 1);
+       if (ddr_esel != -1) {
+               read_tlbcam_entry(ddr_esel, &valid, &tsize, &epn, phys_offset);
+       } else {
+               printf("TLB error in function %s\n", __func__);
+               return -1;
+       }
+
+       return 0;
+}
+
+/*
+ * slide the testing window up to test another area
+ * for 32_bit system, the maximum testable memory is limited to
+ * CONFIG_MAX_MEM_MAPPED
+ */
+int arch_memory_test_advance(u32 *vstart, u32 *size, phys_addr_t *phys_offset)
+{
+       phys_addr_t test_cap, p_addr;
+       phys_size_t p_size = min(gd->ram_size, CONFIG_MAX_MEM_MAPPED);
+
+#if !defined(CONFIG_PHYS_64BIT) || \
+    !defined(CONFIG_SYS_INIT_RAM_ADDR_PHYS) || \
+       (CONFIG_SYS_INIT_RAM_ADDR_PHYS < 0x100000000ull)
+               test_cap = p_size;
+#else
+               test_cap = gd->ram_size;
+#endif
+       p_addr = (*vstart) + (*size) + (*phys_offset);
+       if (p_addr < test_cap - 1) {
+               p_size = min(test_cap - p_addr, CONFIG_MAX_MEM_MAPPED);
+               if (reset_tlb(p_addr, p_size, phys_offset) == -1)
+                       return -1;
+               *vstart = CONFIG_SYS_DDR_SDRAM_BASE;
+               *size = (u32) p_size;
+               printf("Testing 0x%08llx - 0x%08llx\n",
+                       (u64)(*vstart) + (*phys_offset),
+                       (u64)(*vstart) + (*phys_offset) + (*size) - 1);
+       } else
+               return 1;
+
+       return 0;
+}
+
+/* initialization for testing area */
+int arch_memory_test_prepare(u32 *vstart, u32 *size, phys_addr_t *phys_offset)
+{
+       phys_size_t p_size = min(gd->ram_size, CONFIG_MAX_MEM_MAPPED);
+
+       *vstart = CONFIG_SYS_DDR_SDRAM_BASE;
+       *size = (u32) p_size;   /* CONFIG_MAX_MEM_MAPPED < 4G */
+       *phys_offset = 0;
+
+#if !defined(CONFIG_PHYS_64BIT) || \
+    !defined(CONFIG_SYS_INIT_RAM_ADDR_PHYS) || \
+       (CONFIG_SYS_INIT_RAM_ADDR_PHYS < 0x100000000ull)
+               if (gd->ram_size > CONFIG_MAX_MEM_MAPPED) {
+                       puts("Cannot test more than ");
+                       print_size(CONFIG_MAX_MEM_MAPPED,
+                               " without proper 36BIT support.\n");
+               }
+#endif
+       printf("Testing 0x%08llx - 0x%08llx\n",
+               (u64)(*vstart) + (*phys_offset),
+               (u64)(*vstart) + (*phys_offset) + (*size) - 1);
+
+       return 0;
+}
+
+/* invalid TLBs for DDR and remap as normal after testing */
+int arch_memory_test_cleanup(u32 *vstart, u32 *size, phys_addr_t *phys_offset)
+{
+       unsigned long epn;
+       u32 tsize, valid, ptr;
+       phys_addr_t rpn = 0;
+       int ddr_esel;
+
+       /* disable the TLBs for this testing */
+       ptr = *vstart;
+
+       while (ptr < (*vstart) + (*size)) {
+               ddr_esel = find_tlb_idx((void *)ptr, 1);
+               if (ddr_esel != -1) {
+                       read_tlbcam_entry(ddr_esel, &valid, &tsize, &epn, &rpn);
+                       disable_tlb(ddr_esel);
+               }
+               ptr += TSIZE_TO_BYTES(tsize);
+       }
+
+       puts("Remap DDR ");
+       setup_ddr_tlbs(gd->ram_size>>20);
+       puts("\n");
+
+       return 0;
+}
+
+void arch_memory_failure_handle(void)
+{
+       dump_spd_ddr_reg();
+}
+#endif
index 45403641cfa03eca0a805e9482eda5137a1d9df2..53e059655483361c0e850842c17dd671d062381f 100644 (file)
@@ -48,6 +48,7 @@ void ft_fixup_cpu(void *blob, u64 memory_limit)
        ulong spin_tbl_addr = get_spin_phys_addr();
        u32 bootpg = determine_mp_bootpg();
        u32 id = get_my_id();
+       const char *enable_method;
 
        off = fdt_node_offset_by_prop_value(blob, -1, "device_type", "cpu", 4);
        while (off != -FDT_ERR_NOTFOUND) {
@@ -63,10 +64,25 @@ void ft_fixup_cpu(void *blob, u64 memory_limit)
                                fdt_setprop_string(blob, off, "status",
                                                                "disabled");
                        }
+
+                       if (hold_cores_in_reset(0)) {
+#ifdef CONFIG_FSL_CORENET
+                               /* Cores held in reset, use BRR to release */
+                               enable_method = "fsl,brr-holdoff";
+#else
+                               /* Cores held in reset, use EEBPCR to release */
+                               enable_method = "fsl,eebpcr-holdoff";
+#endif
+                       } else {
+                               /* Cores out of reset and in a spin-loop */
+                               enable_method = "spin-table";
+
+                               fdt_setprop(blob, off, "cpu-release-addr",
+                                               &val, sizeof(val));
+                       }
+
                        fdt_setprop_string(blob, off, "enable-method",
-                                                       "spin-table");
-                       fdt_setprop(blob, off, "cpu-release-addr",
-                                       &val, sizeof(val));
+                                                       enable_method);
                } else {
                        printf ("cpu NULL\n");
                }
index 603baef1bd493645ee62a0617fa83c8296acd61e..a019b1bdb13fd90bda59d6ba8edea90ff4cddf91 100644 (file)
@@ -36,6 +36,27 @@ u32 get_my_id()
        return mfspr(SPRN_PIR);
 }
 
+/*
+ * Determine if U-Boot should keep secondary cores in reset, or let them out
+ * of reset and hold them in a spinloop
+ */
+int hold_cores_in_reset(int verbose)
+{
+       const char *s = getenv("mp_holdoff");
+
+       /* Default to no, overriden by 'y', 'yes', 'Y', 'Yes', or '1' */
+       if (s && (*s == 'y' || *s == 'Y' || *s == '1')) {
+               if (verbose) {
+                       puts("Secondary cores are being held in reset.\n");
+                       puts("See 'mp_holdoff' environment variable\n");
+               }
+
+               return 1;
+       }
+
+       return 0;
+}
+
 int cpu_reset(int nr)
 {
        volatile ccsr_pic_t *pic = (void *)(CONFIG_SYS_MPC8xxx_PIC_ADDR);
@@ -51,6 +72,9 @@ int cpu_status(int nr)
 {
        u32 *table, id = get_my_id();
 
+       if (hold_cores_in_reset(1))
+               return 0;
+
        if (nr == id) {
                table = (u32 *)get_spin_virt_addr();
                printf("table base @ 0x%p\n", table);
@@ -133,6 +157,9 @@ int cpu_release(int nr, int argc, char * const argv[])
        u32 i, val, *table = (u32 *)get_spin_virt_addr() + nr * NUM_BOOT_ENTRY;
        u64 boot_addr;
 
+       if (hold_cores_in_reset(1))
+               return 0;
+
        if (nr == get_my_id()) {
                printf("Invalid to release the boot core.\n\n");
                return 1;
@@ -353,6 +380,10 @@ void setup_mp(void)
        ulong fixup = (ulong)&__secondary_start_page;
        u32 bootpg = determine_mp_bootpg();
 
+       /* Some OSes expect secondary cores to be held in reset */
+       if (hold_cores_in_reset(0))
+               return;
+
        /* Store the bootpg's SDRAM address for use by secondary CPU cores */
        __bootpg_addr = bootpg;
 
index 3422cc107009ac66582302b338da3f6a8671779b..87bac3715268df45949dc892f68d610450c1e17d 100644 (file)
@@ -6,6 +6,7 @@
 ulong get_spin_phys_addr(void);
 ulong get_spin_virt_addr(void);
 u32 get_my_id(void);
+int hold_cores_in_reset(int verbose);
 
 #define BOOT_ENTRY_ADDR_UPPER  0
 #define BOOT_ENTRY_ADDR_LOWER  1
index 53cefaf002e32c2b22d6913cd7c64019bf427fc0..56a853ee572b70e55ee13731a5f7e8e03cc3cdb9 100644 (file)
@@ -21,6 +21,7 @@
  * MA 02111-1307 USA
  */
 
+#include <asm-offsets.h>
 #include <config.h>
 #include <mpc85xx.h>
 #include <version.h>
index 7e5e6b17c019567826efe133d877b4a42586969f..291557d40d4ac9260c98cdbf6811dd392132aed9 100644 (file)
@@ -28,6 +28,7 @@
  *
  */
 
+#include <asm-offsets.h>
 #include <config.h>
 #include <mpc85xx.h>
 #include <timestamp.h>
index f2833a5df706fcd038da86dc81d1e661c9ed6b9d..e3a71aec5c4c9298f1e03ad977926d71d699ff16 100644 (file)
@@ -245,7 +245,8 @@ void init_addr_map(void)
 }
 #endif
 
-unsigned int setup_ddr_tlbs(unsigned int memsize_in_meg)
+unsigned int
+setup_ddr_tlbs_phys(phys_addr_t p_addr, unsigned int memsize_in_meg)
 {
        int i;
        unsigned int tlb_size;
@@ -275,21 +276,24 @@ unsigned int setup_ddr_tlbs(unsigned int memsize_in_meg)
 
                tlb_size = (camsize - 10) / 2;
 
-               set_tlb(1, ram_tlb_address, ram_tlb_address,
+               set_tlb(1, ram_tlb_address, p_addr,
                        MAS3_SX|MAS3_SW|MAS3_SR, 0,
                        0, ram_tlb_index, tlb_size, 1);
 
                size -= 1ULL << camsize;
                memsize -= 1ULL << camsize;
                ram_tlb_address += 1UL << camsize;
+               p_addr += 1UL << camsize;
        }
 
        if (memsize)
                print_size(memsize, " left unmapped\n");
-
-       /*
-        * Confirm that the requested amount of memory was mapped.
-        */
        return memsize_in_meg;
 }
+
+unsigned int setup_ddr_tlbs(unsigned int memsize_in_meg)
+{
+       return
+               setup_ddr_tlbs_phys(CONFIG_SYS_DDR_SDRAM_BASE, memsize_in_meg);
+}
 #endif /* !CONFIG_NAND_SPL */
index c88b1f35b9e41fdac88090c7c44f69057b9dcca6..85042c5254b3fca805ba199f55ae9d5bfee4b7c5 100644 (file)
@@ -25,8 +25,7 @@
 #endif
 
 OUTPUT_ARCH(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
+
 PHDRS
 {
   text PT_LOAD;
@@ -38,42 +37,16 @@ SECTIONS
   /* Read-only sections, merged into text segment: */
   . = + SIZEOF_HEADERS;
   .interp : { *(.interp) }
-  .hash          : { *(.hash)          }
-  .dynsym        : { *(.dynsym)                }
-  .dynstr        : { *(.dynstr)                }
-  .rel.text      : { *(.rel.text)              }
-  .rela.text     : { *(.rela.text)     }
-  .rel.data      : { *(.rel.data)              }
-  .rela.data     : { *(.rela.data)     }
-  .rel.rodata    : { *(.rel.rodata)    }
-  .rela.rodata   : { *(.rela.rodata)   }
-  .rel.got       : { *(.rel.got)               }
-  .rela.got      : { *(.rela.got)              }
-  .rel.ctors     : { *(.rel.ctors)     }
-  .rela.ctors    : { *(.rela.ctors)    }
-  .rel.dtors     : { *(.rel.dtors)     }
-  .rela.dtors    : { *(.rela.dtors)    }
-  .rel.bss       : { *(.rel.bss)               }
-  .rela.bss      : { *(.rela.bss)              }
-  .rel.plt       : { *(.rel.plt)               }
-  .rela.plt      : { *(.rela.plt)              }
-  .init          : { *(.init)  }
-  .plt : { *(.plt) }
   .text      :
   {
-    *(.text)
-    *(.got1)
+    *(.text*)
    } :text
     _etext = .;
     PROVIDE (etext = .);
     .rodata    :
    {
-    *(.eh_frame)
     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
   } :text
-  .fini      : { *(.fini)    } =0
-  .ctors     : { *(.ctors)   }
-  .dtors     : { *(.dtors)   }
 
   /* Read-write section, merged into data segment: */
   . = (. + 0x00FF) & 0xFFFFFF00;
@@ -81,23 +54,19 @@ SECTIONS
   PROVIDE (erotext = .);
   .reloc   :
   {
-    *(.got)
+    KEEP(*(.got))
     _GOT2_TABLE_ = .;
-    *(.got2)
+    KEEP(*(.got2))
     _FIXUP_TABLE_ = .;
-    *(.fixup)
+    KEEP(*(.fixup))
   }
   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2;
   __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
 
   .data    :
   {
-    *(.data)
-    *(.data1)
-    *(.sdata)
-    *(.sdata2)
-    *(.dynamic)
-    CONSTRUCTORS
+    *(.data*)
+    *(.sdata*)
   }
   _edata  =  .;
   PROVIDE (edata = .);
@@ -126,7 +95,7 @@ SECTIONS
 
   .resetvec RESET_VECTOR_ADDRESS :
   {
-    *(.resetvec)
+    KEEP(*(.resetvec))
   } :text = 0xffff
 
   . = RESET_VECTOR_ADDRESS + 0x4;
@@ -145,9 +114,8 @@ SECTIONS
   __bss_start = .;
   .bss (NOLOAD)       :
   {
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
+   *(.sbss*)
+   *(.bss*)
    *(COMMON)
   } :bss
 
index ca2f8376edd9dd167ae986e6726055cdf6d0e2ac..bce0fb374b999b854ec4119bc46a1f709e9d6073 100644 (file)
@@ -25,3 +25,10 @@ PLATFORM_RELFLAGS += -fPIC -meabi
 
 PLATFORM_CPPFLAGS += -ffixed-r2 -mstring
 PLATFORM_CPPFLAGS += -maltivec -mabi=altivec -msoft-float
+
+# Enable gc-sections to enable generation of smaller images.
+PLATFORM_LDFLAGS += --gc-sections
+PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
+
+# Use default linker script.  Board port can override in board/*/config.mk
+LDSCRIPT := $(SRCTREE)/arch/powerpc/cpu/mpc86xx/u-boot.lds
index 3817f19d53521e5c96fa7e5a121a031eab83353e..6127115696a437c91fa5ce31b595444a2dbfa753 100644 (file)
@@ -30,6 +30,7 @@
  *  board_init lies at a quite high address and when the cpu has
  *  jumped there, everything is ok.
  */
+#include <asm-offsets.h>
 #include <config.h>
 #include <mpc86xx.h>
 #include <timestamp.h>
@@ -870,7 +871,7 @@ lock_ram_in_cache:
         */
        lis     r3, (CONFIG_SYS_INIT_RAM_ADDR & ~31)@h
        ori     r3, r3, (CONFIG_SYS_INIT_RAM_ADDR & ~31)@l
-       li      r4, ((CONFIG_SYS_INIT_RAM_END & ~31) + \
+       li      r4, ((CONFIG_SYS_INIT_RAM_SIZE & ~31) + \
                     (CONFIG_SYS_INIT_RAM_ADDR & 31) + 31) / 32
        mtctr   r4
 1:
@@ -905,7 +906,7 @@ unlock_ram_in_cache:
        /* invalidate the INIT_RAM section */
        lis     r3, (CONFIG_SYS_INIT_RAM_ADDR & ~31)@h
        ori     r3, r3, (CONFIG_SYS_INIT_RAM_ADDR & ~31)@l
-       li      r4, ((CONFIG_SYS_INIT_RAM_END & ~31) + \
+       li      r4, ((CONFIG_SYS_INIT_RAM_SIZE & ~31) + \
                     (CONFIG_SYS_INIT_RAM_ADDR & 31) + 31) / 32
        mtctr   r4
 1:     icbi    r0, r3
diff --git a/arch/powerpc/cpu/mpc86xx/u-boot.lds b/arch/powerpc/cpu/mpc86xx/u-boot.lds
new file mode 100644 (file)
index 0000000..4bfcb90
--- /dev/null
@@ -0,0 +1,122 @@
+/*
+ * Copyright 2006, 2007 Freescale Semiconductor, Inc.
+ *
+ * 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
+{
+
+  /* Read-only sections, merged into text segment: */
+  .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      :
+  {
+    arch/powerpc/cpu/mpc86xx/start.o   (.text)
+    arch/powerpc/cpu/mpc86xx/traps.o (.text)
+    arch/powerpc/cpu/mpc86xx/interrupts.o (.text)
+    arch/powerpc/cpu/mpc86xx/cpu_init.o (.text)
+    arch/powerpc/cpu/mpc86xx/cpu.o (.text)
+    arch/powerpc/cpu/mpc86xx/speed.o (.text)
+    common/dlmalloc.o (.text)
+    lib/crc32.o (.text)
+    arch/powerpc/lib/extable.o (.text)
+    lib/zlib.o (.text)
+    *(.text*)
+   }
+    _etext = .;
+    PROVIDE (etext = .);
+    .rodata    :
+   {
+    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
+  }
+
+  /* Read-write section, merged into data segment: */
+  . = (. + 0x00FF) & 0xFFFFFF00;
+  _erotext = .;
+  PROVIDE (erotext = .);
+  .reloc   :
+  {
+    KEEP(*(.got))
+    _GOT2_TABLE_ = .;
+    KEEP(*(.got2))
+    _FIXUP_TABLE_ = .;
+    KEEP(*(.fixup))
+  }
+  __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2;
+  __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
+
+  .data    :
+  {
+    *(.data*)
+    *(.sdata*)
+  }
+  _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*)
+   *(.bss*)
+   *(COMMON)
+   . = ALIGN(4);
+  }
+  _end = . ;
+  PROVIDE (end = .);
+}
index 4a8c5d9e48b00ced9c64bb6459cfc9b2f18e76ae..9d022bf5413f91c4899c8e9efad2012685ae155a 100644 (file)
@@ -37,6 +37,7 @@
  *  board_init will change CS0 to be positioned at the correct
  *  address and (s)dram will be positioned at address 0
  */
+#include <asm-offsets.h>
 #include <config.h>
 #include <mpc8xx.h>
 #include <timestamp.h>
index e82082e74cdeb9f47087fd0f10fcb726470f4d26..3fec100377b4ef1ed107d3b4d9ebf72a2453bc79 100644 (file)
@@ -1184,6 +1184,7 @@ compute_fsl_memctl_config_regs(const memctl_options_t *popts,
        unsigned int sr_it;
        unsigned int zq_en;
        unsigned int wrlvl_en;
+       int cs_en = 1;
 
        memset(ddr, 0, sizeof(fsl_ddr_cfg_regs_t));
 
@@ -1250,16 +1251,23 @@ compute_fsl_memctl_config_regs(const memctl_options_t *popts,
                         * and each controller uses rank interleaving within
                         * itself. Therefore the starting and ending address
                         * on each controller is twice the amount present on
-                        * each controller.
+                        * each controller. If any CS is not included in the
+                        * interleaving, the memory on that CS is not accssible
+                        * and the total memory size is reduced. The CS is also
+                        * disabled.
                         */
                        unsigned long long ctlr_density = 0;
                        switch (popts->ba_intlv_ctl & FSL_DDR_CS0_CS1_CS2_CS3) {
                        case FSL_DDR_CS0_CS1:
                        case FSL_DDR_CS0_CS1_AND_CS2_CS3:
                                ctlr_density = dimm_params[0].rank_density * 2;
+                               if (i > 1)
+                                       cs_en = 0;
                                break;
                        case FSL_DDR_CS2_CS3:
                                ctlr_density = dimm_params[0].rank_density;
+                               if (i > 0)
+                                       cs_en = 0;
                                break;
                        case FSL_DDR_CS0_CS1_CS2_CS3:
                                /*
@@ -1379,8 +1387,11 @@ compute_fsl_memctl_config_regs(const memctl_options_t *popts,
                        );
 
                debug("FSLDDR: cs[%d]_bnds = 0x%08x\n", i, ddr->cs[i].bnds);
-               set_csn_config(dimm_number, i, ddr, popts, dimm_params);
-               set_csn_config_2(i, ddr);
+               if (cs_en) {
+                       set_csn_config(dimm_number, i, ddr, popts, dimm_params);
+                       set_csn_config_2(i, ddr);
+               } else
+                       printf("CS%d is disabled.\n", i);
        }
 
        set_ddr_eor(ddr, popts);
index 88c47d1aedef5bfe41a137067bd124df8d0e89d8..54e60bb1aef84fc279b67966bcdcf19f59177b1b 100644 (file)
@@ -27,6 +27,7 @@
 #include <libfdt.h>
 #include <fdt_support.h>
 #include <asm/mp.h>
+#include <asm/fsl_enet.h>
 
 #if defined(CONFIG_MP) && (defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx))
 static int ft_del_cpuhandle(void *blob, int cpuhandle)
@@ -215,3 +216,26 @@ void fdt_fixup_crypto_node(void *blob, int sec_rev)
                fdt_del_node_and_alias(blob, "crypto");
 }
 #endif
+
+int fdt_fixup_phy_connection(void *blob, int offset, enum fsl_phy_enet_if phyc)
+{
+       static const char *fsl_phy_enet_if_str[] = {
+               [MII]           = "mii",
+               [RMII]          = "rmii",
+               [GMII]          = "gmii",
+               [RGMII]         = "rgmii",
+               [RGMII_ID]      = "rgmii-id",
+               [RGMII_RXID]    = "rgmii-rxid",
+               [SGMII]         = "sgmii",
+               [TBI]           = "tbi",
+               [RTBI]          = "rtbi",
+               [XAUI]          = "xgmii",
+               [FSL_ETH_IF_NONE] = "",
+       };
+
+       if (phyc > ARRAY_SIZE(fsl_phy_enet_if_str))
+               return fdt_setprop_string(blob, offset, "phy-connection-type", "");
+
+       return fdt_setprop_string(blob, offset, "phy-connection-type",
+                                        fsl_phy_enet_if_str[phyc]);
+}
index 186936f23e830b189e6c350433b1f02496f67847..53236a36f81bd1d23be30ac1b2ab6dc73b053556 100644 (file)
@@ -138,7 +138,10 @@ static struct pci_info pci_config_info[] =
 {
        [LAW_TRGT_IF_PCIE_1] = {
                .cfg =   (1 << 2) | (1 << 3) | (1 << 5) | (1 << 6) |
-                        (1 << 7) | (1 << 0xe) | (1 << 0xf),
+                        (1 << 7) | (1 << 0xf),
+       },
+       [LAW_TRGT_IF_PCIE_2] = {
+               .cfg =   (1 << 3) | (1 << 0xe) | (1 << 0xf),
        },
 };
 #elif defined(CONFIG_P1011) || defined(CONFIG_P1020) || \
index 2a727b1df38b94b96a27ba70dddd02a886c3a6a9..bf208adfe6f5cb3351fd7a6f8f56849e2ddcb305 100644 (file)
@@ -342,7 +342,7 @@ cpu_init_f (void)
 #endif
 
 #if defined(CONFIG_WATCHDOG)
-       val = mfspr(tcr);
+       val = mfspr(SPRN_TCR);
 #if defined(CONFIG_440EP) || defined(CONFIG_440GR)
        val |= 0xb8000000;      /* generate system reset after 1.34 seconds */
 #elif defined(CONFIG_440EPX)
@@ -354,11 +354,11 @@ cpu_init_f (void)
        val &= ~0x30000000;                     /* clear WRC bits */
        val |= CONFIG_SYS_4xx_RESET_TYPE << 28; /* set board specific WRC type */
 #endif
-       mtspr(tcr, val);
+       mtspr(SPRN_TCR, val);
 
-       val = mfspr(tsr);
+       val = mfspr(SPRN_TSR);
        val |= 0x80000000;      /* enable watchdog timer */
-       mtspr(tsr, val);
+       mtspr(SPRN_TSR, val);
 
        reset_4xx_watchdog();
 #endif /* CONFIG_WATCHDOG */
index c2d49739837c94c2673ee56346289d872deb458f..d0bca92f990633b6dc5736928a7475cf680de70a 100644 (file)
@@ -67,13 +67,6 @@ static __inline__ void set_pit(unsigned long val)
        asm volatile("mtpit %0" : : "r" (val));
 }
 
-
-static __inline__ void set_tcr(unsigned long val)
-{
-       asm volatile("mttcr %0" : : "r" (val));
-}
-
-
 static __inline__ void set_evpr(unsigned long val)
 {
        asm volatile("mtevpr %0" : : "r" (val));
index 87caea19b040308a7c484c55e6240e5021703d54..363becc8071b05984f9db7035d548153ef3bca9f 100644 (file)
@@ -63,6 +63,7 @@
  *  board_init will change CS0 to be positioned at the correct
  *  address and (s)dram will be positioned at address 0
  */
+#include <asm-offsets.h>
 #include <config.h>
 #include <asm/ppc4xx.h>
 #include <timestamp.h>
 # endif
 #endif /* CONFIG_SYS_INIT_DCACHE_CS */
 
-#if (defined(CONFIG_SYS_INIT_RAM_DCACHE) && (CONFIG_SYS_INIT_RAM_END > (4 << 10)))
-#error Only 4k of init-ram is supported - please adjust CONFIG_SYS_INIT_RAM_END!
+#if (defined(CONFIG_SYS_INIT_RAM_DCACHE) && (CONFIG_SYS_INIT_RAM_SIZE > (4 << 10)))
+#error Only 4k of init-ram is supported - please adjust CONFIG_SYS_INIT_RAM_SIZE!
 #endif
 
 /*
@@ -656,8 +657,8 @@ _start:
        /* Clear Dcache to use as RAM */
        addis   r3,r0,CONFIG_SYS_INIT_RAM_ADDR@h
        ori     r3,r3,CONFIG_SYS_INIT_RAM_ADDR@l
-       addis   r4,r0,CONFIG_SYS_INIT_RAM_END@h
-       ori     r4,r4,CONFIG_SYS_INIT_RAM_END@l
+       addis   r4,r0,CONFIG_SYS_INIT_RAM_SIZE@h
+       ori     r4,r4,CONFIG_SYS_INIT_RAM_SIZE@l
        rlwinm. r5,r4,0,27,31
        rlwinm  r5,r4,27,5,31
        beq     ..d_ran
@@ -1091,8 +1092,8 @@ _start:
        lis     r3, CONFIG_SYS_INIT_RAM_ADDR@h
        ori     r3, r3, CONFIG_SYS_INIT_RAM_ADDR@l
 
-       lis     r4, CONFIG_SYS_INIT_RAM_END@h
-       ori     r4, r4, CONFIG_SYS_INIT_RAM_END@l
+       lis     r4, CONFIG_SYS_INIT_RAM_SIZE@h
+       ori     r4, r4, CONFIG_SYS_INIT_RAM_SIZE@l
 
        /*
         * Convert the size, in bytes, to the number of cache lines/blocks
@@ -1119,12 +1120,12 @@ _start:
        lis     r1, CONFIG_SYS_INIT_RAM_ADDR@h
        ori     r1, r1, CONFIG_SYS_INIT_SP_OFFSET@l
 
-       lis     r4, (CONFIG_SYS_INIT_RAM_END >> 2)@h
-       ori     r4, r4, (CONFIG_SYS_INIT_RAM_END >> 2)@l
+       lis     r4, (CONFIG_SYS_INIT_RAM_SIZE >> 2)@h
+       ori     r4, r4, (CONFIG_SYS_INIT_RAM_SIZE >> 2)@l
        mtctr   r4
 
        lis     r2, CONFIG_SYS_INIT_RAM_ADDR@h
-       ori     r2, r2, CONFIG_SYS_INIT_RAM_END@l
+       ori     r2, r2, CONFIG_SYS_INIT_RAM_SIZE@l
 
        lis     r4, CONFIG_SYS_INIT_RAM_PATTERN@h
        ori     r4, r4, CONFIG_SYS_INIT_RAM_PATTERN@l
@@ -1399,7 +1400,7 @@ relocate_code:
 
        /* Flush initial global data range */
        mr      r3, r4
-       addi    r4, r4, CONFIG_SYS_GBL_DATA_SIZE@l
+       addi    r4, r4, GENERATED_GBL_DATA_SIZE@l
        bl      flush_dcache_range
 
 #if defined(CONFIG_SYS_INIT_DCACHE_CS)
@@ -1414,8 +1415,8 @@ relocate_code:
        lis     r3, CONFIG_SYS_INIT_RAM_ADDR@h
        ori     r3, r3, CONFIG_SYS_INIT_RAM_ADDR@l
 
-       lis     r4, CONFIG_SYS_INIT_RAM_END@h
-       ori     r4, r4, CONFIG_SYS_INIT_RAM_END@l
+       lis     r4, CONFIG_SYS_INIT_RAM_SIZE@h
+       ori     r4, r4, CONFIG_SYS_INIT_RAM_SIZE@l
        add     r4, r4, r3
 
        bl      invalidate_dcache_range
index b5562ad9788aa379c8c970af29a56918938d6b66..9baa7a16d1be2d6e29f3e865a79755b6ed722665 100644 (file)
@@ -46,15 +46,6 @@ extern unsigned long search_exception_table(unsigned long);
  */
 #define END_OF_MEM     (gd->bd->bi_memstart + gd->bd->bi_memsize)
 
-static __inline__ void set_tsr(unsigned long val)
-{
-#if defined(CONFIG_440)
-       asm volatile("mtspr 0x150, %0" : : "r" (val));
-#else
-       asm volatile("mttsr %0" : : "r" (val));
-#endif
-}
-
 static __inline__ unsigned long get_esr(void)
 {
        unsigned long val;
@@ -364,7 +355,7 @@ DecrementerPITException(struct pt_regs *regs)
        /*
         * Reset PIT interrupt
         */
-       set_tsr(0x08000000);
+       mtspr(SPRN_TSR, 0x08000000);
 
        /*
         * Call timer_interrupt routine in interrupts.c
index a1942ca2bd900b757dc9a9757b5b1afb7adf51c4..76dedebe67c17c9a2030704e3d23f6687782f16a 100644 (file)
@@ -89,9 +89,6 @@
 #define CONFIG_SYS_NUM_TLBCAMS 16
 #endif
 
-/* Relocation to SDRAM works on all PPC boards */
-#define CONFIG_RELOC_FIXUP_WORKS
-
 /* Since so many PPC SOCs have a semi-common LBC, define this here */
 #if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx) || \
        defined(CONFIG_MPC83xx)
index d576eb85e38d3e6f972d716666a97d5a7b2db8fc..17d4b319bcb4ecd603b7423e2321ac982c542ae2 100644 (file)
@@ -213,4 +213,10 @@ typedef struct memctl_options_s {
 } memctl_options_t;
 
 extern phys_size_t fsl_ddr_sdram(void);
+
+typedef struct fixed_ddr_parm{
+       int min_freq;
+       int max_freq;
+       fsl_ddr_cfg_regs_t *ddr_settings;
+} fixed_ddr_parm_t;
 #endif
diff --git a/arch/powerpc/include/asm/fsl_enet.h b/arch/powerpc/include/asm/fsl_enet.h
new file mode 100644 (file)
index 0000000..4fb2857
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2010 Freescale Semiconductor, Inc.
+ *
+ * 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.
+ */
+
+#ifndef __ASM_PPC_FSL_ENET_H
+#define __ASM_PPC_FSL_ENET_H
+
+enum fsl_phy_enet_if {
+       MII,
+       RMII,
+       GMII,
+       RGMII,
+       RGMII_ID,
+       RGMII_RXID,
+       RGMII_TXID,
+       SGMII,
+       TBI,
+       RTBI,
+       XAUI,
+       FSL_ETH_IF_NONE,
+};
+
+int fdt_fixup_phy_connection(void *blob, int offset, enum fsl_phy_enet_if phyc);
+
+#endif /* __ASM_PPC_FSL_ENET_H */
index 2a323e13d08b798eee6f4dfb52449f4150f4abdc..2e218de0b7ec1570091a88aa253c35b2c4bf2a27 100644 (file)
@@ -34,7 +34,7 @@
  * global variables during system initialization (until we have set
  * up the memory controller so that we can use RAM).
  *
- * Keep it *SMALL* and remember to set CONFIG_SYS_GBL_DATA_SIZE > sizeof(gd_t)
+ * Keep it *SMALL* and remember to set GENERATED_GBL_DATA_SIZE > sizeof(gd_t)
  */
 
 typedef        struct  global_data {
index c0c7fd4f6ee0caf89ae2d859e606ce39edc7e35a..2e0749da0a545a3d15300903c9e5def269a8bdac 100644 (file)
@@ -175,6 +175,16 @@ void __board_add_ram_info(int use_default)
 }
 void board_add_ram_info(int) __attribute__((weak, alias("__board_add_ram_info")));
 
+int __board_flash_wp_on(void)
+{
+       /*
+        * Most flashes can't be detected when write protection is enabled,
+        * so provide a way to let U-Boot gracefully ignore write protected
+        * devices.
+        */
+       return 0;
+}
+int board_flash_wp_on(void) __attribute__((weak, alias("__board_flash_wp_on")));
 
 static int init_func_ram (void)
 {
@@ -698,7 +708,11 @@ void board_init_r (gd_t *id, ulong dest_addr)
 #if !defined(CONFIG_SYS_NO_FLASH)
        puts ("FLASH: ");
 
-       if ((flash_size = flash_init ()) > 0) {
+       if (board_flash_wp_on()) {
+               printf("Uninitialized - Write Protect On\n");
+               /* Since WP is on, we can't find real size.  Set to 0 */
+               flash_size = 0;
+       } else if ((flash_size = flash_init ()) > 0) {
 # ifdef CONFIG_SYS_FLASH_CHECKSUM
                print_size (flash_size, "");
                /*
index 07ba68f19879b1db2c791f02b16d565a80ef112a..415c94979848f6980e6457200b46f05baf271308 100644 (file)
@@ -29,6 +29,6 @@ STANDALONE_LOAD_ADDR += -EB
 endif
 
 PLATFORM_CPPFLAGS += -DCONFIG_SH -D__SH__
-PLATFORM_LDFLAGS += -e $(CONFIG_SYS_TEXT_BASE) --defsym reloc_dst=$(TEXT_BASE)
+PLATFORM_LDFLAGS += -e $(CONFIG_SYS_TEXT_BASE) --defsym reloc_dst=$(CONFIG_SYS_TEXT_BASE)
 
 LDSCRIPT := $(SRCTREE)/$(CPUDIR)/u-boot.lds
index 0ab867d54d56578401ef14cde8322debbb3758f0..77043f686a0cc394c4c50f515d104e22ab2f0f25 100644 (file)
@@ -18,6 +18,7 @@
  * MA 02111-1307 USA
  */
 
+#include <asm-offsets.h>
 #include <config.h>
 #include <version.h>
 
@@ -73,6 +74,6 @@ loop:
 ._reloc_dst_end:       .long   reloc_dst_end
 ._bss_start:           .long   bss_start
 ._bss_end:             .long   bss_end
-._gd_init:             .long   (_start - CONFIG_SYS_GBL_DATA_SIZE)
-._stack_init:  .long   (_start - CONFIG_SYS_GBL_DATA_SIZE - CONFIG_SYS_MALLOC_LEN - 16)
+._gd_init:             .long   (_start - GENERATED_GBL_DATA_SIZE)
+._stack_init:  .long   (_start - GENERATED_GBL_DATA_SIZE - CONFIG_SYS_MALLOC_LEN - 16)
 ._sh_generic_init:     .long   sh_generic_init
index c0f83261d10fd9c1584c316563948b056f3d1b17..9dd23032657b1850c80b9783dfac7407218c5b04 100644 (file)
@@ -21,6 +21,7 @@
  * MA 02111-1307 USA
  */
 
+#include <asm-offsets.h>
 #include <config.h>
 #include <version.h>
 
@@ -72,6 +73,6 @@ loop:
 ._reloc_dst_end:       .long   reloc_dst_end
 ._bss_start:           .long   bss_start
 ._bss_end:             .long   bss_end
-._gd_init:             .long   (_start - CONFIG_SYS_GBL_DATA_SIZE)
-._stack_init:  .long   (_start - CONFIG_SYS_GBL_DATA_SIZE - CONFIG_SYS_MALLOC_LEN - 16)
+._gd_init:             .long   (_start - GENERATED_GBL_DATA_SIZE)
+._stack_init:  .long   (_start - GENERATED_GBL_DATA_SIZE - CONFIG_SYS_MALLOC_LEN - 16)
 ._sh_generic_init:     .long   sh_generic_init
index 711ae668d59bc4403e0a1d098f951d3a7a5cbe72..4b5f606fff7d5f5e98f25daebc2ce3f069739aa8 100644 (file)
@@ -18,6 +18,7 @@
  * MA 02111-1307 USA
  */
 
+#include <asm-offsets.h>
 #include <config.h>
 #include <version.h>
 
@@ -69,6 +70,6 @@ loop:
 ._reloc_dst_end:       .long   reloc_dst_end
 ._bss_start:           .long   bss_start
 ._bss_end:             .long   bss_end
-._gd_init:             .long   (_start - CONFIG_SYS_GBL_DATA_SIZE)
-._stack_init:          .long   (_start - CONFIG_SYS_GBL_DATA_SIZE - CONFIG_SYS_MALLOC_LEN - 16)
+._gd_init:             .long   (_start - GENERATED_GBL_DATA_SIZE)
+._stack_init:          .long   (_start - GENERATED_GBL_DATA_SIZE - CONFIG_SYS_MALLOC_LEN - 16)
 ._sh_generic_init:     .long   sh_generic_init
index 978cc92f40a1a48fb8fae9a31e21f8e75aefaff4..049c44eaf84de0ce67d86afcf0cd016d4bd6c407 100644 (file)
@@ -21,7 +21,4 @@
 #ifndef _ASM_CONFIG_H_
 #define _ASM_CONFIG_H_
 
-/* Relocation to SDRAM works on all sh boards */
-#define CONFIG_RELOC_FIXUP_WORKS
-
 #endif
index a302fc2e65808c858817c288aa0f7c463c682546..fe53ab4de9194351a9906a91cb44780220847914 100644 (file)
@@ -89,7 +89,7 @@ static int sh_pci_init(void)
 
 static int sh_mem_env_init(void)
 {
-       mem_malloc_init(CONFIG_SYS_TEXT_BASE - CONFIG_SYS_GBL_DATA_SIZE -
+       mem_malloc_init(CONFIG_SYS_TEXT_BASE - GENERATED_GBL_DATA_SIZE -
                        CONFIG_SYS_MALLOC_LEN, CONFIG_SYS_MALLOC_LEN - 16);
        env_relocate();
        jumptable_init();
@@ -144,7 +144,7 @@ void sh_generic_init(void)
        bd_t *bd;
        init_fnc_t **init_fnc_ptr;
 
-       memset(gd, 0, CONFIG_SYS_GBL_DATA_SIZE);
+       memset(gd, 0, GENERATED_GBL_DATA_SIZE);
 
        gd->flags |= GD_FLG_RELOC;      /* tell others: relocation done */
 
index 9c58ed7ec8cb2d507321c7c03f650ea1f478725f..19b3a94023c1236390991bca966e52b6e84d395e 100644 (file)
@@ -43,6 +43,41 @@ static void hexdump(unsigned char *buf, int len)
 }
 #endif
 
+#define MOUNT_ROOT_RDONLY      0x000
+#define RAMDISK_FLAGS          0x004
+#define ORIG_ROOT_DEV          0x008
+#define LOADER_TYPE                    0x00c
+#define INITRD_START           0x010
+#define INITRD_SIZE                    0x014
+#define COMMAND_LINE           0x100
+
+#define RD_PROMPT      (1<<15)
+#define RD_DOLOAD      (1<<14)
+#define CMD_ARG_RD_PROMPT      "prompt_ramdisk="
+#define CMD_ARG_RD_DOLOAD      "load_ramdisk="
+
+#ifdef CONFIG_SH_SDRAM_OFFSET
+#define GET_INITRD_START(initrd, linux) (initrd - linux + CONFIG_SH_SDRAM_OFFSET)
+#else
+#define GET_INITRD_START(initrd, linux) (initrd - linux)
+#endif
+
+static void set_sh_linux_param(unsigned long param_addr, unsigned long data)
+{
+       *(unsigned long *)(param_addr) = data;
+}
+
+static unsigned long sh_check_cmd_arg(char *cmdline, char *key, int base)
+{
+       unsigned long val = 0;
+       char *p = strstr(cmdline, key);
+       if (p) {
+               p += strlen(key);
+               val = simple_strtol(p, NULL, base);
+       }
+       return val;
+}
+
 int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images)
 {
        /* Linux kernel load address */
@@ -51,7 +86,7 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima
        unsigned char *param
                = (unsigned char *)image_get_load(images->legacy_hdr_os);
        /* Linux kernel command line */
-       char *cmdline = (char *)param + 0x100;
+       char *cmdline = (char *)param + COMMAND_LINE;
        /* PAGE_SIZE */
        unsigned long size = images->ep - (unsigned long)param;
        char *bootargs = getenv("bootargs");
@@ -61,8 +96,37 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima
 
        /* Setup parameters */
        memset(param, 0, size); /* Clear zero page */
+
+       /* Set commandline */
        strcpy(cmdline, bootargs);
 
+       sh_check_cmd_arg(bootargs, CMD_ARG_RD_DOLOAD, 10);
+       /* Initrd */
+       if (images->rd_start || images->rd_end) {
+               unsigned long ramdisk_flags = 0;
+               int val = sh_check_cmd_arg(bootargs, CMD_ARG_RD_PROMPT, 10);
+               if (val == 1)
+                               ramdisk_flags |= RD_PROMPT;
+               else
+                               ramdisk_flags &= ~RD_PROMPT;
+
+               val = sh_check_cmd_arg(bootargs, CMD_ARG_RD_DOLOAD, 10);
+               if (val == 1)
+                               ramdisk_flags |= RD_DOLOAD;
+               else
+                               ramdisk_flags &= ~RD_DOLOAD;
+
+               set_sh_linux_param((unsigned long)param + MOUNT_ROOT_RDONLY, 0x0001);
+               set_sh_linux_param((unsigned long)param + RAMDISK_FLAGS, ramdisk_flags);
+               set_sh_linux_param((unsigned long)param + ORIG_ROOT_DEV, 0x0200);
+               set_sh_linux_param((unsigned long)param + LOADER_TYPE, 0x0001);
+               set_sh_linux_param((unsigned long)param + INITRD_START,
+                       GET_INITRD_START(images->rd_start, CONFIG_SYS_SDRAM_BASE));
+               set_sh_linux_param((unsigned long)param + INITRD_SIZE,
+                       images->rd_end - images->rd_start);
+       }
+
+       /* Boot kernel */
        kernel();
        /* does not return */
 
index dd58262c2b41392542729e510c30ec7c93c052af..f22fb7eb1b70e90bdfca2aa303547b59fa629dc7 100644 (file)
@@ -21,6 +21,7 @@
  * MA 02111-1307 USA
  */
 
+#include <asm-offsets.h>
 #include <config.h>
 #include <asm/asmmacro.h>
 #include <asm/winmacro.h>
index 5c0808a2edb08459287347052bd95e81ce8f2dac..56ae88d6492b8d5623921427063c9f6635c30cfb 100644 (file)
@@ -21,6 +21,7 @@
  * MA 02111-1307 USA
  */
 
+#include <asm-offsets.h>
 #include <config.h>
 #include <asm/asmmacro.h>
 #include <asm/winmacro.h>
index b9fc65663f82770f71c27f1a930fa439d4c4b99f..e3b3dec91d48f10138422d7566daa0a254bb14cd 100644 (file)
@@ -32,6 +32,7 @@
 
 #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
 #define __BYTEORDER_HAS_U64__
+#define __SWAB_64_THRU_32__
 #endif
 #include <linux/byteorder/big_endian.h>
 #endif                         /* _SPARC_BYTEORDER_H */
index 6ddc3494c6bee9dbaa6d45e1ddb3802c314b97f7..7b6f30bd4a876194e43f427366a2317f23287791 100644 (file)
@@ -21,6 +21,8 @@
 #ifndef _ASM_CONFIG_H_
 #define _ASM_CONFIG_H_
 
+#define CONFIG_NEEDS_MANUAL_RELOC
+
 #define CONFIG_LMB
 #define CONFIG_SYS_BOOT_RAMDISK_HIGH
 
index 7c1ac0dddd4dcede288656fee2cfa64e95c92e04..9b146748d96aaee8e871fc3d10320a254bbaf963 100644 (file)
@@ -36,7 +36,7 @@
  * global variables during system initialization (until we have set
  * up the memory controller so that we can use RAM).
  *
- * Keep it *SMALL* and remember to set CONFIG_SYS_GBL_DATA_SIZE > sizeof(gd_t)
+ * Keep it *SMALL* and remember to set GENERATED_GBL_DATA_SIZE > sizeof(gd_t)
  */
 
 typedef struct global_data {
diff --git a/arch/sparc/include/asm/unaligned.h b/arch/sparc/include/asm/unaligned.h
new file mode 100644 (file)
index 0000000..0e646f7
--- /dev/null
@@ -0,0 +1,10 @@
+#ifndef _ASM_SPARC_UNALIGNED_H
+#define _ASM_SPARC_UNALIGNED_H
+
+/*
+ * The SPARC can not do unaligned accesses, it must be split into multiple
+ * byte accesses. The SPARC is in big endian mode.
+ */
+#include <asm-generic/unaligned.h>
+
+#endif /* _ASM_SPARC_UNALIGNED_H */
index 09bcdb04813938a40daa81d3fe194c2f84fad823..ab31cfb50addf543729c05c7c1a19d8e98f7a334 100644 (file)
@@ -244,7 +244,7 @@ void board_init_f(ulong bootflag)
        printf("CONFIG_SYS_PROM_OFFSET:        0x%lx (%d)\n", CONFIG_SYS_PROM_OFFSET,
               CONFIG_SYS_PROM_SIZE);
        printf("CONFIG_SYS_GBL_DATA_OFFSET:    0x%lx (%d)\n", CONFIG_SYS_GBL_DATA_OFFSET,
-              CONFIG_SYS_GBL_DATA_SIZE);
+              GENERATED_GBL_DATA_SIZE);
 #endif
 
 #ifdef CONFIG_POST
@@ -252,13 +252,13 @@ void board_init_f(ulong bootflag)
        post_run(NULL, POST_ROM | post_bootmode_get(0));
 #endif
 
-#if !defined(CONFIG_RELOC_FIXUP_WORKS)
+#if defined(CONFIG_NEEDS_MANUAL_RELOC)
        /*
         * We have to relocate the command table manually
         */
        fixup_cmdtable(&__u_boot_cmd_start,
                (ulong)(&__u_boot_cmd_end - &__u_boot_cmd_start));
-#endif /* !defined(CONFIG_RELOC_FIXUP_WORKS) */
+#endif /* defined(CONFIG_NEEDS_MANUAL_RELOC) */
 
 #if defined(CONFIG_CMD_AMBAPP) && defined(CONFIG_SYS_AMBAPP_PRINT_ON_STARTUP)
        puts("AMBA:\n");
diff --git a/board/BuS/eb_cpux9k2/config.mk b/board/BuS/eb_cpux9k2/config.mk
deleted file mode 100644 (file)
index e554a45..0000000
+++ /dev/null
@@ -1 +0,0 @@
-CONFIG_SYS_TEXT_BASE = 0x23f00000
index bbceaf37ae7228e4e72901c32abfbc523b68379c..fe62a0fcafaf80bfddaa439cc9ff378748b56bc9 100644 (file)
@@ -66,7 +66,7 @@ int board_init(void)
 
        gd->bd->bi_arch_number = MACH_TYPE_EB_CPUX9K2;
        /* adress of boot parameters */
-       gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
+       gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
 
 #ifdef CONFIG_STATUS_LED
        status_led_set(STATUS_LED_BOOT, STATUS_LED_ON);
@@ -134,9 +134,8 @@ void reset_phy(void)
 
 int dram_init(void)
 {
-       gd->bd->bi_dram[0].start = PHYS_SDRAM;
-       gd->bd->bi_dram[0].size =
-               get_ram_size((volatile long *) PHYS_SDRAM, PHYS_SDRAM_SIZE);
+       gd->ram_size = get_ram_size((volatile long *)CONFIG_SYS_SDRAM_BASE,
+                       CONFIG_SYS_SDRAM_SIZE);
        return 0;
 }
 
index d07642f5cf70a57ea01e6d20266bb539586b696b..2ffd1250af5b7244ff9ddbf21c9f83ad22968017 100644 (file)
@@ -24,4 +24,5 @@
 # MA 02110-1301 USA
 #
 
-CONFIG_SYS_TEXT_BASE = 0x00100000
+# TEXT_BASE must equal the intended FLASH location of u-boot.
+CONFIG_SYS_TEXT_BASE = 0xfff90000
index ae7ccbb4e9dbbaff1daac139a06301b3da663c56..09a5a5183bf9e4e6fa91ab5c79a230f0638be338 100644 (file)
@@ -270,8 +270,6 @@ static u8 display_buf[DISPLAY_BUF_SIZE];
 static u8 display_putc_pos;
 static u8 display_out_pos;
 
-static u8 display_dot_enable;
-
 void display_set(int cmd) {
 
        if (cmd & DISPLAY_CLEAR) {
@@ -281,12 +279,6 @@ void display_set(int cmd) {
        if (cmd & DISPLAY_HOME) {
                display_putc_pos = 0;
        }
-
-       if (cmd & DISPLAY_MARK) {
-               display_dot_enable = 1;
-       } else {
-               display_dot_enable = 0;
-       }
 }
 
 #define SEG_A    (1<<0)
@@ -314,10 +306,12 @@ void display_set(int cmd) {
  * A..Z                index 10..35
  * -           index 36
  * _           index 37
+ * .           index 38
  */
 
 #define SYMBOL_DASH            (36)
 #define SYMBOL_UNDERLINE       (37)
+#define SYMBOL_DOT             (38)
 
 static u8 display_char2seg7_tbl[]=
 {
@@ -337,28 +331,29 @@ static u8 display_char2seg7_tbl[]=
        SEG_B | SEG_C | SEG_D | SEG_E | SEG_G,                  /* d */
        SEG_A | SEG_D | SEG_E | SEG_F | SEG_G,                  /* E */
        SEG_A | SEG_E | SEG_F | SEG_G,                          /* F */
-       SEG_A | SEG_B | SEG_C | SEG_D | SEG_F | SEG_G,          /* g */
+       0,                                      /* g - not displayed */
        SEG_B | SEG_C | SEG_E | SEG_F | SEG_G,                  /* H */
-       SEG_E | SEG_F,                                          /* I */
-       SEG_B | SEG_C | SEG_D | SEG_E,                          /* J */
-       SEG_A,                                          /* K - special 1 */
+       SEG_B | SEG_C,                                          /* I */
+       0,                                      /* J - not displayed */
+       0,                                      /* K - not displayed */
        SEG_D | SEG_E | SEG_F,                                  /* L */
-       SEG_B,                                          /* m - special 2 */
-       SEG_C | SEG_E | SEG_G,                                  /* n */
-       SEG_C | SEG_D | SEG_E | SEG_G,                          /* o */
+       0,                                      /* m - not displayed */
+       0,                                      /* n - not displayed */
+       SEG_A | SEG_B | SEG_C | SEG_D | SEG_E | SEG_F,          /* O */
        SEG_A | SEG_B | SEG_E | SEG_F | SEG_G,                  /* P */
-       SEG_A | SEG_B | SEG_C | SEG_F | SEG_G,                  /* q */
-       SEG_E | SEG_G,                                          /* r */
+       0,                                      /* q - not displayed */
+       0,                                      /* r - not displayed */
        SEG_A | SEG_C | SEG_D | SEG_F | SEG_G,                  /* S */
        SEG_D | SEG_E | SEG_F | SEG_G,                          /* t */
        SEG_B | SEG_C | SEG_D | SEG_E | SEG_F,                  /* U */
-       SEG_C | SEG_D | SEG_E | SEG_F,                          /* V */
-       SEG_C,                                          /* w - special 3 */
-       SEG_B | SEG_C | SEG_E | SEG_F | SEG_G,                  /* X */
+       0,                                      /* V - not displayed */
+       0,                                      /* w - not displayed */
+       0,                                      /* X - not displayed */
        SEG_B | SEG_C | SEG_D | SEG_F | SEG_G,                  /* Y */
-       SEG_A | SEG_B | SEG_D | SEG_E | SEG_G,                  /* Z */
+       0,                                      /* Z - not displayed */
        SEG_G,                                                  /* - */
-       SEG_D                                                   /* _ */
+       SEG_D,                                                  /* _ */
+       SEG_P                                                   /* . */
 };
 
 /* Convert char to the LED segments representation */
@@ -374,23 +369,20 @@ static u8 display_char2seg7(char c)
                c -= 'A' - 10;
        else if (c == '-')
                c = SYMBOL_DASH;
-       else if ((c == '_') || (c == '.'))
+       else if (c == '_')
                c = SYMBOL_UNDERLINE;
+       else if (c == '.')
+               c = SYMBOL_DOT;
        else
                c = ' ';        /* display unsupported symbols as space */
 
        if (c != ' ')
                val = display_char2seg7_tbl[(int)c];
 
-       /* Handle DP LED here */
-       if (display_dot_enable) {
-               val |= SEG_P;
-       }
-
        return val;
 }
 
-static inline int display_putc_nomark(char c)
+int display_putc(char c)
 {
        if (display_putc_pos >= DISPLAY_BUF_SIZE)
                return -1;
@@ -403,13 +395,6 @@ static inline int display_putc_nomark(char c)
        return c;
 }
 
-int display_putc(char c)
-{
-       /* Mark the codes from the "display" command with the DP LED */
-       display_set(DISPLAY_MARK);
-       return display_putc_nomark(c);
-}
-
 /*
  * Flush current symbol to the LED display hardware
  */
@@ -493,9 +478,8 @@ void show_boot_progress(int status)
        if (a4m072_status2code(status, buf) < 0)
                return;
 
-       display_set(0); /* Clear DP Led */
-       display_putc_nomark(buf[0]);
-       display_putc_nomark(buf[1]);
+       display_putc(buf[0]);
+       display_putc(buf[1]);
        display_set(DISPLAY_HOME);
        display_out_pos = 0;    /* reset output position */
 
diff --git a/board/a4m072/config.mk b/board/a4m072/config.mk
deleted file mode 100644 (file)
index c6ba51d..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# (C) Copyright 2003
-# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-#
-# See file CREDITS for list of people who contributed to this
-# project.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-# MA 02111-1307 USA
-#
-
-#
-# a4m072 board:
-#
-#      Valid values for TEXT_BASE is:
-#
-#      0xFE000000   boot low
-#
-
-sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp
-
-ifndef TEXT_BASE
-## Standard: boot low
-TEXT_BASE = 0xFE000000
-endif
-
-PLATFORM_CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE) -I$(TOPDIR)/board
index 6925921785ecbbeaecffc661ad4c9ca56b852f73..3d9989d7f1a9a5d85c7c7cfe496a3431348a7236 100644 (file)
@@ -23,6 +23,7 @@
  * MA 02111-1307 USA
  */
 
+#include <asm-offsets.h>
 #include <ppc_asm.tmpl>
 #include <config.h>
 #include <asm/mmu.h>
index e969fcfd9058560ccca5a610fc2227dd88783c56..4b90c8d0804e5bce05355aa0e32a1e4e5f30edf6 100644 (file)
@@ -21,6 +21,7 @@
  * MA 02111-1307 USA
  */
 
+#include <asm-offsets.h>
 #include <ppc_asm.tmpl>
 #include <config.h>
 #include <asm/mmu.h>
index 64d5d422935cc8ea3b15a7041c9abc42d7d37d8d..680feaa6a9671707422be623ea0654b79d4a77ff 100644 (file)
@@ -21,6 +21,7 @@
  * MA 02111-1307 USA
  */
 
+#include <asm-offsets.h>
 #include <ppc_asm.tmpl>
 #include <config.h>
 #include <asm/mmu.h>
index 7139aaee4d0e710cba00e231e642ea171c6e9659..419ef4f9942a14df7dca2b2a6e873a4eb5653398 100644 (file)
@@ -21,6 +21,7 @@
  * MA 02111-1307 USA
  */
 
+#include <asm-offsets.h>
 #include <ppc_asm.tmpl>
 #include <asm/mmu.h>
 #include <config.h>
index c523bca1feddfacc5c6d598724e590e07a00df75..b518aa7d72fc2e579d9cfdd42ba06e0c4c1be5f6 100644 (file)
@@ -155,7 +155,8 @@ int misc_init_r(void)
        gd->bd->bi_flashstart = 0 - gd->bd->bi_flashsize;
        gd->bd->bi_flashoffset = 0;
 
-#if defined(CONFIG_NAND_U_BOOT) || defined(CONFIG_NAND_SPL)
+#if defined(CONFIG_NAND_U_BOOT) || defined(CONFIG_NAND_SPL) || \
+    defined(CONFIG_SYS_RAMBOOT)
        mtdcr(EBC0_CFGADDR, PB3CR);
 #else
        mtdcr(EBC0_CFGADDR, PB0CR);
@@ -163,7 +164,8 @@ int misc_init_r(void)
        pbcr = mfdcr(EBC0_CFGDATA);
        size_val = ffs(gd->bd->bi_flashsize) - 21;
        pbcr = (pbcr & 0x0001ffff) | gd->bd->bi_flashstart | (size_val << 17);
-#if defined(CONFIG_NAND_U_BOOT) || defined(CONFIG_NAND_SPL)
+#if defined(CONFIG_NAND_U_BOOT) || defined(CONFIG_NAND_SPL) || \
+    defined(CONFIG_SYS_RAMBOOT)
        mtdcr(EBC0_CFGADDR, PB3CR);
 #else
        mtdcr(EBC0_CFGADDR, PB0CR);
index ed3741c54a98d54dacb22bbd2bbe32c4e63098ce..d23cdc79d0decd5f1f7a66a465a585c881b8b361 100644 (file)
@@ -19,6 +19,7 @@
 * MA 02111-1307 USA
 */
 
+#include <asm-offsets.h>
 #include <ppc_asm.tmpl>
 #include <asm/mmu.h>
 #include <config.h>
index 500ce720f35a98776e7b5bce26609d3deb0a15c7..96a0f055ac0f476974e5ea57e6ab393f4a283add 100644 (file)
@@ -27,11 +27,6 @@ LIB  = $(obj)lib$(BOARD).a
 
 COBJS-y += $(BOARD).o
 COBJS-y += led.o
-COBJS-y += misc.o
-ifdef CONFIG_HAS_DATAFLASH
-COBJS-$(CONFIG_DATAFLASH_MMC_SELECT) += mux.o
-COBJS-y += partition.o
-endif
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS-y))
index 570a09a0741b2ed7c1cd2d4e88c1f7bb663979d7..d242583e37f195cb9136e62353e05fd640eb557b 100644 (file)
@@ -1,4 +1,8 @@
 /*
+ * (C) Copyright 2010 Andreas Bießmann <andreas.devel@gmail.com>
+ *
+ * derived from previous work
+ *
  * (C) Copyright 2002
  * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
  * Marius Groeger <mgroeger@sysgo.de>
  */
 
 #include <common.h>
-#include <exports.h>
 #include <netdev.h>
-#include <asm/arch/AT91RM9200.h>
+#include <asm/arch/hardware.h>
+#include <asm/arch/at91_pio.h>
+#include <asm/arch/at91_pmc.h>
 #include <asm/io.h>
-#if defined(CONFIG_DRIVER_ETHER)
-#include <at91rm9200_net.h>
-#include <dm9161.h>
-#endif
 
 DECLARE_GLOBAL_DATA_PTR;
 
 /* ------------------------------------------------------------------------- */
-/*
- * Miscelaneous platform dependent initialisations
- */
-
-int board_init (void)
+int board_init(void)
 {
-       /* Enable Ctrlc */
-       console_init_f ();
+       at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE;
 
        /*
         * Correct IRDA resistor problem
         * Set PA23_TXD in Output
         */
-       writel(AT91C_PA23_TXD2, ((AT91PS_PIO) AT91C_BASE_PIOA)->PIO_OER);
-
-       /*
-        * memory and cpu-speed are setup before relocation
-        * so we do _nothing_ here
-        */
+       writel(AT91_PMX_AA_TXD2, &pio->pioa.oer);
 
        /* arch number of AT91RM9200EK-Board */
        gd->bd->bi_arch_number = MACH_TYPE_AT91RM9200EK;
        /* adress of boot parameters */
-       gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
+       gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
 
        return 0;
 }
 
 int dram_init (void)
 {
-       gd->bd->bi_dram[0].start = PHYS_SDRAM;
-       gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE;
+       /* dram_init must store complete ramsize in gd->ram_size */
+       gd->ram_size = get_ram_size((volatile long *)CONFIG_SYS_SDRAM_BASE,
+                       CONFIG_SYS_SDRAM_SIZE);
        return 0;
 }
 
-#if defined(CONFIG_DRIVER_ETHER) && defined(CONFIG_CMD_NET)
-/*
- * Name:
- *     at91rm9200_GetPhyInterface
- * Description:
- *     Initialise the interface functions to the PHY
- * Arguments:
- *     None
- * Return value:
- *     None
- */
-void at91rm9200_GetPhyInterface(AT91PS_PhyOps p_phyops)
-{
-       p_phyops->Init = dm9161_InitPhy;
-       p_phyops->IsPhyConnected = dm9161_IsPhyConnected;
-       p_phyops->GetLinkSpeed = dm9161_GetLinkSpeed;
-       p_phyops->AutoNegotiate = dm9161_AutoNegotiate;
-}
-#endif
-
 #ifdef CONFIG_DRIVER_AT91EMAC
 int board_eth_init(bd_t *bis)
 {
-       int rc = 0;
-       rc = at91emac_register(bis, 0);
-       return rc;
+       return at91emac_register(bis, (u32) AT91_EMAC_BASE);
 }
 #endif
index 207769233ee041e2d9c0d13ec358b4b8f1627b56..c7323fe47760437d22beda88c696da78d6d720c8 100644 (file)
@@ -1 +1,2 @@
-CONFIG_SYS_TEXT_BASE = 0x21f00000
+# currently only NOR flash booting is supported
+CONFIG_SYS_TEXT_BASE = 0x10000000
index 9464952211baf5128b5dd21e3863cea3b86a0d7b..8d512e0329ce05ef7b6460fad4d3245ebab9b2da 100644 (file)
@@ -3,6 +3,9 @@
  * Atmel Nordic AB <www.atmel.com>
  * Ulf Samuelsson <ulf@atmel.com>
  *
+ * (C) Copyright 2010
+ * Andreas Bießmann <andreas.devel@gmail.com>
+ *
  * See file CREDITS for list of people who contributed to this
  * project.
  *
  */
 
 #include <common.h>
-#include <asm/arch/AT91RM9200.h>
-#include <asm/io.h>
+#include <asm/arch/gpio.h>
+#include <asm/arch/at91_pmc.h>
 
-#define        GREEN_LED       AT91C_PIO_PB0
-#define        YELLOW_LED      AT91C_PIO_PB1
-#define        RED_LED         AT91C_PIO_PB2
+/* bit mask in PIO port B */
+#define        GREEN_LED       (1<<0)
+#define        YELLOW_LED      (1<<1)
+#define        RED_LED         (1<<2)
 
 void   green_LED_on(void)
 {
-       AT91PS_PIO      PIOB    = AT91C_BASE_PIOB;
-
-       writel(GREEN_LED, PIOB->PIO_CODR);
+       at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE;
+       writel(GREEN_LED, &pio->piob.codr);
 }
 
 void    yellow_LED_on(void)
 {
-       AT91PS_PIO      PIOB    = AT91C_BASE_PIOB;
-
-       writel(YELLOW_LED, PIOB->PIO_CODR);
+       at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE;
+       writel(YELLOW_LED, &pio->piob.codr);
 }
 
 void    red_LED_on(void)
 {
-       AT91PS_PIO      PIOB    = AT91C_BASE_PIOB;
-
-       writel(RED_LED, PIOB->PIO_CODR);
+       at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE;
+       writel(RED_LED, &pio->piob.codr);
 }
 
 void   green_LED_off(void)
 {
-       AT91PS_PIO      PIOB    = AT91C_BASE_PIOB;
-
-       writel(GREEN_LED, PIOB->PIO_SODR);
+       at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE;
+       writel(GREEN_LED, &pio->piob.sodr);
 }
 
 void   yellow_LED_off(void)
 {
-       AT91PS_PIO      PIOB    = AT91C_BASE_PIOB;
-
-       writel(YELLOW_LED, PIOB->PIO_SODR);
+       at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE;
+       writel(YELLOW_LED, &pio->piob.sodr);
 }
 
 void   red_LED_off(void)
 {
-       AT91PS_PIO      PIOB    = AT91C_BASE_PIOB;
-
-       writel(RED_LED, PIOB->PIO_SODR);
+       at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE;
+       writel(RED_LED, &pio->piob.sodr);
 }
 
-
 void coloured_LED_init (void)
 {
-       AT91PS_PIO      PIOB    = AT91C_BASE_PIOB;
-       AT91PS_PMC      PMC     = AT91C_BASE_PMC;
+       at91_pmc_t *pmc = (at91_pmc_t *)AT91_PMC_BASE;
+       at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE;
 
        /* Enable PIOB clock */
-       writel((1 << AT91C_ID_PIOB), PMC->PMC_PCER);
+       writel(1 << AT91_ID_PIOB, &pmc->pcer);
+
        /* Disable peripherals on LEDs */
-       writel(AT91C_PIO_PB2 | AT91C_PIO_PB1 | AT91C_PIO_PB0, PIOB->PIO_PER);
+       writel(GREEN_LED | YELLOW_LED | RED_LED, &pio->piob.per);
        /* Enable pins as outputs */
-       writel(AT91C_PIO_PB2 | AT91C_PIO_PB1 | AT91C_PIO_PB0, PIOB->PIO_OER);
+       writel(GREEN_LED | YELLOW_LED | RED_LED, &pio->piob.oer);
        /* Turn all LEDs OFF */
-       writel(AT91C_PIO_PB2 | AT91C_PIO_PB1 | AT91C_PIO_PB0, PIOB->PIO_SODR);
+       writel(GREEN_LED | YELLOW_LED | RED_LED, &pio->piob.sodr);
 }
diff --git a/board/atmel/at91rm9200ek/misc.c b/board/atmel/at91rm9200ek/misc.c
deleted file mode 100644 (file)
index 81de32f..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * (C) Copyright 2002
- * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
- * Marius Groeger <mgroeger@sysgo.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/arch/AT91RM9200.h>
-#include <at91rm9200_net.h>
-#include <dm9161.h>
-#include <net.h>
-
-int board_late_init(void)
-{
-       DECLARE_GLOBAL_DATA_PTR;
-
-       /* Fix Ethernet Initialization Bug when starting Linux from U-Boot */
-       eth_init(gd->bd);
-       return 0;
-}
-
-
-/* checks if addr is in RAM */
-int addr2ram(ulong addr)
-{
-       int result = 0;
-
-       if((addr >= PHYS_SDRAM) && (addr < (PHYS_SDRAM + PHYS_SDRAM_SIZE)))
-               result = 1;
-
-       return result;
-}
diff --git a/board/atmel/at91rm9200ek/mux.c b/board/atmel/at91rm9200ek/mux.c
deleted file mode 100644 (file)
index bdd44e8..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#include <config.h>
-#include <common.h>
-#include <asm/hardware.h>
-#include <asm/io.h>
-#include <dataflash.h>
-
-int AT91F_GetMuxStatus(void)
-{
-       /* Set in PIO mode */
-       writel(CONFIG_SYS_DATAFLASH_MMC_PIO, AT91C_BASE_PIOB->PIO_PER);
-       /* Configure in output */
-       writel(CONFIG_SYS_DATAFLASH_MMC_PIO, AT91C_BASE_PIOB->PIO_OER);
-
-       if(readl(AT91C_BASE_PIOB->PIO_ODSR) & CONFIG_SYS_DATAFLASH_MMC_PIO)
-               return 1;
-
-       return 0;
-}
-
-void AT91F_SelectMMC(void)
-{
-       /* Set in PIO mode */
-       writel(CONFIG_SYS_DATAFLASH_MMC_PIO, AT91C_BASE_PIOB->PIO_PER);
-       /* Configure in output */
-       writel(CONFIG_SYS_DATAFLASH_MMC_PIO, AT91C_BASE_PIOB->PIO_OER);
-       /* Set Output */
-       writel(CONFIG_SYS_DATAFLASH_MMC_PIO, AT91C_BASE_PIOB->PIO_SODR);
-}
-
-void AT91F_SelectSPI(void)
-{
-       /* Set in PIO mode */
-       writel(CONFIG_SYS_DATAFLASH_MMC_PIO, AT91C_BASE_PIOB->PIO_PER);
-       /* Configure in output */
-       writel(CONFIG_SYS_DATAFLASH_MMC_PIO, AT91C_BASE_PIOB->PIO_OER);
-       /* Clear Output */
-       writel(CONFIG_SYS_DATAFLASH_MMC_PIO, AT91C_BASE_PIOB->PIO_CODR);
-}
diff --git a/board/atmel/at91rm9200ek/partition.c b/board/atmel/at91rm9200ek/partition.c
deleted file mode 100644 (file)
index 990cbcf..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- *
- * 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 <config.h>
-#include <asm/hardware.h>
-#include <dataflash.h>
-
-AT91S_DATAFLASH_INFO dataflash_info[CONFIG_SYS_MAX_DATAFLASH_BANKS];
-
-struct dataflash_addr cs[CONFIG_SYS_MAX_DATAFLASH_BANKS] = {
-       {CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0, 0},       /* Logical adress, CS */
-       {CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS3, 3}
-};
-
-/*define the area offsets*/
-dataflash_protect_t area_list[NB_DATAFLASH_AREA] = {
-       {0x00000000, 0x000041FF, FLAG_PROTECT_SET,      0, "Bootstrap"},
-       {0x00004200, 0x000083FF, FLAG_PROTECT_CLEAR,    0, "Environment"},
-       {0x00008400, 0x00041FFF, FLAG_PROTECT_SET,      0, "U-Boot"},
-       {0x00042000, 0x00251FFF, FLAG_PROTECT_CLEAR,    0, "Kernel"},
-       {0x00252000, 0xFFFFFFFF, FLAG_PROTECT_CLEAR,    0, "FS"},
-};
diff --git a/board/balloon3/Makefile b/board/balloon3/Makefile
new file mode 100644 (file)
index 0000000..7db615e
--- /dev/null
@@ -0,0 +1,47 @@
+#
+# Balloon3 Support
+#
+# Copyright (C) 2010 Marek Vasut <marek.vasut@gmail.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
+#
+
+include $(TOPDIR)/config.mk
+
+LIB    = $(obj)lib$(BOARD).a
+
+COBJS  := balloon3.o
+
+SRCS   := $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+
+$(LIB):        $(obj).depend $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS)
+
+clean:
+       rm -f $(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/balloon3/balloon3.c b/board/balloon3/balloon3.c
new file mode 100644 (file)
index 0000000..26e34e9
--- /dev/null
@@ -0,0 +1,238 @@
+/*
+ * Balloon3 Support
+ *
+ * Copyright (C) 2010 Marek Vasut <marek.vasut@gmail.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
+ */
+
+#include <common.h>
+#include <asm/arch/hardware.h>
+#include <serial.h>
+#include <asm/io.h>
+#include <spartan3.h>
+#include <command.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+void balloon3_init_fpga(void);
+
+/*
+ * Miscelaneous platform dependent initialisations
+ */
+
+int board_init(void)
+{
+       /* We have RAM, disable cache */
+       dcache_disable();
+       icache_disable();
+
+       /* arch number of vpac270 */
+       gd->bd->bi_arch_number = MACH_TYPE_BALLOON3;
+
+       /* adress of boot parameters */
+       gd->bd->bi_boot_params = 0xa0000100;
+
+       /* Init the FPGA */
+       balloon3_init_fpga();
+
+       return 0;
+}
+
+struct serial_device *default_serial_console(void)
+{
+       return &serial_stuart_device;
+}
+
+extern void pxa_dram_init(void);
+int dram_init(void)
+{
+       pxa_dram_init();
+       gd->ram_size = PHYS_SDRAM_1_SIZE;
+       return 0;
+}
+
+void dram_init_banksize(void)
+{
+       gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
+       gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
+       gd->bd->bi_dram[2].start = PHYS_SDRAM_3;
+
+       gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
+       gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
+       gd->bd->bi_dram[2].size = PHYS_SDRAM_3_SIZE;
+}
+
+#ifdef CONFIG_CMD_USB
+int usb_board_init(void)
+{
+       writel((readl(UHCHR) | UHCHR_PCPL | UHCHR_PSPL) &
+               ~(UHCHR_SSEP0 | UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE),
+               UHCHR);
+
+       writel(readl(UHCHR) | UHCHR_FSBIR, UHCHR);
+
+       while (readl(UHCHR) & UHCHR_FSBIR)
+               ;
+
+       writel(readl(UHCHR) & ~UHCHR_SSE, UHCHR);
+       writel((UHCHIE_UPRIE | UHCHIE_RWIE), UHCHIE);
+
+       /* Clear any OTG Pin Hold */
+       if (readl(PSSR) & PSSR_OTGPH)
+               writel(readl(PSSR) | PSSR_OTGPH, PSSR);
+
+       writel(readl(UHCRHDA) & ~(0x200), UHCRHDA);
+       writel(readl(UHCRHDA) | 0x100, UHCRHDA);
+
+       /* Set port power control mask bits, only 3 ports. */
+       writel(readl(UHCRHDB) | (0x7<<17), UHCRHDB);
+
+       /* enable port 2 */
+       writel(readl(UP2OCR) | UP2OCR_HXOE | UP2OCR_HXS |
+               UP2OCR_DMPDE | UP2OCR_DPPDE, UP2OCR);
+
+       return 0;
+}
+
+void usb_board_init_fail(void)
+{
+       return;
+}
+
+void usb_board_stop(void)
+{
+       writel(readl(UHCHR) | UHCHR_FHR, UHCHR);
+       udelay(11);
+       writel(readl(UHCHR) & ~UHCHR_FHR, UHCHR);
+
+       writel(readl(UHCCOMS) | 1, UHCCOMS);
+       udelay(10);
+
+       writel(readl(CKEN) & ~CKEN10_USBHOST, CKEN);
+
+       return;
+}
+#endif
+
+#if defined(CONFIG_FPGA)
+/* Toggle GPIO103 and GPIO104 --  PROGB and RDnWR */
+int fpga_pgm_fn(int nassert, int nflush, int cookie)
+{
+       if (nassert)
+               writel(0x80, GPCR3);
+       else
+               writel(0x80, GPSR3);
+       if (nflush)
+               writel(0x100, GPCR3);
+       else
+               writel(0x100, GPSR3);
+       return nassert;
+}
+
+/* Check GPIO83 -- INITB */
+int fpga_init_fn(int cookie)
+{
+       return !(readl(GPLR2) & 0x80000);
+}
+
+/* Check GPIO84 -- BUSY */
+int fpga_busy_fn(int cookie)
+{
+       return !(readl(GPLR2) & 0x100000);
+}
+
+/* Check GPIO111 -- DONE */
+int fpga_done_fn(int cookie)
+{
+       return readl(GPLR3) & 0x8000;
+}
+
+/* Configure GPIO104 as GPIO and deassert it */
+int fpga_pre_config_fn(int cookie)
+{
+       writel(readl(GAFR3_L) & ~0x30000, GAFR3_L);
+       writel(0x100, GPCR3);
+       return 0;
+}
+
+/* Configure GPIO104 as nSKTSEL */
+int fpga_post_config_fn(int cookie)
+{
+       writel(readl(GAFR3_L) | 0x10000, GAFR3_L);
+       return 0;
+}
+
+/* Toggle RDnWR */
+int fpga_wr_fn(int nassert_write, int flush, int cookie)
+{
+       udelay(1000);
+
+       if (nassert_write)
+               writel(0x100, GPCR3);
+       else
+               writel(0x100, GPSR3);
+
+       return nassert_write;
+}
+
+/* Write program to the FPGA */
+int fpga_wdata_fn(uchar data, int flush, int cookie)
+{
+       writeb(data, 0x10f00000);
+       return 0;
+}
+
+/* Toggle Clock pin -- NO-OP */
+int fpga_clk_fn(int assert_clk, int flush, int cookie)
+{
+       return assert_clk;
+}
+
+/* Toggle ChipSelect pin -- NO-OP */
+int fpga_cs_fn(int assert_clk, int flush, int cookie)
+{
+       return assert_clk;
+}
+
+Xilinx_Spartan3_Slave_Parallel_fns balloon3_fpga_fns = {
+       fpga_pre_config_fn,
+       fpga_pgm_fn,
+       fpga_init_fn,
+       NULL,   /* err */
+       fpga_done_fn,
+       fpga_clk_fn,
+       fpga_cs_fn,
+       fpga_wr_fn,
+       NULL,   /* rdata */
+       fpga_wdata_fn,
+       fpga_busy_fn,
+       NULL,   /* abort */
+       fpga_post_config_fn,
+};
+
+Xilinx_desc fpga = XILINX_XC3S1000_DESC(slave_parallel,
+                       (void *)&balloon3_fpga_fns, 0);
+
+/* Initialize the FPGA */
+void balloon3_init_fpga(void)
+{
+       fpga_init();
+       fpga_add(fpga_xilinx, &fpga);
+}
+#else
+void balloon3_init_fpga(void) {}
+#endif /* CONFIG_FPGA */
index 531dcdf4ae22e5dd00c2c6f7718df775394927ea..61b4b55534226357e1f74120baf3f484c2feeec0 100644 (file)
@@ -25,6 +25,7 @@
 #define __ASSEMBLY__   1
 #endif
 
+#include <asm-offsets.h>
 #include <config.h>
 #include <asm/processor.h>
 #include <mpc824x.h>
index 9e73c57b8789466ec1802b2444ea3f35d36ede94..dcb91bdffad707e4d0f0e9f3320cbb516e669488 100644 (file)
@@ -13,7 +13,7 @@
 
 int do_cled(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
-       ulong addr = 0x20000000 + 0x200000; // AMS2
+       ulong addr = 0x20000000 + 0x200000; /* AMS2 */
        uchar data;
 
        if (argc < 2)
index a806b184920d2abff6c5be38bffec1124943029b..b111b519f080d430db49c7ea3e135614f61ab3f6 100644 (file)
@@ -26,17 +26,15 @@ include $(TOPDIR)/config.mk
 LIB    = $(obj)lib$(BOARD).a
 
 COBJS  := cerf250.o flash.o
-SOBJS  := lowlevel_init.o
 
-SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+SRCS   := $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
-SOBJS  := $(addprefix $(obj),$(SOBJS))
 
-$(LIB):        $(obj).depend $(OBJS) $(SOBJS)
-       $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+$(LIB):        $(obj).depend $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS)
 
 clean:
-       rm -f $(SOBJS) $(OBJS)
+       rm -f $(OBJS)
 
 distclean:     clean
        rm -f $(LIB) core *.bak $(obj).depend
index 59346bc6d45d65ffb742456f5ed59d931900ba44..043afea265f91034002f4fba88a9534e2158304f 100644 (file)
@@ -39,8 +39,9 @@ DECLARE_GLOBAL_DATA_PTR;
 
 int board_init (void)
 {
-       /* memory and cpu-speed are setup before relocation */
-       /* so we do _nothing_ here */
+       /* We have RAM, disable cache */
+       dcache_disable();
+       icache_disable();
 
        /* arch number of cerf PXA Board */
        gd->bd->bi_arch_number = MACH_TYPE_PXA_CERF;
@@ -58,19 +59,18 @@ int board_late_init(void)
        return 0;
 }
 
+extern void pxa_dram_init(void);
+int dram_init(void)
+{
+       pxa_dram_init();
+       gd->ram_size = PHYS_SDRAM_1_SIZE;
+       return 0;
+}
 
-int dram_init (void)
+void dram_init_banksize(void)
 {
        gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
        gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
-       gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
-       gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
-       gd->bd->bi_dram[2].start = PHYS_SDRAM_3;
-       gd->bd->bi_dram[2].size = PHYS_SDRAM_3_SIZE;
-       gd->bd->bi_dram[3].start = PHYS_SDRAM_4;
-       gd->bd->bi_dram[3].size = PHYS_SDRAM_4_SIZE;
-
-       return 0;
 }
 
 #ifdef CONFIG_CMD_NET
diff --git a/board/cerf250/config.mk b/board/cerf250/config.mk
deleted file mode 100644 (file)
index c2d46b2..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#
-# Cerf board with PXA250 cpu
-#
-#
-CONFIG_SYS_TEXT_BASE = 0xa3080000
diff --git a/board/cerf250/lowlevel_init.S b/board/cerf250/lowlevel_init.S
deleted file mode 100644 (file)
index 5bfe53c..0000000
+++ /dev/null
@@ -1,411 +0,0 @@
-/*
- * Most of this taken from Redboot hal_platform_setup.h with cleanup
- *
- * NOTE: I haven't clean this up considerably, just enough to get it
- * running. See hal_platform_setup.h for the source. See
- * board/cradle/lowlevel_init.S for another PXA250 setup that is
- * much cleaner.
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include <config.h>
-#include <version.h>
-#include <asm/arch/pxa-regs.h>
-
-DRAM_SIZE:  .long   CONFIG_SYS_DRAM_SIZE
-
-/* wait for coprocessor write complete */
-   .macro CPWAIT reg
-   mrc  p15,0,\reg,c2,c0,0
-   mov  \reg,\reg
-   sub  pc,pc,#4
-   .endm
-
-
-/*
- *     Memory setup
- */
-
-.globl lowlevel_init
-lowlevel_init:
-
-       /* Set up GPIO pins first ----------------------------------------- */
-
-       ldr     r0, =GPSR0
-       ldr     r1, =CONFIG_SYS_GPSR0_VAL
-       str     r1, [r0]
-
-       ldr     r0, =GPSR1
-       ldr     r1, =CONFIG_SYS_GPSR1_VAL
-       str     r1, [r0]
-
-       ldr     r0, =GPSR2
-       ldr     r1, =CONFIG_SYS_GPSR2_VAL
-       str     r1, [r0]
-
-       ldr     r0, =GPCR0
-       ldr     r1, =CONFIG_SYS_GPCR0_VAL
-       str     r1, [r0]
-
-       ldr     r0, =GPCR1
-       ldr     r1, =CONFIG_SYS_GPCR1_VAL
-       str     r1, [r0]
-
-       ldr     r0, =GPCR2
-       ldr     r1, =CONFIG_SYS_GPCR2_VAL
-       str     r1, [r0]
-
-       ldr     r0, =GPDR0
-       ldr     r1, =CONFIG_SYS_GPDR0_VAL
-       str     r1, [r0]
-
-       ldr     r0, =GPDR1
-       ldr     r1, =CONFIG_SYS_GPDR1_VAL
-       str     r1, [r0]
-
-       ldr     r0, =GPDR2
-       ldr     r1, =CONFIG_SYS_GPDR2_VAL
-       str     r1, [r0]
-
-       ldr     r0, =GAFR0_L
-       ldr     r1, =CONFIG_SYS_GAFR0_L_VAL
-       str     r1, [r0]
-
-       ldr     r0, =GAFR0_U
-       ldr     r1, =CONFIG_SYS_GAFR0_U_VAL
-       str     r1, [r0]
-
-       ldr     r0, =GAFR1_L
-       ldr     r1, =CONFIG_SYS_GAFR1_L_VAL
-       str     r1, [r0]
-
-       ldr     r0, =GAFR1_U
-       ldr     r1, =CONFIG_SYS_GAFR1_U_VAL
-       str     r1, [r0]
-
-       ldr     r0, =GAFR2_L
-       ldr     r1, =CONFIG_SYS_GAFR2_L_VAL
-       str     r1, [r0]
-
-       ldr     r0, =GAFR2_U
-       ldr     r1, =CONFIG_SYS_GAFR2_U_VAL
-       str     r1, [r0]
-
-       ldr     r0, =PSSR                       /* enable GPIO pins */
-       ldr     r1, =CONFIG_SYS_PSSR_VAL
-       str     r1, [r0]
-
-       /* ---------------------------------------------------------------- */
-       /* Enable memory interface                                          */
-       /*                                                                  */
-       /* The sequence below is based on the recommended init steps        */
-       /* detailed in the Intel PXA250 Operating Systems Developers Guide, */
-       /* Chapter 10.                                                      */
-       /* ---------------------------------------------------------------- */
-
-       /* ---------------------------------------------------------------- */
-       /* Step 1: Wait for at least 200 microsedonds to allow internal     */
-       /*         clocks to settle. Only necessary after hard reset...     */
-       /*         FIXME: can be optimized later                            */
-       /* ---------------------------------------------------------------- */
-
-       ldr     r3, =OSCR                       /* reset the OS Timer Count to zero */
-       mov     r2, #0
-       str     r2, [r3]
-       ldr     r4, =0x300                      /* really 0x2E1 is about 200usec,   */
-                                               /* so 0x300 should be plenty        */
-1:
-       ldr     r2, [r3]
-       cmp     r4, r2
-       bgt     1b
-
-mem_init:
-
-       ldr     r1, =MEMC_BASE                  /* get memory controller base addr. */
-
-       /* ---------------------------------------------------------------- */
-       /* Step 2a: Initialize Asynchronous static memory controller        */
-       /* ---------------------------------------------------------------- */
-
-       /* MSC registers: timing, bus width, mem type                       */
-
-       /* MSC0: nCS(0,1)                                                   */
-       ldr     r2, =CONFIG_SYS_MSC0_VAL
-       str     r2, [r1, #MSC0_OFFSET]
-       ldr     r2, [r1, #MSC0_OFFSET]          /* read back to ensure      */
-                                               /* that data latches        */
-       /* MSC1: nCS(2,3)                                                   */
-       ldr     r2, =CONFIG_SYS_MSC1_VAL
-       str     r2, [r1, #MSC1_OFFSET]
-       ldr     r2, [r1, #MSC1_OFFSET]
-
-       /* MSC2: nCS(4,5)                                                   */
-       ldr     r2, =CONFIG_SYS_MSC2_VAL
-       str     r2, [r1, #MSC2_OFFSET]
-       ldr     r2, [r1, #MSC2_OFFSET]
-
-       /* ---------------------------------------------------------------- */
-       /* Step 2b: Initialize Card Interface                               */
-       /* ---------------------------------------------------------------- */
-
-       /* MECR: Memory Expansion Card Register                             */
-       ldr     r2, =CONFIG_SYS_MECR_VAL
-       str     r2, [r1, #MECR_OFFSET]
-       ldr     r2, [r1, #MECR_OFFSET]
-
-       /* MCMEM0: Card Interface slot 0 timing                             */
-       ldr     r2, =CONFIG_SYS_MCMEM0_VAL
-       str     r2, [r1, #MCMEM0_OFFSET]
-       ldr     r2, [r1, #MCMEM0_OFFSET]
-
-       /* MCMEM1: Card Interface slot 1 timing                             */
-       ldr     r2, =CONFIG_SYS_MCMEM1_VAL
-       str     r2, [r1, #MCMEM1_OFFSET]
-       ldr     r2, [r1, #MCMEM1_OFFSET]
-
-       /* MCATT0: Card Interface Attribute Space Timing, slot 0            */
-       ldr     r2, =CONFIG_SYS_MCATT0_VAL
-       str     r2, [r1, #MCATT0_OFFSET]
-       ldr     r2, [r1, #MCATT0_OFFSET]
-
-       /* MCATT1: Card Interface Attribute Space Timing, slot 1            */
-       ldr     r2, =CONFIG_SYS_MCATT1_VAL
-       str     r2, [r1, #MCATT1_OFFSET]
-       ldr     r2, [r1, #MCATT1_OFFSET]
-
-       /* MCIO0: Card Interface I/O Space Timing, slot 0                   */
-       ldr     r2, =CONFIG_SYS_MCIO0_VAL
-       str     r2, [r1, #MCIO0_OFFSET]
-       ldr     r2, [r1, #MCIO0_OFFSET]
-
-       /* MCIO1: Card Interface I/O Space Timing, slot 1                   */
-       ldr     r2, =CONFIG_SYS_MCIO1_VAL
-       str     r2, [r1, #MCIO1_OFFSET]
-       ldr     r2, [r1, #MCIO1_OFFSET]
-
-       /* ---------------------------------------------------------------- */
-       /* Step 2c: Write FLYCNFG  FIXME: what's that???                    */
-       /* ---------------------------------------------------------------- */
-
-
-       /* ---------------------------------------------------------------- */
-       /* Step 2d: Initialize Timing for Sync Memory (SDCLK0)              */
-       /* ---------------------------------------------------------------- */
-
-       /* Before accessing MDREFR we need a valid DRI field, so we set     */
-       /* this to power on defaults + DRI field, set SDRAM clocks free running */
-
-       ldr     r3, =CONFIG_SYS_MDREFR_VAL
-       ldr     r2, =0xFFF
-       and     r3, r3,  r2
-
-       ldr     r0, [r1, #MDREFR_OFFSET]
-       bic     r0, r0, r2
-       bic     r0, r0, #(MDREFR_K0FREE|MDREFR_K1FREE|MDREFR_K2FREE)
-       orr     r0, r0, r3
-
-       str     r0, [r1, #MDREFR_OFFSET]        /* write back MDREFR        */
-
-
-       /* ---------------------------------------------------------------- */
-       /* Step 3: Initialize Synchronous Static Memory (Flash/Peripherals) */
-       /* ---------------------------------------------------------------- */
-
-       /* Initialize SXCNFG register. Assert the enable bits               */
-
-       /* Write SXMRS to cause an MRS command to all enabled banks of      */
-       /* synchronous static memory. Note that SXLCR need not be written   */
-       /* at this time.                                                    */
-
-       /* FIXME: we use async mode for now                                 */
-
-
-       /* ---------------------------------------------------------------- */
-       /* Step 4: Initialize SDRAM                                         */
-       /* ---------------------------------------------------------------- */
-
-       /* set MDREFR according to user define with exception of a few bits */
-
-       ldr     r4, =CONFIG_SYS_MDREFR_VAL
-       ldr     r2, =(MDREFR_K0RUN|MDREFR_K0DB2|MDREFR_K1RUN|MDREFR_K1DB2|\
-                                       MDREFR_K2RUN |MDREFR_K2DB2)
-       and     r4, r4, r2
-       bic     r0, r0, r2
-       orr     r0, r0, r4
-
-       str     r0, [r1, #MDREFR_OFFSET]    /* write back MDREFR        */
-       ldr     r0, [r1, #MDREFR_OFFSET]
-
-       /* Step 4b: de-assert MDREFR:SLFRSH.                                */
-
-       bic     r0, r0, #(MDREFR_SLFRSH)
-       str     r0, [r1, #MDREFR_OFFSET]    /* write back MDREFR        */
-       ldr     r0, [r1, #MDREFR_OFFSET]
-
-
-       /* Step 4c: assert MDREFR:E1PIN and E0PIO as desired, set KXFREE  */
-
-       ldr     r4, =CONFIG_SYS_MDREFR_VAL
-       ldr     r2, =(MDREFR_E0PIN|MDREFR_E1PIN|MDREFR_K0FREE| \
-                       MDREFR_K1FREE | MDREFR_K2FREE)
-       and     r4, r4, r2
-       orr     r0, r0, r4
-       str     r0, [r1, #MDREFR_OFFSET]    /* write back MDREFR        */
-       ldr     r0, [r1, #MDREFR_OFFSET]
-
-
-       /* Step 4d: write MDCNFG with MDCNFG:DEx deasserted (set to 0), to  */
-       /*          configure but not enable each SDRAM partition pair.     */
-
-       ldr     r4, =CONFIG_SYS_MDCNFG_VAL
-       bic     r4, r4, #(MDCNFG_DE0|MDCNFG_DE1)
-       bic     r4, r4, #(MDCNFG_DE2|MDCNFG_DE3)
-       str     r4, [r1, #MDCNFG_OFFSET]        /* write back MDCNFG        */
-       ldr     r4, [r1, #MDCNFG_OFFSET]
-
-
-       /* Step 4e: Wait for the clock to the SDRAMs to stabilize,          */
-       /*          100..200 Âµsec.                                          */
-
-       ldr     r3, =OSCR                       /* reset the OS Timer Count to zero */
-       mov     r2, #0
-       str     r2, [r3]
-       ldr     r4, =0x300                      /* really 0x2E1 is about 200usec,   */
-                                               /* so 0x300 should be plenty        */
-1:
-       ldr     r2, [r3]
-       cmp     r4, r2
-       bgt     1b
-
-
-       /* Step 4f: Trigger a number (usually 8) refresh cycles by          */
-       /*          attempting non-burst read or write accesses to disabled */
-       /*          SDRAM, as commonly specified in the power up sequence   */
-       /*          documented in SDRAM data sheets. The address(es) used   */
-       /*          for this purpose must not be cacheable.                 */
-
-       ldr     r3, =CONFIG_SYS_DRAM_BASE
-.rept 8
-       str     r2, [r3]
-.endr
-
-       /* Step 4g: Write MDCNFG with enable bits asserted                  */
-       /*          (MDCNFG:DEx set to 1).                                  */
-
-       ldr     r3, [r1, #MDCNFG_OFFSET]
-       orr     r3, r3, #(MDCNFG_DE0|MDCNFG_DE1)
-       str     r3, [r1, #MDCNFG_OFFSET]
-
-       /* Step 4h: Write MDMRS.                                            */
-
-       ldr     r2, =CONFIG_SYS_MDMRS_VAL
-       str     r2, [r1, #MDMRS_OFFSET]
-
-
-       /* We are finished with Intel's memory controller initialisation    */
-
-
-       /* ---------------------------------------------------------------- */
-       /* Disable (mask) all interrupts at interrupt controller            */
-       /* ---------------------------------------------------------------- */
-
-initirqs:
-
-       mov     r1, #0          /* clear int. level register (IRQ, not FIQ) */
-       ldr     r2, =ICLR
-       str     r1, [r2]
-
-       ldr     r2, =ICMR       /* mask all interrupts at the controller    */
-       str     r1, [r2]
-
-
-       /* ---------------------------------------------------------------- */
-       /* Clock initialisation                                             */
-       /* ---------------------------------------------------------------- */
-
-initclks:
-
-       /* Disable the peripheral clocks, and set the core clock frequency  */
-
-       /* Turn Off ALL on-chip peripheral clocks for re-configuration      */
-       /* Note: See label 'ENABLECLKS' for the re-enabling                 */
-       ldr     r1, =CKEN
-       mov     r2, #0
-       str     r2, [r1]
-
-
-       /* default value in case no valid rotary switch setting is found    */
-       ldr     r2, =(CCCR_L27|CCCR_M2|CCCR_N10)  /* DEFAULT: {200/200/100} */
-
-       /* ... and write the core clock config register                     */
-       ldr     r1, =CCCR
-       str     r2, [r1]
-
-#ifdef RTC
-       /* enable the 32Khz oscillator for RTC and PowerManager             */
-
-       ldr     r1, =OSCC
-       mov     r2, #OSCC_OON
-       str     r2, [r1]
-
-       /* NOTE:  spin here until OSCC.OOK get set, meaning the PLL         */
-       /* has settled.                                                     */
-60:
-       ldr     r2, [r1]
-       ands    r2, r2, #1
-       beq     60b
-#endif
-
-       /* ---------------------------------------------------------------- */
-       /*                                                                  */
-       /* ---------------------------------------------------------------- */
-
-       /* Save SDRAM size */
-       ldr     r1, =DRAM_SIZE
-       str     r8, [r1]
-
-       /* Interrupt init: Mask all interrupts                              */
-       ldr     r0, =ICMR /* enable no sources */
-       mov     r1, #0
-       str     r1, [r0]
-
-       /* FIXME */
-
-#define NODEBUG
-#ifdef NODEBUG
-       /*Disable software and data breakpoints */
-       mov     r0,#0
-       mcr     p15,0,r0,c14,c8,0  /* ibcr0 */
-       mcr     p15,0,r0,c14,c9,0  /* ibcr1 */
-       mcr     p15,0,r0,c14,c4,0  /* dbcon */
-
-       /*Enable all debug functionality */
-       mov     r0,#0x80000000
-       mcr     p14,0,r0,c10,c0,0  /* dcsr */
-
-#endif
-
-       /* ---------------------------------------------------------------- */
-       /* End lowlevel_init                                                     */
-       /* ---------------------------------------------------------------- */
-
-endlowlevel_init:
-
-       mov     pc, lr
index ae570e153c49ef8862df18475cb3e3a3577a2cde..f8b44abee008f064a9a61a377f97813c3e91fe78 100644 (file)
@@ -24,17 +24,15 @@ include $(TOPDIR)/config.mk
 LIB    = $(obj)lib$(BOARD).a
 
 COBJS  := colibri_pxa270.o
-SOBJS  := lowlevel_init.o
 
-SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+SRCS   := $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
-SOBJS  := $(addprefix $(obj),$(SOBJS))
 
-$(LIB):        $(obj).depend $(OBJS) $(SOBJS)
-       $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+$(LIB):        $(obj).depend $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS)
 
 clean:
-       rm -f $(SOBJS) $(OBJS)
+       rm -f $(OBJS)
 
 distclean:     clean
        rm -f $(LIB) core *.bak $(obj).depend
index 84ec38e4a22966692b1336c63043edc6bb518d81..191fb333e40ff53f9aba9c7c414b16fe2898df4d 100644 (file)
@@ -22,6 +22,7 @@
 #include <common.h>
 #include <asm/arch/hardware.h>
 #include <netdev.h>
+#include <asm/io.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -41,8 +42,9 @@ struct serial_device *default_serial_console (void)
 
 int board_init (void)
 {
-       /* memory and cpu-speed are setup before relocation */
-       /* so we do _nothing_ here */
+       /* We have RAM, disable cache */
+       dcache_disable();
+       icache_disable();
 
        /* arch number of vpac270 */
        gd->bd->bi_arch_number = MACH_TYPE_COLIBRI;
@@ -53,40 +55,47 @@ int board_init (void)
        return 0;
 }
 
-int dram_init (void)
+extern void pxa_dram_init(void);
+int dram_init(void)
 {
-       gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
+       pxa_dram_init();
+       gd->ram_size = PHYS_SDRAM_1_SIZE;
+       return 0;
+}
 
+void dram_init_banksize(void)
+{
+       gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
        gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
-
-       return 0;
 }
 
 #ifdef CONFIG_CMD_USB
 int usb_board_init(void)
 {
-       UHCHR = (UHCHR | UHCHR_PCPL | UHCHR_PSPL) &
-               ~(UHCHR_SSEP0 | UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE);
+       writel((readl(UHCHR) | UHCHR_PCPL | UHCHR_PSPL) &
+               ~(UHCHR_SSEP0 | UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE),
+               UHCHR);
 
-       UHCHR |= UHCHR_FSBIR;
+       writel(readl(UHCHR) | UHCHR_FSBIR, UHCHR);
 
        while (UHCHR & UHCHR_FSBIR);
 
-       UHCHR &= ~UHCHR_SSE;
-       UHCHIE = (UHCHIE_UPRIE | UHCHIE_RWIE);
+       writel(readl(UHCHR) & ~UHCHR_SSE, UHCHR);
+       writel((UHCHIE_UPRIE | UHCHIE_RWIE), UHCHIE);
 
        /* Clear any OTG Pin Hold */
-       if (PSSR & PSSR_OTGPH)
-               PSSR |= PSSR_OTGPH;
+       if (readl(PSSR) & PSSR_OTGPH)
+               writel(readl(PSSR) | PSSR_OTGPH, PSSR);
 
-       UHCRHDA &= ~(0x200);
-       UHCRHDA |= 0x100;
+       writel(readl(UHCRHDA) & ~(0x200), UHCRHDA);
+       writel(readl(UHCRHDA) | 0x100, UHCRHDA);
 
        /* Set port power control mask bits, only 3 ports. */
-       UHCRHDB |= (0x7<<17);
+       writel(readl(UHCRHDB) | (0x7<<17), UHCRHDB);
 
        /* enable port 2 */
-       UP2OCR |= UP2OCR_HXOE | UP2OCR_HXS | UP2OCR_DMPDE | UP2OCR_DPPDE;
+       writel(readl(UP2OCR) | UP2OCR_HXOE | UP2OCR_HXS |
+               UP2OCR_DMPDE | UP2OCR_DPPDE, UP2OCR);
 
        return 0;
 }
@@ -98,14 +107,14 @@ void usb_board_init_fail(void)
 
 void usb_board_stop(void)
 {
-       UHCHR |= UHCHR_FHR;
+       writel(readl(UHCHR) | UHCHR_FHR, UHCHR);
        udelay(11);
-       UHCHR &= ~UHCHR_FHR;
+       writel(readl(UHCHR) & ~UHCHR_FHR, UHCHR);
 
-       UHCCOMS |= 1;
+       writel(readl(UHCCOMS) | 1, UHCCOMS);
        udelay(10);
 
-       CKEN &= ~CKEN10_USBHOST;
+       writel(readl(CKEN) & ~CKEN10_USBHOST, CKEN);
 
        return;
 }
diff --git a/board/colibri_pxa270/config.mk b/board/colibri_pxa270/config.mk
deleted file mode 100644 (file)
index 0f10662..0000000
+++ /dev/null
@@ -1 +0,0 @@
-CONFIG_SYS_TEXT_BASE = 0xa1000000
diff --git a/board/colibri_pxa270/lowlevel_init.S b/board/colibri_pxa270/lowlevel_init.S
deleted file mode 100644 (file)
index a43dac2..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Toradex Colibri PXA270 Lowlevel Hardware Initialization
- *
- * Copyright (C) 2010 Marek Vasut <marek.vasut@gmail.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
- */
-
-#include <config.h>
-#include <version.h>
-#include <asm/arch/pxa-regs.h>
-#include <asm/arch/macro.h>
-
-.globl lowlevel_init
-lowlevel_init:
-       pxa_gpio_setup
-       pxa_wait_ticks  0x8000
-       pxa_mem_setup
-       pxa_wakeup
-       pxa_intr_setup
-       pxa_clock_setup
-
-       mov     pc, lr
index 1ae785db5fc749aea01fe2c38b850eaaa422d8d4..720593c4825e86a159328f30caac39749ec0535e 100644 (file)
@@ -26,17 +26,15 @@ include $(TOPDIR)/config.mk
 LIB    = $(obj)lib$(BOARD).a
 
 COBJS  := cradle.o flash.o
-SOBJS  := lowlevel_init.o
 
-SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+SRCS   := $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
-SOBJS  := $(addprefix $(obj),$(SOBJS))
 
-$(LIB):        $(obj).depend $(OBJS) $(SOBJS)
-       $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+$(LIB):        $(obj).depend $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS)
 
 clean:
-       rm -f $(SOBJS) $(OBJS)
+       rm -f $(OBJS)
 
 distclean:     clean
        rm -f $(LIB) core *.bak $(obj).depend
diff --git a/board/cradle/config.mk b/board/cradle/config.mk
deleted file mode 100644 (file)
index 6656bdd..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-CONFIG_SYS_TEXT_BASE = 0xa0f80000
-#CONFIG_SYS_TEXT_BASE = 0
index 21eb6550db67cf09c848bf680fe0fff18fbcd27f..2bbf2d532d43adf05cd1e3195e83ac6da3507f8a 100644 (file)
@@ -28,6 +28,7 @@
 #include <asm/arch/pxa-regs.h>
 #include <common.h>
 #include <netdev.h>
+#include <asm/io.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -92,8 +93,8 @@ set_led (int led, int color)
        int shift = led * 2;
        unsigned long mask = 0x3 << shift;
 
-       CRADLE_LED_CLR_REG = mask;      /* clear bits */
-       CRADLE_LED_SET_REG = (color << shift);  /* set bits */
+       writel(mask, GPCR2);    /* clear bits */
+       writel((color << shift), GPSR2);        /* set bits */
        udelay (5000);
 }
 
@@ -184,6 +185,10 @@ int
 board_init (void)
 /**********************************************************/
 {
+       /* We have RAM, disable cache */
+       dcache_disable();
+       icache_disable();
+
        led_code (0xf, YELLOW);
 
        /* arch number of HHP Cradle */
@@ -205,24 +210,18 @@ board_init (void)
        return 1;
 }
 
-int
-/**********************************************************/
-dram_init (void)
-/**********************************************************/
+extern void pxa_dram_init(void);
+int dram_init(void)
+{
+       pxa_dram_init();
+       gd->ram_size = PHYS_SDRAM_1_SIZE;
+       return 0;
+}
+
+void dram_init_banksize(void)
 {
        gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-       gd->bd->bi_dram[0].size  = PHYS_SDRAM_1_SIZE;
-       gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
-       gd->bd->bi_dram[1].size  = PHYS_SDRAM_2_SIZE;
-       gd->bd->bi_dram[2].start = PHYS_SDRAM_3;
-       gd->bd->bi_dram[2].size  = PHYS_SDRAM_3_SIZE;
-       gd->bd->bi_dram[3].start = PHYS_SDRAM_4;
-       gd->bd->bi_dram[3].size  = PHYS_SDRAM_4_SIZE;
-
-       return (PHYS_SDRAM_1_SIZE +
-               PHYS_SDRAM_2_SIZE +
-               PHYS_SDRAM_3_SIZE +
-               PHYS_SDRAM_4_SIZE );
+       gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
 }
 
 #ifdef CONFIG_CMD_NET
diff --git a/board/cradle/lowlevel_init.S b/board/cradle/lowlevel_init.S
deleted file mode 100644 (file)
index 6b5cfb9..0000000
+++ /dev/null
@@ -1,515 +0,0 @@
-/*
- * Most of this taken from Redboot hal_platform_setup.h with cleanup
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include <config.h>
-#include <version.h>
-#include <asm/arch/pxa-regs.h>
-
-DRAM_SIZE:  .long   CONFIG_SYS_DRAM_SIZE
-
-/* wait for coprocessor write complete */
-   .macro CPWAIT reg
-   mrc  p15,0,\reg,c2,c0,0
-   mov  \reg,\reg
-   sub  pc,pc,#4
-   .endm
-
-   .macro SET_LED val
-   ldr   r6, =CRADLE_LED_CLR_REG
-   ldr   r7, =0
-   str   r7, [r6]
-   ldr   r6, =CRADLE_LED_SET_REG
-   ldr   r7, =\val
-   str   r7, [r6]
-   .endm
-
-
-.globl lowlevel_init
-lowlevel_init:
-
-    mov      r10, lr
-
-    /* Set up GPIO pins first */
-
-   ldr      r0,   =GPSR0
-   ldr      r1,   =CONFIG_SYS_GPSR0_VAL
-   str      r1,   [r0]
-
-   ldr      r0,   =GPSR1
-   ldr      r1,   =CONFIG_SYS_GPSR1_VAL
-   str      r1,   [r0]
-
-   ldr      r0,   =GPSR2
-   ldr      r1,   =CONFIG_SYS_GPSR2_VAL
-   str      r1,   [r0]
-
-   ldr      r0,   =GPCR0
-   ldr      r1,   =CONFIG_SYS_GPCR0_VAL
-   str      r1,   [r0]
-
-   ldr      r0,   =GPCR1
-   ldr      r1,   =CONFIG_SYS_GPCR1_VAL
-   str      r1,   [r0]
-
-   ldr      r0,   =GPCR2
-   ldr      r1,   =CONFIG_SYS_GPCR2_VAL
-   str      r1,   [r0]
-
-   ldr      r0,   =GRER0
-   ldr      r1,   =CONFIG_SYS_GRER0_VAL
-   str      r1,   [r0]
-
-   ldr      r0,   =GRER1
-   ldr      r1,   =CONFIG_SYS_GRER1_VAL
-   str      r1,   [r0]
-
-   ldr      r0,   =GRER2
-   ldr      r1,   =CONFIG_SYS_GRER2_VAL
-   str      r1,   [r0]
-
-   ldr      r0,   =GFER0
-   ldr      r1,   =CONFIG_SYS_GFER0_VAL
-   str      r1,   [r0]
-
-   ldr      r0,   =GFER1
-   ldr      r1,   =CONFIG_SYS_GFER1_VAL
-   str      r1,   [r0]
-
-   ldr      r0,   =GFER2
-   ldr      r1,   =CONFIG_SYS_GFER2_VAL
-   str      r1,   [r0]
-
-   ldr      r0,   =GPDR0
-   ldr      r1,   =CONFIG_SYS_GPDR0_VAL
-   str      r1,   [r0]
-
-   ldr      r0,   =GPDR1
-   ldr      r1,   =CONFIG_SYS_GPDR1_VAL
-   str      r1,   [r0]
-
-   ldr      r0,   =GPDR2
-   ldr      r1,   =CONFIG_SYS_GPDR2_VAL
-   str      r1,   [r0]
-
-   ldr      r0,   =GAFR0_L
-   ldr      r1,   =CONFIG_SYS_GAFR0_L_VAL
-   str      r1,   [r0]
-
-   ldr      r0,   =GAFR0_U
-   ldr      r1,   =CONFIG_SYS_GAFR0_U_VAL
-   str      r1,   [r0]
-
-   ldr      r0,   =GAFR1_L
-   ldr      r1,   =CONFIG_SYS_GAFR1_L_VAL
-   str      r1,   [r0]
-
-   ldr      r0,   =GAFR1_U
-   ldr      r1,   =CONFIG_SYS_GAFR1_U_VAL
-   str      r1,   [r0]
-
-   ldr      r0,   =GAFR2_L
-   ldr      r1,   =CONFIG_SYS_GAFR2_L_VAL
-   str      r1,   [r0]
-
-   ldr      r0,   =GAFR2_U
-   ldr      r1,   =CONFIG_SYS_GAFR2_U_VAL
-   str      r1,   [r0]
-
-   /* enable GPIO pins */
-   ldr      r0,   =PSSR
-   ldr      r1,   =CONFIG_SYS_PSSR_VAL
-   str      r1,   [r0]
-
-   SET_LED 1
-
-   ldr    r3, =MSC1             /* low - bank 2 Lubbock Registers / SRAM */
-   ldr    r2, =CONFIG_SYS_MSC1_VAL     /* high - bank 3 Ethernet Controller */
-   str    r2, [r3]              /* need to set MSC1 before trying to write to the HEX LEDs */
-   ldr    r2, [r3]              /* need to read it back to make sure the value latches (see MSC section of manual) */
-
-
-/*********************************************************************
-    Initlialize Memory Controller
-
-    See PXA250 Operating System Developer's Guide
-
-    pause for 200 uSecs- allow internal clocks to settle
-    *Note: only need this if hard reset... doing it anyway for now
-*/
-
-    @ Step 1
-   @ ---- Wait 200 usec
-   ldr r3, =OSCR       @ reset the OS Timer Count to zero
-   mov r2, #0
-   str r2, [r3]
-   ldr r4, =0x300         @ really 0x2E1 is about 200usec, so 0x300 should be plenty
-1:
-   ldr r2, [r3]
-   cmp r4, r2
-   bgt 1b
-
-   SET_LED 2
-
-mem_init:
-       @ get memory controller base address
-       ldr     r1,  =MEMC_BASE
-
-
-@****************************************************************************
-@  Step 2
-@
-
-   @ Step 2a
-   @ write msc0, read back to ensure data latches
-   @
-   ldr     r2,   =CONFIG_SYS_MSC0_VAL
-   str     r2,   [r1, #MSC0_OFFSET]
-   ldr     r2,   [r1, #MSC0_OFFSET]
-
-   @ write msc1
-   ldr     r2,  =CONFIG_SYS_MSC1_VAL
-   str     r2,  [r1, #MSC1_OFFSET]
-   ldr     r2,  [r1, #MSC1_OFFSET]
-
-   @ write msc2
-   ldr     r2,  =CONFIG_SYS_MSC2_VAL
-   str     r2,  [r1, #MSC2_OFFSET]
-   ldr     r2,  [r1, #MSC2_OFFSET]
-
-   @ Step 2b
-   @ write mecr
-   ldr     r2,  =CONFIG_SYS_MECR_VAL
-   str     r2,  [r1, #MECR_OFFSET]
-
-   @ write mcmem0
-   ldr     r2,  =CONFIG_SYS_MCMEM0_VAL
-   str     r2,  [r1, #MCMEM0_OFFSET]
-
-   @ write mcmem1
-   ldr     r2,  =CONFIG_SYS_MCMEM1_VAL
-   str     r2,  [r1, #MCMEM1_OFFSET]
-
-   @ write mcatt0
-   ldr     r2,  =CONFIG_SYS_MCATT0_VAL
-   str     r2,  [r1, #MCATT0_OFFSET]
-
-   @ write mcatt1
-   ldr     r2,  =CONFIG_SYS_MCATT1_VAL
-   str     r2,  [r1, #MCATT1_OFFSET]
-
-   @ write mcio0
-   ldr     r2,  =CONFIG_SYS_MCIO0_VAL
-   str     r2,  [r1, #MCIO0_OFFSET]
-
-   @ write mcio1
-   ldr     r2,  =CONFIG_SYS_MCIO1_VAL
-   str     r2,  [r1, #MCIO1_OFFSET]
-
-   /*SET_LED 3 */
-
-   @ Step 2c
-   @ fly-by-dma is defeatured on this part
-   @ write flycnfg
-   @ldr     r2,  =CONFIG_SYS_FLYCNFG_VAL
-   @str     r2,  [r1, #FLYCNFG_OFFSET]
-
-/* FIXME Does this sequence really make sense */
-#ifdef REDBOOT_WAY
-   @ Step 2d
-   @ get the mdrefr settings
-   ldr     r3,  =CONFIG_SYS_MDREFR_VAL
-
-   @ extract DRI field (we need a valid DRI field)
-   @
-   ldr     r2,  =0xFFF
-
-   @ valid DRI field in r3
-   @
-   and     r3,  r3,  r2
-
-   @ get the reset state of MDREFR
-   @
-   ldr     r4,  [r1, #MDREFR_OFFSET]
-
-   @ clear the DRI field
-   @
-   bic     r4,  r4,  r2
-
-   @ insert the valid DRI field loaded above
-   @
-   orr     r4,  r4,  r3
-
-   @ write back mdrefr
-   @
-   str     r4,  [r1, #MDREFR_OFFSET]
-
-   @ *Note: preserve the mdrefr value in r4 *
-
-   /*SET_LED 4 */
-
-@****************************************************************************
-@  Step 3
-@
-@ NO SRAM
-
-   mov   pc, r10
-
-
-@****************************************************************************
-@  Step 4
-@
-
-   @ Assumes previous mdrefr value in r4, if not then read current mdrefr
-
-   @ clear the free-running clock bits
-   @ (clear K0Free, K1Free, K2Free
-   @
-   bic     r4,  r4,  #(0x00800000 | 0x01000000 | 0x02000000)
-
-   @ set K0RUN for CPLD clock
-   @
-   orr   r4,  r4,  #0x00002000
-
-   @ set K1RUN if bank 0 installed
-   @
-   orr   r4,  r4,  #0x00010000
-
-   @ write back mdrefr
-   @
-   str     r4,  [r1, #MDREFR_OFFSET]
-   ldr     r4,  [r1, #MDREFR_OFFSET]
-
-   @ deassert SLFRSH
-   @
-   bic     r4,  r4,  #0x00400000
-
-   @ write back mdrefr
-   @
-   str     r4,  [r1, #MDREFR_OFFSET]
-
-   @ assert E1PIN
-   @
-   orr     r4,  r4,  #0x00008000
-
-   @ write back mdrefr
-   @
-   str     r4,  [r1, #MDREFR_OFFSET]
-   ldr     r4,  [r1, #MDREFR_OFFSET]
-   nop
-   nop
-#else
-   @ Step 2d
-   @ get the mdrefr settings
-   ldr     r3,  =CONFIG_SYS_MDREFR_VAL
-
-   @ write back mdrefr
-   @
-   str     r4,  [r1, #MDREFR_OFFSET]
-
-   @  Step 4
-
-   @ set K0RUN for CPLD clock
-   @
-   orr   r4,  r4,  #0x00002000
-
-   @ set K1RUN for bank 0
-   @
-   orr   r4,  r4,  #0x00010000
-
-   @ write back mdrefr
-   @
-   str     r4,  [r1, #MDREFR_OFFSET]
-   ldr     r4,  [r1, #MDREFR_OFFSET]
-
-   @ deassert SLFRSH
-   @
-   bic     r4,  r4,  #0x00400000
-
-   @ write back mdrefr
-   @
-   str     r4,  [r1, #MDREFR_OFFSET]
-
-   @ assert E1PIN
-   @
-   orr     r4,  r4,  #0x00008000
-
-   @ write back mdrefr
-   @
-   str     r4,  [r1, #MDREFR_OFFSET]
-   ldr     r4,  [r1, #MDREFR_OFFSET]
-   nop
-   nop
-#endif
-
-   @ Step 4d
-   @ fetch platform value of mdcnfg
-   @
-   ldr     r2,  =CONFIG_SYS_MDCNFG_VAL
-
-   @ disable all sdram banks
-   @
-   bic     r2,  r2,  #(MDCNFG_DE0 | MDCNFG_DE1)
-   bic     r2,  r2,  #(MDCNFG_DE2 | MDCNFG_DE3)
-
-   @ program banks 0/1 for bus width
-   @
-   bic   r2,  r2,  #MDCNFG_DWID0      @0=32-bit
-
-   @ write initial value of mdcnfg, w/o enabling sdram banks
-   @
-   str     r2,  [r1, #MDCNFG_OFFSET]
-
-   @ Step 4e
-   @ pause for 200 uSecs
-   @
-   ldr r3, =OSCR       @ reset the OS Timer Count to zero
-   mov r2, #0
-   str r2, [r3]
-   ldr r4, =0x300                      @ really 0x2E1 is about 200usec, so 0x300 should be plenty
-1:
-   ldr r2, [r3]
-   cmp r4, r2
-   bgt 1b
-
-   /*SET_LED 5 */
-
-   /* Why is this here??? */
-   mov    r0, #0x78                @turn everything off
-   mcr    p15, 0, r0, c1, c0, 0      @(caches off, MMU off, etc.)
-
-   @ Step 4f
-   @ Access memory *not yet enabled* for CBR refresh cycles (8)
-   @ - CBR is generated for all banks
-
-   ldr     r2, =CONFIG_SYS_DRAM_BASE
-   str     r2, [r2]
-   str     r2, [r2]
-   str     r2, [r2]
-   str     r2, [r2]
-   str     r2, [r2]
-   str     r2, [r2]
-   str     r2, [r2]
-   str     r2, [r2]
-
-   @ Step 4g
-   @get memory controller base address
-   @
-   ldr     r1,  =MEMC_BASE
-
-   @fetch current mdcnfg value
-   @
-   ldr     r3,  [r1, #MDCNFG_OFFSET]
-
-   @enable sdram bank 0 if installed (must do for any populated bank)
-   @
-   orr     r3,  r3,  #MDCNFG_DE0
-
-   @write back mdcnfg, enabling the sdram bank(s)
-   @
-   str     r3,  [r1, #MDCNFG_OFFSET]
-
-   @ Step 4h
-   @ write mdmrs
-   @
-   ldr     r2,  =CONFIG_SYS_MDMRS_VAL
-   str     r2,  [r1, #MDMRS_OFFSET]
-
-   @ Done Memory Init
-
-   /*SET_LED 6 */
-
-   @********************************************************************
-   @ Disable (mask) all interrupts at the interrupt controller
-   @
-
-   @ clear the interrupt level register (use IRQ, not FIQ)
-   @
-   mov     r1, #0
-   ldr     r2,  =ICLR
-   str     r1,  [r2]
-
-   @ Set interrupt mask register
-   @
-   ldr     r1,  =CONFIG_SYS_ICMR_VAL
-   ldr     r2,  =ICMR
-   str     r1,  [r2]
-
-   @ ********************************************************************
-   @ Disable the peripheral clocks, and set the core clock
-   @
-
-       @ Turn Off ALL on-chip peripheral clocks for re-configuration
-       @
-   ldr     r1,  =CKEN
-   mov     r2,  #0
-   str     r2,  [r1]
-
-   @ set core clocks
-   @
-   ldr     r2,  =CONFIG_SYS_CCCR_VAL
-   ldr     r1,  =CCCR
-   str     r2,  [r1]
-
-#ifdef ENABLE32KHZ
-   @ enable the 32Khz oscillator for RTC and PowerManager
-   @
-   ldr     r1,  =OSCC
-   mov     r2,  #OSCC_OON
-   str     r2,  [r1]
-
-   @ NOTE:  spin here until OSCC.OOK get set,
-   @        meaning the PLL has settled.
-   @
-60:
-   ldr     r2, [r1]
-   ands    r2, r2, #1
-   beq     60b
-#endif
-
-       @ Turn on needed clocks
-       @
-   ldr     r1,  =CKEN
-   ldr     r2,  =CONFIG_SYS_CKEN_VAL
-   str     r2,  [r1]
-
-   /*SET_LED 7 */
-
-/* Is this needed???? */
-#define NODEBUG
-#ifdef NODEBUG
-   /*Disable software and data breakpoints */
-   mov   r0,#0
-   mcr   p15,0,r0,c14,c8,0  /* ibcr0 */
-   mcr   p15,0,r0,c14,c9,0  /* ibcr1 */
-   mcr   p15,0,r0,c14,c4,0  /* dbcon */
-
-   /*Enable all debug functionality */
-   mov   r0,#0x80000000
-   mcr   p14,0,r0,c10,c0,0  /* dcsr */
-
-#endif
-
-   /*SET_LED 8 */
-
-   mov   pc, r10
-
-@ End lowlevel_init
index c12dbea9cdd7db3802087cacb8f036da048a6c82..5e1332bae41332b19d2f27bc1c54012efb1dd31d 100644 (file)
@@ -26,17 +26,15 @@ include $(TOPDIR)/config.mk
 LIB    = $(obj)lib$(BOARD).a
 
 COBJS  := csb226.o flash.o
-SOBJS  := lowlevel_init.o
 
-SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+SRCS   := $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
-SOBJS  := $(addprefix $(obj),$(SOBJS))
 
-$(LIB):        $(obj).depend $(OBJS) $(SOBJS)
-       $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+$(LIB):        $(obj).depend $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS)
 
 clean:
-       rm -f $(SOBJS) $(OBJS)
+       rm -f $(OBJS)
 
 distclean:     clean
        rm -f $(LIB) core *.bak $(obj).depend
diff --git a/board/csb226/config.mk b/board/csb226/config.mk
deleted file mode 100644 (file)
index 9e46555..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#
-# Linux-Kernel is expected to be at c000'8000, entry c000'8000
-#
-# we load ourself to c170'0000, the upper 1 MB of second bank
-#
-# download areas is c800'0000
-#
-
-# This is the address where U-Boot lives in flash:
-#CONFIG_SYS_TEXT_BASE = 0
-
-# FIXME: armboot does only work correctly when being compiled
-# for the addresses _after_ relocation to RAM!! Otherwhise the
-# .bss segment is assumed in flash...
-CONFIG_SYS_TEXT_BASE = 0xa1fe0000
index 0a6c13dd29b046ff89c46b46d134d6a5966edecb..dd29e626591a83e5ccc6ddd4ad23ea5e41215864 100644 (file)
@@ -26,6 +26,7 @@
 #include <common.h>
 #include <netdev.h>
 #include <asm/arch/pxa-regs.h>
+#include <asm/io.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -68,8 +69,9 @@ int misc_init_r(void)
 
 int board_init (void)
 {
-       /* memory and cpu-speed are setup before relocation */
-       /* so we do _nothing_ here */
+       /* We have RAM, disable cache */
+       dcache_disable();
+       icache_disable();
 
        /* arch number of CSB226 board */
        gd->bd->bi_arch_number = MACH_TYPE_CSB226;
@@ -81,21 +83,20 @@ int board_init (void)
 }
 
 
-/**
- * dram_init: - setup dynamic RAM
- *
- * @return: 0 in case of success
- */
+extern void pxa_dram_init(void);
+int dram_init(void)
+{
+       pxa_dram_init();
+       gd->ram_size = PHYS_SDRAM_1_SIZE;
+       return 0;
+}
 
-int dram_init (void)
+void dram_init_banksize(void)
 {
        gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
        gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
-
-       return 0;
 }
 
-
 /**
  * csb226_set_led: - switch LEDs on or off
  *
@@ -108,23 +109,23 @@ void csb226_set_led(int led, int state)
        switch(led) {
 
                case 0: if (state==1) {
-                               GPCR0 |= CSB226_USER_LED0;
+                               writel(readl(GPCR0) | CSB226_USER_LED0, GPCR0);
                        } else if (state==0) {
-                               GPSR0 |= CSB226_USER_LED0;
+                               writel(readl(GPSR0) | CSB226_USER_LED0, GPSR0);
                        }
                        break;
 
                case 1: if (state==1) {
-                               GPCR0 |= CSB226_USER_LED1;
+                               writel(readl(GPCR0) | CSB226_USER_LED1, GPCR0);
                        } else if (state==0) {
-                               GPSR0 |= CSB226_USER_LED1;
+                               writel(readl(GPSR0) | CSB226_USER_LED1, GPSR0);
                        }
                        break;
 
                case 2: if (state==1) {
-                               GPCR0 |= CSB226_USER_LED2;
+                               writel(readl(GPCR0) | CSB226_USER_LED2, GPCR0);
                        } else if (state==0) {
-                               GPSR0 |= CSB226_USER_LED2;
+                               writel(readl(GPSR0) | CSB226_USER_LED2, GPSR0);
                        }
                        break;
        }
diff --git a/board/csb226/lowlevel_init.S b/board/csb226/lowlevel_init.S
deleted file mode 100644 (file)
index 55169be..0000000
+++ /dev/null
@@ -1,437 +0,0 @@
-/*
- * Most of this taken from Redboot hal_platform_setup.h with cleanup
- *
- * NOTE: I haven't clean this up considerably, just enough to get it
- * running. See hal_platform_setup.h for the source. See
- * board/cradle/lowlevel_init.S for another PXA250 setup that is
- * much cleaner.
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include <config.h>
-#include <version.h>
-#include <asm/arch/pxa-regs.h>
-
-DRAM_SIZE:  .long   CONFIG_SYS_DRAM_SIZE
-
-/* wait for coprocessor write complete */
-   .macro CPWAIT reg
-   mrc  p15,0,\reg,c2,c0,0
-   mov  \reg,\reg
-   sub  pc,pc,#4
-   .endm
-
-_TEXT_BASE:
-       .word   CONFIG_SYS_TEXT_BASE
-
-
-/*
- *     Memory setup
- */
-
-.globl lowlevel_init
-lowlevel_init:
-
-    mov      r10, lr
-
-       /* Set up GPIO pins first ----------------------------------------- */
-
-       ldr             r0,     =GPSR0
-       ldr             r1,     =CONFIG_SYS_GPSR0_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPSR1
-       ldr             r1,     =CONFIG_SYS_GPSR1_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPSR2
-       ldr             r1,     =CONFIG_SYS_GPSR2_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPCR0
-       ldr             r1,     =CONFIG_SYS_GPCR0_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPCR1
-       ldr             r1,     =CONFIG_SYS_GPCR1_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPCR2
-       ldr             r1,     =CONFIG_SYS_GPCR2_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPDR0
-       ldr             r1,     =CONFIG_SYS_GPDR0_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPDR1
-       ldr             r1,     =CONFIG_SYS_GPDR1_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPDR2
-       ldr             r1,     =CONFIG_SYS_GPDR2_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GAFR0_L
-       ldr             r1,     =CONFIG_SYS_GAFR0_L_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GAFR0_U
-       ldr             r1,     =CONFIG_SYS_GAFR0_U_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GAFR1_L
-       ldr             r1,     =CONFIG_SYS_GAFR1_L_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GAFR1_U
-       ldr             r1,     =CONFIG_SYS_GAFR1_U_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GAFR2_L
-       ldr             r1,     =CONFIG_SYS_GAFR2_L_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GAFR2_U
-       ldr             r1,     =CONFIG_SYS_GAFR2_U_VAL
-       str             r1,   [r0]
-
-       ldr     r0,     =PSSR           /* enable GPIO pins */
-       ldr             r1,     =CONFIG_SYS_PSSR_VAL
-       str             r1,   [r0]
-
-/*     ldr     r3,     =MSC1           /  low - bank 2 Lubbock Registers / SRAM */
-/*     ldr     r2,     =CONFIG_SYS_MSC1_VAL    /  high - bank 3 Ethernet Controller */
-/*     str     r2,     [r3]            /  need to set MSC1 before trying to write to the HEX LEDs */
-/*     ldr     r2,     [r3]            /  need to read it back to make sure the value latches (see MSC section of manual) */
-/* */
-/*     ldr     r1,     =LED_BLANK */
-/*     mov     r0,     #0xFF */
-/*     str     r0,     [r1]            /  turn on hex leds */
-/* */
-/*loop: */
-/* */
-/*   ldr       r0, =0xB0070001 */
-/*   ldr       r1, =_LED */
-/*   str       r0, [r1]                /  hex display */
-
-
-       /* ---------------------------------------------------------------- */
-       /* Enable memory interface                                          */
-       /*                                                                  */
-       /* The sequence below is based on the recommended init steps        */
-       /* detailed in the Intel PXA250 Operating Systems Developers Guide, */
-       /* Chapter 10.                                                      */
-       /* ---------------------------------------------------------------- */
-
-       /* ---------------------------------------------------------------- */
-       /* Step 1: Wait for at least 200 microsedonds to allow internal     */
-       /*         clocks to settle. Only necessary after hard reset...     */
-       /*         FIXME: can be optimized later                            */
-       /* ---------------------------------------------------------------- */
-
-       ldr r3, =OSCR                   /* reset the OS Timer Count to zero */
-       mov r2, #0
-       str r2, [r3]
-       ldr r4, =0x300                  /* really 0x2E1 is about 200usec,   */
-                                       /* so 0x300 should be plenty        */
-1:
-       ldr r2, [r3]
-       cmp r4, r2
-       bgt 1b
-
-mem_init:
-
-       ldr     r1,  =MEMC_BASE         /* get memory controller base addr. */
-
-       /* ---------------------------------------------------------------- */
-       /* Step 2a: Initialize Asynchronous static memory controller        */
-       /* ---------------------------------------------------------------- */
-
-       /* MSC registers: timing, bus width, mem type                       */
-
-       /* MSC0: nCS(0,1)                                                   */
-       ldr     r2,   =CONFIG_SYS_MSC0_VAL
-       str     r2,   [r1, #MSC0_OFFSET]
-       ldr     r2,   [r1, #MSC0_OFFSET]        /* read back to ensure      */
-                                               /* that data latches        */
-       /* MSC1: nCS(2,3)                                                   */
-       ldr     r2,  =CONFIG_SYS_MSC1_VAL
-       str     r2,  [r1, #MSC1_OFFSET]
-       ldr     r2,  [r1, #MSC1_OFFSET]
-
-       /* MSC2: nCS(4,5)                                                   */
-       ldr     r2,  =CONFIG_SYS_MSC2_VAL
-       str     r2,  [r1, #MSC2_OFFSET]
-       ldr     r2,  [r1, #MSC2_OFFSET]
-
-       /* ---------------------------------------------------------------- */
-       /* Step 2b: Initialize Card Interface                               */
-       /* ---------------------------------------------------------------- */
-
-       /* MECR: Memory Expansion Card Register                             */
-       ldr     r2,  =CONFIG_SYS_MECR_VAL
-       str     r2,  [r1, #MECR_OFFSET]
-       ldr     r2,     [r1, #MECR_OFFSET]
-
-       /* MCMEM0: Card Interface slot 0 timing                             */
-       ldr     r2,  =CONFIG_SYS_MCMEM0_VAL
-       str     r2,  [r1, #MCMEM0_OFFSET]
-       ldr     r2,     [r1, #MCMEM0_OFFSET]
-
-       /* MCMEM1: Card Interface slot 1 timing                             */
-       ldr     r2,  =CONFIG_SYS_MCMEM1_VAL
-       str     r2,  [r1, #MCMEM1_OFFSET]
-       ldr     r2,     [r1, #MCMEM1_OFFSET]
-
-       /* MCATT0: Card Interface Attribute Space Timing, slot 0            */
-       ldr     r2,  =CONFIG_SYS_MCATT0_VAL
-       str     r2,  [r1, #MCATT0_OFFSET]
-       ldr     r2,     [r1, #MCATT0_OFFSET]
-
-       /* MCATT1: Card Interface Attribute Space Timing, slot 1            */
-       ldr     r2,  =CONFIG_SYS_MCATT1_VAL
-       str     r2,  [r1, #MCATT1_OFFSET]
-       ldr     r2,     [r1, #MCATT1_OFFSET]
-
-       /* MCIO0: Card Interface I/O Space Timing, slot 0                   */
-       ldr     r2,  =CONFIG_SYS_MCIO0_VAL
-       str     r2,  [r1, #MCIO0_OFFSET]
-       ldr     r2,     [r1, #MCIO0_OFFSET]
-
-       /* MCIO1: Card Interface I/O Space Timing, slot 1                   */
-       ldr     r2,  =CONFIG_SYS_MCIO1_VAL
-       str     r2,  [r1, #MCIO1_OFFSET]
-       ldr     r2,     [r1, #MCIO1_OFFSET]
-
-       /* ---------------------------------------------------------------- */
-       /* Step 2c: Write FLYCNFG  FIXME: what's that???                    */
-       /* ---------------------------------------------------------------- */
-
-       /* test if we run from flash or RAM - RAM/BDI: don't setup RAM      */
-       adr     r3, mem_init            /* r0 <- current position of code   */
-       ldr     r2, =mem_init
-       cmp     r3, r2                  /* skip init if in place            */
-       beq     initirqs
-
-
-       /* ---------------------------------------------------------------- */
-       /* Step 2d: Initialize Timing for Sync Memory (SDCLK0)              */
-       /* ---------------------------------------------------------------- */
-
-       /* Before accessing MDREFR we need a valid DRI field, so we set     */
-       /* this to power on defaults + DRI field.                           */
-
-       ldr     r3,     =CONFIG_SYS_MDREFR_VAL
-       ldr     r2,     =0xFFF
-       and     r3,     r3, r2
-       ldr     r4,     =0x03ca4000
-       orr     r4,     r4,  r3
-
-       str     r4,     [r1, #MDREFR_OFFSET]    /* write back MDREFR        */
-       ldr     r4,     [r1, #MDREFR_OFFSET]
-
-
-       /* ---------------------------------------------------------------- */
-       /* Step 3: Initialize Synchronous Static Memory (Flash/Peripherals) */
-       /* ---------------------------------------------------------------- */
-
-       /* Initialize SXCNFG register. Assert the enable bits               */
-
-       /* Write SXMRS to cause an MRS command to all enabled banks of      */
-       /* synchronous static memory. Note that SXLCR need not be written   */
-       /* at this time.                                                    */
-
-       /* FIXME: we use async mode for now                                 */
-
-
-       /* ---------------------------------------------------------------- */
-       /* Step 4: Initialize SDRAM                                         */
-       /* ---------------------------------------------------------------- */
-
-       /* Step 4a: assert MDREFR:K?RUN and configure                       */
-       /*          MDREFR:K1DB2 and MDREFR:K2DB2 as desired.               */
-
-       ldr     r4,     =CONFIG_SYS_MDREFR_VAL
-       str     r4,     [r1, #MDREFR_OFFSET]    /* write back MDREFR        */
-       ldr     r4,     [r1, #MDREFR_OFFSET]
-
-       /* Step 4b: de-assert MDREFR:SLFRSH.                                */
-
-       bic     r4,     r4, #(MDREFR_SLFRSH)
-
-       str     r4,     [r1, #MDREFR_OFFSET]    /* write back MDREFR        */
-       ldr     r4,     [r1, #MDREFR_OFFSET]
-
-
-       /* Step 4c: assert MDREFR:E1PIN and E0PIO                           */
-
-       orr     r4,     r4,     #(MDREFR_E1PIN|MDREFR_E0PIN)
-
-       str     r4,     [r1, #MDREFR_OFFSET]    /* write back MDREFR        */
-       ldr     r4,     [r1, #MDREFR_OFFSET]
-
-
-       /* Step 4d: write MDCNFG with MDCNFG:DEx deasserted (set to 0), to  */
-       /*          configure but not enable each SDRAM partition pair.     */
-
-       ldr     r4,     =CONFIG_SYS_MDCNFG_VAL
-       bic     r4,     r4,     #(MDCNFG_DE0|MDCNFG_DE1)
-
-       str     r4,     [r1, #MDCNFG_OFFSET]    /* write back MDCNFG        */
-       ldr     r4,     [r1, #MDCNFG_OFFSET]
-
-
-       /* Step 4e: Wait for the clock to the SDRAMs to stabilize,          */
-       /*          100..200 Âµsec.                                          */
-
-       ldr r3, =OSCR                   /* reset the OS Timer Count to zero */
-       mov r2, #0
-       str r2, [r3]
-       ldr r4, =0x300                  /* really 0x2E1 is about 200usec,   */
-                                       /* so 0x300 should be plenty        */
-1:
-       ldr r2, [r3]
-       cmp r4, r2
-       bgt 1b
-
-
-       /* Step 4f: Trigger a number (usually 8) refresh cycles by          */
-       /*          attempting non-burst read or write accesses to disabled */
-       /*          SDRAM, as commonly specified in the power up sequence   */
-       /*          documented in SDRAM data sheets. The address(es) used   */
-       /*          for this purpose must not be cacheable.                 */
-
-       /*          There should 9 writes, since the first write doesn't    */
-       /*          trigger a refresh cycle on PXA250. See Intel PXA250 and */
-       /*          PXA210 Processors Specification Update,                 */
-       /*          Jan 2003, Errata #116, page 30.                         */
-
-
-       ldr     r3,     =CONFIG_SYS_DRAM_BASE
-       str     r2, [r3]
-       str     r2, [r3]
-       str     r2, [r3]
-       str     r2, [r3]
-       str     r2, [r3]
-       str     r2, [r3]
-       str     r2, [r3]
-       str     r2, [r3]
-       str     r2, [r3]
-
-       /* Step 4g: Write MDCNFG with enable bits asserted                  */
-       /*          (MDCNFG:DEx set to 1).                                  */
-
-       ldr     r3, [r1, #MDCNFG_OFFSET]
-       orr     r3,     r3,     #(MDCNFG_DE0|MDCNFG_DE1)
-       str     r3, [r1, #MDCNFG_OFFSET]
-
-       /* Step 4h: Write MDMRS.                                            */
-
-       ldr     r2,  =CONFIG_SYS_MDMRS_VAL
-       str     r2,  [r1, #MDMRS_OFFSET]
-
-
-       /* We are finished with Intel's memory controller initialisation    */
-
-       /* ---------------------------------------------------------------- */
-       /* Disable (mask) all interrupts at interrupt controller            */
-       /* ---------------------------------------------------------------- */
-
-initirqs:
-
-       mov     r1, #0          /* clear int. level register (IRQ, not FIQ) */
-       ldr     r2,  =ICLR
-       str     r1,  [r2]
-
-       ldr     r2,  =ICMR      /* mask all interrupts at the controller    */
-       str     r1,  [r2]
-
-
-       /* ---------------------------------------------------------------- */
-       /* Clock initialisation                                             */
-       /* ---------------------------------------------------------------- */
-
-initclks:
-
-       /* Disable the peripheral clocks, and set the core clock frequency  */
-       /* (hard-coding at 398.12MHz for now).                              */
-
-       /* Turn Off ALL on-chip peripheral clocks for re-configuration      */
-       /* Note: See label 'ENABLECLKS' for the re-enabling                 */
-       ldr     r1,  =CKEN
-       mov     r2,  #0
-       str     r2,  [r1]
-
-
-       /* default value in case no valid rotary switch setting is found    */
-       ldr     r2, =(CCCR_L27|CCCR_M2|CCCR_N10)  /* DEFAULT: {200/200/100} */
-
-       /* ... and write the core clock config register                     */
-       ldr     r1,  =CCCR
-       str     r2,  [r1]
-
-       /* enable the 32Khz oscillator for RTC and PowerManager             */
-/*
-       ldr     r1,  =OSCC
-       mov     r2,  #OSCC_OON
-       str     r2,  [r1]
-*/
-       /* NOTE:  spin here until OSCC.OOK get set, meaning the PLL         */
-       /* has settled.                                                     */
-60:
-       ldr     r2, [r1]
-       ands    r2, r2, #1
-       beq     60b
-
-       /* ---------------------------------------------------------------- */
-       /*                                                                  */
-       /* ---------------------------------------------------------------- */
-
-       /* Save SDRAM size                                                  */
-       ldr     r1, =DRAM_SIZE
-       str     r8, [r1]
-
-       /* Interrupt init: Mask all interrupts                              */
-       ldr     r0, =ICMR                       /* enable no sources        */
-       mov     r1, #0
-       str     r1, [r0]
-
-       /* FIXME */
-
-#ifndef DEBUG
-       /*Disable software and data breakpoints */
-       mov     r0,#0
-       mcr     p15,0,r0,c14,c8,0  /* ibcr0 */
-       mcr     p15,0,r0,c14,c9,0  /* ibcr1 */
-       mcr     p15,0,r0,c14,c4,0  /* dbcon */
-
-       /*Enable all debug functionality */
-       mov     r0,#0x80000000
-       mcr     p14,0,r0,c10,c0,0  /* dcsr */
-#endif
-
-       /* ---------------------------------------------------------------- */
-       /* End lowlevel_init                                                     */
-       /* ---------------------------------------------------------------- */
-
-endlowlevel_init:
-
-    mov     pc, lr
index f865eb422563142a71a692bf83e301d0a69789ee..656d5cde95a4933b81bbbbcd1eee962a92118abf 100644 (file)
@@ -92,4 +92,3 @@ int qong_fpga_init(void)
 }
 
 #endif
-
index b60a46e96d2d60b5612f0ef6426420ca8ba84196..fa9dd9fe4d0b830aaf14127ec61cbab1002c9f03 100644 (file)
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-int dram_init(void)
-{
-       gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-       gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
-
-       return(0);
-}
-#else
 int dram_init(void)
 {
        /* dram_init must store complete ramsize in gd->ram_size */
@@ -56,7 +47,6 @@ void dram_init_banksize(void)
        gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
        gd->bd->bi_dram[0].size = gd->ram_size;
 }
-#endif
 
 #ifdef CONFIG_DRIVER_TI_EMAC
 
diff --git a/board/davinci/da8xxevm/config.mk b/board/davinci/da8xxevm/config.mk
deleted file mode 100644 (file)
index e176f7d..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# (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
-CONFIG_SYS_TEXT_BASE = 0xC1080000
diff --git a/board/delta/Makefile b/board/delta/Makefile
deleted file mode 100644 (file)
index 648e00c..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-
-#
-# (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  := delta.o nand.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/delta/config.mk b/board/delta/config.mk
deleted file mode 100644 (file)
index 8b24044..0000000
+++ /dev/null
@@ -1 +0,0 @@
-CONFIG_SYS_TEXT_BASE = 0x83008000
diff --git a/board/delta/delta.c b/board/delta/delta.c
deleted file mode 100644 (file)
index 68c39d2..0000000
+++ /dev/null
@@ -1,377 +0,0 @@
-/*
- * (C) Copyright 2006
- * DENX Software Engineering
- *
- * 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 <netdev.h>
-#include <i2c.h>
-#include <da9030.h>
-#include <malloc.h>
-#include <command.h>
-#include <asm/arch/pxa-regs.h>
-
-DECLARE_GLOBAL_DATA_PTR;
-
-/* ------------------------------------------------------------------------- */
-
-static void init_DA9030(void);
-static void keys_init(void);
-static void get_pressed_keys(uchar *s);
-static uchar *key_match(uchar *kbd_data);
-
-/*
- * Miscelaneous platform dependent initialisations
- */
-
-int board_init (void)
-{
-       /* memory and cpu-speed are setup before relocation */
-       /* so we do _nothing_ here */
-
-       /* arch number of Lubbock-Board mk@tbd: fix this! */
-       gd->bd->bi_arch_number = MACH_TYPE_LUBBOCK;
-
-       /* adress of boot parameters */
-       gd->bd->bi_boot_params = 0xa0000100;
-
-       return 0;
-}
-
-int board_late_init(void)
-{
-#ifdef DELTA_CHECK_KEYBD
-       uchar kbd_data[KEYBD_DATALEN];
-       char keybd_env[2 * KEYBD_DATALEN + 1];
-       char *str;
-       int i;
-#endif /* DELTA_CHECK_KEYBD */
-
-       setenv("stdout", "serial");
-       setenv("stderr", "serial");
-
-#ifdef DELTA_CHECK_KEYBD
-       keys_init();
-
-       memset(kbd_data, '\0', KEYBD_DATALEN);
-
-       /* check for pressed keys and setup keybd_env */
-       get_pressed_keys(kbd_data);
-
-       for (i = 0; i < KEYBD_DATALEN; ++i) {
-               sprintf (keybd_env + i + i, "%02X", kbd_data[i]);
-       }
-       setenv ("keybd", keybd_env);
-
-       str = strdup ((char *)key_match (kbd_data));    /* decode keys */
-
-# ifdef CONFIG_PREBOOT /* automatically configure "preboot" command on key match */
-       setenv ("preboot", str);        /* set or delete definition */
-# endif /* CONFIG_PREBOOT */
-       if (str != NULL) {
-               free (str);
-       }
-#endif /* DELTA_CHECK_KEYBD */
-
-       init_DA9030();
-       return 0;
-}
-
-/*
- * Magic Key Handling, mainly copied from board/lwmon/lwmon.c
- */
-#ifdef DELTA_CHECK_KEYBD
-
-static uchar kbd_magic_prefix[] = "key_magic";
-static uchar kbd_command_prefix[] = "key_cmd";
-
-/*
- * Get pressed keys
- * s is a buffer of size KEYBD_DATALEN-1
- */
-static void get_pressed_keys(uchar *s)
-{
-       unsigned long val;
-       val = GPLR3;
-
-       if(val & (1<<31))
-               *s++ = KEYBD_KP_DKIN0;
-       if(val & (1<<18))
-               *s++ = KEYBD_KP_DKIN1;
-       if(val & (1<<29))
-               *s++ = KEYBD_KP_DKIN2;
-       if(val & (1<<22))
-               *s++ = KEYBD_KP_DKIN5;
-}
-
-static void keys_init()
-{
-       CKENB |= CKENB_7_GPIO;
-       udelay(100);
-
-       /* Configure GPIOs */
-       GPIO127 = 0xa840;       /* KP_DKIN0 */
-       GPIO114 = 0xa840;       /* KP_DKIN1 */
-       GPIO125 = 0xa840;       /* KP_DKIN2 */
-       GPIO118 = 0xa840;       /* KP_DKIN5 */
-
-       /* Configure GPIOs as inputs */
-       GPDR3 &= ~(1<<31 | 1<<18 | 1<<29 | 1<<22);
-       GCDR3 = (1<<31 | 1<<18 | 1<<29 | 1<<22);
-
-       udelay(100);
-}
-
-static int compare_magic (uchar *kbd_data, uchar *str)
-{
-       /* uchar compare[KEYBD_DATALEN-1]; */
-       uchar compare[KEYBD_DATALEN];
-       char *nxt;
-       int i;
-
-       /* Don't include modifier byte */
-       /* memcpy (compare, kbd_data+1, KEYBD_DATALEN-1); */
-       memcpy (compare, kbd_data, KEYBD_DATALEN);
-
-       for (; str != NULL; str = (*nxt) ? (uchar *)(nxt+1) : (uchar *)nxt) {
-               uchar c;
-               int k;
-
-               c = (uchar) simple_strtoul ((char *)str, (char **) (&nxt), 16);
-
-               if (str == (uchar *)nxt) {      /* invalid character */
-                       break;
-               }
-
-               /*
-                * Check if this key matches the input.
-                * Set matches to zero, so they match only once
-                * and we can find duplicates or extra keys
-                */
-               for (k = 0; k < sizeof(compare); ++k) {
-                       if (compare[k] == '\0') /* only non-zero entries */
-                               continue;
-                       if (c == compare[k]) {  /* found matching key */
-                               compare[k] = '\0';
-                               break;
-                       }
-               }
-               if (k == sizeof(compare)) {
-                       return -1;              /* unmatched key */
-               }
-       }
-
-       /*
-        * A full match leaves no keys in the `compare' array,
-        */
-       for (i = 0; i < sizeof(compare); ++i) {
-               if (compare[i])
-               {
-                       return -1;
-               }
-       }
-
-       return 0;
-}
-
-
-static uchar *key_match (uchar *kbd_data)
-{
-       char magic[sizeof (kbd_magic_prefix) + 1];
-       uchar *suffix;
-       char *kbd_magic_keys;
-
-       /*
-        * The following string defines the characters that can pe appended
-        * to "key_magic" to form the names of environment variables that
-        * hold "magic" key codes, i. e. such key codes that can cause
-        * pre-boot actions. If the string is empty (""), then only
-        * "key_magic" is checked (old behaviour); the string "125" causes
-        * checks for "key_magic1", "key_magic2" and "key_magic5", etc.
-        */
-       if ((kbd_magic_keys = getenv ("magic_keys")) == NULL)
-               kbd_magic_keys = "";
-
-       /* loop over all magic keys;
-        * use '\0' suffix in case of empty string
-        */
-       for (suffix=(uchar *)kbd_magic_keys; *suffix || suffix==(uchar *)kbd_magic_keys; ++suffix) {
-               sprintf (magic, "%s%c", kbd_magic_prefix, *suffix);
-#if 0
-               printf ("### Check magic \"%s\"\n", magic);
-#endif
-               if (compare_magic(kbd_data, (uchar *)getenv(magic)) == 0) {
-                       char cmd_name[sizeof (kbd_command_prefix) + 1];
-                       char *cmd;
-
-                       sprintf (cmd_name, "%s%c", kbd_command_prefix, *suffix);
-
-                       cmd = getenv (cmd_name);
-#if 0
-                       printf ("### Set PREBOOT to $(%s): \"%s\"\n",
-                               cmd_name, cmd ? cmd : "<<NULL>>");
-#endif
-                       *kbd_data = *suffix;
-                       return ((uchar *)cmd);
-               }
-       }
-#if 0
-       printf ("### Delete PREBOOT\n");
-#endif
-       *kbd_data = '\0';
-       return (NULL);
-}
-
-int do_kbd (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
-{
-       uchar kbd_data[KEYBD_DATALEN];
-       char keybd_env[2 * KEYBD_DATALEN + 1];
-       int i;
-
-       /* Read keys */
-       get_pressed_keys(kbd_data);
-       puts ("Keys:");
-       for (i = 0; i < KEYBD_DATALEN; ++i) {
-               sprintf (keybd_env + i + i, "%02X", kbd_data[i]);
-               printf (" %02x", kbd_data[i]);
-       }
-       putc ('\n');
-       setenv ("keybd", keybd_env);
-       return 0;
-}
-
-U_BOOT_CMD(
-          kbd, 1,      1,      do_kbd,
-          "read keyboard status",
-          ""
-);
-
-#endif /* DELTA_CHECK_KEYBD */
-
-
-int dram_init (void)
-{
-       gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-       gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
-       gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
-       gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
-       gd->bd->bi_dram[2].start = PHYS_SDRAM_3;
-       gd->bd->bi_dram[2].size = PHYS_SDRAM_3_SIZE;
-       gd->bd->bi_dram[3].start = PHYS_SDRAM_4;
-       gd->bd->bi_dram[3].size = PHYS_SDRAM_4_SIZE;
-
-       return 0;
-}
-
-void i2c_init_board()
-{
-       CKENB |= (CKENB_4_I2C);
-
-       /* setup I2C GPIO's */
-       GPIO32 = 0x801;         /* SCL = Alt. Fkt. 1 */
-       GPIO33 = 0x801;         /* SDA = Alt. Fkt. 1 */
-}
-
-/* initialize the DA9030 Power Controller */
-static void init_DA9030()
-{
-       uchar addr = (uchar) DA9030_I2C_ADDR, val = 0;
-
-       CKENB |= CKENB_7_GPIO;
-       udelay(100);
-
-       /* Rising Edge on EXTON to reset DA9030 */
-       GPIO17 = 0x8800;        /* configure GPIO17, no pullup, -down */
-       GPDR0 |= (1<<17);       /* GPIO17 is output */
-       GSDR0 = (1<<17);
-       GPCR0 = (1<<17);        /* drive GPIO17 low */
-       GPSR0 = (1<<17);        /* drive GPIO17 high */
-
-#if CONFIG_SYS_DA9030_EXTON_DELAY
-       udelay((unsigned long) CONFIG_SYS_DA9030_EXTON_DELAY);  /* wait for DA9030 */
-#endif
-       GPCR0 = (1<<17);        /* drive GPIO17 low */
-
-       /* reset the watchdog and go active (0xec) */
-       val = (SYS_CONTROL_A_HWRES_ENABLE |
-              (0x6<<4) |
-              SYS_CONTROL_A_WDOG_ACTION |
-              SYS_CONTROL_A_WATCHDOG);
-       if(i2c_write(addr, SYS_CONTROL_A, 1, &val, 1)) {
-               printf("Error accessing DA9030 via i2c.\n");
-               return;
-       }
-
-       val = 0x80;
-       if(i2c_write(addr, IRQ_MASK_B, 1, &val, 1)) {
-               printf("Error accessing DA9030 via i2c.\n");
-               return;
-       }
-
-       i2c_reg_write(addr, REG_CONTROL_1_97, 0xfd); /* disable LDO1, enable LDO6 */
-       i2c_reg_write(addr, LDO2_3, 0xd1);      /* LDO2 =1,9V, LDO3=3,1V */
-       i2c_reg_write(addr, LDO4_5, 0xcc);      /* LDO2 =1,9V, LDO3=3,1V */
-       i2c_reg_write(addr, LDO6_SIMCP, 0x3e);  /* LDO6=3,2V, SIMCP = 5V support */
-       i2c_reg_write(addr, LDO7_8, 0xc9);      /* LDO7=2,7V, LDO8=3,0V */
-       i2c_reg_write(addr, LDO9_12, 0xec);     /* LDO9=3,0V, LDO12=3,2V */
-       i2c_reg_write(addr, BUCK, 0x0c);        /* Buck=1.2V */
-       i2c_reg_write(addr, REG_CONTROL_2_98, 0x7f); /* All LDO'S on 8,9,10,11,12,14 */
-       i2c_reg_write(addr, LDO_10_11, 0xcc);   /* LDO10=3.0V  LDO11=3.0V */
-       i2c_reg_write(addr, LDO_15, 0xae);      /* LDO15=1.8V, dislock first 3bit */
-       i2c_reg_write(addr, LDO_14_16, 0x05);   /* LDO14=2.8V, LDO16=NB */
-       i2c_reg_write(addr, LDO_18_19, 0x9c);   /* LDO18=3.0V, LDO19=2.7V */
-       i2c_reg_write(addr, LDO_17_SIMCP0, 0x2c); /* LDO17=3.0V, SIMCP=3V support */
-       i2c_reg_write(addr, BUCK2_DVC1, 0x9a);  /* Buck2=1.5V plus Update support of 520 MHz */
-       i2c_reg_write(addr, REG_CONTROL_2_18, 0x43); /* Ball on */
-       i2c_reg_write(addr, MISC_CONTROLB, 0x08); /* session valid enable */
-       i2c_reg_write(addr, USBPUMP, 0xc1);     /* start pump, ignore HW signals */
-
-       val = i2c_reg_read(addr, STATUS);
-       if(val & STATUS_CHDET)
-               printf("Charger detected, turning on LED.\n");
-       else {
-               printf("No charger detetected.\n");
-               /* undervoltage? print error and power down */
-       }
-}
-
-
-#if 0
-/* reset the DA9030 watchdog */
-void hw_watchdog_reset(void)
-{
-       uchar addr = (uchar) DA9030_I2C_ADDR, val = 0;
-       val = i2c_reg_read(addr, SYS_CONTROL_A);
-       val |= SYS_CONTROL_A_WATCHDOG;
-       i2c_reg_write(addr, SYS_CONTROL_A, val);
-}
-#endif
-
-#ifdef CONFIG_CMD_NET
-int board_eth_init(bd_t *bis)
-{
-       int rc = 0;
-#ifdef CONFIG_SMC91111
-       rc = smc91111_initialize(0, CONFIG_SMC91111_BASE);
-#endif
-       return rc;
-}
-#endif
diff --git a/board/delta/lowlevel_init.S b/board/delta/lowlevel_init.S
deleted file mode 100644 (file)
index 1664f3b..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * (C) Copyright 2006 DENX Software Engineering
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include <config.h>
-#include <version.h>
-#include <asm/arch/pxa-regs.h>
-
-DRAM_SIZE:  .long   CONFIG_SYS_DRAM_SIZE
-
-.macro wait time
-       ldr             r2, =OSCR
-       mov             r3, #0
-       str             r3, [r2]
-0:
-       ldr             r3, [r2]
-       cmp             r3, \time
-       bls             0b
-.endm
-
-.globl lowlevel_init
-lowlevel_init:
-       /* Set up GPIO pins first */
-       mov      r10, lr
-
-       /*  Configure GPIO  Pins 97, 98 UART1 / altern. Fkt. 1 */
-       ldr             r0, =GPIO97
-       ldr             r1, =0x801
-       str             r1, [r0]
-
-       ldr             r0, =GPIO98
-       ldr             r1, =0x801
-       str             r1, [r0]
-
-       /* tebrandt - ASCR, clear the RDH bit */
-       ldr             r0, =ASCR
-       ldr             r1, [r0]
-       bic             r1, r1, #0x80000000
-       str             r1, [r0]
-
-mem_init:
-       /* Configure ACCR Register - enable DMEMC Clock at 260 / 2 MHz */
-       ldr             r0, =ACCR
-       ldr             r1, [r0]
-       orr             r1, r1, #0x3000
-       str             r1, [r0]
-       ldr             r1, [r0]
-
-       /* 2. Programm MDCNFG, leaving DMCEN de-asserted */
-       ldr             r0, =MDCNFG
-       ldr             r1, =(MDCNFG_DMAP | MDCNFG_DTYPE | MDCNFG_DTC_2 | MDCNFG_DCSE0 | MDCNFG_DRAC_13)
-       /* ldr          r1, =0x80000403 */
-       str             r1, [r0]
-       ldr             r1, [r0]        /* delay until written */
-
-       /* 3. wait nop power up waiting period (200ms)
-        * optimization: Steps 4+6 can be done during this
-        */
-       wait #0x300
-
-       /* 4. Perform an initial Rcomp-calibration cycle */
-       ldr             r0, =RCOMP
-       ldr             r1, =0x80000000
-       str             r1, [r0]
-       ldr             r1, [r0]        /* delay until written */
-       /* missing: program for automatic rcomp evaluation cycles */
-
-       /* 5. DDR DRAM strobe delay calibration */
-       ldr             r0, =DDR_HCAL
-       ldr             r1, =0x88000007
-       str             r1, [r0]
-       wait            #5
-       ldr             r1, [r0]        /* delay until written */
-
-       /* Set MDMRS */
-       ldr             r0, =MDMRS
-       ldr             r1, =0x60000033
-       str             r1, [r0]
-       wait    #300
-
-       /* Configure MDREFR */
-       ldr             r0, =MDREFR
-       ldr             r1, =0x00000006
-       str             r1, [r0]
-       ldr             r1, [r0]
-
-       /* Enable the dynamic memory controller */
-       ldr             r0, =MDCNFG
-       ldr             r1, [r0]
-       orr             r1, r1, #MDCNFG_DMCEN
-       str             r1, [r0]
-
-#ifndef CONFIG_SYS_SKIP_DRAM_SCRUB
-       /* scrub/init SDRAM if enabled/present */
-       ldr     r8, =CONFIG_SYS_DRAM_BASE       /* base address of SDRAM (CONFIG_SYS_DRAM_BASE) */
-       ldr     r9, =CONFIG_SYS_DRAM_SIZE       /* size of memory to scrub (CONFIG_SYS_DRAM_SIZE) */
-       mov     r0, #0                  /* scrub with 0x0000:0000 */
-       mov     r1, #0
-       mov     r2, #0
-       mov     r3, #0
-       mov     r4, #0
-       mov     r5, #0
-       mov     r6, #0
-       mov     r7, #0
-10:    /* fastScrubLoop */
-       subs    r9, r9, #32     /* 8 words/line */
-       stmia   r8!, {r0-r7}
-       beq     15f
-       b       10b
-#endif /* CONFIG_SYS_SKIP_DRAM_SCRUB */
-
-15:
-       /* Mask all interrupts */
-       mov     r1, #0
-       mcr     p6, 0, r1, c1, c0, 0    @ ICMR
-
-       /* Disable software and data breakpoints */
-       mov     r0, #0
-       mcr     p15,0,r0,c14,c8,0  /* ibcr0 */
-       mcr     p15,0,r0,c14,c9,0  /* ibcr1 */
-       mcr     p15,0,r0,c14,c4,0  /* dbcon */
-
-       /* Enable all debug functionality */
-       mov     r0,#0x80000000
-       mcr     p14,0,r0,c10,c0,0  /* dcsr */
-
-endlowlevel_init:
-       mov     pc, lr
diff --git a/board/delta/nand.c b/board/delta/nand.c
deleted file mode 100644 (file)
index 85a6ba2..0000000
+++ /dev/null
@@ -1,554 +0,0 @@
-/*
- * (C) Copyright 2006 DENX Software Engineering
- *
- * 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>
-
-#if defined(CONFIG_CMD_NAND)
-
-#include <nand.h>
-#include <asm/arch/pxa-regs.h>
-
-#ifdef CONFIG_SYS_DFC_DEBUG1
-# define DFC_DEBUG1(fmt, args...) printf(fmt, ##args)
-#else
-# define DFC_DEBUG1(fmt, args...)
-#endif
-
-#ifdef CONFIG_SYS_DFC_DEBUG2
-# define DFC_DEBUG2(fmt, args...) printf(fmt, ##args)
-#else
-# define DFC_DEBUG2(fmt, args...)
-#endif
-
-#ifdef CONFIG_SYS_DFC_DEBUG3
-# define DFC_DEBUG3(fmt, args...) printf(fmt, ##args)
-#else
-# define DFC_DEBUG3(fmt, args...)
-#endif
-
-/* These really don't belong here, as they are specific to the NAND Model */
-static uint8_t scan_ff_pattern[] = { 0xff, 0xff };
-
-static struct nand_bbt_descr delta_bbt_descr = {
-       .options = 0,
-       .offs = 0,
-       .len = 2,
-       .pattern = scan_ff_pattern
-};
-
-static struct nand_ecclayout delta_oob = {
-       .eccbytes = 6,
-       .eccpos = {2, 3, 4, 5, 6, 7},
-       .oobfree = { {8, 2}, {12, 4} }
-};
-
-/*
- * not required for Monahans DFC
- */
-static void dfc_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
-{
-       return;
-}
-
-#if 0
-/* read device ready pin */
-static int dfc_device_ready(struct mtd_info *mtdinfo)
-{
-       if(NDSR & NDSR_RDY)
-               return 1;
-       else
-               return 0;
-       return 0;
-}
-#endif
-
-/*
- * Write buf to the DFC Controller Data Buffer
- */
-static void dfc_write_buf(struct mtd_info *mtd, const u_char *buf, int len)
-{
-       unsigned long bytes_multi = len & 0xfffffffc;
-       unsigned long rest = len & 0x3;
-       unsigned long *long_buf;
-       int i;
-
-       DFC_DEBUG2("dfc_write_buf: writing %d bytes starting with 0x%x.\n", len, *((unsigned long*) buf));
-       if(bytes_multi) {
-               for(i=0; i<bytes_multi; i+=4) {
-                       long_buf = (unsigned long*) &buf[i];
-                       NDDB = *long_buf;
-               }
-       }
-       if(rest) {
-               printf("dfc_write_buf: ERROR, writing non 4-byte aligned data.\n");
-       }
-       return;
-}
-
-
-static void dfc_read_buf(struct mtd_info *mtd, u_char* const buf, int len)
-{
-       int i=0, j;
-
-       /* we have to be carefull not to overflow the buffer if len is
-        * not a multiple of 4 */
-       unsigned long bytes_multi = len & 0xfffffffc;
-       unsigned long rest = len & 0x3;
-       unsigned long *long_buf;
-
-       DFC_DEBUG3("dfc_read_buf: reading %d bytes.\n", len);
-       /* if there are any, first copy multiple of 4 bytes */
-       if(bytes_multi) {
-               for(i=0; i<bytes_multi; i+=4) {
-                       long_buf = (unsigned long*) &buf[i];
-                       *long_buf = NDDB;
-               }
-       }
-
-       /* ...then the rest */
-       if(rest) {
-               unsigned long rest_data = NDDB;
-               for(j=0;j<rest; j++)
-                       buf[i+j] = (u_char) ((rest_data>>j) & 0xff);
-       }
-
-       return;
-}
-
-/*
- * read a word. Not implemented as not used in NAND code.
- */
-static u16 dfc_read_word(struct mtd_info *mtd)
-{
-       printf("dfc_read_word: UNIMPLEMENTED.\n");
-       return 0;
-}
-
-/* global var, too bad: mk@tbd: move to ->priv pointer */
-static unsigned long read_buf = 0;
-static int bytes_read = -1;
-
-/*
- * read a byte from NDDB Because we can only read 4 bytes from NDDB at
- * a time, we buffer the remaining bytes. The buffer is reset when a
- * new command is sent to the chip.
- *
- * WARNING:
- * This function is currently only used to read status and id
- * bytes. For these commands always 8 bytes need to be read from
- * NDDB. So we read and discard these bytes right now. In case this
- * function is used for anything else in the future, we must check
- * what was the last command issued and read the appropriate amount of
- * bytes respectively.
- */
-static u_char dfc_read_byte(struct mtd_info *mtd)
-{
-       unsigned char byte;
-       unsigned long dummy;
-
-       if(bytes_read < 0) {
-               read_buf = NDDB;
-               dummy = NDDB;
-               bytes_read = 0;
-       }
-       byte = (unsigned char) (read_buf>>(8 * bytes_read++));
-       if(bytes_read >= 4)
-               bytes_read = -1;
-
-       DFC_DEBUG2("dfc_read_byte: byte %u: 0x%x of (0x%x).\n", bytes_read - 1, byte, read_buf);
-       return byte;
-}
-
-/* calculate delta between OSCR values start and now  */
-static unsigned long get_delta(unsigned long start)
-{
-       unsigned long cur = OSCR;
-
-       if(cur < start) /* OSCR overflowed */
-               return (cur + (start^0xffffffff));
-       else
-               return (cur - start);
-}
-
-/* delay function, this doesn't belong here */
-static void wait_us(unsigned long us)
-{
-       unsigned long start = OSCR;
-       us = DIV_ROUND_UP(us * OSCR_CLK_FREQ, 1000);
-
-       while (get_delta(start) < us) {
-               /* do nothing */
-       }
-}
-
-static void dfc_clear_nddb(void)
-{
-       NDCR &= ~NDCR_ND_RUN;
-       wait_us(CONFIG_SYS_NAND_OTHER_TO);
-}
-
-/* wait_event with timeout */
-static unsigned long dfc_wait_event(unsigned long event)
-{
-       unsigned long ndsr, timeout, start = OSCR;
-
-       if(!event)
-               return 0xff000000;
-       else if(event & (NDSR_CS0_CMDD | NDSR_CS0_BBD))
-               timeout = DIV_ROUND_UP(CONFIG_SYS_NAND_PROG_ERASE_TO
-                                       * OSCR_CLK_FREQ, 1000);
-       else
-               timeout = DIV_ROUND_UP(CONFIG_SYS_NAND_OTHER_TO
-                                       * OSCR_CLK_FREQ, 1000);
-
-       while(1) {
-               ndsr = NDSR;
-               if(ndsr & event) {
-                       NDSR |= event;
-                       break;
-               }
-               if(get_delta(start) > timeout) {
-                       DFC_DEBUG1("dfc_wait_event: TIMEOUT waiting for event: 0x%lx.\n", event);
-                       return 0xff000000;
-               }
-
-       }
-       return ndsr;
-}
-
-/* we don't always wan't to do this */
-static void dfc_new_cmd(void)
-{
-       int retry = 0;
-       unsigned long status;
-
-       while(retry++ <= CONFIG_SYS_NAND_SENDCMD_RETRY) {
-               /* Clear NDSR */
-               NDSR = 0xFFF;
-
-               /* set NDCR[NDRUN] */
-               if(!(NDCR & NDCR_ND_RUN))
-                       NDCR |= NDCR_ND_RUN;
-
-               status = dfc_wait_event(NDSR_WRCMDREQ);
-
-               if(status & NDSR_WRCMDREQ)
-                       return;
-
-               DFC_DEBUG2("dfc_new_cmd: FAILED to get WRITECMDREQ, retry: %d.\n", retry);
-               dfc_clear_nddb();
-       }
-       DFC_DEBUG1("dfc_new_cmd: giving up after %d retries.\n", retry);
-}
-
-/* this function is called after Programm and Erase Operations to
- * check for success or failure */
-static int dfc_wait(struct mtd_info *mtd, struct nand_chip *this)
-{
-       unsigned long ndsr=0, event=0;
-       int state = this->state;
-
-       if(state == FL_WRITING) {
-               event = NDSR_CS0_CMDD | NDSR_CS0_BBD;
-       } else if(state == FL_ERASING) {
-               event = NDSR_CS0_CMDD | NDSR_CS0_BBD;
-       }
-
-       ndsr = dfc_wait_event(event);
-
-       if((ndsr & NDSR_CS0_BBD) || (ndsr & 0xff000000))
-               return(0x1); /* Status Read error */
-       return 0;
-}
-
-/* cmdfunc send commands to the DFC */
-static void dfc_cmdfunc(struct mtd_info *mtd, unsigned command,
-                       int column, int page_addr)
-{
-       /* register struct nand_chip *this = mtd->priv; */
-       unsigned long ndcb0=0, ndcb1=0, ndcb2=0, event=0;
-
-       /* clear the ugly byte read buffer */
-       bytes_read = -1;
-       read_buf = 0;
-
-       switch (command) {
-       case NAND_CMD_READ0:
-               DFC_DEBUG3("dfc_cmdfunc: NAND_CMD_READ0, page_addr: 0x%x, column: 0x%x.\n", page_addr, (column>>1));
-               dfc_new_cmd();
-               ndcb0 = (NAND_CMD_READ0 | (4<<16));
-               column >>= 1; /* adjust for 16 bit bus */
-               ndcb1 = (((column>>1) & 0xff) |
-                        ((page_addr<<8) & 0xff00) |
-                        ((page_addr<<8) & 0xff0000) |
-                        ((page_addr<<8) & 0xff000000)); /* make this 0x01000000 ? */
-               event = NDSR_RDDREQ;
-               goto write_cmd;
-       case NAND_CMD_READ1:
-               DFC_DEBUG2("dfc_cmdfunc: NAND_CMD_READ1 unimplemented!\n");
-               goto end;
-       case NAND_CMD_READOOB:
-               DFC_DEBUG1("dfc_cmdfunc: NAND_CMD_READOOB unimplemented!\n");
-               goto end;
-       case NAND_CMD_READID:
-               dfc_new_cmd();
-               DFC_DEBUG2("dfc_cmdfunc: NAND_CMD_READID.\n");
-               ndcb0 = (NAND_CMD_READID | (3 << 21) | (1 << 16)); /* addr cycles*/
-               event = NDSR_RDDREQ;
-               goto write_cmd;
-       case NAND_CMD_PAGEPROG:
-               /* sent as a multicommand in NAND_CMD_SEQIN */
-               DFC_DEBUG2("dfc_cmdfunc: NAND_CMD_PAGEPROG empty due to multicmd.\n");
-               goto end;
-       case NAND_CMD_ERASE1:
-               DFC_DEBUG2("dfc_cmdfunc: NAND_CMD_ERASE1,  page_addr: 0x%x, column: 0x%x.\n", page_addr, (column>>1));
-               dfc_new_cmd();
-               ndcb0 = (0xd060 | (1<<25) | (2<<21) | (1<<19) | (3<<16));
-               ndcb1 = (page_addr & 0x00ffffff);
-               goto write_cmd;
-       case NAND_CMD_ERASE2:
-               DFC_DEBUG2("dfc_cmdfunc: NAND_CMD_ERASE2 empty due to multicmd.\n");
-               goto end;
-       case NAND_CMD_SEQIN:
-               /* send PAGE_PROG command(0x1080) */
-               dfc_new_cmd();
-               DFC_DEBUG2("dfc_cmdfunc: NAND_CMD_SEQIN/PAGE_PROG,  page_addr: 0x%x, column: 0x%x.\n", page_addr, (column>>1));
-               ndcb0 = (0x1080 | (1<<25) | (1<<21) | (1<<19) | (4<<16));
-               column >>= 1; /* adjust for 16 bit bus */
-               ndcb1 = (((column>>1) & 0xff) |
-                        ((page_addr<<8) & 0xff00) |
-                        ((page_addr<<8) & 0xff0000) |
-                        ((page_addr<<8) & 0xff000000)); /* make this 0x01000000 ? */
-               event = NDSR_WRDREQ;
-               goto write_cmd;
-       case NAND_CMD_STATUS:
-               DFC_DEBUG2("dfc_cmdfunc: NAND_CMD_STATUS.\n");
-               dfc_new_cmd();
-               ndcb0 = NAND_CMD_STATUS | (4<<21);
-               event = NDSR_RDDREQ;
-               goto write_cmd;
-       case NAND_CMD_RESET:
-               DFC_DEBUG2("dfc_cmdfunc: NAND_CMD_RESET.\n");
-               ndcb0 = NAND_CMD_RESET | (5<<21);
-               event = NDSR_CS0_CMDD;
-               goto write_cmd;
-       default:
-               printk("dfc_cmdfunc: error, unsupported command.\n");
-               goto end;
-       }
-
- write_cmd:
-       NDCB0 = ndcb0;
-       NDCB0 = ndcb1;
-       NDCB0 = ndcb2;
-
-       /*  wait_event: */
-       dfc_wait_event(event);
- end:
-       return;
-}
-
-static void dfc_gpio_init(void)
-{
-       DFC_DEBUG2("Setting up DFC GPIO's.\n");
-
-       /* no idea what is done here, see zylonite.c */
-       GPIO4 = 0x1;
-
-       DF_ALE_WE1 = 0x00000001;
-       DF_ALE_WE2 = 0x00000001;
-       DF_nCS0 = 0x00000001;
-       DF_nCS1 = 0x00000001;
-       DF_nWE = 0x00000001;
-       DF_nRE = 0x00000001;
-       DF_IO0 = 0x00000001;
-       DF_IO8 = 0x00000001;
-       DF_IO1 = 0x00000001;
-       DF_IO9 = 0x00000001;
-       DF_IO2 = 0x00000001;
-       DF_IO10 = 0x00000001;
-       DF_IO3 = 0x00000001;
-       DF_IO11 = 0x00000001;
-       DF_IO4 = 0x00000001;
-       DF_IO12 = 0x00000001;
-       DF_IO5 = 0x00000001;
-       DF_IO13 = 0x00000001;
-       DF_IO6 = 0x00000001;
-       DF_IO14 = 0x00000001;
-       DF_IO7 = 0x00000001;
-       DF_IO15 = 0x00000001;
-
-       DF_nWE = 0x1901;
-       DF_nRE = 0x1901;
-       DF_CLE_NOE = 0x1900;
-       DF_ALE_WE1 = 0x1901;
-       DF_INT_RnB = 0x1900;
-}
-
-/*
- * Board-specific NAND initialization. The following members of the
- * argument are board-specific (per include/linux/mtd/nand_new.h):
- * - IO_ADDR_R?: address to read the 8 I/O lines of the flash device
- * - IO_ADDR_W?: address to write the 8 I/O lines of the flash device
- * - hwcontrol: hardwarespecific function for accesing control-lines
- * - dev_ready: hardwarespecific function for  accesing device ready/busy line
- * - enable_hwecc?: function to enable (reset)  hardware ecc generator. Must
- *   only be provided if a hardware ECC is available
- * - ecc.mode: mode of ecc, see defines
- * - chip_delay: chip dependent delay for transfering data from array to
- *   read regs (tR)
- * - options: various chip options. They can partly be set to inform
- *   nand_scan about special functionality. See the defines for further
- *   explanation
- * Members with a "?" were not set in the merged testing-NAND branch,
- * so they are not set here either.
- */
-int board_nand_init(struct nand_chip *nand)
-{
-       unsigned long tCH, tCS, tWH, tWP, tRH, tRP, tRP_high, tR, tWHR, tAR;
-
-       /* set up GPIO Control Registers */
-       dfc_gpio_init();
-
-       /* turn on the NAND Controller Clock (104 MHz @ D0) */
-       CKENA |= (CKENA_4_NAND | CKENA_9_SMC);
-
-#undef CONFIG_SYS_TIMING_TIGHT
-#ifndef CONFIG_SYS_TIMING_TIGHT
-       tCH = MIN(((unsigned long) (NAND_TIMING_tCH * DFC_CLK_PER_US) + 1),
-                 DFC_MAX_tCH);
-       tCS = MIN(((unsigned long) (NAND_TIMING_tCS * DFC_CLK_PER_US) + 1),
-                 DFC_MAX_tCS);
-       tWH = MIN(((unsigned long) (NAND_TIMING_tWH * DFC_CLK_PER_US) + 1),
-                 DFC_MAX_tWH);
-       tWP = MIN(((unsigned long) (NAND_TIMING_tWP * DFC_CLK_PER_US) + 1),
-                 DFC_MAX_tWP);
-       tRH = MIN(((unsigned long) (NAND_TIMING_tRH * DFC_CLK_PER_US) + 1),
-                 DFC_MAX_tRH);
-       tRP = MIN(((unsigned long) (NAND_TIMING_tRP * DFC_CLK_PER_US) + 1),
-                 DFC_MAX_tRP);
-       tR = MIN(((unsigned long) (NAND_TIMING_tR * DFC_CLK_PER_US) + 1),
-                DFC_MAX_tR);
-       tWHR = MIN(((unsigned long) (NAND_TIMING_tWHR * DFC_CLK_PER_US) + 1),
-                  DFC_MAX_tWHR);
-       tAR = MIN(((unsigned long) (NAND_TIMING_tAR * DFC_CLK_PER_US) + 1),
-                 DFC_MAX_tAR);
-#else /* this is the tight timing */
-
-       tCH = MIN(((unsigned long) (NAND_TIMING_tCH * DFC_CLK_PER_US)),
-                 DFC_MAX_tCH);
-       tCS = MIN(((unsigned long) (NAND_TIMING_tCS * DFC_CLK_PER_US)),
-                 DFC_MAX_tCS);
-       tWH = MIN(((unsigned long) (NAND_TIMING_tWH * DFC_CLK_PER_US)),
-                 DFC_MAX_tWH);
-       tWP = MIN(((unsigned long) (NAND_TIMING_tWP * DFC_CLK_PER_US)),
-                 DFC_MAX_tWP);
-       tRH = MIN(((unsigned long) (NAND_TIMING_tRH * DFC_CLK_PER_US)),
-                 DFC_MAX_tRH);
-       tRP = MIN(((unsigned long) (NAND_TIMING_tRP * DFC_CLK_PER_US)),
-                 DFC_MAX_tRP);
-       tR = MIN(((unsigned long) (NAND_TIMING_tR * DFC_CLK_PER_US) - tCH - 2),
-                DFC_MAX_tR);
-       tWHR = MIN(((unsigned long) (NAND_TIMING_tWHR * DFC_CLK_PER_US) - tCH - 2),
-                  DFC_MAX_tWHR);
-       tAR = MIN(((unsigned long) (NAND_TIMING_tAR * DFC_CLK_PER_US) - 2),
-                 DFC_MAX_tAR);
-#endif /* CONFIG_SYS_TIMING_TIGHT */
-
-
-       DFC_DEBUG2("tCH=%u, tCS=%u, tWH=%u, tWP=%u, tRH=%u, tRP=%u, tR=%u, tWHR=%u, tAR=%u.\n", tCH, tCS, tWH, tWP, tRH, tRP, tR, tWHR, tAR);
-
-       /* tRP value is split in the register */
-       if(tRP & (1 << 4)) {
-               tRP_high = 1;
-               tRP &= ~(1 << 4);
-       } else {
-               tRP_high = 0;
-       }
-
-       NDTR0CS0 = (tCH << 19) |
-               (tCS << 16) |
-               (tWH << 11) |
-               (tWP << 8) |
-               (tRP_high << 6) |
-               (tRH << 3) |
-               (tRP << 0);
-
-       NDTR1CS0 = (tR << 16) |
-               (tWHR << 4) |
-               (tAR << 0);
-
-       /* If it doesn't work (unlikely) think about:
-        *  - ecc enable
-        *  - chip select don't care
-        *  - read id byte count
-        *
-        * Intentionally enabled by not setting bits:
-        *  - dma (DMA_EN)
-        *  - page size = 512
-        *  - cs don't care, see if we can enable later!
-        *  - row address start position (after second cycle)
-        *  - pages per block = 32
-        *  - ND_RDY : clears command buffer
-        */
-       /* NDCR_NCSX |          /\* Chip select busy don't care *\/ */
-
-       NDCR = (NDCR_SPARE_EN |         /* use the spare area */
-               NDCR_DWIDTH_C |         /* 16bit DFC data bus width  */
-               NDCR_DWIDTH_M |         /* 16 bit Flash device data bus width */
-               (2 << 16) |             /* read id count = 7 ???? mk@tbd */
-               NDCR_ND_ARB_EN |        /* enable bus arbiter */
-               NDCR_RDYM |             /* flash device ready ir masked */
-               NDCR_CS0_PAGEDM |       /* ND_nCSx page done ir masked */
-               NDCR_CS1_PAGEDM |
-               NDCR_CS0_CMDDM |        /* ND_CSx command done ir masked */
-               NDCR_CS1_CMDDM |
-               NDCR_CS0_BBDM |         /* ND_CSx bad block detect ir masked */
-               NDCR_CS1_BBDM |
-               NDCR_DBERRM |           /* double bit error ir masked */
-               NDCR_SBERRM |           /* single bit error ir masked */
-               NDCR_WRDREQM |          /* write data request ir masked */
-               NDCR_RDDREQM |          /* read data request ir masked */
-               NDCR_WRCMDREQM);        /* write command request ir masked */
-
-
-       /* wait 10 us due to cmd buffer clear reset */
-       /*      wait(10); */
-
-
-       nand->cmd_ctrl = dfc_hwcontrol;
-/*     nand->dev_ready = dfc_device_ready; */
-       nand->ecc.mode = NAND_ECC_SOFT;
-       nand->ecc.layout = &delta_oob;
-       nand->options = NAND_BUSWIDTH_16;
-       nand->waitfunc = dfc_wait;
-       nand->read_byte = dfc_read_byte;
-       nand->read_word = dfc_read_word;
-       nand->read_buf = dfc_read_buf;
-       nand->write_buf = dfc_write_buf;
-
-       nand->cmdfunc = dfc_cmdfunc;
-       nand->badblock_pattern = &delta_bbt_descr;
-       return 0;
-}
-
-#endif
index b414079bc14121bc9071cf687f2ab8f2a6c31ff2..3eeb2a201b4475614e247cd92a6198d8ef8f9fe7 100644 (file)
@@ -27,7 +27,7 @@ ENTRY(_start)
 
 SECTIONS
 {
-       . = TEXT_BASE;          /* Location of bootcode in flash */
+       . = CONFIG_SYS_TEXT_BASE;       /* Location of bootcode in flash */
        __text_start = .;
        .text  : { *(.text*); }
 
@@ -94,11 +94,11 @@ SECTIONS
         * The fff0 offset of resetvec is important, however.
         */
        . = 0xfffffe00;
-       .start32 : AT (TEXT_BASE + 0x3fe00) { KEEP(*(.start32)); }
+       .start32 : AT (CONFIG_SYS_TEXT_BASE + 0x3fe00) { KEEP(*(.start32)); }
 
        . = 0xf800;
-       .start16 : AT (TEXT_BASE + 0x3f800) { KEEP(*(.start16)); }
+       .start16 : AT (CONFIG_SYS_TEXT_BASE + 0x3f800) { KEEP(*(.start16)); }
 
        . = 0xfff0;
-       .resetvec : AT (TEXT_BASE + 0x3fff0) { KEEP(*(.resetvec)); }
+       .resetvec : AT (CONFIG_SYS_TEXT_BASE + 0x3fff0) { KEEP(*(.resetvec)); }
 }
index 351095a48a9299872339d6be8c9e8ca231ba8aa4..88565d91da7ba6a1beeca1a1edf5fc66e730defd 100644 (file)
@@ -21,6 +21,7 @@
  * MA 02111-1307 USA
  */
 
+#include <asm-offsets.h>
 #include <ppc_asm.tmpl>
 #include <asm/mmu.h>
 #include <config.h>
index 96f7206b30775d8b5701640d9d39b30bbf5bbc2e..b99a8e9792bfb2e8b4e9835db9a15e27645b0e56 100644 (file)
@@ -19,6 +19,7 @@
  * MA 02111-1307 USA
  */
 
+#include <asm-offsets.h>
 #include <ppc_asm.tmpl>
 #include <asm/mmu.h>
 #include <config.h>
index 38abc70d4aaa5a7366dffc0ff6979eb479069e71..3dc535878df93190c9a41f0f3026b514ebe4972c 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 8aa725523a2942f1abfd5db01ed0a2836d604ed2..7a56fa2ce3de88f64b2437cba7ed0d140b07ef5a 100644 (file)
@@ -27,7 +27,8 @@ include $(TOPDIR)/config.mk
 LIB    = $(obj)lib$(BOARD).a
 
 COBJS-y        += $(BOARD).o
-COBJS-$(CONFIG_DDR_SPD)        += ddr.o
+COBJS-y        += ddr.o
+COBJS-$(CONFIG_P4080DS)        += p4080ds_ddr.o
 COBJS-$(CONFIG_PCI)    += pci.o
 COBJS-y        += law.o
 COBJS-y        += tlb.o
index 48d95d6a63fa3a15c774f5da8ebb0e8e1968ee88..68c63ac027b8844a98bf97071f7233cefb59d7ce 100644 (file)
@@ -29,7 +29,6 @@
 #include <asm/cache.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_law.h>
-#include <asm/fsl_ddr_sdram.h>
 #include <asm/fsl_serdes.h>
 #include <asm/fsl_portals.h>
 #include <asm/fsl_liodn.h>
@@ -196,20 +195,6 @@ int misc_init_r(void)
        return 0;
 }
 
-phys_size_t initdram(int board_type)
-{
-       phys_size_t dram_size;
-
-       puts("Initializing....\n");
-
-       dram_size = fsl_ddr_sdram();
-
-       setup_ddr_tlbs(dram_size / 0x100000);
-
-       puts("    DDR: ");
-       return dram_size;
-}
-
 #ifdef CONFIG_MP
 void board_lmb_reserve(struct lmb *lmb)
 {
index 18adf2f9c5f1a30103dc943b693b2ec4bcecea2a..2ee018868bd60e989cecbbf3c233f0243ff39dd0 100644 (file)
@@ -8,9 +8,103 @@
 
 #include <common.h>
 #include <i2c.h>
-
+#include <hwconfig.h>
+#include <asm/mmu.h>
 #include <asm/fsl_ddr_sdram.h>
 #include <asm/fsl_ddr_dimm_params.h>
+#include <asm/fsl_law.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+extern void fsl_ddr_set_memctl_regs(const fsl_ddr_cfg_regs_t *regs,
+                                  unsigned int ctrl_num);
+
+
+/*
+ * Fixed sdram init -- doesn't use serial presence detect.
+ */
+extern fixed_ddr_parm_t fixed_ddr_parm_0[];
+#if (CONFIG_NUM_DDR_CONTROLLERS == 2)
+extern fixed_ddr_parm_t fixed_ddr_parm_1[];
+#endif
+
+phys_size_t fixed_sdram(void)
+{
+       int i;
+       sys_info_t sysinfo;
+       char buf[32];
+       fsl_ddr_cfg_regs_t ddr_cfg_regs;
+       phys_size_t ddr_size;
+       unsigned int lawbar1_target_id;
+
+       get_sys_info(&sysinfo);
+       printf("Configuring DDR for %s MT/s data rate\n",
+                               strmhz(buf, sysinfo.freqDDRBus));
+
+       for (i = 0; fixed_ddr_parm_0[i].max_freq > 0; i++) {
+               if ((sysinfo.freqDDRBus > fixed_ddr_parm_0[i].min_freq) &&
+                  (sysinfo.freqDDRBus <= fixed_ddr_parm_0[i].max_freq)) {
+                       memcpy(&ddr_cfg_regs,
+                               fixed_ddr_parm_0[i].ddr_settings,
+                               sizeof(ddr_cfg_regs));
+                       break;
+               }
+       }
+
+       if (fixed_ddr_parm_0[i].max_freq == 0)
+               panic("Unsupported DDR data rate %s MT/s data rate\n",
+                       strmhz(buf, sysinfo.freqDDRBus));
+
+       ddr_size = (phys_size_t) CONFIG_SYS_SDRAM_SIZE * 1024 * 1024;
+       fsl_ddr_set_memctl_regs(&ddr_cfg_regs, 0);
+
+#if (CONFIG_NUM_DDR_CONTROLLERS == 2)
+       memcpy(&ddr_cfg_regs,
+               fixed_ddr_parm_1[i].ddr_settings,
+               sizeof(ddr_cfg_regs));
+       fsl_ddr_set_memctl_regs(&ddr_cfg_regs, 1);
+#endif
+
+       /*
+        * setup laws for DDR. If not interleaving, presuming half memory on
+        * DDR1 and the other half on DDR2
+        */
+       if (fixed_ddr_parm_0[i].ddr_settings->cs[0].config & 0x20000000) {
+               if (set_ddr_laws(CONFIG_SYS_DDR_SDRAM_BASE,
+                                ddr_size,
+                                LAW_TRGT_IF_DDR_INTRLV) < 0) {
+                       printf("ERROR setting Local Access Windows for DDR\n");
+                       return 0;
+               }
+       } else {
+#if (CONFIG_NUM_DDR_CONTROLLERS == 2)
+               /* We require both controllers have identical DIMMs */
+               lawbar1_target_id = LAW_TRGT_IF_DDR_1;
+               if (set_ddr_laws(CONFIG_SYS_DDR_SDRAM_BASE,
+                                ddr_size / 2,
+                                lawbar1_target_id) < 0) {
+                       printf("ERROR setting Local Access Windows for DDR\n");
+                       return 0;
+               }
+               lawbar1_target_id = LAW_TRGT_IF_DDR_2;
+               if (set_ddr_laws(CONFIG_SYS_DDR_SDRAM_BASE + ddr_size / 2,
+                                ddr_size / 2,
+                                lawbar1_target_id) < 0) {
+                       printf("ERROR setting Local Access Windows for DDR\n");
+                       return 0;
+               }
+#else
+               lawbar1_target_id = LAW_TRGT_IF_DDR_1;
+               if (set_ddr_laws(CONFIG_SYS_DDR_SDRAM_BASE,
+                                ddr_size,
+                                lawbar1_target_id) < 0) {
+                       printf("ERROR setting Local Access Windows for DDR\n");
+                       return 0;
+               }
+#endif
+       }
+       return ddr_size;
+}
 
 static void get_spd(ddr3_spd_eeprom_t *spd, unsigned char i2c_address)
 {
@@ -190,3 +284,38 @@ void fsl_ddr_board_options(memctl_options_t *popts,
        /* Enable ZQ calibration */
        popts->zq_en = 1;
 }
+
+phys_size_t initdram(int board_type)
+{
+       phys_size_t dram_size;
+       int use_spd = 0;
+
+       puts("Initializing....");
+
+#ifdef CONFIG_DDR_SPD
+       /* if hwconfig is not enabled, or "sdram" is not defined, use spd */
+       if (hwconfig_sub("fsl_ddr", "sdram")) {
+               if (hwconfig_subarg_cmp("fsl_ddr", "sdram", "spd"))
+                       use_spd = 1;
+               else if (hwconfig_subarg_cmp("fsl_ddr", "sdram", "fixed"))
+                       use_spd = 0;
+               else
+                       use_spd = 1;
+       } else
+               use_spd = 1;
+#endif
+
+       if (use_spd) {
+               puts("using SPD\n");
+               dram_size = fsl_ddr_sdram();
+       } else {
+               puts("using fixed parameters\n");
+               dram_size = fixed_sdram();
+       }
+
+       dram_size = setup_ddr_tlbs(dram_size / 0x100000);
+       dram_size *= 0x100000;
+
+       puts("    DDR: ");
+       return dram_size;
+}
diff --git a/board/freescale/corenet_ds/p4080ds_ddr.c b/board/freescale/corenet_ds/p4080ds_ddr.c
new file mode 100644 (file)
index 0000000..4ad89ff
--- /dev/null
@@ -0,0 +1,356 @@
+/*
+ * Copyright 2009-2010 Freescale Semiconductor, Inc.
+ *
+ * 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.
+ */
+
+#include <common.h>
+#include <asm/fsl_ddr_sdram.h>
+
+#define DATARATE_800MHZ                        800000000
+#define DATARATE_900MHZ                        900000000
+#define DATARATE_1000MHZ               1000000000
+#define DATARATE_1200MHZ               1200000000
+#define DATARATE_1300MHZ               1300000000
+
+#define CONFIG_SYS_DDR_TIMING_3_1200   0x01030000
+#define CONFIG_SYS_DDR_TIMING_0_1200   0xCC550104
+#define CONFIG_SYS_DDR_TIMING_1_1200   0x868FAA45
+#define CONFIG_SYS_DDR_TIMING_2_1200   0x0FB8A912
+#define CONFIG_SYS_DDR_MODE_1_1200     0x00441A40
+#define CONFIG_SYS_DDR_MODE_2_1200     0x00100000
+#define CONFIG_SYS_DDR_INTERVAL_1200   0x12480100
+#define CONFIG_SYS_DDR_CLK_CTRL_1200   0x02800000
+
+#define CONFIG_SYS_DDR_TIMING_3_1000   0x00020000
+#define CONFIG_SYS_DDR_TIMING_0_1000   0xCC440104
+#define CONFIG_SYS_DDR_TIMING_1_1000   0x727DF944
+#define CONFIG_SYS_DDR_TIMING_2_1000   0x0FB088CF
+#define CONFIG_SYS_DDR_MODE_1_1000     0x00441830
+#define CONFIG_SYS_DDR_MODE_2_1000     0x00080000
+#define CONFIG_SYS_DDR_INTERVAL_1000   0x0F3C0100
+#define CONFIG_SYS_DDR_CLK_CTRL_1000   0x02800000
+
+#define CONFIG_SYS_DDR_TIMING_3_900    0x00020000
+#define CONFIG_SYS_DDR_TIMING_0_900    0xCC440104
+#define CONFIG_SYS_DDR_TIMING_1_900    0x616ba844
+#define CONFIG_SYS_DDR_TIMING_2_900    0x0fb088ce
+#define CONFIG_SYS_DDR_MODE_1_900      0x00441620
+#define CONFIG_SYS_DDR_MODE_2_900      0x00080000
+#define CONFIG_SYS_DDR_INTERVAL_900    0x0db60100
+#define CONFIG_SYS_DDR_CLK_CTRL_900    0x02800000
+
+#define CONFIG_SYS_DDR_TIMING_3_800    0x00020000
+#define CONFIG_SYS_DDR_TIMING_0_800    0xcc330104
+#define CONFIG_SYS_DDR_TIMING_1_800    0x6f6b4744
+#define CONFIG_SYS_DDR_TIMING_2_800    0x0fa888cc
+#define CONFIG_SYS_DDR_MODE_1_800      0x00441420
+#define CONFIG_SYS_DDR_MODE_2_800      0x00000000
+#define CONFIG_SYS_DDR_INTERVAL_800    0x0c300100
+#define CONFIG_SYS_DDR_CLK_CTRL_800    0x02800000
+
+#define CONFIG_SYS_DDR_CS0_BNDS                0x000000FF
+#define CONFIG_SYS_DDR_CS1_BNDS                0x00000000
+#define CONFIG_SYS_DDR_CS2_BNDS                0x000000FF
+#define CONFIG_SYS_DDR_CS3_BNDS                0x000000FF
+#define CONFIG_SYS_DDR2_CS0_BNDS       0x000000FF
+#define CONFIG_SYS_DDR2_CS1_BNDS       0x00000000
+#define CONFIG_SYS_DDR2_CS2_BNDS       0x000000FF
+#define CONFIG_SYS_DDR2_CS3_BNDS       0x000000FF
+#define CONFIG_SYS_DDR_CS0_CONFIG      0xA0044202
+#define CONFIG_SYS_DDR_CS0_CONFIG_2    0x00000000
+#define CONFIG_SYS_DDR_CS1_CONFIG      0x80004202
+#define CONFIG_SYS_DDR_CS2_CONFIG      0x00000000
+#define CONFIG_SYS_DDR_CS3_CONFIG      0x00000000
+#define CONFIG_SYS_DDR2_CS0_CONFIG     0x80044202
+#define CONFIG_SYS_DDR2_CS1_CONFIG     0x80004202
+#define CONFIG_SYS_DDR2_CS2_CONFIG     0x00000000
+#define CONFIG_SYS_DDR2_CS3_CONFIG     0x00000000
+#define CONFIG_SYS_DDR_INIT_ADDR       0x00000000
+#define CONFIG_SYS_DDR_INIT_EXT_ADDR   0x00000000
+#define CONFIG_SYS_DDR_CS1_CONFIG      0x80004202
+#define CONFIG_SYS_DDR_DATA_INIT       0xdeadbeef
+#define CONFIG_SYS_DDR_TIMING_4                0x00000001
+#define CONFIG_SYS_DDR_TIMING_5                0x02401400
+#define CONFIG_SYS_DDR_MODE_CONTROL    0x00000000
+#define CONFIG_SYS_DDR_ZQ_CNTL         0x89080600
+#define CONFIG_SYS_DDR_WRLVL_CNTL      0x8675F607
+#define CONFIG_SYS_DDR_SDRAM_CFG       0xE7044000
+#define CONFIG_SYS_DDR_SDRAM_CFG2      0x24401031
+#define CONFIG_SYS_DDR_RCW_1           0x00000000
+#define CONFIG_SYS_DDR_RCW_2           0x00000000
+#define CONFIG_MEM_INIT_VALUE          0xdeadbeef
+
+fsl_ddr_cfg_regs_t ddr_cfg_regs_800 = {
+       .cs[0].bnds = CONFIG_SYS_DDR_CS0_BNDS,
+       .cs[1].bnds = CONFIG_SYS_DDR_CS1_BNDS,
+       .cs[2].bnds = CONFIG_SYS_DDR_CS2_BNDS,
+       .cs[3].bnds = CONFIG_SYS_DDR_CS3_BNDS,
+       .cs[0].config = CONFIG_SYS_DDR_CS0_CONFIG,
+       .cs[0].config_2 = CONFIG_SYS_DDR_CS0_CONFIG_2,
+       .cs[1].config = CONFIG_SYS_DDR_CS1_CONFIG,
+       .cs[2].config = CONFIG_SYS_DDR_CS2_CONFIG,
+       .cs[3].config = CONFIG_SYS_DDR_CS3_CONFIG,
+       .timing_cfg_3 = CONFIG_SYS_DDR_TIMING_3_800,
+       .timing_cfg_0 = CONFIG_SYS_DDR_TIMING_0_800,
+       .timing_cfg_1 = CONFIG_SYS_DDR_TIMING_1_800,
+       .timing_cfg_2 = CONFIG_SYS_DDR_TIMING_2_800,
+       .ddr_sdram_cfg = CONFIG_SYS_DDR_SDRAM_CFG,
+       .ddr_sdram_cfg_2 = CONFIG_SYS_DDR_SDRAM_CFG2,
+       .ddr_sdram_mode = CONFIG_SYS_DDR_MODE_1_800,
+       .ddr_sdram_mode_2 = CONFIG_SYS_DDR_MODE_2_800,
+       .ddr_sdram_md_cntl = CONFIG_SYS_DDR_MODE_CONTROL,
+       .ddr_sdram_interval = CONFIG_SYS_DDR_INTERVAL_800,
+       .ddr_data_init = CONFIG_MEM_INIT_VALUE,
+       .ddr_sdram_clk_cntl = CONFIG_SYS_DDR_CLK_CTRL_800,
+       .ddr_init_addr = CONFIG_SYS_DDR_INIT_ADDR,
+       .ddr_init_ext_addr = CONFIG_SYS_DDR_INIT_EXT_ADDR,
+       .timing_cfg_4 = CONFIG_SYS_DDR_TIMING_4,
+       .timing_cfg_5 = CONFIG_SYS_DDR_TIMING_5,
+       .ddr_zq_cntl = CONFIG_SYS_DDR_ZQ_CNTL,
+       .ddr_wrlvl_cntl = CONFIG_SYS_DDR_WRLVL_CNTL,
+       .ddr_sdram_rcw_1 = CONFIG_SYS_DDR_RCW_1,
+       .ddr_sdram_rcw_2 = CONFIG_SYS_DDR_RCW_2
+};
+
+fsl_ddr_cfg_regs_t ddr_cfg_regs_800_2nd = {
+       .cs[0].bnds = CONFIG_SYS_DDR2_CS0_BNDS,
+       .cs[1].bnds = CONFIG_SYS_DDR2_CS1_BNDS,
+       .cs[2].bnds = CONFIG_SYS_DDR2_CS2_BNDS,
+       .cs[3].bnds = CONFIG_SYS_DDR2_CS3_BNDS,
+       .cs[0].config = CONFIG_SYS_DDR2_CS0_CONFIG,
+       .cs[0].config_2 = CONFIG_SYS_DDR_CS0_CONFIG_2,
+       .cs[1].config = CONFIG_SYS_DDR2_CS1_CONFIG,
+       .cs[2].config = CONFIG_SYS_DDR2_CS2_CONFIG,
+       .cs[3].config = CONFIG_SYS_DDR2_CS3_CONFIG,
+       .timing_cfg_3 = CONFIG_SYS_DDR_TIMING_3_800,
+       .timing_cfg_0 = CONFIG_SYS_DDR_TIMING_0_800,
+       .timing_cfg_1 = CONFIG_SYS_DDR_TIMING_1_800,
+       .timing_cfg_2 = CONFIG_SYS_DDR_TIMING_2_800,
+       .ddr_sdram_cfg = CONFIG_SYS_DDR_SDRAM_CFG,
+       .ddr_sdram_cfg_2 = CONFIG_SYS_DDR_SDRAM_CFG2,
+       .ddr_sdram_mode = CONFIG_SYS_DDR_MODE_1_800,
+       .ddr_sdram_mode_2 = CONFIG_SYS_DDR_MODE_2_800,
+       .ddr_sdram_md_cntl = CONFIG_SYS_DDR_MODE_CONTROL,
+       .ddr_sdram_interval = CONFIG_SYS_DDR_INTERVAL_800,
+       .ddr_data_init = CONFIG_MEM_INIT_VALUE,
+       .ddr_sdram_clk_cntl = CONFIG_SYS_DDR_CLK_CTRL_800,
+       .ddr_init_addr = CONFIG_SYS_DDR_INIT_ADDR,
+       .ddr_init_ext_addr = CONFIG_SYS_DDR_INIT_EXT_ADDR,
+       .timing_cfg_4 = CONFIG_SYS_DDR_TIMING_4,
+       .timing_cfg_5 = CONFIG_SYS_DDR_TIMING_5,
+       .ddr_zq_cntl = CONFIG_SYS_DDR_ZQ_CNTL,
+       .ddr_wrlvl_cntl = CONFIG_SYS_DDR_WRLVL_CNTL,
+       .ddr_sdram_rcw_1 = CONFIG_SYS_DDR_RCW_1,
+       .ddr_sdram_rcw_2 = CONFIG_SYS_DDR_RCW_2
+};
+
+fsl_ddr_cfg_regs_t ddr_cfg_regs_900 = {
+       .cs[0].bnds = CONFIG_SYS_DDR_CS0_BNDS,
+       .cs[1].bnds = CONFIG_SYS_DDR_CS1_BNDS,
+       .cs[2].bnds = CONFIG_SYS_DDR_CS2_BNDS,
+       .cs[3].bnds = CONFIG_SYS_DDR_CS3_BNDS,
+       .cs[0].config = CONFIG_SYS_DDR_CS0_CONFIG,
+       .cs[0].config_2 = CONFIG_SYS_DDR_CS0_CONFIG_2,
+       .cs[1].config = CONFIG_SYS_DDR_CS1_CONFIG,
+       .cs[2].config = CONFIG_SYS_DDR_CS2_CONFIG,
+       .cs[3].config = CONFIG_SYS_DDR_CS3_CONFIG,
+       .timing_cfg_3 = CONFIG_SYS_DDR_TIMING_3_900,
+       .timing_cfg_0 = CONFIG_SYS_DDR_TIMING_0_900,
+       .timing_cfg_1 = CONFIG_SYS_DDR_TIMING_1_900,
+       .timing_cfg_2 = CONFIG_SYS_DDR_TIMING_2_900,
+       .ddr_sdram_cfg = CONFIG_SYS_DDR_SDRAM_CFG,
+       .ddr_sdram_cfg_2 = CONFIG_SYS_DDR_SDRAM_CFG2,
+       .ddr_sdram_mode = CONFIG_SYS_DDR_MODE_1_900,
+       .ddr_sdram_mode_2 = CONFIG_SYS_DDR_MODE_2_900,
+       .ddr_sdram_md_cntl = CONFIG_SYS_DDR_MODE_CONTROL,
+       .ddr_sdram_interval = CONFIG_SYS_DDR_INTERVAL_900,
+       .ddr_data_init = CONFIG_MEM_INIT_VALUE,
+       .ddr_sdram_clk_cntl = CONFIG_SYS_DDR_CLK_CTRL_900,
+       .ddr_init_addr = CONFIG_SYS_DDR_INIT_ADDR,
+       .ddr_init_ext_addr = CONFIG_SYS_DDR_INIT_EXT_ADDR,
+       .timing_cfg_4 = CONFIG_SYS_DDR_TIMING_4,
+       .timing_cfg_5 = CONFIG_SYS_DDR_TIMING_5,
+       .ddr_zq_cntl = CONFIG_SYS_DDR_ZQ_CNTL,
+       .ddr_wrlvl_cntl = CONFIG_SYS_DDR_WRLVL_CNTL,
+       .ddr_sdram_rcw_1 = CONFIG_SYS_DDR_RCW_1,
+       .ddr_sdram_rcw_2 = CONFIG_SYS_DDR_RCW_2
+};
+
+fsl_ddr_cfg_regs_t ddr_cfg_regs_900_2nd = {
+       .cs[0].bnds = CONFIG_SYS_DDR2_CS0_BNDS,
+       .cs[1].bnds = CONFIG_SYS_DDR2_CS1_BNDS,
+       .cs[2].bnds = CONFIG_SYS_DDR2_CS2_BNDS,
+       .cs[3].bnds = CONFIG_SYS_DDR2_CS3_BNDS,
+       .cs[0].config = CONFIG_SYS_DDR2_CS0_CONFIG,
+       .cs[0].config_2 = CONFIG_SYS_DDR_CS0_CONFIG_2,
+       .cs[1].config = CONFIG_SYS_DDR2_CS1_CONFIG,
+       .cs[2].config = CONFIG_SYS_DDR2_CS2_CONFIG,
+       .cs[3].config = CONFIG_SYS_DDR2_CS3_CONFIG,
+       .timing_cfg_3 = CONFIG_SYS_DDR_TIMING_3_900,
+       .timing_cfg_0 = CONFIG_SYS_DDR_TIMING_0_900,
+       .timing_cfg_1 = CONFIG_SYS_DDR_TIMING_1_900,
+       .timing_cfg_2 = CONFIG_SYS_DDR_TIMING_2_900,
+       .ddr_sdram_cfg = CONFIG_SYS_DDR_SDRAM_CFG,
+       .ddr_sdram_cfg_2 = CONFIG_SYS_DDR_SDRAM_CFG2,
+       .ddr_sdram_mode = CONFIG_SYS_DDR_MODE_1_900,
+       .ddr_sdram_mode_2 = CONFIG_SYS_DDR_MODE_2_900,
+       .ddr_sdram_md_cntl = CONFIG_SYS_DDR_MODE_CONTROL,
+       .ddr_sdram_interval = CONFIG_SYS_DDR_INTERVAL_900,
+       .ddr_data_init = CONFIG_MEM_INIT_VALUE,
+       .ddr_sdram_clk_cntl = CONFIG_SYS_DDR_CLK_CTRL_900,
+       .ddr_init_addr = CONFIG_SYS_DDR_INIT_ADDR,
+       .ddr_init_ext_addr = CONFIG_SYS_DDR_INIT_EXT_ADDR,
+       .timing_cfg_4 = CONFIG_SYS_DDR_TIMING_4,
+       .timing_cfg_5 = CONFIG_SYS_DDR_TIMING_5,
+       .ddr_zq_cntl = CONFIG_SYS_DDR_ZQ_CNTL,
+       .ddr_wrlvl_cntl = CONFIG_SYS_DDR_WRLVL_CNTL,
+       .ddr_sdram_rcw_1 = CONFIG_SYS_DDR_RCW_1,
+       .ddr_sdram_rcw_2 = CONFIG_SYS_DDR_RCW_2
+};
+
+fsl_ddr_cfg_regs_t ddr_cfg_regs_1000 = {
+       .cs[0].bnds = CONFIG_SYS_DDR_CS0_BNDS,
+       .cs[1].bnds = CONFIG_SYS_DDR_CS1_BNDS,
+       .cs[2].bnds = CONFIG_SYS_DDR_CS2_BNDS,
+       .cs[3].bnds = CONFIG_SYS_DDR_CS3_BNDS,
+       .cs[0].config = CONFIG_SYS_DDR_CS0_CONFIG,
+       .cs[0].config_2 = CONFIG_SYS_DDR_CS0_CONFIG_2,
+       .cs[1].config = CONFIG_SYS_DDR_CS1_CONFIG,
+       .cs[2].config = CONFIG_SYS_DDR_CS2_CONFIG,
+       .cs[3].config = CONFIG_SYS_DDR_CS3_CONFIG,
+       .timing_cfg_3 = CONFIG_SYS_DDR_TIMING_3_1000,
+       .timing_cfg_0 = CONFIG_SYS_DDR_TIMING_0_1000,
+       .timing_cfg_1 = CONFIG_SYS_DDR_TIMING_1_1000,
+       .timing_cfg_2 = CONFIG_SYS_DDR_TIMING_2_1000,
+       .ddr_sdram_cfg = CONFIG_SYS_DDR_SDRAM_CFG,
+       .ddr_sdram_cfg_2 = CONFIG_SYS_DDR_SDRAM_CFG2,
+       .ddr_sdram_mode = CONFIG_SYS_DDR_MODE_1_1000,
+       .ddr_sdram_mode_2 = CONFIG_SYS_DDR_MODE_2_1000,
+       .ddr_sdram_md_cntl = CONFIG_SYS_DDR_MODE_CONTROL,
+       .ddr_sdram_interval = CONFIG_SYS_DDR_INTERVAL_1000,
+       .ddr_data_init = CONFIG_MEM_INIT_VALUE,
+       .ddr_sdram_clk_cntl = CONFIG_SYS_DDR_CLK_CTRL_1000,
+       .ddr_init_addr = CONFIG_SYS_DDR_INIT_ADDR,
+       .ddr_init_ext_addr = CONFIG_SYS_DDR_INIT_EXT_ADDR,
+       .timing_cfg_4 = CONFIG_SYS_DDR_TIMING_4,
+       .timing_cfg_5 = CONFIG_SYS_DDR_TIMING_5,
+       .ddr_zq_cntl = CONFIG_SYS_DDR_ZQ_CNTL,
+       .ddr_wrlvl_cntl = CONFIG_SYS_DDR_WRLVL_CNTL,
+       .ddr_sdram_rcw_1 = CONFIG_SYS_DDR_RCW_1,
+       .ddr_sdram_rcw_2 = CONFIG_SYS_DDR_RCW_2
+};
+
+fsl_ddr_cfg_regs_t ddr_cfg_regs_1000_2nd = {
+       .cs[0].bnds = CONFIG_SYS_DDR2_CS0_BNDS,
+       .cs[1].bnds = CONFIG_SYS_DDR2_CS1_BNDS,
+       .cs[2].bnds = CONFIG_SYS_DDR2_CS2_BNDS,
+       .cs[3].bnds = CONFIG_SYS_DDR2_CS3_BNDS,
+       .cs[0].config = CONFIG_SYS_DDR2_CS0_CONFIG,
+       .cs[0].config_2 = CONFIG_SYS_DDR_CS0_CONFIG_2,
+       .cs[1].config = CONFIG_SYS_DDR2_CS1_CONFIG,
+       .cs[2].config = CONFIG_SYS_DDR2_CS2_CONFIG,
+       .cs[3].config = CONFIG_SYS_DDR2_CS3_CONFIG,
+       .timing_cfg_3 = CONFIG_SYS_DDR_TIMING_3_1000,
+       .timing_cfg_0 = CONFIG_SYS_DDR_TIMING_0_1000,
+       .timing_cfg_1 = CONFIG_SYS_DDR_TIMING_1_1000,
+       .timing_cfg_2 = CONFIG_SYS_DDR_TIMING_2_1000,
+       .ddr_sdram_cfg = CONFIG_SYS_DDR_SDRAM_CFG,
+       .ddr_sdram_cfg_2 = CONFIG_SYS_DDR_SDRAM_CFG2,
+       .ddr_sdram_mode = CONFIG_SYS_DDR_MODE_1_1000,
+       .ddr_sdram_mode_2 = CONFIG_SYS_DDR_MODE_2_1000,
+       .ddr_sdram_md_cntl = CONFIG_SYS_DDR_MODE_CONTROL,
+       .ddr_sdram_interval = CONFIG_SYS_DDR_INTERVAL_1000,
+       .ddr_data_init = CONFIG_MEM_INIT_VALUE,
+       .ddr_sdram_clk_cntl = CONFIG_SYS_DDR_CLK_CTRL_1000,
+       .ddr_init_addr = CONFIG_SYS_DDR_INIT_ADDR,
+       .ddr_init_ext_addr = CONFIG_SYS_DDR_INIT_EXT_ADDR,
+       .timing_cfg_4 = CONFIG_SYS_DDR_TIMING_4,
+       .timing_cfg_5 = CONFIG_SYS_DDR_TIMING_5,
+       .ddr_zq_cntl = CONFIG_SYS_DDR_ZQ_CNTL,
+       .ddr_wrlvl_cntl = CONFIG_SYS_DDR_WRLVL_CNTL,
+       .ddr_sdram_rcw_1 = CONFIG_SYS_DDR_RCW_1,
+       .ddr_sdram_rcw_2 = CONFIG_SYS_DDR_RCW_2
+};
+
+fsl_ddr_cfg_regs_t ddr_cfg_regs_1200 = {
+       .cs[0].bnds = CONFIG_SYS_DDR_CS0_BNDS,
+       .cs[1].bnds = CONFIG_SYS_DDR_CS1_BNDS,
+       .cs[2].bnds = CONFIG_SYS_DDR_CS2_BNDS,
+       .cs[3].bnds = CONFIG_SYS_DDR_CS3_BNDS,
+       .cs[0].config = CONFIG_SYS_DDR_CS0_CONFIG,
+       .cs[0].config_2 = CONFIG_SYS_DDR_CS0_CONFIG_2,
+       .cs[1].config = CONFIG_SYS_DDR_CS1_CONFIG,
+       .cs[2].config = CONFIG_SYS_DDR_CS2_CONFIG,
+       .cs[3].config = CONFIG_SYS_DDR_CS3_CONFIG,
+       .timing_cfg_3 = CONFIG_SYS_DDR_TIMING_3_1200,
+       .timing_cfg_0 = CONFIG_SYS_DDR_TIMING_0_1200,
+       .timing_cfg_1 = CONFIG_SYS_DDR_TIMING_1_1200,
+       .timing_cfg_2 = CONFIG_SYS_DDR_TIMING_2_1200,
+       .ddr_sdram_cfg = CONFIG_SYS_DDR_SDRAM_CFG,
+       .ddr_sdram_cfg_2 = CONFIG_SYS_DDR_SDRAM_CFG2,
+       .ddr_sdram_mode = CONFIG_SYS_DDR_MODE_1_1200,
+       .ddr_sdram_mode_2 = CONFIG_SYS_DDR_MODE_2_1200,
+       .ddr_sdram_md_cntl = CONFIG_SYS_DDR_MODE_CONTROL,
+       .ddr_sdram_interval = CONFIG_SYS_DDR_INTERVAL_1200,
+       .ddr_data_init = CONFIG_MEM_INIT_VALUE,
+       .ddr_sdram_clk_cntl = CONFIG_SYS_DDR_CLK_CTRL_1200,
+       .ddr_init_addr = CONFIG_SYS_DDR_INIT_ADDR,
+       .ddr_init_ext_addr = CONFIG_SYS_DDR_INIT_EXT_ADDR,
+       .timing_cfg_4 = CONFIG_SYS_DDR_TIMING_4,
+       .timing_cfg_5 = CONFIG_SYS_DDR_TIMING_5,
+       .ddr_zq_cntl = CONFIG_SYS_DDR_ZQ_CNTL,
+       .ddr_wrlvl_cntl = CONFIG_SYS_DDR_WRLVL_CNTL,
+       .ddr_sdram_rcw_1 = CONFIG_SYS_DDR_RCW_1,
+       .ddr_sdram_rcw_2 = CONFIG_SYS_DDR_RCW_2
+};
+
+fsl_ddr_cfg_regs_t ddr_cfg_regs_1200_2nd = {
+       .cs[0].bnds = CONFIG_SYS_DDR2_CS0_BNDS,
+       .cs[1].bnds = CONFIG_SYS_DDR2_CS1_BNDS,
+       .cs[2].bnds = CONFIG_SYS_DDR2_CS2_BNDS,
+       .cs[3].bnds = CONFIG_SYS_DDR2_CS3_BNDS,
+       .cs[0].config = CONFIG_SYS_DDR2_CS0_CONFIG,
+       .cs[0].config_2 = CONFIG_SYS_DDR_CS0_CONFIG_2,
+       .cs[1].config = CONFIG_SYS_DDR2_CS1_CONFIG,
+       .cs[2].config = CONFIG_SYS_DDR2_CS2_CONFIG,
+       .cs[3].config = CONFIG_SYS_DDR2_CS3_CONFIG,
+       .timing_cfg_3 = CONFIG_SYS_DDR_TIMING_3_1200,
+       .timing_cfg_0 = CONFIG_SYS_DDR_TIMING_0_1200,
+       .timing_cfg_1 = CONFIG_SYS_DDR_TIMING_1_1200,
+       .timing_cfg_2 = CONFIG_SYS_DDR_TIMING_2_1200,
+       .ddr_sdram_cfg = CONFIG_SYS_DDR_SDRAM_CFG,
+       .ddr_sdram_cfg_2 = CONFIG_SYS_DDR_SDRAM_CFG2,
+       .ddr_sdram_mode = CONFIG_SYS_DDR_MODE_1_1200,
+       .ddr_sdram_mode_2 = CONFIG_SYS_DDR_MODE_2_1200,
+       .ddr_sdram_md_cntl = CONFIG_SYS_DDR_MODE_CONTROL,
+       .ddr_sdram_interval = CONFIG_SYS_DDR_INTERVAL_1200,
+       .ddr_data_init = CONFIG_MEM_INIT_VALUE,
+       .ddr_sdram_clk_cntl = CONFIG_SYS_DDR_CLK_CTRL_1200,
+       .ddr_init_addr = CONFIG_SYS_DDR_INIT_ADDR,
+       .ddr_init_ext_addr = CONFIG_SYS_DDR_INIT_EXT_ADDR,
+       .timing_cfg_4 = CONFIG_SYS_DDR_TIMING_4,
+       .timing_cfg_5 = CONFIG_SYS_DDR_TIMING_5,
+       .ddr_zq_cntl = CONFIG_SYS_DDR_ZQ_CNTL,
+       .ddr_wrlvl_cntl = CONFIG_SYS_DDR_WRLVL_CNTL,
+       .ddr_sdram_rcw_1 = CONFIG_SYS_DDR_RCW_1,
+       .ddr_sdram_rcw_2 = CONFIG_SYS_DDR_RCW_2
+};
+
+fixed_ddr_parm_t fixed_ddr_parm_0[] = {
+       {DATARATE_800MHZ, DATARATE_900MHZ, &ddr_cfg_regs_800},
+       {DATARATE_900MHZ, DATARATE_1000MHZ, &ddr_cfg_regs_900},
+       {DATARATE_1000MHZ, DATARATE_1200MHZ, &ddr_cfg_regs_1000},
+       {DATARATE_1200MHZ, DATARATE_1300MHZ, &ddr_cfg_regs_1200},
+       {0, 0, NULL}
+};
+
+fixed_ddr_parm_t fixed_ddr_parm_1[] = {
+       {DATARATE_800MHZ, DATARATE_900MHZ, &ddr_cfg_regs_800_2nd},
+       {DATARATE_900MHZ, DATARATE_1000MHZ, &ddr_cfg_regs_900_2nd},
+       {DATARATE_1000MHZ, DATARATE_1200MHZ, &ddr_cfg_regs_1000_2nd},
+       {DATARATE_1200MHZ, DATARATE_1300MHZ, &ddr_cfg_regs_1200_2nd},
+       {0, 0, NULL}
+};
index 59ada9ca752af6b89b7367efe98cac7dfa4104aa..0babd2648afce1f0661e9d8c86238a3dfce8e493 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006 Freescale Semiconductor, Inc.
+ * Copyright (C) 2006,2010 Freescale Semiconductor, Inc.
  * Dave Liu <daveliu@freescale.com>
  *
  * See file CREDITS for list of people who contributed to this
@@ -22,6 +22,7 @@
 #include <spd_sdram.h>
 #include <asm/mmu.h>
 #include <asm/io.h>
+#include <asm/fsl_enet.h>
 #if defined(CONFIG_OF_LIBFDT)
 #include <libfdt.h>
 #endif
@@ -396,10 +397,8 @@ void ft_board_setup(void *blob, bd_t *bd)
                                prop = fdt_getprop(blob, path,
                                                   "phy-connection-type", 0);
                                if (prop && (strcmp(prop, "rgmii-id") == 0))
-                                       fdt_setprop(blob, path,
-                                                   "phy-connection-type",
-                                                   "rgmii-rxid",
-                                                   sizeof("rgmii-rxid"));
+                                       fdt_fixup_phy_connection(blob, path,
+                                                               RGMII_RXID);
                        }
 #endif
 #if defined(CONFIG_HAS_ETH1)
@@ -410,10 +409,8 @@ void ft_board_setup(void *blob, bd_t *bd)
                                prop = fdt_getprop(blob, path,
                                                   "phy-connection-type", 0);
                                if (prop && (strcmp(prop, "rgmii-id") == 0))
-                                       fdt_setprop(blob, path,
-                                                   "phy-connection-type",
-                                                   "rgmii-rxid",
-                                                   sizeof("rgmii-rxid"));
+                                       fdt_fixup_phy_connection(blob, path,
+                                                               RGMII_RXID);
                        }
 #endif
                }
index 32a87adb9e8170b6f0079efb906157a747c200f7..51dd692c2e41b93b8e17ce7e3cecacd44c8cbd7b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007 Freescale Semiconductor, Inc.
+ * Copyright (C) 2007,2010 Freescale Semiconductor, Inc.
  * Dave Liu <daveliu@freescale.com>
  *
  * CREDITS: Kim Phillips contribute to LIBFDT code
@@ -15,6 +15,7 @@
 #include <i2c.h>
 #include <asm/io.h>
 #include <asm/fsl_mpc83xx_serdes.h>
+#include <asm/fsl_enet.h>
 #include <spd_sdram.h>
 #include <tsec.h>
 #include <libfdt.h>
@@ -136,7 +137,6 @@ int board_eth_init(bd_t *bd)
 static void __ft_tsec_fixup(void *blob, bd_t *bd, const char *alias,
                            int phy_addr)
 {
-       const char *phy_type = "sgmii";
        const u32 *ph;
        int off;
        int err;
@@ -148,8 +148,8 @@ static void __ft_tsec_fixup(void *blob, bd_t *bd, const char *alias,
                return;
        }
 
-       err = fdt_setprop(blob, off, "phy-connection-type", phy_type,
-                         strlen(phy_type) + 1);
+       err = fdt_fixup_phy_connection(blob, off, SGMII);
+
        if (err) {
                printf("WARNING: could not set phy-connection-type for %s: "
                        "%s.\n", alias, fdt_strerror(err));
index 795e5654e8cd343182922c79769f86e8cf426f21..743e712b849a8a4b2f39a3d2eef1a7a532203d00 100644 (file)
@@ -622,8 +622,8 @@ void ft_board_setup(void *blob, bd_t *bd)
                        break;
                }
 
-               err = fdt_setprop_string(blob, nodeoff, "phy-connection-type",
-                                       "rmii");
+               err = fdt_fixup_phy_connection(blob, nodeoff, RMII);
+
                if (err < 0) {
                        printf("WARNING: could not set phy-connection-type "
                                "%s.\n", fdt_strerror(err));
diff --git a/board/freescale/mpc8610hpcd/u-boot.lds b/board/freescale/mpc8610hpcd/u-boot.lds
deleted file mode 100644 (file)
index 9c98b2a..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright 2007 Freescale Semiconductor, Inc.
- *
- * 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
-{
-
-  /* Read-only sections, merged into text segment: */
-  .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 :
-  {
-    arch/powerpc/cpu/mpc86xx/start.o   (.text)
-    arch/powerpc/cpu/mpc86xx/traps.o (.text)
-    arch/powerpc/cpu/mpc86xx/interrupts.o (.text)
-    arch/powerpc/cpu/mpc86xx/cpu_init.o (.text)
-    arch/powerpc/cpu/mpc86xx/cpu.o (.text)
-    arch/powerpc/cpu/mpc86xx/speed.o (.text)
-    common/dlmalloc.o (.text)
-    lib/crc32.o (.text)
-    arch/powerpc/lib/extable.o (.text)
-    lib/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 fee310a67f68a60cf17b13be22aa2bab3828e68d..092ead6653572023fef815a35b0c0946c1aed6c8 100644 (file)
@@ -142,56 +142,26 @@ int first_free_busno = 0;
 
 void pci_init_board(void)
 {
+       struct fsl_pci_info pci_info[2];
+       int pcie_ep;
+       int num = 0;
+
 #ifdef CONFIG_PCIE1
-{
-       volatile ccsr_fsl_pci_t *pci = (ccsr_fsl_pci_t *) CONFIG_SYS_PCIE1_ADDR;
-       struct pci_controller *hose = &pcie1_hose;
-       struct pci_region *r = hose->regions;
        volatile immap_t *immap = (immap_t *) CONFIG_SYS_CCSRBAR;
        volatile ccsr_gur_t *gur = &immap->im_gur;
-       uint devdisr = gur->devdisr;
+       uint devdisr = in_be32(&gur->devdisr);
        uint io_sel = (gur->pordevsr & MPC8641_PORDEVSR_IO_SEL)
                >> MPC8641_PORDEVSR_IO_SEL_SHIFT;
        int pcie_configured = is_fsl_pci_cfg(LAW_TRGT_IF_PCIE_1, io_sel);
 
-#ifdef DEBUG
-       uint host1_agent = (gur->porbmsr & MPC8641_PORBMSR_HA)
-               >> MPC8641_PORBMSR_HA_SHIFT;
-       uint pex1_agent = (host1_agent == 0) || (host1_agent == 1);
-#endif
        if (pcie_configured && !(devdisr & MPC86xx_DEVDISR_PCIEX1)) {
-               debug("PCI-EXPRESS 1: %s \n", pex1_agent ? "Agent" : "Host");
-               debug("0x%08x=0x%08x ", &pci->pme_msg_det, pci->pme_msg_det);
-               if (pci->pme_msg_det) {
-                       pci->pme_msg_det = 0xffffffff;
-                       debug(" with errors.  Clearing.  Now 0x%08x",
-                             pci->pme_msg_det);
-               }
-               debug("\n");
-
-               /* outbound memory */
-               pci_set_region(r++,
-                              CONFIG_SYS_PCIE1_MEM_BUS,
-                              CONFIG_SYS_PCIE1_MEM_PHYS,
-                              CONFIG_SYS_PCIE1_MEM_SIZE,
-                              PCI_REGION_MEM);
-
-               /* outbound io */
-               pci_set_region(r++,
-                              CONFIG_SYS_PCIE1_IO_BUS,
-                              CONFIG_SYS_PCIE1_IO_PHYS,
-                              CONFIG_SYS_PCIE1_IO_SIZE,
-                              PCI_REGION_IO);
-
-               hose->region_count = r - hose->regions;
-
-               hose->first_busno=first_free_busno;
-
-               fsl_pci_init(hose, (u32)&pci->cfg_addr, (u32)&pci->cfg_data);
-
-               first_free_busno=hose->last_busno+1;
-               printf ("    PCI-EXPRESS 1 on bus %02x - %02x\n",
-                       hose->first_busno,hose->last_busno);
+               SET_STD_PCIE_INFO(pci_info[num], 1);
+               pcie_ep = fsl_setup_hose(&pcie1_hose, pci_info[num].regs);
+               printf("    PCIE1 connected to ULI as %s (base addr %lx)\n",
+                               pcie_ep ? "Endpoint" : "Root Complex",
+                               pci_info[num].regs);
+               first_free_busno = fsl_pci_init_port(&pci_info[num++],
+                                       &pcie1_hose, first_free_busno);
 
                /*
                 * Activate ULI1575 legacy chip by performing a fake
@@ -201,45 +171,22 @@ void pci_init_board(void)
                                       + CONFIG_SYS_PCIE1_MEM_SIZE - 0x1000000)));
 
        } else {
-               puts("PCI-EXPRESS 1: Disabled\n");
+               puts("    PCIE1: disabled\n");
        }
-}
 #else
-       puts("PCI-EXPRESS1: Disabled\n");
+       puts("    PCIE1: disabled\n");
 #endif /* CONFIG_PCIE1 */
 
 #ifdef CONFIG_PCIE2
-{
-       volatile ccsr_fsl_pci_t *pci = (ccsr_fsl_pci_t *) CONFIG_SYS_PCIE2_ADDR;
-       struct pci_controller *hose = &pcie2_hose;
-       struct pci_region *r = hose->regions;
-
-       /* outbound memory */
-       pci_set_region(r++,
-                      CONFIG_SYS_PCIE2_MEM_BUS,
-                      CONFIG_SYS_PCIE2_MEM_PHYS,
-                      CONFIG_SYS_PCIE2_MEM_SIZE,
-                      PCI_REGION_MEM);
-
-       /* outbound io */
-       pci_set_region(r++,
-                      CONFIG_SYS_PCIE2_IO_BUS,
-                      CONFIG_SYS_PCIE2_IO_PHYS,
-                      CONFIG_SYS_PCIE2_IO_SIZE,
-                      PCI_REGION_IO);
-
-       hose->region_count = r - hose->regions;
-
-       hose->first_busno=first_free_busno;
-
-       fsl_pci_init(hose, (u32)&pci->cfg_addr, (u32)&pci->cfg_data);
-
-       first_free_busno=hose->last_busno+1;
-       printf ("    PCI-EXPRESS 2 on bus %02x - %02x\n",
-               hose->first_busno,hose->last_busno);
-}
+       SET_STD_PCIE_INFO(pci_info[num], 2);
+       pcie_ep = fsl_setup_hose(&pcie2_hose, pci_info[num].regs);
+       printf("    PCIE2 connected as %s (base addr %lx)\n",
+                       pcie_ep ? "Endpoint" : "Root Complex",
+                       pci_info[num].regs);
+       first_free_busno = fsl_pci_init_port(&pci_info[num++],
+                               &pcie2_hose, first_free_busno);
 #else
-       puts("PCI-EXPRESS 2: Disabled\n");
+       puts("    PCIE2: disabled\n");
 #endif /* CONFIG_PCIE2 */
 
 }
diff --git a/board/freescale/mpc8641hpcn/u-boot.lds b/board/freescale/mpc8641hpcn/u-boot.lds
deleted file mode 100644 (file)
index 5bf0f2d..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright 2006, 2007 Freescale Semiconductor, Inc.
- *
- * 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
-{
-
-  /* Read-only sections, merged into text segment: */
-  .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      :
-  {
-    arch/powerpc/cpu/mpc86xx/start.o   (.text)
-    arch/powerpc/cpu/mpc86xx/traps.o (.text)
-    arch/powerpc/cpu/mpc86xx/interrupts.o (.text)
-    arch/powerpc/cpu/mpc86xx/cpu_init.o (.text)
-    arch/powerpc/cpu/mpc86xx/cpu.o (.text)
-    arch/powerpc/cpu/mpc86xx/speed.o (.text)
-    common/dlmalloc.o (.text)
-    lib/crc32.o (.text)
-    arch/powerpc/lib/extable.o (.text)
-    lib/zlib.o (.text)
-    drivers/bios_emulator/atibios.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 84386e6c8ff7b05586fc1af59e34f7ee8d48c7be..c8d7d3964e3f368ba41e6faa92189c9fca843e88 100644 (file)
@@ -23,7 +23,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
-#include <asm/arch/mx51_pins.h>
+#include <asm/arch/mx5x_pins.h>
 #include <asm/arch/iomux.h>
 #include <asm/errno.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/gdsys/405ep/405ep.c b/board/gdsys/405ep/405ep.c
new file mode 100644 (file)
index 0000000..d3bd233
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+ * (C) Copyright 2010
+ * Dirk Eibach,  Guntermann & Drunck GmbH, eibach@gdsys.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 <asm/processor.h>
+#include <asm/io.h>
+#include <asm/ppc4xx-gpio.h>
+
+#include "../common/fpga.h"
+
+#define LATCH0_BASE (CONFIG_SYS_LATCH_BASE)
+#define LATCH1_BASE (CONFIG_SYS_LATCH_BASE + 0x100)
+#define LATCH2_BASE (CONFIG_SYS_LATCH_BASE + 0x200)
+
+#define REFLECTION_TESTPATTERN 0xdede
+#define REFLECTION_TESTPATTERN_INV (~REFLECTION_TESTPATTERN & 0xffff)
+
+int board_early_init_f(void)
+{
+       mtdcr(UIC0SR, 0xFFFFFFFF);      /* clear all ints */
+       mtdcr(UIC0ER, 0x00000000);      /* disable all ints */
+       mtdcr(UIC0CR, 0x00000000);      /* set all to be non-critical */
+       mtdcr(UIC0PR, 0xFFFFFF80);      /* set int polarities */
+       mtdcr(UIC0TR, 0x10000000);      /* set int trigger levels */
+       mtdcr(UIC0VCR, 0x00000001);     /* set vect base=0,INT0 highest prio */
+       mtdcr(UIC0SR, 0xFFFFFFFF);      /* clear all ints */
+
+       /*
+        * EBC Configuration Register: set ready timeout to 512 ebc-clks
+        * -> ca. 15 us
+        */
+       mtebc(EBC0_CFG, 0xa8400000);    /* ebc always driven */
+
+       /*
+        * setup io-latches for reset
+        */
+       out_le16((void *)LATCH0_BASE, CONFIG_SYS_LATCH0_RESET);
+       out_le16((void *)LATCH1_BASE, CONFIG_SYS_LATCH1_RESET);
+
+       /*
+        * set "startup-finished"-gpios
+        */
+       gpio_write_bit(21, 0);
+       gpio_write_bit(22, 1);
+
+       /*
+        * wait for fpga-done
+        * fail ungraceful if fpga is not configuring properly
+        */
+       while (!(in_le16((void *)LATCH2_BASE) & 0x0010))
+               ;
+
+       /*
+        * setup io-latches for boot (stop reset)
+        */
+       udelay(10);
+       out_le16((void *)LATCH0_BASE, CONFIG_SYS_LATCH0_BOOT);
+       out_le16((void *)LATCH1_BASE, CONFIG_SYS_LATCH1_BOOT);
+
+       /*
+        * wait for fpga out of reset
+        * fail ungraceful if fpga is not working properly
+        */
+       while (1) {
+               fpga_set_reg(CONFIG_SYS_FPGA_RFL_LOW, REFLECTION_TESTPATTERN);
+               if (fpga_get_reg(CONFIG_SYS_FPGA_RFL_HIGH) ==
+                       REFLECTION_TESTPATTERN_INV)
+                       break;
+       }
+
+       return 0;
+}
diff --git a/board/gdsys/405ep/Makefile b/board/gdsys/405ep/Makefile
new file mode 100644 (file)
index 0000000..13dff52
--- /dev/null
@@ -0,0 +1,54 @@
+#
+# (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 $(TOPDIR)/config.mk
+
+LIB    = $(obj)lib$(BOARD).a
+
+COBJS-$(CONFIG_IO) += io.o
+COBJS-$(CONFIG_IOCON) += iocon.o
+
+COBJS   := $(BOARD).o $(COBJS-y)
+SOBJS   =
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):        $(OBJS) $(SOBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+       rm -f $(SOBJS) $(OBJS)
+
+distclean:     clean
+       rm -f $(LIB) core *.bak $(obj).depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
diff --git a/board/gdsys/405ep/io.c b/board/gdsys/405ep/io.c
new file mode 100644 (file)
index 0000000..80877b6
--- /dev/null
@@ -0,0 +1,181 @@
+/*
+ * (C) Copyright 2010
+ * Dirk Eibach,  Guntermann & Drunck GmbH, eibach@gdsys.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 <asm/processor.h>
+#include <asm/io.h>
+#include <asm/ppc4xx-gpio.h>
+
+#include <miiphy.h>
+
+#include "../common/fpga.h"
+
+#define PHYREG_CONTROL                         0
+#define PHYREG_PAGE_ADDRESS                    22
+#define PHYREG_PG0_COPPER_SPECIFIC_CONTROL_1   16
+#define PHYREG_PG2_COPPER_SPECIFIC_CONTROL_2   26
+
+enum {
+       REG_VERSIONS = 0x0002,
+       REG_FPGA_FEATURES = 0x0004,
+       REG_FPGA_VERSION = 0x0006,
+       REG_QUAD_SERDES_RESET = 0x0012,
+};
+
+enum {
+       UNITTYPE_CCD_SWITCH = 1,
+};
+
+enum {
+       HWVER_100 = 0,
+       HWVER_110 = 1,
+       HWVER_121 = 2,
+       HWVER_122 = 3,
+};
+
+int configure_gbit_phy(unsigned char addr)
+{
+       unsigned short value;
+
+       /* select page 2 */
+       if (miiphy_write(CONFIG_SYS_GBIT_MII_BUSNAME, addr,
+               PHYREG_PAGE_ADDRESS, 0x0002))
+               goto err_out;
+       /* disable SGMII autonegotiation */
+       if (miiphy_write(CONFIG_SYS_GBIT_MII_BUSNAME, addr,
+               PHYREG_PG2_COPPER_SPECIFIC_CONTROL_2, 0x800a))
+               goto err_out;
+       /* select page 0 */
+       if (miiphy_write(CONFIG_SYS_GBIT_MII_BUSNAME, addr,
+               PHYREG_PAGE_ADDRESS, 0x0000))
+               goto err_out;
+       /* switch from powerdown to normal operation */
+       if (miiphy_read(CONFIG_SYS_GBIT_MII_BUSNAME, addr,
+               PHYREG_PG0_COPPER_SPECIFIC_CONTROL_1, &value))
+               goto err_out;
+       if (miiphy_write(CONFIG_SYS_GBIT_MII_BUSNAME, addr,
+               PHYREG_PG0_COPPER_SPECIFIC_CONTROL_1, value & ~0x0004))
+               goto err_out;
+       /* reset phy so settings take effect */
+       if (miiphy_write(CONFIG_SYS_GBIT_MII_BUSNAME, addr,
+               PHYREG_CONTROL, 0x9140))
+               goto err_out;
+
+       return 0;
+
+err_out:
+       printf("Error writing to the PHY addr=%02x\n", addr);
+       return -1;
+}
+
+/*
+ * Check Board Identity:
+ */
+int checkboard(void)
+{
+       char *s = getenv("serial#");
+       u16 versions = fpga_get_reg(REG_VERSIONS);
+       u16 fpga_version = fpga_get_reg(REG_FPGA_VERSION);
+       u16 fpga_features = fpga_get_reg(REG_FPGA_FEATURES);
+       unsigned unit_type;
+       unsigned hardware_version;
+       unsigned feature_channels;
+       unsigned feature_expansion;
+
+       unit_type = (versions & 0xf000) >> 12;
+       hardware_version = versions & 0x000f;
+       feature_channels = fpga_features & 0x007f;
+       feature_expansion = fpga_features & (1<<15);
+
+       printf("Board: ");
+
+       printf("CATCenter Io");
+
+       if (s != NULL) {
+               puts(", serial# ");
+               puts(s);
+       }
+       puts("\n       ");
+
+       switch (unit_type) {
+       case UNITTYPE_CCD_SWITCH:
+               printf("CCD-Switch");
+               break;
+
+       default:
+               printf("UnitType %d(not supported)", unit_type);
+               break;
+       }
+
+       switch (hardware_version) {
+       case HWVER_100:
+               printf(" HW-Ver 1.00\n");
+               break;
+
+       case HWVER_110:
+               printf(" HW-Ver 1.10\n");
+               break;
+
+       case HWVER_121:
+               printf(" HW-Ver 1.21\n");
+               break;
+
+       case HWVER_122:
+               printf(" HW-Ver 1.22\n");
+               break;
+
+       default:
+               printf(" HW-Ver %d(not supported)\n",
+                      hardware_version);
+               break;
+       }
+
+       printf("       FPGA V %d.%02d, features:",
+               fpga_version / 100, fpga_version % 100);
+
+       printf(" %d channel(s)", feature_channels);
+
+       printf(", expansion %ssupported\n", feature_expansion ? "" : "un");
+
+       return 0;
+}
+
+/*
+ * setup Gbit PHYs
+ */
+int last_stage_init(void)
+{
+       unsigned int k;
+
+       miiphy_register(CONFIG_SYS_GBIT_MII_BUSNAME,
+               bb_miiphy_read, bb_miiphy_write);
+
+       for (k = 0; k < 32; ++k)
+               configure_gbit_phy(k);
+
+       /* take fpga serdes blocks out of reset */
+       fpga_set_reg(REG_QUAD_SERDES_RESET, 0);
+
+       return 0;
+}
diff --git a/board/gdsys/405ep/iocon.c b/board/gdsys/405ep/iocon.c
new file mode 100644 (file)
index 0000000..ecd6cb2
--- /dev/null
@@ -0,0 +1,236 @@
+/*
+ * (C) Copyright 2010
+ * Dirk Eibach,  Guntermann & Drunck GmbH, eibach@gdsys.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 <asm/processor.h>
+#include <asm/io.h>
+#include <asm/ppc4xx-gpio.h>
+
+#include "../common/fpga.h"
+#include "../common/osd.h"
+
+enum {
+       REG_VERSIONS = 0x0002,
+       REG_FPGA_VERSION = 0x0004,
+       REG_FPGA_FEATURES = 0x0006,
+};
+
+enum {
+       UNITTYPE_MAIN_SERVER = 0,
+       UNITTYPE_MAIN_USER = 1,
+       UNITTYPE_VIDEO_SERVER = 2,
+       UNITTYPE_VIDEO_USER = 3,
+};
+
+enum {
+       HWVER_100 = 0,
+       HWVER_104 = 1,
+       HWVER_110 = 2,
+};
+
+enum {
+       COMPRESSION_NONE = 0,
+       COMPRESSION_TYPE1_DELTA,
+};
+
+enum {
+       AUDIO_NONE = 0,
+       AUDIO_TX = 1,
+       AUDIO_RX = 2,
+       AUDIO_RXTX = 3,
+};
+
+enum {
+       SYSCLK_147456 = 0,
+};
+
+enum {
+       RAM_DDR2_32 = 0,
+};
+
+/*
+ * Check Board Identity:
+ */
+int checkboard(void)
+{
+       char *s = getenv("serial#");
+       u16 versions = fpga_get_reg(REG_VERSIONS);
+       u16 fpga_version = fpga_get_reg(REG_FPGA_VERSION);
+       u16 fpga_features = fpga_get_reg(REG_FPGA_FEATURES);
+       unsigned unit_type;
+       unsigned hardware_version;
+       unsigned feature_compression;
+       unsigned feature_osd;
+       unsigned feature_audio;
+       unsigned feature_sysclock;
+       unsigned feature_ramconfig;
+       unsigned feature_carriers;
+       unsigned feature_video_channels;
+
+       unit_type = (versions & 0xf000) >> 12;
+       hardware_version = versions & 0x000f;
+       feature_compression = (fpga_features & 0xe000) >> 13;
+       feature_osd = fpga_features & (1<<11);
+       feature_audio = (fpga_features & 0x0600) >> 9;
+       feature_sysclock = (fpga_features & 0x0180) >> 7;
+       feature_ramconfig = (fpga_features & 0x0060) >> 5;
+       feature_carriers = (fpga_features & 0x000c) >> 2;
+       feature_video_channels = fpga_features & 0x0003;
+
+       printf("Board: ");
+
+       printf("IoCon");
+
+       if (s != NULL) {
+               puts(", serial# ");
+               puts(s);
+       }
+       puts("\n       ");
+
+       switch (unit_type) {
+       case UNITTYPE_MAIN_USER:
+               printf("Mainchannel");
+               break;
+
+       case UNITTYPE_VIDEO_USER:
+               printf("Videochannel");
+               break;
+
+       default:
+               printf("UnitType %d(not supported)", unit_type);
+               break;
+       }
+
+       switch (hardware_version) {
+       case HWVER_100:
+               printf(" HW-Ver 1.00\n");
+               break;
+
+       case HWVER_104:
+               printf(" HW-Ver 1.04\n");
+               break;
+
+       case HWVER_110:
+               printf(" HW-Ver 1.10\n");
+               break;
+
+       default:
+               printf(" HW-Ver %d(not supported)\n",
+                      hardware_version);
+               break;
+       }
+
+       printf("       FPGA V %d.%02d, features:",
+               fpga_version / 100, fpga_version % 100);
+
+
+       switch (feature_compression) {
+       case COMPRESSION_NONE:
+               printf(" no compression");
+               break;
+
+       case COMPRESSION_TYPE1_DELTA:
+               printf(" type1-deltacompression");
+               break;
+
+       default:
+               printf(" compression %d(not supported)", feature_compression);
+               break;
+       }
+
+       printf(", %sosd", feature_osd ? "" : "no ");
+
+       switch (feature_audio) {
+       case AUDIO_NONE:
+               printf(", no audio");
+               break;
+
+       case AUDIO_TX:
+               printf(", audio tx");
+               break;
+
+       case AUDIO_RX:
+               printf(", audio rx");
+               break;
+
+       case AUDIO_RXTX:
+               printf(", audio rx+tx");
+               break;
+
+       default:
+               printf(", audio %d(not supported)", feature_audio);
+               break;
+       }
+
+       puts(",\n       ");
+
+       switch (feature_sysclock) {
+       case SYSCLK_147456:
+               printf("clock 147.456 MHz");
+               break;
+
+       default:
+               printf("clock %d(not supported)", feature_sysclock);
+               break;
+       }
+
+       switch (feature_ramconfig) {
+       case RAM_DDR2_32:
+               printf(", RAM 32 bit DDR2");
+               break;
+
+       default:
+               printf(", RAM %d(not supported)", feature_ramconfig);
+               break;
+       }
+
+       printf(", %d carrier(s)", feature_carriers);
+
+       printf(", %d video channel(s)\n", feature_video_channels);
+
+       return 0;
+}
+
+int last_stage_init(void)
+{
+       return osd_probe();
+}
+
+/*
+ * provide access to fpga gpios (for I2C bitbang)
+ */
+void fpga_gpio_set(int pin)
+{
+       out_le16((void *)(CONFIG_SYS_FPGA_BASE + 0x18), pin);
+}
+
+void fpga_gpio_clear(int pin)
+{
+       out_le16((void *)(CONFIG_SYS_FPGA_BASE + 0x16), pin);
+}
+
+int fpga_gpio_get(int pin)
+{
+       return in_le16((void *)(CONFIG_SYS_FPGA_BASE + 0x14)) & pin;
+}
diff --git a/board/gdsys/common/Makefile b/board/gdsys/common/Makefile
new file mode 100644 (file)
index 0000000..93cde5a
--- /dev/null
@@ -0,0 +1,58 @@
+#
+# (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 $(TOPDIR)/config.mk
+
+ifneq ($(OBJTREE),$(SRCTREE))
+$(shell mkdir -p $(obj)board/$(VENDOR)/common)
+endif
+
+LIB    = $(obj)lib$(VENDOR).a
+
+COBJS-$(CONFIG_IO) += miiphybb.o
+COBJS-$(CONFIG_IOCON) += osd.o
+
+COBJS   := $(COBJS-y)
+SOBJS   =
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):        $(OBJS) $(SOBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+       rm -f $(SOBJS) $(OBJS)
+
+distclean:     clean
+       rm -f $(LIB) core *.bak $(obj).depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
diff --git a/board/gdsys/common/fpga.h b/board/gdsys/common/fpga.h
new file mode 100644 (file)
index 0000000..c1434e7
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * (C) Copyright 2010
+ * Dirk Eibach,  Guntermann & Drunck GmbH, eibach@gdsys.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 _FPGA_H_
+#define _FPGA_H_
+
+static inline u16 fpga_get_reg(unsigned reg)
+{
+       return in_le16((void *)(CONFIG_SYS_FPGA_BASE + reg));
+}
+
+static inline void fpga_set_reg(unsigned reg, u16 val)
+{
+       return out_le16((void *)(CONFIG_SYS_FPGA_BASE + reg), val);
+}
+
+#endif
diff --git a/board/gdsys/common/miiphybb.c b/board/gdsys/common/miiphybb.c
new file mode 100644 (file)
index 0000000..e56e966
--- /dev/null
@@ -0,0 +1,102 @@
+/*
+ * (C) Copyright 2010
+ * Dirk Eibach,  Guntermann & Drunck GmbH, eibach@gdsys.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 <miiphy.h>
+
+#include <asm/io.h>
+
+static int io_bb_mii_init(struct bb_miiphy_bus *bus)
+{
+       return 0;
+}
+
+static int io_bb_mdio_active(struct bb_miiphy_bus *bus)
+{
+       out_be32((void *)GPIO0_TCR,
+               in_be32((void *)GPIO0_TCR) | CONFIG_SYS_MDIO_PIN);
+
+       return 0;
+}
+
+static int io_bb_mdio_tristate(struct bb_miiphy_bus *bus)
+{
+       out_be32((void *)GPIO0_TCR,
+               in_be32((void *)GPIO0_TCR) & ~CONFIG_SYS_MDIO_PIN);
+
+       return 0;
+}
+
+static int io_bb_set_mdio(struct bb_miiphy_bus *bus, int v)
+{
+       if (v)
+               out_be32((void *)GPIO0_OR,
+                       in_be32((void *)GPIO0_OR) | CONFIG_SYS_MDIO_PIN);
+       else
+               out_be32((void *)GPIO0_OR,
+                       in_be32((void *)GPIO0_OR) & ~CONFIG_SYS_MDIO_PIN);
+
+       return 0;
+}
+
+static int io_bb_get_mdio(struct bb_miiphy_bus *bus, int *v)
+{
+       *v = ((in_be32((void *)GPIO0_IR) & CONFIG_SYS_MDIO_PIN) != 0);
+
+       return 0;
+}
+
+static int io_bb_set_mdc(struct bb_miiphy_bus *bus, int v)
+{
+       if (v)
+               out_be32((void *)GPIO0_OR,
+                       in_be32((void *)GPIO0_OR) | CONFIG_SYS_MDC_PIN);
+       else
+               out_be32((void *)GPIO0_OR,
+                       in_be32((void *)GPIO0_OR) & ~CONFIG_SYS_MDC_PIN);
+
+       return 0;
+}
+
+static int io_bb_delay(struct bb_miiphy_bus *bus)
+{
+       udelay(1);
+
+       return 0;
+}
+
+struct bb_miiphy_bus bb_miiphy_buses[] = {
+       {
+               .name = CONFIG_SYS_GBIT_MII_BUSNAME,
+               .init = io_bb_mii_init,
+               .mdio_active = io_bb_mdio_active,
+               .mdio_tristate = io_bb_mdio_tristate,
+               .set_mdio = io_bb_set_mdio,
+               .get_mdio = io_bb_get_mdio,
+               .set_mdc = io_bb_set_mdc,
+               .delay = io_bb_delay,
+       }
+};
+
+int bb_miiphy_buses_num = sizeof(bb_miiphy_buses) /
+                         sizeof(bb_miiphy_buses[0]);
diff --git a/board/gdsys/common/osd.c b/board/gdsys/common/osd.c
new file mode 100644 (file)
index 0000000..05800ff
--- /dev/null
@@ -0,0 +1,247 @@
+/*
+ * (C) Copyright 2010
+ * Dirk Eibach,  Guntermann & Drunck GmbH, eibach@gdsys.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 <i2c.h>
+#include <asm/io.h>
+
+#include "fpga.h"
+
+#define CH7301_I2C_ADDR 0x75
+
+#define PIXCLK_640_480_60 25180000
+
+#define BASE_WIDTH 32
+#define BASE_HEIGHT 16
+#define BUFSIZE (BASE_WIDTH * BASE_HEIGHT)
+
+enum {
+       REG_CONTROL = 0x0010,
+       REG_MPC3W_CONTROL = 0x001a,
+       REG_VIDEOCONTROL = 0x0042,
+       REG_OSDVERSION = 0x0100,
+       REG_OSDFEATURES = 0x0102,
+       REG_OSDCONTROL = 0x0104,
+       REG_XY_SIZE = 0x0106,
+       REG_VIDEOMEM = 0x0800,
+};
+
+enum {
+       CH7301_CM = 0x1c,               /* Clock Mode Register */
+       CH7301_IC = 0x1d,               /* Input Clock Register */
+       CH7301_GPIO = 0x1e,             /* GPIO Control Register */
+       CH7301_IDF = 0x1f,              /* Input Data Format Register */
+       CH7301_CD = 0x20,               /* Connection Detect Register */
+       CH7301_DC = 0x21,               /* DAC Control Register */
+       CH7301_HPD = 0x23,              /* Hot Plug Detection Register */
+       CH7301_TCTL = 0x31,             /* DVI Control Input Register */
+       CH7301_TPCP = 0x33,             /* DVI PLL Charge Pump Ctrl Register */
+       CH7301_TPD = 0x34,              /* DVI PLL Divide Register */
+       CH7301_TPVT = 0x35,             /* DVI PLL Supply Control Register */
+       CH7301_TPF = 0x36,              /* DVI PLL Filter Register */
+       CH7301_TCT = 0x37,              /* DVI Clock Test Register */
+       CH7301_TSTP = 0x48,             /* Test Pattern Register */
+       CH7301_PM = 0x49,               /* Power Management register */
+       CH7301_VID = 0x4a,              /* Version ID Register */
+       CH7301_DID = 0x4b,              /* Device ID Register */
+       CH7301_DSP = 0x56,              /* DVI Sync polarity Register */
+};
+
+static void mpc92469ac_calc_parameters(unsigned int fout,
+       unsigned int *post_div, unsigned int *feedback_div)
+{
+       unsigned int n = *post_div;
+       unsigned int m = *feedback_div;
+       unsigned int a;
+       unsigned int b = 14745600 / 16;
+
+       if (fout < 50169600)
+               n = 8;
+       else if (fout < 100339199)
+               n = 4;
+       else if (fout < 200678399)
+               n = 2;
+       else
+               n = 1;
+
+       a = fout * n + (b / 2); /* add b/2 for proper rounding */
+
+       m = a / b;
+
+       *post_div = n;
+       *feedback_div = m;
+}
+
+static void mpc92469ac_set(unsigned int fout)
+{
+       unsigned int n;
+       unsigned int m;
+       unsigned int bitval = 0;
+       mpc92469ac_calc_parameters(fout, &n, &m);
+
+       switch (n) {
+       case 1:
+               bitval = 0x00;
+               break;
+       case 2:
+               bitval = 0x01;
+               break;
+       case 4:
+               bitval = 0x02;
+               break;
+       case 8:
+               bitval = 0x03;
+               break;
+       }
+
+       fpga_set_reg(REG_MPC3W_CONTROL, (bitval << 9) | m);
+}
+
+static int osd_write_videomem(unsigned offset, u16 *data, size_t charcount)
+{
+       unsigned int k;
+
+       for (k = 0; k < charcount; ++k) {
+               if (offset + k >= BUFSIZE)
+                       return -1;
+               fpga_set_reg(REG_VIDEOMEM + 2 * (offset + k), data[k]);
+       }
+
+       return charcount;
+}
+
+static int osd_print(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+       unsigned x;
+       unsigned y;
+       unsigned charcount;
+       unsigned len;
+       u8 color;
+       unsigned int k;
+       u16 buf[BUFSIZE];
+       char *text;
+
+       if (argc < 5) {
+               cmd_usage(cmdtp);
+               return 1;
+       }
+
+       x = simple_strtoul(argv[1], NULL, 16);
+       y = simple_strtoul(argv[2], NULL, 16);
+       color = simple_strtoul(argv[3], NULL, 16);
+       text = argv[4];
+       charcount = strlen(text);
+       len = (charcount > BUFSIZE) ? BUFSIZE : charcount;
+
+       for (k = 0; k < len; ++k)
+               buf[k] = (text[k] << 8) | color;
+
+       return osd_write_videomem(y * BASE_WIDTH + x, buf, len);
+}
+
+int osd_probe(void)
+{
+       u8 value;
+       u16 version = fpga_get_reg(REG_OSDVERSION);
+       u16 features = fpga_get_reg(REG_OSDFEATURES);
+       unsigned width;
+       unsigned height;
+
+       width = ((features & 0x3f00) >> 8) + 1;
+       height = (features & 0x001f) + 1;
+
+       printf("OSD:   Digital-OSD version %01d.%02d, %d" "x%d characters\n",
+               version/100, version%100, width, height);
+
+       value = i2c_reg_read(CH7301_I2C_ADDR, CH7301_DID);
+       if (value != 0x17) {
+               printf("       Probing CH7301 failed, DID %02x\n", value);
+               return -1;
+       }
+       i2c_reg_write(CH7301_I2C_ADDR, CH7301_TPCP, 0x08);
+       i2c_reg_write(CH7301_I2C_ADDR, CH7301_TPD, 0x16);
+       i2c_reg_write(CH7301_I2C_ADDR, CH7301_TPF, 0x60);
+       i2c_reg_write(CH7301_I2C_ADDR, CH7301_DC, 0x09);
+       i2c_reg_write(CH7301_I2C_ADDR, CH7301_PM, 0xc0);
+
+       mpc92469ac_set(PIXCLK_640_480_60);
+       fpga_set_reg(REG_VIDEOCONTROL, 0x0002);
+       fpga_set_reg(REG_OSDCONTROL, 0x0049);
+
+       fpga_set_reg(REG_XY_SIZE, ((32 - 1) << 8) | (16 - 1));
+
+       return 0;
+}
+
+int osd_write(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+       unsigned x;
+       unsigned y;
+       unsigned k;
+       u16 buffer[BASE_WIDTH];
+       char *rp;
+       u16 *wp = buffer;
+       unsigned count = (argc > 4) ?  simple_strtoul(argv[4], NULL, 16) : 1;
+
+       if ((argc < 4) || (strlen(argv[3]) % 4)) {
+               cmd_usage(cmdtp);
+               return 1;
+       }
+
+       x = simple_strtoul(argv[1], NULL, 16);
+       y = simple_strtoul(argv[2], NULL, 16);
+       rp = argv[3];
+
+
+       while (*rp) {
+               char substr[5];
+
+               memcpy(substr, rp, 4);
+               substr[4] = 0;
+               *wp = simple_strtoul(substr, NULL, 16);
+
+               rp += 4;
+               wp++;
+               if (wp - buffer > BASE_WIDTH)
+                       break;
+       }
+
+       for (k = 0; k < count; ++k) {
+               unsigned offset = y * BASE_WIDTH + x + k * (wp - buffer);
+               osd_write_videomem(offset, buffer, wp - buffer);
+       }
+
+       return 0;
+}
+
+U_BOOT_CMD(
+       osdw, 5, 0, osd_write,
+       "write 16-bit hex encoded buffer to osd memory",
+       "pos_x pos_y buffer count\n"
+);
+
+U_BOOT_CMD(
+       osdp, 5, 0, osd_print,
+       "write ASCII buffer to osd memory",
+       "pos_x pos_y color text\n"
+);
diff --git a/board/gdsys/common/osd.h b/board/gdsys/common/osd.h
new file mode 100644 (file)
index 0000000..4431cbc
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * (C) Copyright 2010
+ * Dirk Eibach,  Guntermann & Drunck GmbH, eibach@gdsys.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 _OSD_H_
+#define _OSD_H_
+
+int osd_probe(void);
+
+#endif
index ba750cb538b13ee7722628a9531df1cbcbcf4610..4a40e4b0bb7dff79db849b01e239381a12e3a12c 100644 (file)
@@ -24,6 +24,7 @@
 * MA 02111-1307 USA
 */
 
+#include <asm-offsets.h>
 #include <ppc_asm.tmpl>
 #include <config.h>
 
index 5a819c2a30ccbb5c7b1ea579475842a38c9042fb..7513f1d3c3243a93f9767135e87c420f9b0ed91e 100644 (file)
@@ -25,6 +25,7 @@
  * MA 02111-1307 USA
  */
 
+#include <asm-offsets.h>
 #include <ppc_asm.tmpl>
 #include <config.h>
 #include <asm/mmu.h>
index 531dcdf4ae22e5dd00c2c6f7718df775394927ea..61b4b55534226357e1f74120baf3f484c2feeec0 100644 (file)
@@ -25,6 +25,7 @@
 #define __ASSEMBLY__   1
 #endif
 
+#include <asm-offsets.h>
 #include <config.h>
 #include <asm/processor.h>
 #include <mpc824x.h>
index 47b2195557920adc8f7a879bef8fb9f5fdebb75d..a9e4448f4d0d157cca8a1c479e3e2859a148648e 100644 (file)
@@ -80,7 +80,7 @@ void lite5200b_wakeup(void)
        /* jump back to linux kernel code */
        linux_wakeup = SAVED_ADDR;
        printf("\n\nLooks like we just woke, transferring control to 0x%08lx\n",
-                       linux_wakeup);
+                       (unsigned long)linux_wakeup);
        linux_wakeup();
 }
 #else
index afae217242cd32b590ff385807dd7c1961cbc4e6..ba248c03e73536580b225d59b087254e27851744 100644 (file)
@@ -26,17 +26,15 @@ include $(TOPDIR)/config.mk
 LIB    = $(obj)lib$(BOARD).a
 
 COBJS  := innokom.o flash.o
-SOBJS  := lowlevel_init.o
 
-SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+SRCS   := $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
-SOBJS  := $(addprefix $(obj),$(SOBJS))
 
-$(LIB):        $(obj).depend $(OBJS) $(SOBJS)
-       $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+$(LIB):        $(obj).depend $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS)
 
 clean:
-       rm -f $(SOBJS) $(OBJS)
+       rm -f $(OBJS)
 
 distclean:     clean
        rm -f $(LIB) core *.bak $(obj).depend
diff --git a/board/innokom/config.mk b/board/innokom/config.mk
deleted file mode 100644 (file)
index 9e46555..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#
-# Linux-Kernel is expected to be at c000'8000, entry c000'8000
-#
-# we load ourself to c170'0000, the upper 1 MB of second bank
-#
-# download areas is c800'0000
-#
-
-# This is the address where U-Boot lives in flash:
-#CONFIG_SYS_TEXT_BASE = 0
-
-# FIXME: armboot does only work correctly when being compiled
-# for the addresses _after_ relocation to RAM!! Otherwhise the
-# .bss segment is assumed in flash...
-CONFIG_SYS_TEXT_BASE = 0xa1fe0000
index 3412f10d3fd9b95e18f57105e45b658530c9dafe..e658c3529a8f5690c907fa35dbbecb291e040e47 100644 (file)
@@ -27,6 +27,7 @@
 #include <netdev.h>
 #include <asm/arch/pxa-regs.h>
 #include <asm/mach-types.h>
+#include <asm/io.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -48,20 +49,21 @@ int i2c_init_board(void)
 
        /* disable I2C controller first, otherwhise it thinks we want to    */
        /* talk to the slave port...                                        */
-       icr = ICR; ICR &= ~(ICR_SCLE | ICR_IUE);
+       icr = readl(ICR);
+       writel(readl(ICR) & ~(ICR_SCLE | ICR_IUE), ICR);
 
        /* set gpio pin low _before_ we change direction to output          */
-       GPCR(70) = GPIO_bit(70);
+       writel(GPIO_bit(70), GPCR(70));
 
        /* now toggle between output=low and high-impedance                 */
        for (i = 0; i < 20; i++) {
-               GPDR(70) |= GPIO_bit(70);  /* output */
+               writel(readl(GPDR(70)) | GPIO_bit(70), GPDR(70));  /* output */
                udelay(10);
-               GPDR(70) &= ~GPIO_bit(70); /* input  */
+               writel(readl(GPDR(70)) & ~GPIO_bit(70), GPDR(70)); /* input  */
                udelay(10);
        }
 
-       ICR = icr;
+       writel(icr, ICR);
 
        return 0;
 }
@@ -76,7 +78,7 @@ int misc_init_r(void)
        char *str;
 
        /* determine if the software update key is pressed during startup   */
-       if (GPLR0 & 0x00000800) {
+       if (readl(GPLR0) & 0x00000800) {
                printf("using bootcmd_normal (sw-update button not pressed)\n");
                str = getenv("bootcmd_normal");
        } else {
@@ -98,8 +100,9 @@ int misc_init_r(void)
 
 int board_init (void)
 {
-       /* memory and cpu-speed are setup before relocation */
-       /* so we do _nothing_ here */
+       /* We have RAM, disable cache */
+       dcache_disable();
+       icache_disable();
 
        gd->bd->bi_arch_number = MACH_TYPE_INNOKOM;
        gd->bd->bi_boot_params = 0xa0000100;
@@ -108,22 +111,20 @@ int board_init (void)
        return 0;
 }
 
+extern void pxa_dram_init(void);
+int dram_init(void)
+{
+       pxa_dram_init();
+       gd->ram_size = PHYS_SDRAM_1_SIZE;
+       return 0;
+}
 
-/**
- * dram_init: - setup dynamic RAM
- *
- * @return: 0 in case of success
- */
-
-int dram_init (void)
+void dram_init_banksize(void)
 {
        gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
        gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
-
-       return 0;
 }
 
-
 /**
  * innokom_set_led: - switch LEDs on or off
  *
diff --git a/board/innokom/lowlevel_init.S b/board/innokom/lowlevel_init.S
deleted file mode 100644 (file)
index 55169be..0000000
+++ /dev/null
@@ -1,437 +0,0 @@
-/*
- * Most of this taken from Redboot hal_platform_setup.h with cleanup
- *
- * NOTE: I haven't clean this up considerably, just enough to get it
- * running. See hal_platform_setup.h for the source. See
- * board/cradle/lowlevel_init.S for another PXA250 setup that is
- * much cleaner.
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include <config.h>
-#include <version.h>
-#include <asm/arch/pxa-regs.h>
-
-DRAM_SIZE:  .long   CONFIG_SYS_DRAM_SIZE
-
-/* wait for coprocessor write complete */
-   .macro CPWAIT reg
-   mrc  p15,0,\reg,c2,c0,0
-   mov  \reg,\reg
-   sub  pc,pc,#4
-   .endm
-
-_TEXT_BASE:
-       .word   CONFIG_SYS_TEXT_BASE
-
-
-/*
- *     Memory setup
- */
-
-.globl lowlevel_init
-lowlevel_init:
-
-    mov      r10, lr
-
-       /* Set up GPIO pins first ----------------------------------------- */
-
-       ldr             r0,     =GPSR0
-       ldr             r1,     =CONFIG_SYS_GPSR0_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPSR1
-       ldr             r1,     =CONFIG_SYS_GPSR1_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPSR2
-       ldr             r1,     =CONFIG_SYS_GPSR2_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPCR0
-       ldr             r1,     =CONFIG_SYS_GPCR0_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPCR1
-       ldr             r1,     =CONFIG_SYS_GPCR1_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPCR2
-       ldr             r1,     =CONFIG_SYS_GPCR2_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPDR0
-       ldr             r1,     =CONFIG_SYS_GPDR0_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPDR1
-       ldr             r1,     =CONFIG_SYS_GPDR1_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPDR2
-       ldr             r1,     =CONFIG_SYS_GPDR2_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GAFR0_L
-       ldr             r1,     =CONFIG_SYS_GAFR0_L_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GAFR0_U
-       ldr             r1,     =CONFIG_SYS_GAFR0_U_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GAFR1_L
-       ldr             r1,     =CONFIG_SYS_GAFR1_L_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GAFR1_U
-       ldr             r1,     =CONFIG_SYS_GAFR1_U_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GAFR2_L
-       ldr             r1,     =CONFIG_SYS_GAFR2_L_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GAFR2_U
-       ldr             r1,     =CONFIG_SYS_GAFR2_U_VAL
-       str             r1,   [r0]
-
-       ldr     r0,     =PSSR           /* enable GPIO pins */
-       ldr             r1,     =CONFIG_SYS_PSSR_VAL
-       str             r1,   [r0]
-
-/*     ldr     r3,     =MSC1           /  low - bank 2 Lubbock Registers / SRAM */
-/*     ldr     r2,     =CONFIG_SYS_MSC1_VAL    /  high - bank 3 Ethernet Controller */
-/*     str     r2,     [r3]            /  need to set MSC1 before trying to write to the HEX LEDs */
-/*     ldr     r2,     [r3]            /  need to read it back to make sure the value latches (see MSC section of manual) */
-/* */
-/*     ldr     r1,     =LED_BLANK */
-/*     mov     r0,     #0xFF */
-/*     str     r0,     [r1]            /  turn on hex leds */
-/* */
-/*loop: */
-/* */
-/*   ldr       r0, =0xB0070001 */
-/*   ldr       r1, =_LED */
-/*   str       r0, [r1]                /  hex display */
-
-
-       /* ---------------------------------------------------------------- */
-       /* Enable memory interface                                          */
-       /*                                                                  */
-       /* The sequence below is based on the recommended init steps        */
-       /* detailed in the Intel PXA250 Operating Systems Developers Guide, */
-       /* Chapter 10.                                                      */
-       /* ---------------------------------------------------------------- */
-
-       /* ---------------------------------------------------------------- */
-       /* Step 1: Wait for at least 200 microsedonds to allow internal     */
-       /*         clocks to settle. Only necessary after hard reset...     */
-       /*         FIXME: can be optimized later                            */
-       /* ---------------------------------------------------------------- */
-
-       ldr r3, =OSCR                   /* reset the OS Timer Count to zero */
-       mov r2, #0
-       str r2, [r3]
-       ldr r4, =0x300                  /* really 0x2E1 is about 200usec,   */
-                                       /* so 0x300 should be plenty        */
-1:
-       ldr r2, [r3]
-       cmp r4, r2
-       bgt 1b
-
-mem_init:
-
-       ldr     r1,  =MEMC_BASE         /* get memory controller base addr. */
-
-       /* ---------------------------------------------------------------- */
-       /* Step 2a: Initialize Asynchronous static memory controller        */
-       /* ---------------------------------------------------------------- */
-
-       /* MSC registers: timing, bus width, mem type                       */
-
-       /* MSC0: nCS(0,1)                                                   */
-       ldr     r2,   =CONFIG_SYS_MSC0_VAL
-       str     r2,   [r1, #MSC0_OFFSET]
-       ldr     r2,   [r1, #MSC0_OFFSET]        /* read back to ensure      */
-                                               /* that data latches        */
-       /* MSC1: nCS(2,3)                                                   */
-       ldr     r2,  =CONFIG_SYS_MSC1_VAL
-       str     r2,  [r1, #MSC1_OFFSET]
-       ldr     r2,  [r1, #MSC1_OFFSET]
-
-       /* MSC2: nCS(4,5)                                                   */
-       ldr     r2,  =CONFIG_SYS_MSC2_VAL
-       str     r2,  [r1, #MSC2_OFFSET]
-       ldr     r2,  [r1, #MSC2_OFFSET]
-
-       /* ---------------------------------------------------------------- */
-       /* Step 2b: Initialize Card Interface                               */
-       /* ---------------------------------------------------------------- */
-
-       /* MECR: Memory Expansion Card Register                             */
-       ldr     r2,  =CONFIG_SYS_MECR_VAL
-       str     r2,  [r1, #MECR_OFFSET]
-       ldr     r2,     [r1, #MECR_OFFSET]
-
-       /* MCMEM0: Card Interface slot 0 timing                             */
-       ldr     r2,  =CONFIG_SYS_MCMEM0_VAL
-       str     r2,  [r1, #MCMEM0_OFFSET]
-       ldr     r2,     [r1, #MCMEM0_OFFSET]
-
-       /* MCMEM1: Card Interface slot 1 timing                             */
-       ldr     r2,  =CONFIG_SYS_MCMEM1_VAL
-       str     r2,  [r1, #MCMEM1_OFFSET]
-       ldr     r2,     [r1, #MCMEM1_OFFSET]
-
-       /* MCATT0: Card Interface Attribute Space Timing, slot 0            */
-       ldr     r2,  =CONFIG_SYS_MCATT0_VAL
-       str     r2,  [r1, #MCATT0_OFFSET]
-       ldr     r2,     [r1, #MCATT0_OFFSET]
-
-       /* MCATT1: Card Interface Attribute Space Timing, slot 1            */
-       ldr     r2,  =CONFIG_SYS_MCATT1_VAL
-       str     r2,  [r1, #MCATT1_OFFSET]
-       ldr     r2,     [r1, #MCATT1_OFFSET]
-
-       /* MCIO0: Card Interface I/O Space Timing, slot 0                   */
-       ldr     r2,  =CONFIG_SYS_MCIO0_VAL
-       str     r2,  [r1, #MCIO0_OFFSET]
-       ldr     r2,     [r1, #MCIO0_OFFSET]
-
-       /* MCIO1: Card Interface I/O Space Timing, slot 1                   */
-       ldr     r2,  =CONFIG_SYS_MCIO1_VAL
-       str     r2,  [r1, #MCIO1_OFFSET]
-       ldr     r2,     [r1, #MCIO1_OFFSET]
-
-       /* ---------------------------------------------------------------- */
-       /* Step 2c: Write FLYCNFG  FIXME: what's that???                    */
-       /* ---------------------------------------------------------------- */
-
-       /* test if we run from flash or RAM - RAM/BDI: don't setup RAM      */
-       adr     r3, mem_init            /* r0 <- current position of code   */
-       ldr     r2, =mem_init
-       cmp     r3, r2                  /* skip init if in place            */
-       beq     initirqs
-
-
-       /* ---------------------------------------------------------------- */
-       /* Step 2d: Initialize Timing for Sync Memory (SDCLK0)              */
-       /* ---------------------------------------------------------------- */
-
-       /* Before accessing MDREFR we need a valid DRI field, so we set     */
-       /* this to power on defaults + DRI field.                           */
-
-       ldr     r3,     =CONFIG_SYS_MDREFR_VAL
-       ldr     r2,     =0xFFF
-       and     r3,     r3, r2
-       ldr     r4,     =0x03ca4000
-       orr     r4,     r4,  r3
-
-       str     r4,     [r1, #MDREFR_OFFSET]    /* write back MDREFR        */
-       ldr     r4,     [r1, #MDREFR_OFFSET]
-
-
-       /* ---------------------------------------------------------------- */
-       /* Step 3: Initialize Synchronous Static Memory (Flash/Peripherals) */
-       /* ---------------------------------------------------------------- */
-
-       /* Initialize SXCNFG register. Assert the enable bits               */
-
-       /* Write SXMRS to cause an MRS command to all enabled banks of      */
-       /* synchronous static memory. Note that SXLCR need not be written   */
-       /* at this time.                                                    */
-
-       /* FIXME: we use async mode for now                                 */
-
-
-       /* ---------------------------------------------------------------- */
-       /* Step 4: Initialize SDRAM                                         */
-       /* ---------------------------------------------------------------- */
-
-       /* Step 4a: assert MDREFR:K?RUN and configure                       */
-       /*          MDREFR:K1DB2 and MDREFR:K2DB2 as desired.               */
-
-       ldr     r4,     =CONFIG_SYS_MDREFR_VAL
-       str     r4,     [r1, #MDREFR_OFFSET]    /* write back MDREFR        */
-       ldr     r4,     [r1, #MDREFR_OFFSET]
-
-       /* Step 4b: de-assert MDREFR:SLFRSH.                                */
-
-       bic     r4,     r4, #(MDREFR_SLFRSH)
-
-       str     r4,     [r1, #MDREFR_OFFSET]    /* write back MDREFR        */
-       ldr     r4,     [r1, #MDREFR_OFFSET]
-
-
-       /* Step 4c: assert MDREFR:E1PIN and E0PIO                           */
-
-       orr     r4,     r4,     #(MDREFR_E1PIN|MDREFR_E0PIN)
-
-       str     r4,     [r1, #MDREFR_OFFSET]    /* write back MDREFR        */
-       ldr     r4,     [r1, #MDREFR_OFFSET]
-
-
-       /* Step 4d: write MDCNFG with MDCNFG:DEx deasserted (set to 0), to  */
-       /*          configure but not enable each SDRAM partition pair.     */
-
-       ldr     r4,     =CONFIG_SYS_MDCNFG_VAL
-       bic     r4,     r4,     #(MDCNFG_DE0|MDCNFG_DE1)
-
-       str     r4,     [r1, #MDCNFG_OFFSET]    /* write back MDCNFG        */
-       ldr     r4,     [r1, #MDCNFG_OFFSET]
-
-
-       /* Step 4e: Wait for the clock to the SDRAMs to stabilize,          */
-       /*          100..200 Âµsec.                                          */
-
-       ldr r3, =OSCR                   /* reset the OS Timer Count to zero */
-       mov r2, #0
-       str r2, [r3]
-       ldr r4, =0x300                  /* really 0x2E1 is about 200usec,   */
-                                       /* so 0x300 should be plenty        */
-1:
-       ldr r2, [r3]
-       cmp r4, r2
-       bgt 1b
-
-
-       /* Step 4f: Trigger a number (usually 8) refresh cycles by          */
-       /*          attempting non-burst read or write accesses to disabled */
-       /*          SDRAM, as commonly specified in the power up sequence   */
-       /*          documented in SDRAM data sheets. The address(es) used   */
-       /*          for this purpose must not be cacheable.                 */
-
-       /*          There should 9 writes, since the first write doesn't    */
-       /*          trigger a refresh cycle on PXA250. See Intel PXA250 and */
-       /*          PXA210 Processors Specification Update,                 */
-       /*          Jan 2003, Errata #116, page 30.                         */
-
-
-       ldr     r3,     =CONFIG_SYS_DRAM_BASE
-       str     r2, [r3]
-       str     r2, [r3]
-       str     r2, [r3]
-       str     r2, [r3]
-       str     r2, [r3]
-       str     r2, [r3]
-       str     r2, [r3]
-       str     r2, [r3]
-       str     r2, [r3]
-
-       /* Step 4g: Write MDCNFG with enable bits asserted                  */
-       /*          (MDCNFG:DEx set to 1).                                  */
-
-       ldr     r3, [r1, #MDCNFG_OFFSET]
-       orr     r3,     r3,     #(MDCNFG_DE0|MDCNFG_DE1)
-       str     r3, [r1, #MDCNFG_OFFSET]
-
-       /* Step 4h: Write MDMRS.                                            */
-
-       ldr     r2,  =CONFIG_SYS_MDMRS_VAL
-       str     r2,  [r1, #MDMRS_OFFSET]
-
-
-       /* We are finished with Intel's memory controller initialisation    */
-
-       /* ---------------------------------------------------------------- */
-       /* Disable (mask) all interrupts at interrupt controller            */
-       /* ---------------------------------------------------------------- */
-
-initirqs:
-
-       mov     r1, #0          /* clear int. level register (IRQ, not FIQ) */
-       ldr     r2,  =ICLR
-       str     r1,  [r2]
-
-       ldr     r2,  =ICMR      /* mask all interrupts at the controller    */
-       str     r1,  [r2]
-
-
-       /* ---------------------------------------------------------------- */
-       /* Clock initialisation                                             */
-       /* ---------------------------------------------------------------- */
-
-initclks:
-
-       /* Disable the peripheral clocks, and set the core clock frequency  */
-       /* (hard-coding at 398.12MHz for now).                              */
-
-       /* Turn Off ALL on-chip peripheral clocks for re-configuration      */
-       /* Note: See label 'ENABLECLKS' for the re-enabling                 */
-       ldr     r1,  =CKEN
-       mov     r2,  #0
-       str     r2,  [r1]
-
-
-       /* default value in case no valid rotary switch setting is found    */
-       ldr     r2, =(CCCR_L27|CCCR_M2|CCCR_N10)  /* DEFAULT: {200/200/100} */
-
-       /* ... and write the core clock config register                     */
-       ldr     r1,  =CCCR
-       str     r2,  [r1]
-
-       /* enable the 32Khz oscillator for RTC and PowerManager             */
-/*
-       ldr     r1,  =OSCC
-       mov     r2,  #OSCC_OON
-       str     r2,  [r1]
-*/
-       /* NOTE:  spin here until OSCC.OOK get set, meaning the PLL         */
-       /* has settled.                                                     */
-60:
-       ldr     r2, [r1]
-       ands    r2, r2, #1
-       beq     60b
-
-       /* ---------------------------------------------------------------- */
-       /*                                                                  */
-       /* ---------------------------------------------------------------- */
-
-       /* Save SDRAM size                                                  */
-       ldr     r1, =DRAM_SIZE
-       str     r8, [r1]
-
-       /* Interrupt init: Mask all interrupts                              */
-       ldr     r0, =ICMR                       /* enable no sources        */
-       mov     r1, #0
-       str     r1, [r0]
-
-       /* FIXME */
-
-#ifndef DEBUG
-       /*Disable software and data breakpoints */
-       mov     r0,#0
-       mcr     p15,0,r0,c14,c8,0  /* ibcr0 */
-       mcr     p15,0,r0,c14,c9,0  /* ibcr1 */
-       mcr     p15,0,r0,c14,c4,0  /* dbcon */
-
-       /*Enable all debug functionality */
-       mov     r0,#0x80000000
-       mcr     p14,0,r0,c10,c0,0  /* dcsr */
-#endif
-
-       /* ---------------------------------------------------------------- */
-       /* End lowlevel_init                                                     */
-       /* ---------------------------------------------------------------- */
-
-endlowlevel_init:
-
-    mov     pc, lr
index 35865e06a490f2d7be8098738b0bc8e24529d429..019f93f20075c33df663df569d957bd32ee551ea 100644 (file)
@@ -31,4 +31,3 @@
 
 # For use with external or internal boots.
 TEXT_BASE = 0x80008000
-
diff --git a/board/jornada/Makefile b/board/jornada/Makefile
new file mode 100644 (file)
index 0000000..1b4e192
--- /dev/null
@@ -0,0 +1,53 @@
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+#
+# 2004 (c) MontaVista Software, Inc.
+#
+# 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  := jornada.o
+SOBJS  := setup.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/jornada/jornada.c b/board/jornada/jornada.c
new file mode 100644 (file)
index 0000000..fab1068
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * (C) Copyright 2002
+ * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
+ * Marius Groeger <mgroeger@sysgo.de>
+ *
+ * 2004 (c) MontaVista Software, Inc.
+ *
+ * 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 <SA-1100.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/* ------------------------------------------------------------------------- */
+
+int board_init(void)
+{
+       gd->bd->bi_arch_number = MACH_TYPE_JORNADA720;
+       gd->bd->bi_boot_params = 0xc0000100;
+
+
+       /*
+        * Turn on flashing.
+        * Would be nice to have some protection but
+        * that would have to be implemented in the
+        * flash init function, which isnt possible yet.
+        */
+       PPSR |= (1 << 7);
+       PPDR |= (1 << 7);
+
+       return 0;
+}
+
+int dram_init(void)
+{
+       gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
+       gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
+       gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
+       gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
+
+       return (0);
+}
diff --git a/board/jornada/setup.S b/board/jornada/setup.S
new file mode 100644 (file)
index 0000000..885e02f
--- /dev/null
@@ -0,0 +1,210 @@
+/*
+ * Memory Setup stuff - taken from blob memsetup.S
+ *
+ * Copyright (C) 1999 2000 2001 Erik Mouw (J.A.K.Mouw@its.tudelft.nl) and
+ *                    Jan-Derk Bakker (J.D.Bakker@its.tudelft.nl)
+ * 2004 (c) MontaVista Software, Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+
+#include "config.h"
+#include "version.h"
+
+
+/*-----------------------------------------------------------------------
+ * Board defines:
+ */
+
+#define MDCNFG         0x00
+#define MDCAS00                0x04
+#define MDCAS01                0x08
+#define MDCAS02                0x0C
+#define MSC0           0x10
+#define MSC1           0x14
+#define MECR           0x18
+#define MDREFR         0x1C
+#define MDCAS20                0x20
+#define MDCAS21                0x24
+#define MDCAS22                0x28
+#define MSC2           0x2C
+#define SMCNFG         0x30
+
+#define GPDR   0x04
+#define GPSR   0x08
+#define GPCR   0x0C
+#define GAFR   0x1C
+
+#define PPDR   0x00
+#define PPSR   0x04
+#define PPAR   0x08
+
+#define MDREFR_TRASR(n_) (n_ & (0x0000000f))
+#define MDREFR_DRI(n_)   ((n_ & (0x00000fff)) << 4)
+#define MDREFR_K0DB2 (1 << 18)
+#define MDREFR_K1DB2 (1 << 22)
+#define MDREFR_K2DB2 (1 << 26)
+
+#define MDREFR_K0RUN (1 << 17)
+#define MDREFR_K1RUN (1 << 21)
+#define MDREFR_K2RUN (1 << 25)
+
+#define MDREFR_SLFRSH (1 << 31)
+#define MDREFR_E1PIN  (1 << 20)
+
+#define PSSR    0x04
+#define PSSR_DH 0x00000008
+#define POSR    0x08
+#define RCSR    0x04
+
+/*-----------------------------------------------------------------------
+ * Setup parameters for the board:
+ */
+MEM_BASE:      .long   0xa0000000
+MEM_START:     .long   0xc0000000
+PWR_BASE:      .word   0x90020000
+RST_BASE:      .long   0x90030000
+PPC_BASE:      .long   0x90060000
+GPIO_BASE:     .long   0x90040000
+IC_BASE:       .word   0x90050000
+
+cpuspeed:      .word   0xa0
+/* calculated from old blob bootloader */
+mdcnfg:        .long   0x00037267      /* mdcnfg  0x00037267 */
+mdcas00:       .long   0x5555557f      /* mdcas00 0x5555557f */
+mdcas01:       .long   0x55555555      /* mdcas01 0x55555555 */
+mdcas02:       .long   0x55555555      /* mdcas02 0x55555555 */
+msc0:  .long   0xfff04f78              /* msc0    0xfff04f78 */
+msc1:  .long   0xfff8fff0              /* msc1    0xfff8fff0 */
+mecr:  .long   0x98c698c6      /* mecr    0x98c698c6 */
+mdrefr:        .long   0x067600c7      /* mdrefr  0x04340327 */
+mdcas20:       .long   0xd1284142      /* mdcas20 0xd1284142 */
+mdcas21:       .long   0x72249529      /* mdcas21 0x72249529 */
+mdcas22:       .long   0x78414351      /* mdcas22 0x78414351 */
+msc2:  .long   0x201d2959              /* msc2    0x201d2959 */
+smcnfg:        .long   0x00000000      /* smcnfg  0x00000000 */
+
+pin_set_out:   .long   0x37ff70
+pin_set_dir:   .long   0x11480
+
+gpdr_set:      .long   0x0B3A0900
+gpsr_set:      .long   0x02100800
+gpcr_set:      .long   0x092A0100
+gafr_set:      .long   0x08600000
+
+.globl lowlevel_init
+lowlevel_init:
+
+       /* set output and direction of pins */
+       ldr r0, PPC_BASE
+       ldr r1, pin_set_out
+       str r1, [r0, #PPSR]
+       ldr r1, pin_set_dir
+       str r1, [r0, #PPDR]
+
+       /* Setting up the memory and stuff */
+       /***********************************/
+
+       ldr     r0, MEM_BASE
+
+       ldr     r1, mdcnfg
+       str     r1, [r0, #MDCNFG]
+       ldr     r1, mdcas00
+       str     r1, [r0, #MDCAS00]
+       ldr     r1, mdcas01
+       str     r1, [r0, #MDCAS01]
+       ldr     r1, mdcas02
+       str     r1, [r0, #MDCAS02]
+       ldr     r1, mdcas20
+       str     r1, [r0, #MDCAS20]
+       ldr     r1, mdcas21
+       str     r1, [r0, #MDCAS21]
+       ldr     r1, mdcas22
+       str     r1, [r0, #MDCAS22]
+
+       /* clear kxDB2 */
+       ldr     r2, [r0, #MDREFR]
+       bic     r2, r2, #MDREFR_K0DB2
+       bic     r2, r2, #MDREFR_K1DB2
+       bic     r2, r2, #MDREFR_K2DB2
+       str     r2, [r0, #MDREFR]
+
+       ldr     r2, [r0, #MDREFR]
+       orr r2, r2, #MDREFR_TRASR(7)
+
+       mov r4, #0x2000
+       spin:   subs    r4, r4, #1
+       bne     spin
+
+       ldr     r1, PWR_BASE
+       mov     r2, #PSSR_DH
+       str     r2, [r1, #PSSR]
+
+       ldr     r2, [r0, #MDREFR]
+       bic     r2, r2, #MDREFR_K0DB2
+       bic     r2, r2, #MDREFR_K1DB2
+       bic     r2, r2, #MDREFR_K2DB2
+       str     r2, [r0, #MDREFR]
+
+       ldr     r2, [r0, #MDREFR]
+       orr     r2, r2, #MDREFR_TRASR(7)
+       orr     r2, r2, #MDREFR_DRI(12)
+       orr     r2, r2, #MDREFR_K0DB2
+       orr     r2, r2, #MDREFR_K1DB2
+       orr     r2, r2, #MDREFR_K2DB2
+       str     r2, [r0, #MDREFR]
+
+       ldr     r2, [r0, #MDREFR]
+       orr     r2, r2, #MDREFR_K0RUN
+       orr     r2, r2, #MDREFR_K1RUN
+       orr     r2, r2, #MDREFR_K2RUN
+       str     r2, [r0, #MDREFR]
+
+       ldr     r2, [r0, #MDREFR]
+       bic     r2, r2, #MDREFR_SLFRSH
+       str     r2, [r0, #MDREFR]
+
+       ldr     r2, [r0, #MDREFR]
+       orr     r2, r2, #MDREFR_E1PIN
+       str     r2, [r0, #MDREFR]
+
+       ldr     r2, MEM_START
+.rept  8
+       ldr     r3, [r2]
+.endr
+
+       ldr     r1, msc0
+       str     r1, [r0, #MSC0]
+       ldr     r1, msc1
+       str     r1, [r0, #MSC1]
+       ldr     r1, msc2
+       str     r1, [r0, #MSC2]
+       ldr     r1, smcnfg
+       str     r1, [r0, #SMCNFG]
+       ldr     r1, mdcnfg
+       str     r1, [r0, #MDCNFG]
+       ldr     r1, mecr
+       str     r1, [r0, #MECR]
+
+       /* enable SDRAM */
+       orr     r1, r1, #0x00000001
+       str     r1, [r0, #MDCNFG]
+
+       mov     pc, lr
diff --git a/board/jornada/u-boot.lds b/board/jornada/u-boot.lds
new file mode 100644 (file)
index 0000000..de6101e
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * (C) Copyright 2000-2004
+ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+ * 2004 (c) MontaVista Software, Inc.
+ *
+ * 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_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
+OUTPUT_ARCH(arm)
+ENTRY(_start)
+SECTIONS
+{
+       . = 0x00000000;
+
+       . = ALIGN(4);
+       .text :
+       {
+               cpu/sa1100/start.o      (.text)
+               *(.text)
+       }
+
+       . = ALIGN(4);
+       .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
+
+       . = ALIGN(4);
+       .data : { *(.data) }
+
+       . = ALIGN(4);
+       .got : { *(.got) }
+
+
+       . = .;
+       __u_boot_cmd_start = .;
+       .u_boot_cmd : { *(.u_boot_cmd) }
+       __u_boot_cmd_end = .;
+
+       . = ALIGN(4);
+       __bss_start = .;
+       .bss (NOLOAD) : { *(.bss) . = ALIGN(4); }
+       _end = .;
+}
index 4283c3e344ed09d8b9227b6cda9d248c1a91ce2b..18b288392cf606a65008d693b545428fb9e32b06 100644 (file)
@@ -1,5 +1,5 @@
 ifdef CONFIG_NAND_SPL
 CONFIG_SYS_TEXT_BASE = 0x810c0000
 else
-CONFIG_SYS_TEXT_BASE = 0x81fc0000
+CONFIG_SYS_TEXT_BASE = 0x81200000
 endif
index 7c0b858887397bbe979f060fc3054bb093802167..ed5ed448263c3b9babed1d2ea9387e7cb8edaf6f 100644 (file)
@@ -225,20 +225,6 @@ U_BOOT_CMD(
        );
 #endif
 
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-int dram_init(void)
-{
-       int i;
-
-       for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
-               gd->bd->bi_dram[i].start = kw_sdram_bar(i);
-               gd->bd->bi_dram[i].size = get_ram_size((long *)kw_sdram_bar(i),
-                                                      kw_sdram_bs(i));
-       }
-
-       return 0;
-}
-#else
 int dram_init(void)
 {
        /* dram_init must store complete ramsize in gd->ram_size */
@@ -259,7 +245,6 @@ void dram_init_banksize(void)
                                                       kw_sdram_bs(i));
        }
 }
-#endif
 
 /* Configure and enable MV88E1118 PHY */
 void reset_phy(void)
index bfc6bc15253a982c4ce9ce935a236837044605a3..3741277f60a0f64a1f6a87cdd43c7a1ef713e168 100644 (file)
@@ -19,6 +19,7 @@
  * MA 02111-1307 USA
  */
 
+#include <asm-offsets.h>
 #include <ppc_asm.tmpl>
 #include <asm/mmu.h>
 #include <config.h>
index 7f22154c618d9fd80fa985926849ebbffbf8d0a3..018d9207e0f04bfe1a2f3a89cf282767d4516698 100644 (file)
@@ -1 +1,5 @@
+# with relocation CONFIG_SYS_TEXT_BASE can be anything, and making it 0
+# makes relative and absolute relocation fixups interchangeable.
+#CONFIG_SYS_TEXT_BASE = 0
+
 CONFIG_SYS_TEXT_BASE = 0xc0000000
index 0131edfbe9a651f510cb781d7c6cd3d673f8d4cc..a7887ba44ff4da3bbf323d50d31142ad89ecc567 100644 (file)
@@ -1 +1 @@
-CONFIG_SYS_TEXT_BASE = 0x87f00000
+CONFIG_SYS_TEXT_BASE = 0xa0000000
index 2ac622dbbe33954bc3cf3748a31ebf14b5355631..a07ba0efc7ed5f65c8eb6c1fae3b0e2f74cba489 100644 (file)
@@ -31,12 +31,18 @@ DECLARE_GLOBAL_DATA_PTR;
 
 int dram_init (void)
 {
-       gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-       gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
+       gd->ram_size = PHYS_SDRAM_1_SIZE;
 
        return 0;
 }
 
+void
+dram_init_banksize (void)
+{
+       gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
+       gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
+}
+
 int board_init (void)
 {
        __REG(CSCR_U(0)) = 0x0000cf03; /* CS0: Nor Flash */
index 65923070c41ae2c1c7883431d0d2ecb36efce3f5..2853bca8d7798ef5ec1dd2409d174f0d3abdff2d 100644 (file)
@@ -27,17 +27,15 @@ include $(TOPDIR)/config.mk
 LIB    = $(obj)lib$(BOARD).a
 
 COBJS  := lubbock.o flash.o
-SOBJS  := lowlevel_init.o
 
-SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+SRCS   := $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
-SOBJS  := $(addprefix $(obj),$(SOBJS))
 
-$(LIB):        $(obj).depend $(OBJS) $(SOBJS)
-       $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+$(LIB):        $(obj).depend $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS)
 
 clean:
-       rm -f $(SOBJS) $(OBJS)
+       rm -f $(OBJS)
 
 distclean:     clean
        rm -f $(LIB) core *.bak $(obj).depend
diff --git a/board/lubbock/config.mk b/board/lubbock/config.mk
deleted file mode 100644 (file)
index f30f695..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#CONFIG_SYS_TEXT_BASE = 0xa1700000
-CONFIG_SYS_TEXT_BASE = 0xa3080000
-#CONFIG_SYS_TEXT_BASE = 0
diff --git a/board/lubbock/lowlevel_init.S b/board/lubbock/lowlevel_init.S
deleted file mode 100644 (file)
index db6f69d..0000000
+++ /dev/null
@@ -1,411 +0,0 @@
-/*
- * Most of this taken from Redboot hal_platform_setup.h with cleanup
- *
- * NOTE: I haven't clean this up considerably, just enough to get it
- * running. See hal_platform_setup.h for the source. See
- * board/cradle/lowlevel_init.S for another PXA250 setup that is
- * much cleaner.
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include <config.h>
-#include <version.h>
-#include <asm/arch/pxa-regs.h>
-
-DRAM_SIZE:  .long   CONFIG_SYS_DRAM_SIZE
-
-/* wait for coprocessor write complete */
-   .macro CPWAIT reg
-   mrc  p15,0,\reg,c2,c0,0
-   mov  \reg,\reg
-   sub  pc,pc,#4
-   .endm
-
-
-/*
- *     Memory setup
- */
-
-.globl lowlevel_init
-lowlevel_init:
-
-    mov      r10, lr
-
-       /* Set up GPIO pins first ----------------------------------------- */
-
-       ldr             r0,     =GPSR0
-       ldr             r1,     =CONFIG_SYS_GPSR0_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPSR1
-       ldr             r1,     =CONFIG_SYS_GPSR1_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPSR2
-       ldr             r1,     =CONFIG_SYS_GPSR2_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPCR0
-       ldr             r1,     =CONFIG_SYS_GPCR0_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPCR1
-       ldr             r1,     =CONFIG_SYS_GPCR1_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPCR2
-       ldr             r1,     =CONFIG_SYS_GPCR2_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPDR0
-       ldr             r1,     =CONFIG_SYS_GPDR0_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPDR1
-       ldr             r1,     =CONFIG_SYS_GPDR1_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPDR2
-       ldr             r1,     =CONFIG_SYS_GPDR2_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GAFR0_L
-       ldr             r1,     =CONFIG_SYS_GAFR0_L_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GAFR0_U
-       ldr             r1,     =CONFIG_SYS_GAFR0_U_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GAFR1_L
-       ldr             r1,     =CONFIG_SYS_GAFR1_L_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GAFR1_U
-       ldr             r1,     =CONFIG_SYS_GAFR1_U_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GAFR2_L
-       ldr             r1,     =CONFIG_SYS_GAFR2_L_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GAFR2_U
-       ldr             r1,     =CONFIG_SYS_GAFR2_U_VAL
-       str             r1,   [r0]
-
-       ldr     r0,     =PSSR           /* enable GPIO pins */
-       ldr             r1,     =CONFIG_SYS_PSSR_VAL
-       str             r1,   [r0]
-
-       /* ---------------------------------------------------------------- */
-       /* Enable memory interface                                          */
-       /*                                                                  */
-       /* The sequence below is based on the recommended init steps        */
-       /* detailed in the Intel PXA250 Operating Systems Developers Guide, */
-       /* Chapter 10.                                                      */
-       /* ---------------------------------------------------------------- */
-
-       /* ---------------------------------------------------------------- */
-       /* Step 1: Wait for at least 200 microsedonds to allow internal     */
-       /*         clocks to settle. Only necessary after hard reset...     */
-       /*         FIXME: can be optimized later                            */
-       /* ---------------------------------------------------------------- */
-
-       ldr r3, =OSCR                   /* reset the OS Timer Count to zero */
-       mov r2, #0
-       str r2, [r3]
-       ldr r4, =0x300                  /* really 0x2E1 is about 200usec,   */
-                                       /* so 0x300 should be plenty        */
-1:
-       ldr r2, [r3]
-       cmp r4, r2
-       bgt 1b
-
-mem_init:
-
-       ldr     r1,  =MEMC_BASE         /* get memory controller base addr. */
-
-       /* ---------------------------------------------------------------- */
-       /* Step 2a: Initialize Asynchronous static memory controller        */
-       /* ---------------------------------------------------------------- */
-
-       /* MSC registers: timing, bus width, mem type                       */
-
-       /* MSC0: nCS(0,1)                                                   */
-       ldr     r2,   =CONFIG_SYS_MSC0_VAL
-       str     r2,   [r1, #MSC0_OFFSET]
-       ldr     r2,   [r1, #MSC0_OFFSET]        /* read back to ensure      */
-                                               /* that data latches        */
-       /* MSC1: nCS(2,3)                                                   */
-       ldr     r2,  =CONFIG_SYS_MSC1_VAL
-       str     r2,  [r1, #MSC1_OFFSET]
-       ldr     r2,  [r1, #MSC1_OFFSET]
-
-       /* MSC2: nCS(4,5)                                                   */
-       ldr     r2,  =CONFIG_SYS_MSC2_VAL
-       str     r2,  [r1, #MSC2_OFFSET]
-       ldr     r2,  [r1, #MSC2_OFFSET]
-
-       /* ---------------------------------------------------------------- */
-       /* Step 2b: Initialize Card Interface                               */
-       /* ---------------------------------------------------------------- */
-
-       /* MECR: Memory Expansion Card Register                             */
-       ldr     r2,  =CONFIG_SYS_MECR_VAL
-       str     r2,  [r1, #MECR_OFFSET]
-       ldr     r2,     [r1, #MECR_OFFSET]
-
-       /* MCMEM0: Card Interface slot 0 timing                             */
-       ldr     r2,  =CONFIG_SYS_MCMEM0_VAL
-       str     r2,  [r1, #MCMEM0_OFFSET]
-       ldr     r2,     [r1, #MCMEM0_OFFSET]
-
-       /* MCMEM1: Card Interface slot 1 timing                             */
-       ldr     r2,  =CONFIG_SYS_MCMEM1_VAL
-       str     r2,  [r1, #MCMEM1_OFFSET]
-       ldr     r2,     [r1, #MCMEM1_OFFSET]
-
-       /* MCATT0: Card Interface Attribute Space Timing, slot 0            */
-       ldr     r2,  =CONFIG_SYS_MCATT0_VAL
-       str     r2,  [r1, #MCATT0_OFFSET]
-       ldr     r2,     [r1, #MCATT0_OFFSET]
-
-       /* MCATT1: Card Interface Attribute Space Timing, slot 1            */
-       ldr     r2,  =CONFIG_SYS_MCATT1_VAL
-       str     r2,  [r1, #MCATT1_OFFSET]
-       ldr     r2,     [r1, #MCATT1_OFFSET]
-
-       /* MCIO0: Card Interface I/O Space Timing, slot 0                   */
-       ldr     r2,  =CONFIG_SYS_MCIO0_VAL
-       str     r2,  [r1, #MCIO0_OFFSET]
-       ldr     r2,     [r1, #MCIO0_OFFSET]
-
-       /* MCIO1: Card Interface I/O Space Timing, slot 1                   */
-       ldr     r2,  =CONFIG_SYS_MCIO1_VAL
-       str     r2,  [r1, #MCIO1_OFFSET]
-       ldr     r2,     [r1, #MCIO1_OFFSET]
-
-       /* ---------------------------------------------------------------- */
-       /* Step 2c: Write FLYCNFG  FIXME: what's that???                    */
-       /* ---------------------------------------------------------------- */
-
-
-       /* ---------------------------------------------------------------- */
-       /* Step 2d: Initialize Timing for Sync Memory (SDCLK0)              */
-       /* ---------------------------------------------------------------- */
-
-       /* Before accessing MDREFR we need a valid DRI field, so we set     */
-       /* this to power on defaults + DRI field.                           */
-
-       ldr     r3,     =CONFIG_SYS_MDREFR_VAL
-       ldr     r2,     =0xFFF
-       and     r3,     r3,  r2
-       ldr     r4,     =0x03ca4000
-       orr     r4,     r4,  r3
-       str     r4,     [r1, #MDREFR_OFFSET]    /* write back MDREFR        */
-       ldr     r4,  [r1, #MDREFR_OFFSET]
-
-       /* Note: preserve the mdrefr value in r4                            */
-
-
-       /* ---------------------------------------------------------------- */
-       /* Step 3: Initialize Synchronous Static Memory (Flash/Peripherals) */
-       /* ---------------------------------------------------------------- */
-
-       /* Initialize SXCNFG register. Assert the enable bits               */
-
-       /* Write SXMRS to cause an MRS command to all enabled banks of      */
-       /* synchronous static memory. Note that SXLCR need not be written   */
-       /* at this time.                                                    */
-
-       /* FIXME: we use async mode for now                                 */
-
-
-       /* ---------------------------------------------------------------- */
-       /* Step 4: Initialize SDRAM                                         */
-       /* ---------------------------------------------------------------- */
-
-       /* set MDREFR according to user define with exception of a few bits */
-
-       ldr     r4,     =CONFIG_SYS_MDREFR_VAL
-       orr     r4,     r4,     #(MDREFR_SLFRSH)
-       bic     r4,     r4,     #(MDREFR_E1PIN|MDREFR_E0PIN)
-       str     r4,     [r1, #MDREFR_OFFSET]    /* write back MDREFR        */
-       ldr     r4,  [r1, #MDREFR_OFFSET]
-
-       /* Step 4b: de-assert MDREFR:SLFRSH.                                */
-
-       bic     r4,     r4,     #(MDREFR_SLFRSH)
-       str     r4,     [r1, #MDREFR_OFFSET]    /* write back MDREFR        */
-       ldr     r4,  [r1, #MDREFR_OFFSET]
-
-
-       /* Step 4c: assert MDREFR:E1PIN and E0PIO as desired                */
-
-       ldr     r4,     =CONFIG_SYS_MDREFR_VAL
-       str     r4,     [r1, #MDREFR_OFFSET]    /* write back MDREFR        */
-       ldr     r4,     [r1, #MDREFR_OFFSET]
-
-
-       /* Step 4d: write MDCNFG with MDCNFG:DEx deasserted (set to 0), to  */
-       /*          configure but not enable each SDRAM partition pair.     */
-
-       ldr     r4,     =CONFIG_SYS_MDCNFG_VAL
-       bic     r4,     r4,     #(MDCNFG_DE0|MDCNFG_DE1)
-
-       str     r4,     [r1, #MDCNFG_OFFSET]    /* write back MDCNFG        */
-       ldr     r4,     [r1, #MDCNFG_OFFSET]
-
-
-       /* Step 4e: Wait for the clock to the SDRAMs to stabilize,          */
-       /*          100..200 Âµsec.                                          */
-
-       ldr r3, =OSCR                   /* reset the OS Timer Count to zero */
-       mov r2, #0
-           str r2, [r3]
-       ldr r4, =0x300                  /* really 0x2E1 is about 200usec,   */
-                                       /* so 0x300 should be plenty        */
-1:
-           ldr r2, [r3]
-           cmp r4, r2
-           bgt 1b
-
-
-       /* Step 4f: Trigger a number (usually 8) refresh cycles by          */
-       /*          attempting non-burst read or write accesses to disabled */
-       /*          SDRAM, as commonly specified in the power up sequence   */
-       /*          documented in SDRAM data sheets. The address(es) used   */
-       /*          for this purpose must not be cacheable.                 */
-
-       ldr     r3,     =CONFIG_SYS_DRAM_BASE
-       str     r2,     [r3]
-       str     r2,     [r3]
-       str     r2,     [r3]
-       str     r2,     [r3]
-       str     r2,     [r3]
-       str     r2,     [r3]
-       str     r2,     [r3]
-       str     r2,     [r3]
-
-
-       /* Step 4g: Write MDCNFG with enable bits asserted                  */
-       /*          (MDCNFG:DEx set to 1).                                  */
-
-       ldr     r3,  [r1, #MDCNFG_OFFSET]
-       orr     r3,     r3,     #(MDCNFG_DE0|MDCNFG_DE1)
-       str     r3,  [r1, #MDCNFG_OFFSET]
-
-       /* Step 4h: Write MDMRS.                                            */
-
-       ldr     r2,  =CONFIG_SYS_MDMRS_VAL
-       str     r2,  [r1, #MDMRS_OFFSET]
-
-
-       /* We are finished with Intel's memory controller initialisation    */
-
-
-       /* ---------------------------------------------------------------- */
-       /* Disable (mask) all interrupts at interrupt controller            */
-       /* ---------------------------------------------------------------- */
-
-initirqs:
-
-       mov     r1, #0          /* clear int. level register (IRQ, not FIQ) */
-       ldr     r2,  =ICLR
-       str     r1,  [r2]
-
-       ldr     r2,  =ICMR      /* mask all interrupts at the controller    */
-       str     r1,  [r2]
-
-
-       /* ---------------------------------------------------------------- */
-       /* Clock initialisation                                             */
-       /* ---------------------------------------------------------------- */
-
-initclks:
-
-       /* Disable the peripheral clocks, and set the core clock frequency  */
-       /* (hard-coding at 398.12MHz for now).                              */
-
-       /* Turn Off ALL on-chip peripheral clocks for re-configuration      */
-       /* Note: See label 'ENABLECLKS' for the re-enabling                 */
-       ldr     r1,  =CKEN
-       mov     r2,  #0
-       str     r2,  [r1]
-
-
-       /* default value in case no valid rotary switch setting is found    */
-       ldr     r2, =(CCCR_L27|CCCR_M2|CCCR_N10)  /* DEFAULT: {200/200/100} */
-
-       /* ... and write the core clock config register                     */
-       ldr     r1,  =CCCR
-       str     r2,  [r1]
-
-#ifdef RTC
-       /* enable the 32Khz oscillator for RTC and PowerManager             */
-
-       ldr     r1,  =OSCC
-       mov     r2,  #OSCC_OON
-       str     r2,  [r1]
-
-       /* NOTE:  spin here until OSCC.OOK get set, meaning the PLL         */
-       /* has settled.                                                     */
-60:
-       ldr     r2, [r1]
-       ands    r2, r2, #1
-       beq     60b
-#endif
-
-       /* ---------------------------------------------------------------- */
-       /*                                                                  */
-       /* ---------------------------------------------------------------- */
-
-       /* Save SDRAM size */
-    ldr     r1, =DRAM_SIZE
-        str       r8, [r1]
-
-       /* Interrupt init: Mask all interrupts                              */
-    ldr        r0, =ICMR /* enable no sources */
-       mov r1, #0
-    str r1, [r0]
-
-       /* FIXME */
-
-#define NODEBUG
-#ifdef NODEBUG
-       /*Disable software and data breakpoints */
-       mov     r0,#0
-       mcr     p15,0,r0,c14,c8,0  /* ibcr0 */
-       mcr     p15,0,r0,c14,c9,0  /* ibcr1 */
-       mcr     p15,0,r0,c14,c4,0  /* dbcon */
-
-       /*Enable all debug functionality */
-       mov     r0,#0x80000000
-       mcr     p14,0,r0,c10,c0,0  /* dcsr */
-
-#endif
-
-       /* ---------------------------------------------------------------- */
-       /* End lowlevel_init                                                     */
-       /* ---------------------------------------------------------------- */
-
-endlowlevel_init:
-
-    mov     pc, lr
index d8d6ffbf6174fdfc44318a06fc7fb204cd9568ef..f791c5b904098b38eebb150918353daf6c0199bf 100644 (file)
@@ -36,8 +36,9 @@ DECLARE_GLOBAL_DATA_PTR;
 
 int board_init (void)
 {
-       /* memory and cpu-speed are setup before relocation */
-       /* so we do _nothing_ here */
+       /* We have RAM, disable cache */
+       dcache_disable();
+       icache_disable();
 
        /* arch number of Lubbock-Board */
        gd->bd->bi_arch_number = MACH_TYPE_LUBBOCK;
@@ -55,19 +56,18 @@ int board_late_init(void)
        return 0;
 }
 
+extern void pxa_dram_init(void);
+int dram_init(void)
+{
+       pxa_dram_init();
+       gd->ram_size = PHYS_SDRAM_1_SIZE;
+       return 0;
+}
 
-int dram_init (void)
+void dram_init_banksize(void)
 {
        gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
        gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
-       gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
-       gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
-       gd->bd->bi_dram[2].start = PHYS_SDRAM_3;
-       gd->bd->bi_dram[2].size = PHYS_SDRAM_3_SIZE;
-       gd->bd->bi_dram[3].start = PHYS_SDRAM_4;
-       gd->bd->bi_dram[3].size = PHYS_SDRAM_4_SIZE;
-
-       return 0;
 }
 
 #ifdef CONFIG_CMD_NET
index 8efc8a146e55a2fd65cd100d27608faaec09f709..2014cd7b981125f3ce1baa9ff2c9372ed2c0d9fc 100644 (file)
@@ -23,6 +23,7 @@
  * MA 02111-1307 USA
  */
 
+#include <asm-offsets.h>
 #include <ppc_asm.tmpl>
 #include <config.h>
 #include <asm/mmu.h>
diff --git a/board/nc650/Makefile b/board/nc650/Makefile
deleted file mode 100644 (file)
index e4006e7..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# (C) Copyright 2006 Detlev Zundel, dzu@denx.de
-# (C) Copyright 2004-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 nand.o flash.o
-
-SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS   := $(addprefix $(obj),$(COBJS))
-SOBJS  := $(addprefix $(obj),$(SOBJS))
-
-$(LIB):        $(obj).depend $(OBJS)
-       $(AR) $(ARFLAGS) $@ $(OBJS)
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
diff --git a/board/nc650/flash.c b/board/nc650/flash.c
deleted file mode 100644 (file)
index 8a0eab5..0000000
+++ /dev/null
@@ -1,542 +0,0 @@
-/*
- * (C) Copyright 2004
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * (C) Copyright 2001
- * Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net
- *
- * (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
- */
-
-#undef DEBUG
-
-#include <common.h>
-#include <mpc8xx.h>
-
-DECLARE_GLOBAL_DATA_PTR;
-
-#ifndef CONFIG_SYS_OR_TIMING_FLASH_AT_50MHZ
-#define CONFIG_SYS_OR_TIMING_FLASH_AT_50MHZ (OR_ACS_DIV1  | OR_TRLX | OR_CSNT_SAM | \
-                                     OR_SCY_2_CLK | OR_EHTR | OR_BI)
-#endif
-
-flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS];   /* info for FLASH chips    */
-
-#if defined(CONFIG_ENV_IS_IN_FLASH)
-# ifndef  CONFIG_ENV_ADDR
-#  define CONFIG_ENV_ADDR      (CONFIG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET)
-# endif
-# ifndef  CONFIG_ENV_SIZE
-#  define CONFIG_ENV_SIZE      CONFIG_ENV_SECT_SIZE
-# endif
-# ifndef  CONFIG_ENV_SECT_SIZE
-#  define CONFIG_ENV_SECT_SIZE  CONFIG_ENV_SIZE
-# endif
-#endif
-
-/*-----------------------------------------------------------------------
- * Protection Flags:
- */
-#define FLAG_PROTECT_SET       0x01
-#define FLAG_PROTECT_CLEAR     0x02
-
-/* Board support for 1 or 2 flash devices */
-#undef FLASH_PORT_WIDTH32
-#undef FLASH_PORT_WIDTH16
-#define FLASH_PORT_WIDTH8
-
-#ifdef FLASH_PORT_WIDTH16
-#define FLASH_PORT_WIDTH       ushort
-#define FLASH_PORT_WIDTHV      vu_short
-#elif FLASH_PORT_WIDTH32
-#define FLASH_PORT_WIDTH       ulong
-#define FLASH_PORT_WIDTHV      vu_long
-#else /* FLASH_PORT_WIDTH8 */
-#define FLASH_PORT_WIDTH       uchar
-#define FLASH_PORT_WIDTHV      vu_char
-#endif
-
-#define FPW                    FLASH_PORT_WIDTH
-#define FPWV                   FLASH_PORT_WIDTHV
-
-/*-----------------------------------------------------------------------
- * Functions
- */
-static ulong flash_get_size (FPWV * addr, flash_info_t * info);
-static int write_data (flash_info_t * info, ulong dest, FPW data);
-static void flash_get_offsets (ulong base, flash_info_t * info);
-
-/*-----------------------------------------------------------------------
- */
-
-unsigned long flash_init (void)
-{
-       volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
-       volatile memctl8xx_t *memctl = &immap->im_memctl;
-       unsigned long size_b0;
-       int i;
-#ifdef CONFIG_SYS_OR_TIMING_FLASH_AT_50MHZ
-       int scy, trlx, flash_or_timing, clk_diff;
-
-       scy = (CONFIG_SYS_OR_TIMING_FLASH_AT_50MHZ & OR_SCY_MSK) >> 4;
-       if (CONFIG_SYS_OR_TIMING_FLASH_AT_50MHZ & OR_TRLX) {
-               trlx = OR_TRLX;
-               scy *= 2;
-       } else
-               trlx = 0;
-
-               /* We assume that each 10MHz of bus clock require 1-clk SCY
-                * adjustment.
-                */
-       clk_diff = (gd->bus_clk / 1000000) - 50;
-
-               /* We need proper rounding here. This is what the "+5" and "-5"
-                * are here for.
-                */
-       if (clk_diff >= 0)
-               scy += (clk_diff + 5) / 10;
-       else
-               scy += (clk_diff - 5) / 10;
-
-               /* For bus frequencies above 50MHz, we want to use relaxed
-                * timing (OR_TRLX).
-                */
-       if (gd->bus_clk >= 50000000)
-               trlx = OR_TRLX;
-       else
-               trlx = 0;
-
-       if (trlx)
-               scy /= 2;
-
-       if (scy > 0xf)
-               scy = 0xf;
-       if (scy < 1)
-               scy = 1;
-
-       flash_or_timing = (scy << 4) | trlx |
-                         (CONFIG_SYS_OR_TIMING_FLASH_AT_50MHZ & ~(OR_TRLX | OR_SCY_MSK));
-#endif
-
-       /* Init: no FLASHes known */
-       for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; ++i) {
-               flash_info[i].flash_id = FLASH_UNKNOWN;
-       }
-
-       /* Static FLASH Bank configuration here - FIXME XXX */
-       size_b0 = flash_get_size ((FPW *) FLASH_BASE0_PRELIM, &flash_info[0]);
-
-       if (flash_info[0].flash_id == FLASH_UNKNOWN) {
-               printf ("## Unknown FLASH on Bank 0 - Size = 0x%08lx = %ld MB\n",
-                       size_b0, size_b0 << 20);
-       }
-
-       /* Remap FLASH according to real size */
-#ifndef CONFIG_SYS_OR_TIMING_FLASH_AT_50MHZ
-       memctl->memc_or0 = CONFIG_SYS_OR_TIMING_FLASH | (-size_b0 & OR_AM_MSK);
-#else
-       memctl->memc_or0 = flash_or_timing | (-size_b0 & OR_AM_MSK);
-#endif
-       memctl->memc_br0 = (CONFIG_SYS_FLASH_BASE & BR_BA_MSK) | BR_PS_8 | BR_MS_GPCM | BR_V;
-
-       /* Re-do sizing to get full correct info */
-       size_b0 = flash_get_size ((FPW *) CONFIG_SYS_FLASH_BASE, &flash_info[0]);
-
-       flash_get_offsets (CONFIG_SYS_FLASH_BASE, &flash_info[0]);
-
-#if CONFIG_SYS_MONITOR_BASE >= CONFIG_SYS_FLASH_BASE
-       /* monitor protection ON by default */
-       (void) flash_protect (FLAG_PROTECT_SET,
-                               CONFIG_SYS_MONITOR_BASE,
-                               CONFIG_SYS_MONITOR_BASE + monitor_flash_len - 1,
-                               &flash_info[0]);
-#endif
-
-#ifdef CONFIG_ENV_IS_IN_FLASH
-       /* ENV protection ON by default */
-       flash_protect (FLAG_PROTECT_SET,
-                       CONFIG_ENV_ADDR,
-                       CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1,
-                       &flash_info[0]);
-#endif
-
-       flash_info[0].size = size_b0;
-
-       return (size_b0);
-}
-
-/*-----------------------------------------------------------------------
- */
-static void flash_get_offsets (ulong base, flash_info_t * info)
-{
-       int i;
-
-       if (info->flash_id == FLASH_UNKNOWN) {
-               return;
-       }
-
-       if ((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_INTEL) {
-               for (i = 0; i < info->sector_count; i++) {
-                       info->start[i] = base + (i * 0x00020000);
-               }
-       }
-}
-
-/*-----------------------------------------------------------------------
- */
-void flash_print_info (flash_info_t * info)
-{
-       int i;
-
-       if (info->flash_id == FLASH_UNKNOWN) {
-               printf ("missing or unknown FLASH type\n");
-               return;
-       }
-
-       switch (info->flash_id & FLASH_VENDMASK) {
-       case FLASH_MAN_INTEL:
-               printf ("INTEL ");
-               break;
-       default:
-               printf ("Unknown Vendor ");
-               break;
-       }
-
-       switch (info->flash_id & FLASH_TYPEMASK) {
-       case FLASH_28F320J3A:
-               printf ("28F320J3A\n");
-               break;
-       case FLASH_28F640J3A:
-               printf ("28F640J3A\n");
-               break;
-       case FLASH_28F128J3A:
-               printf ("28F128J3A\n");
-               break;
-       default:
-               printf ("Unknown Chip Type\n");
-               break;
-       }
-
-       printf ("  Size: %ld MB in %d Sectors\n",
-                       info->size >> 20, info->sector_count);
-
-       printf ("  Sector Start Addresses:");
-       for (i = 0; i < info->sector_count; ++i) {
-               if ((i % 5) == 0)
-                       printf ("\n   ");
-               printf (" %08lX%s",
-                       info->start[i],
-                       info->protect[i] ? " (RO)" : "     ");
-       }
-       printf ("\n");
-       return;
-}
-
-/*-----------------------------------------------------------------------
- */
-
-
-/*-----------------------------------------------------------------------
- */
-
-/*
- * The following code cannot be run from FLASH!
- */
-
-static ulong flash_get_size (FPWV * addr, flash_info_t * info)
-{
-       FPW value;
-
-       addr[0] = (FPW) 0x00900090;
-
-       value = addr[0];
-
-       debug ("Manuf. ID @ 0x%08lx: 0x%08lx\n", (ulong)addr, value);
-
-       switch (value) {
-       case (FPW) INTEL_MANUFACT:
-               info->flash_id = FLASH_MAN_INTEL;
-               break;
-       default:
-               info->flash_id = FLASH_UNKNOWN;
-               info->sector_count = 0;
-               info->size = 0;
-               addr[0] = (FPW) 0x00FF00FF;     /* restore read mode */
-               return (0);                     /* no or unknown flash  */
-       }
-
-#ifdef FLASH_PORT_WIDTH8
-       value = addr[2];                        /* device ID        */
-#else
-       value = addr[1];                        /* device ID        */
-#endif
-
-       debug ("Device ID @ 0x%08lx: 0x%08lx\n", (ulong)(&addr[1]), value);
-
-       switch (value) {
-       case (FPW) INTEL_ID_28F320J3A:
-               info->flash_id += FLASH_28F320J3A;
-               info->sector_count = 32;
-               info->size = 0x00400000;
-               break;                          /* => 4 MB     */
-
-       case (FPW) INTEL_ID_28F640J3A:
-               info->flash_id += FLASH_28F640J3A;
-               info->sector_count = 64;
-               info->size = 0x00800000;
-               break;                          /* => 8 MB     */
-
-       case (FPW) INTEL_ID_28F128J3A:
-               info->flash_id += FLASH_28F128J3A;
-               info->sector_count = 128;
-               info->size = 0x01000000;
-               break;                          /* => 16 MB     */
-
-       default:
-               info->flash_id = FLASH_UNKNOWN;
-               break;
-       }
-
-       if (info->sector_count > CONFIG_SYS_MAX_FLASH_SECT) {
-               printf ("** ERROR: sector count %d > max (%d) **\n",
-                               info->sector_count, CONFIG_SYS_MAX_FLASH_SECT);
-               info->sector_count = CONFIG_SYS_MAX_FLASH_SECT;
-       }
-
-       addr[0] = (FPW) 0x00FF00FF;     /* restore read mode */
-
-       return (info->size);
-}
-
-
-/*-----------------------------------------------------------------------
- */
-
-int flash_erase (flash_info_t * info, int s_first, int s_last)
-{
-       int flag, prot, sect;
-       ulong type, start, now, last;
-       int rcode = 0;
-
-       if ((s_first < 0) || (s_first > s_last)) {
-               if (info->flash_id == FLASH_UNKNOWN) {
-                       printf ("- missing\n");
-               } else {
-                       printf ("- no sectors to erase\n");
-               }
-               return 1;
-       }
-
-       type = (info->flash_id & FLASH_VENDMASK);
-       if ((type != FLASH_MAN_INTEL)) {
-               printf ("Can't erase unknown flash type %08lx - aborted\n",
-                       info->flash_id);
-               return 1;
-       }
-
-       prot = 0;
-       for (sect = s_first; sect <= s_last; ++sect) {
-               if (info->protect[sect]) {
-                       prot++;
-               }
-       }
-
-       if (prot) {
-               printf ("- Warning: %d protected sectors will not be erased!\n",
-                       prot);
-       } else {
-               printf ("\n");
-       }
-
-       start = get_timer (0);
-       last = start;
-       /* Start erase on unprotected sectors */
-       for (sect = s_first; sect <= s_last; sect++) {
-               if (info->protect[sect] == 0) { /* not protected */
-                       FPWV *addr = (FPWV *) (info->start[sect]);
-                       FPW status;
-
-                       /* Disable interrupts which might cause a timeout here */
-                       flag = disable_interrupts ();
-
-                       *addr = (FPW) 0x00500050;       /* clear status register */
-                       *addr = (FPW) 0x00200020;       /* erase setup */
-                       *addr = (FPW) 0x00D000D0;       /* erase confirm */
-
-                       /* re-enable interrupts if necessary */
-                       if (flag)
-                               enable_interrupts ();
-
-                       /* wait at least 80us - let's wait 1 ms */
-                       udelay (1000);
-
-                       while (((status = *addr) & (FPW) 0x00800080) != (FPW) 0x00800080) {
-                           if ((now = get_timer (start)) > CONFIG_SYS_FLASH_ERASE_TOUT) {
-                               printf ("Timeout\n");
-                               *addr = (FPW) 0x00B000B0;       /* suspend erase     */
-                               *addr = (FPW) 0x00FF00FF;       /* reset to read mode */
-                               rcode = 1;
-                               break;
-                           }
-
-                           /* show that we're waiting */
-                           if ((now - last) > 1000) {  /* every second */
-                               putc ('.');
-                               last = now;
-                           }
-                       }
-
-                       *addr = (FPW) 0x00FF00FF;       /* reset to read mode */
-               }
-       }
-       printf (" done\n");
-       return rcode;
-}
-
-/*-----------------------------------------------------------------------
- * Copy memory to flash, returns:
- * 0 - OK
- * 1 - write timeout
- * 2 - Flash not erased
- * 4 - Flash not identified
- */
-
-int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt)
-{
-       ulong cp, wp;
-       FPW data;
-
-       int i, l, rc, port_width;
-
-       if (info->flash_id == FLASH_UNKNOWN) {
-               return 4;
-       }
-/* get lower word aligned address */
-#ifdef FLASH_PORT_WIDTH16
-       wp = (addr & ~1);
-       port_width = 2;
-#elif defined(FLASH_PORT_WIDTH32)
-       wp = (addr & ~3);
-       port_width = 4;
-#else
-       wp = addr;
-       port_width = 1;
-#endif
-
-       /*
-        * handle unaligned start bytes
-        */
-       if ((l = addr - wp) != 0) {
-               data = 0;
-               for (i = 0, cp = wp; i < l; ++i, ++cp) {
-                       data = (data << 8) | (*(uchar *) cp);
-               }
-               for (; i < port_width && cnt > 0; ++i) {
-                       data = (data << 8) | *src++;
-                       --cnt;
-                       ++cp;
-               }
-               for (; cnt == 0 && i < port_width; ++i, ++cp) {
-                       data = (data << 8) | (*(uchar *) cp);
-               }
-
-               if ((rc = write_data (info, wp, data)) != 0) {
-                       return (rc);
-               }
-               wp += port_width;
-       }
-
-       /*
-        * handle word aligned part
-        */
-       while (cnt >= port_width) {
-               data = 0;
-               for (i = 0; i < port_width; ++i) {
-                       data = (data << 8) | *src++;
-               }
-               if ((rc = write_data (info, wp, data)) != 0) {
-                       return (rc);
-               }
-               wp += port_width;
-               cnt -= port_width;
-       }
-
-       if (cnt == 0) {
-               return (0);
-       }
-
-       /*
-        * handle unaligned tail bytes
-        */
-       data = 0;
-       for (i = 0, cp = wp; i < port_width && cnt > 0; ++i, ++cp) {
-               data = (data << 8) | *src++;
-               --cnt;
-       }
-       for (; i < port_width; ++i, ++cp) {
-               data = (data << 8) | (*(uchar *) cp);
-       }
-
-       return (write_data (info, wp, data));
-}
-
-/*-----------------------------------------------------------------------
- * Write a word or halfword to Flash, returns:
- * 0 - OK
- * 1 - write timeout
- * 2 - Flash not erased
- */
-static int write_data (flash_info_t * info, ulong dest, FPW data)
-{
-       FPWV *addr = (FPWV *) dest;
-       ulong status;
-       ulong start;
-       int flag;
-
-       /* Check if Flash is (sufficiently) erased */
-       if ((*addr & data) != data) {
-               printf ("not erased at %08lx (%x)\n", (ulong) addr, *addr);
-               return (2);
-       }
-       /* Disable interrupts which might cause a timeout here */
-       flag = disable_interrupts ();
-
-       *addr = (FPW) 0x00400040;       /* write setup */
-       *addr = data;
-
-       /* re-enable interrupts if necessary */
-       if (flag)
-               enable_interrupts ();
-
-       start = get_timer (0);
-
-       while (((status = *addr) & (FPW) 0x00800080) != (FPW) 0x00800080) {
-               if (get_timer (start) > CONFIG_SYS_FLASH_WRITE_TOUT) {
-                       *addr = (FPW) 0x00FF00FF;       /* restore read mode */
-                       return (1);
-               }
-       }
-
-       *addr = (FPW) 0x00FF00FF;       /* restore read mode */
-
-       return (0);
-}
diff --git a/board/nc650/nand.c b/board/nc650/nand.c
deleted file mode 100644 (file)
index 7dca97f..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * (C) Copyright 2006 Detlev Zundel, dzu@denx.de
- * (C) Copyright 2006 DENX Software Engineering
- *
- * 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/io.h>
-
-#if defined(CONFIG_CMD_NAND)
-
-#include <nand.h>
-
-#if defined(CONFIG_IDS852_REV1)
-/*
- *     hardware specific access to control-lines
- */
-static void nc650_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
-{
-       struct nand_chip *this = mtd->priv;
-
-       if (ctrl & NAND_CTRL_CHANGE) {
-               if ( ctrl & NAND_CLE )
-                       this->IO_ADDR_W += 2;
-               else
-                       this->IO_ADDR_W -= 2;
-               if ( ctrl & NAND_ALE )
-                       this->IO_ADDR_W += 1;
-               else
-                       this->IO_ADDR_W -= 1;
-       }
-
-       if (cmd != NAND_CMD_NONE)
-               writeb(cmd, this->IO_ADDR_W);
-}
-#elif defined(CONFIG_IDS852_REV2)
-/*
- *     hardware specific access to control-lines
- */
-static void nc650_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
-{
-       struct nand_chip *this = mtd->priv;
-
-       if (ctrl & NAND_CTRL_CHANGE) {
-               if ( ctrl & NAND_CLE )
-                       writeb(0, (volatile __u8 *) this->IO_ADDR_W + 0xa);
-               else
-                       writeb(0, (volatile __u8 *) this->IO_ADDR_W) + 0x8);
-               if ( ctrl & NAND_ALE )
-                       writeb(0, (volatile __u8 *) this->IO_ADDR_W) + 0x9);
-               else
-                       writeb(0, (volatile __u8 *) this->IO_ADDR_W) + 0x8);
-               if ( ctrl & NAND_NCE )
-                       writeb(0, (volatile __u8 *) this->IO_ADDR_W) + 0x8);
-               else
-                       writeb(0, (volatile __u8 *) this->IO_ADDR_W) + 0xc);
-       }
-
-       if (cmd != NAND_CMD_NONE)
-               writeb(cmd, this->IO_ADDR_W);
-}
-#else
-#error Unknown IDS852 module revision
-#endif
-
-/*
- * Board-specific NAND initialization. The following members of the
- * argument are board-specific (per include/linux/mtd/nand.h):
- * - IO_ADDR_R?: address to read the 8 I/O lines of the flash device
- * - IO_ADDR_W?: address to write the 8 I/O lines of the flash device
- * - cmd_ctrl: hardwarespecific function for accesing control-lines
- * - dev_ready: hardwarespecific function for  accesing device ready/busy line
- * - enable_hwecc?: function to enable (reset)  hardware ecc generator. Must
- *   only be provided if a hardware ECC is available
- * - eccm.ode: mode of ecc, see defines
- * - chip_delay: chip dependent delay for transfering data from array to
- *   read regs (tR)
- * - options: various chip options. They can partly be set to inform
- *   nand_scan about special functionality. See the defines for further
- *   explanation
- * Members with a "?" were not set in the merged testing-NAND branch,
- * so they are not set here either.
- */
-int board_nand_init(struct nand_chip *nand)
-{
-
-       nand->cmd_ctrl = nc650_hwcontrol;
-       nand->ecc.mode = NAND_ECC_SOFT;
-       nand->chip_delay = 12;
-/*     nand->options = NAND_SAMSUNG_LP_OPTIONS;*/
-       return 0;
-}
-#endif
diff --git a/board/nc650/nc650.c b/board/nc650/nc650.c
deleted file mode 100644 (file)
index 056230d..0000000
+++ /dev/null
@@ -1,309 +0,0 @@
-/*
- * (C) Copyright 2006 Detlev Zundel, dzu@denx.de
- * (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
- */
-
-#include <common.h>
-#include <config.h>
-#include <mpc8xx.h>
-
-/*
- *  Memory Controller Using
- *
- *  CS0 - Flash memory            (0x40000000)
- *  CS3 - SDRAM                   (0x00000000}
- */
-
-/* ------------------------------------------------------------------------- */
-
-#define _not_used_     0xffffffff
-
-const uint sdram_table[] = {
-       /* single read. (offset 0 in upm RAM) */
-       0x1f07fc04, 0xeeaefc04, 0x11adfc04, 0xefbbbc00,
-       0x1ff77c47,
-
-       /* MRS initialization (offset 5) */
-
-       0x1ff77c34, 0xefeabc34, 0x1fb57c35,
-
-       /* burst read. (offset 8 in upm RAM) */
-       0x1f07fc04, 0xeeaefc04, 0x10adfc04, 0xf0affc00,
-       0xf0affc00, 0xf1affc00, 0xefbbbc00, 0x1ff77c47,
-       _not_used_, _not_used_, _not_used_, _not_used_,
-       _not_used_, _not_used_, _not_used_, _not_used_,
-
-       /* single write. (offset 18 in upm RAM) */
-       0x1f27fc04, 0xeeaebc00, 0x01b93c04, 0x1ff77c47,
-       _not_used_, _not_used_, _not_used_, _not_used_,
-
-       /* burst write. (offset 20 in upm RAM) */
-       0x1f07fc04, 0xeeaebc00, 0x10ad7c00, 0xf0affc00,
-       0xf0affc00, 0xe1bbbc04, 0x1ff77c47, _not_used_,
-       _not_used_, _not_used_, _not_used_, _not_used_,
-       _not_used_, _not_used_, _not_used_, _not_used_,
-
-       /* refresh. (offset 30 in upm RAM) */
-       0x1ff5fc84, 0xfffffc04, 0xfffffc04, 0xfffffc04,
-       0xfffffc84, 0xfffffc07, _not_used_, _not_used_,
-       _not_used_, _not_used_, _not_used_, _not_used_,
-
-       /* exception. (offset 3c in upm RAM) */
-       0x7ffffc07, _not_used_, _not_used_, _not_used_
-};
-
-const uint nand_flash_table[] = {
-       /* single read. (offset 0 in upm RAM) */
-       0x0ff3fc04, 0x0ff3fc04, 0x0ff3fc04, 0x0ffffc04,
-       0xfffffc00, 0xfffffc05, 0xfffffc05, 0xfffffc05,
-
-       /* burst read. (offset 8 in upm RAM) */
-       0xffffcc05, 0xffffcc05, 0xffffcc05, 0xffffcc05,
-       0xffffcc05, 0xffffcc05, 0xffffcc05, 0xffffcc05,
-       0xffffcc05, 0xffffcc05, 0xffffcc05, 0xffffcc05,
-       0xffffcc05, 0xffffcc05, 0xffffcc05, 0xffffcc05,
-
-       /* single write. (offset 18 in upm RAM) */
-       0x00fffc04, 0x00fffc04, 0x00fffc04, 0x0ffffc04,
-       0x0ffffc84, 0x0ffffc84, 0xfffffc00, 0xfffffc05,
-
-       /* burst write. (offset 20 in upm RAM) */
-       0xffffcc05, 0xffffcc05, 0xffffcc05, 0xffffcc05,
-       0xffffcc05, 0xffffcc05, 0xffffcc05, 0xffffcc05,
-       0xffffcc05, 0xffffcc05, 0xffffcc05, 0xffffcc05,
-       0xffffcc05, 0xffffcc05, 0xffffcc05, 0xffffcc05,
-
-       /* refresh. (offset 30 in upm RAM) */
-       0xffffcc05, 0xffffcc05, 0xffffcc05, 0xffffcc05,
-       0xffffcc05, 0xffffcc05, 0xffffcc05, 0xffffcc05,
-       0xffffcc05, 0xffffcc05, 0xffffcc05, 0xffffcc05,
-
-       /* exception. (offset 3c in upm RAM) */
-       0xffffcc05, 0xffffcc05, 0xffffcc05, 0xffffcc05
-};
-
-/* ------------------------------------------------------------------------- */
-
-/*
- * Check Board Identity:
- */
-
-int checkboard (void)
-{
-#if !defined(CONFIG_CP850)
-       puts ("Board: NC650");
-#else
-       puts ("Board: CP850");
-#endif
-#if defined(CONFIG_IDS852_REV1)
-       puts (" with IDS852 rev 1 module\n");
-#elif defined(CONFIG_IDS852_REV2)
-       puts (" with IDS852 rev 2 module\n");
-#endif
-       return 0;
-}
-
-/* ------------------------------------------------------------------------- */
-
-static long int dram_size (long int, long int *, long int);
-
-/* ------------------------------------------------------------------------- */
-
-phys_size_t initdram (int board_type)
-{
-       volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
-       volatile memctl8xx_t *memctl = &immap->im_memctl;
-       long int size8, size9;
-       long int size_b0 = 0;
-       unsigned long reg;
-
-       upmconfig (UPMA, (uint *) sdram_table,
-                          sizeof (sdram_table) / sizeof (uint));
-
-       /*
-        * Preliminary prescaler for refresh (depends on number of
-        * banks): This value is selected for four cycles every 62.4 us
-        * with two SDRAM banks or four cycles every 31.2 us with one
-        * bank. It will be adjusted after memory sizing.
-        */
-       memctl->memc_mptpr = CONFIG_SYS_MPTPR_2BK_8K;
-
-       memctl->memc_mar = 0x00000088;
-
-       /*
-        * Map controller bank 1 to the SDRAM bank at
-        * preliminary address - these have to be modified after the
-        * SDRAM size has been determined.
-        */
-       memctl->memc_or3 = CONFIG_SYS_OR3_PRELIM;
-       memctl->memc_br3 = CONFIG_SYS_BR3_PRELIM;
-
-       memctl->memc_mamr = CONFIG_SYS_MAMR_8COL & (~(MAMR_PTAE));      /* no refresh yet */
-
-       udelay (200);
-
-       /* perform SDRAM initializsation sequence */
-
-       memctl->memc_mcr = 0x80006105;  /* SDRAM bank 0 */
-       udelay (200);
-       memctl->memc_mcr = 0x80006230;  /* SDRAM bank 0 - execute twice */
-       udelay (200);
-
-       memctl->memc_mamr |= MAMR_PTAE; /* enable refresh */
-
-       udelay (1000);
-
-       /*
-        * Check Bank 0 Memory Size for re-configuration
-        *
-        * try 8 column mode
-        */
-       size8 = dram_size (CONFIG_SYS_MAMR_8COL, SDRAM_BASE3_PRELIM, SDRAM_MAX_SIZE);
-
-       udelay (1000);
-
-       /*
-        * try 9 column mode
-        */
-       size9 = dram_size (CONFIG_SYS_MAMR_9COL, SDRAM_BASE3_PRELIM, SDRAM_MAX_SIZE);
-
-       udelay (1000);
-
-       if (size8 < size9) {
-               size_b0 = size9;
-       } else {
-               size_b0 = size8;
-               memctl->memc_mamr = CONFIG_SYS_MAMR_8COL;
-               udelay (500);
-       }
-
-       /*
-        * Adjust refresh rate depending on SDRAM type, both banks.
-        * For types > 128 MBit leave it at the current (fast) rate
-        */
-       if ((size_b0 < 0x02000000)) {
-               /* reduce to 15.6 us (62.4 us / quad) */
-               memctl->memc_mptpr = CONFIG_SYS_MPTPR_2BK_4K;
-               udelay (1000);
-       }
-
-       /*
-        * Final mapping
-        */
-
-       memctl->memc_or3 = ((-size_b0) & 0xFFFF0000) | CONFIG_SYS_OR_TIMING_SDRAM;
-       memctl->memc_br3 = (CONFIG_SYS_SDRAM_BASE & BR_BA_MSK) | BR_MS_UPMA | BR_V;
-
-       /* adjust refresh rate depending on SDRAM type, one bank */
-       reg = memctl->memc_mptpr;
-       reg >>= 1;                                      /* reduce to CONFIG_SYS_MPTPR_1BK_8K / _4K */
-       memctl->memc_mptpr = reg;
-
-       udelay (10000);
-
-       /* Configure UPMB for NAND flash access */
-       upmconfig (UPMB, (uint *) nand_flash_table,
-                          sizeof (nand_flash_table) / sizeof (uint));
-
-       memctl->memc_mbmr = CONFIG_SYS_MBMR_NAND;
-
-       return (size_b0);
-}
-
-/* ------------------------------------------------------------------------- */
-
-/*
- * Check memory range for valid RAM. A simple memory test determines
- * the actually available RAM size between addresses `base' and
- * `base + maxsize'. Some (not all) hardware errors are detected:
- * - short between address lines
- * - short between data lines
- */
-
-static long int dram_size (long int mamr_value, long int *base, long int maxsize)
-{
-       volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
-       volatile memctl8xx_t *memctl = &immap->im_memctl;
-
-       memctl->memc_mamr = mamr_value;
-
-       return (get_ram_size(base, maxsize));
-}
-
-
-#if defined(CONFIG_CP850)
-
-#define DPRAM_VARNAME           "KP850DIP"
-#define PARAM_ADDR              0x7C0
-#define NAME_ADDR               0x7F8
-#define BOARD_NAME              "KP01"
-#define DEFAULT_LB              "241111"
-
-int misc_init_r(void)
-{
-       int             iCompatMode = 0;
-       char            *pParam = NULL;
-       char            *envlb;
-
-       /*
-          First byte in CPLD read address space signals compatibility mode
-          0 - cp850
-          1 - kp852
-       */
-       pParam = (char*)(CONFIG_SYS_CPLD_BASE);
-       if( *pParam != 0)
-               iCompatMode = 1;
-
-       if ( iCompatMode != 0) {
-               /*
-                  In KP852 compatibility mode we have to write to
-                  DPRAM as early as possible the binary coded
-                  line config and board name.
-                  The line config is derived from the environment
-                  variable DPRAM_VARNAME by converting from ASCII
-                  to binary per character.
-               */
-               if ( (envlb = getenv ( DPRAM_VARNAME )) == 0) {
-                       setenv( DPRAM_VARNAME, DEFAULT_LB);
-                       envlb = DEFAULT_LB;
-               }
-
-               /* Status string */
-               printf("Mode:  KP852(LB=%s)\n", envlb);
-
-               /* copy appl init */
-               pParam = (char*)(DPRAM_BASE_ADDR + PARAM_ADDR);
-               while (*envlb) {
-                       *(pParam++) = *(envlb++) - '0';
-               }
-               *pParam = '\0';
-
-               /* copy board id */
-               pParam = (char*)(DPRAM_BASE_ADDR + NAME_ADDR);
-               strcpy( pParam, BOARD_NAME);
-       } else {
-               puts("Mode:  CP850\n");
-       }
-
-       return 0;
-}
-#endif
diff --git a/board/nc650/u-boot.lds b/board/nc650/u-boot.lds
deleted file mode 100644 (file)
index e89a9bc..0000000
+++ /dev/null
@@ -1,126 +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
-{
-  /* 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      :
-  {
-    arch/powerpc/cpu/mpc8xx/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(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/nc650/u-boot.lds.debug b/board/nc650/u-boot.lds.debug
deleted file mode 100644 (file)
index 770adf7..0000000
+++ /dev/null
@@ -1,125 +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
-{
-  /* 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      :
-  {
-    arch/powerpc/cpu/mpc8xx/start.o    (.text)
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.rodata)
-    *(.rodata1)
-    *(.rodata.str1.4)
-    *(.eh_frame)
-  }
-  .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       :
-  {
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
-   *(COMMON)
-  }
-  _end = . ;
-  PROVIDE (end = .);
-}
index 6722d53927e45f896ed3705fa4874ab435aedecb..cd62642894425f87b0140c7fd330d49697fa37b2 100644 (file)
 #
 
 include $(TOPDIR)/config.mk
+ifneq ($(OBJTREE),$(SRCTREE))
+$(shell mkdir -p $(obj)../common)
+endif
 
 LIB    = $(obj)lib$(BOARD).a
 
-# NOBJS : Netstal common objects
-NOBJS  = fixed_sdram.o nm_bsp.o
-COBJS  = $(BOARD).o
-SOBJS  =
+COBJS  = $(BOARD).o \
+       ../common/fixed_sdram.o \
+       ../common/nm_bsp.o
 
-SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c) $(addprefix ../common/,$(NOBJS:.o=.c))
+SRCS   := $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
-NOBJS  := $(addprefix $(obj)../common/,$(NOBJS))
-SOBJS  := $(addprefix $(obj),$(SOBJS))
 
-$(LIB):        $(OBJS) $(SOBJS) $(NOBJS)
-       $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) $(NOBJS)
+$(LIB):        $(OBJS)
+       $(AR) $(ARFLAGS) $@ $^
 
 clean:
-       rm -f $(SOBJS) $(OBJS)
+       rm -f $(OBJS)
 
 distclean:     clean
        rm -f $(LIB) core *.bak $(obj).depend
index 445677104c8f2d26c294186e06847f60db1ffa54..d037552d709bc481fb5a3e787b93da7bb67c492e 100644 (file)
 #
 
 include $(TOPDIR)/config.mk
+ifneq ($(OBJTREE),$(SRCTREE))
+$(shell mkdir -p $(obj)../common)
+endif
 
 LIB    = $(obj)lib$(BOARD).a
 
-
-# NOBJS : Netstal common objects
-NOBJS  = nm_bsp.o
-COBJS  = $(BOARD).o sdram.o
+COBJS  = $(BOARD).o \
+       sdram.o \
+       ../common/nm_bsp.o
 SOBJS  = init.o
 
-SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c) $(addprefix ../common/,$(NOBJS:.o=.c))
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
-NOBJS  := $(addprefix $(obj)../common/,$(NOBJS))
 SOBJS  := $(addprefix $(obj),$(SOBJS))
 
-$(LIB):        $(OBJS) $(SOBJS) $(NOBJS)
-       $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) $(NOBJS)
+$(LIB):        $(OBJS) $(SOBJS)
+       $(AR) $(ARFLAGS) $@ $^
 
 clean:
        rm -f $(SOBJS) $(OBJS)
index 6722d53927e45f896ed3705fa4874ab435aedecb..cd62642894425f87b0140c7fd330d49697fa37b2 100644 (file)
 #
 
 include $(TOPDIR)/config.mk
+ifneq ($(OBJTREE),$(SRCTREE))
+$(shell mkdir -p $(obj)../common)
+endif
 
 LIB    = $(obj)lib$(BOARD).a
 
-# NOBJS : Netstal common objects
-NOBJS  = fixed_sdram.o nm_bsp.o
-COBJS  = $(BOARD).o
-SOBJS  =
+COBJS  = $(BOARD).o \
+       ../common/fixed_sdram.o \
+       ../common/nm_bsp.o
 
-SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c) $(addprefix ../common/,$(NOBJS:.o=.c))
+SRCS   := $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
-NOBJS  := $(addprefix $(obj)../common/,$(NOBJS))
-SOBJS  := $(addprefix $(obj),$(SOBJS))
 
-$(LIB):        $(OBJS) $(SOBJS) $(NOBJS)
-       $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) $(NOBJS)
+$(LIB):        $(OBJS)
+       $(AR) $(ARFLAGS) $@ $^
 
 clean:
-       rm -f $(SOBJS) $(OBJS)
+       rm -f $(OBJS)
 
 distclean:     clean
        rm -f $(LIB) core *.bak $(obj).depend
diff --git a/board/palmld/Makefile b/board/palmld/Makefile
new file mode 100644 (file)
index 0000000..0cca8ab
--- /dev/null
@@ -0,0 +1,47 @@
+#
+# Palm LifeDrive Support
+#
+# Copyright (C) 2010 Marek Vasut <marek.vasut@gmail.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
+#
+
+include $(TOPDIR)/config.mk
+
+LIB    = $(obj)lib$(BOARD).a
+
+COBJS  := palmld.o
+
+SRCS   := $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+
+$(LIB):        $(obj).depend $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS)
+
+clean:
+       rm -f $(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/palmld/palmld.c b/board/palmld/palmld.c
new file mode 100644 (file)
index 0000000..5588fe7
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Palm LifeDrive Support
+ *
+ * Copyright (C) 2010 Marek Vasut <marek.vasut@gmail.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
+ */
+
+#include <common.h>
+#include <command.h>
+#include <serial.h>
+#include <asm/arch/pxa-regs.h>
+#include <asm/io.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/*
+ * Miscelaneous platform dependent initialisations
+ */
+
+int board_init(void)
+{
+       /* We have RAM, disable cache */
+       dcache_disable();
+       icache_disable();
+
+       /* arch number of PalmLD */
+       gd->bd->bi_arch_number = MACH_TYPE_PALMLD;
+
+       /* adress of boot parameters */
+       gd->bd->bi_boot_params = 0xa0000100;
+
+       /* Set PWM for LCD */
+       writel(0x7, PWM_CTRL0);
+       writel(0x16c, PWM_PERVAL0);
+       writel(0x11a, PWM_PWDUTY0);
+
+       return 0;
+}
+
+struct serial_device *default_serial_console(void)
+{
+       return &serial_ffuart_device;
+}
+
+extern void pxa_dram_init(void);
+int dram_init(void)
+{
+       pxa_dram_init();
+       gd->ram_size = PHYS_SDRAM_1_SIZE;
+       return 0;
+}
+
+void dram_init_banksize(void)
+{
+       gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
+       gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
+}
+
+ulong board_flash_get_legacy(ulong base, int banknum, flash_info_t *info)
+{
+       info->portwidth = FLASH_CFI_16BIT;
+       info->chipwidth = FLASH_CFI_BY16;
+       info->interface = FLASH_CFI_X16;
+       return 1;
+}
diff --git a/board/palmtc/Makefile b/board/palmtc/Makefile
new file mode 100644 (file)
index 0000000..3a12e66
--- /dev/null
@@ -0,0 +1,48 @@
+#
+# Palm Tungsten|C Support
+#
+# Copyright (C) 2009-2010 Marek Vasut <marek.vasut@gmail.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
+#
+
+include $(TOPDIR)/config.mk
+
+LIB    = $(obj)lib$(BOARD).a
+
+COBJS  := palmtc.o
+
+SRCS   := $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):        $(obj).depend $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS)
+
+clean:
+       rm -f $(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/palmtc/palmtc.c b/board/palmtc/palmtc.c
new file mode 100644 (file)
index 0000000..25186ae
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Palm Tungsten|C Support
+ *
+ * Copyright (C) 2009-2010 Marek Vasut <marek.vasut@gmail.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
+ */
+
+#include <common.h>
+#include <command.h>
+#include <serial.h>
+#include <asm/io.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/*
+ * Miscelaneous platform dependent initialisations
+ */
+
+int board_init(void)
+{
+       /* We have RAM, disable cache */
+       dcache_disable();
+       icache_disable();
+
+       /* Arch number of Palm Tungsten|C */
+       gd->bd->bi_arch_number = MACH_TYPE_PALMTC;
+
+       /* Adress of boot parameters */
+       gd->bd->bi_boot_params = 0xa0000100;
+
+       /* Set PWM for LCD */
+       writel(0x5f, PWM_CTRL1);
+       writel(0x3ff, PWM_PERVAL1);
+       writel(892, PWM_PWDUTY1);
+
+       return 0;
+}
+
+struct serial_device *default_serial_console(void)
+{
+       return &serial_ffuart_device;
+}
+
+extern void pxa_dram_init(void);
+int dram_init(void)
+{
+       pxa_dram_init();
+       gd->ram_size = PHYS_SDRAM_1_SIZE;
+       return 0;
+}
+
+void dram_init_banksize(void)
+{
+       gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
+       gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
+}
index 9745c14e5a462e74bcb7e4ef0a79d4bb36ccf618..6bd8852a66fc554963146fd92760b732e82d16fb 100644 (file)
@@ -21,6 +21,7 @@
  * MA 02111-1307 USA
  */
 
+#include <asm-offsets.h>
 #include <ppc_asm.tmpl>
 #include <asm/mmu.h>
 #include <config.h>
index faa26911b82374d459e40bf9f0973b30e6602581..cb0c3d7cb9092bfbc1b58e81c6a06587ba12c27e 100644 (file)
@@ -27,17 +27,15 @@ include $(TOPDIR)/config.mk
 LIB    = $(obj)lib$(BOARD).a
 
 COBJS  := pleb2.o flash.o
-SOBJS  := lowlevel_init.o
 
-SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+SRCS   := $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
-SOBJS  := $(addprefix $(obj),$(SOBJS))
 
-$(LIB):        $(obj).depend $(OBJS) $(SOBJS)
-       $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+$(LIB):        $(obj).depend $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS)
 
 clean:
-       rm -f $(SOBJS) $(OBJS)
+       rm -f $(OBJS)
 
 distclean:     clean
        rm -f $(LIB) core *.bak $(obj).depend
diff --git a/board/pleb2/config.mk b/board/pleb2/config.mk
deleted file mode 100644 (file)
index 079f58e..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CONFIG_SYS_TEXT_BASE =  0xa1F80000
-#CONFIG_SYS_TEXT_BASE = 0xa3080000
-#CONFIG_SYS_TEXT_BASE = 0
diff --git a/board/pleb2/lowlevel_init.S b/board/pleb2/lowlevel_init.S
deleted file mode 100644 (file)
index b95ff9c..0000000
+++ /dev/null
@@ -1,488 +0,0 @@
-/*
- * Most of this taken from Redboot hal_platform_setup.h with cleanup
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include <config.h>
-#include <version.h>
-#include <asm/arch/pxa-regs.h>
-
-DRAM_SIZE:  .long   CONFIG_SYS_DRAM_SIZE
-
-/* wait for coprocessor write complete */
-       .macro CPWAIT reg
-       mrc     p15,0,\reg,c2,c0,0
-       mov     \reg,\reg
-       sub     pc,pc,#4
-       .endm
-
-.globl lowlevel_init
-lowlevel_init:
-
-       mov     r10, lr
-
-       /* Set up GPIO pins first */
-
-       ldr     r0,   =GPSR0
-       ldr     r1,   =CONFIG_SYS_GPSR0_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GPSR1
-       ldr     r1,   =CONFIG_SYS_GPSR1_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GPSR2
-       ldr     r1,   =CONFIG_SYS_GPSR2_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GPCR0
-       ldr     r1,   =CONFIG_SYS_GPCR0_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GPCR1
-       ldr     r1,   =CONFIG_SYS_GPCR1_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GPCR2
-       ldr     r1,   =CONFIG_SYS_GPCR2_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GRER0
-       ldr     r1,   =CONFIG_SYS_GRER0_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GRER1
-       ldr     r1,   =CONFIG_SYS_GRER1_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GRER2
-       ldr     r1,   =CONFIG_SYS_GRER2_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GFER0
-       ldr     r1,   =CONFIG_SYS_GFER0_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GFER1
-       ldr     r1,   =CONFIG_SYS_GFER1_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GFER2
-       ldr     r1,   =CONFIG_SYS_GFER2_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GPDR0
-       ldr     r1,   =CONFIG_SYS_GPDR0_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GPDR1
-       ldr     r1,   =CONFIG_SYS_GPDR1_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GPDR2
-       ldr     r1,   =CONFIG_SYS_GPDR2_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GAFR0_L
-       ldr     r1,   =CONFIG_SYS_GAFR0_L_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GAFR0_U
-       ldr     r1,   =CONFIG_SYS_GAFR0_U_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GAFR1_L
-       ldr     r1,   =CONFIG_SYS_GAFR1_L_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GAFR1_U
-       ldr     r1,   =CONFIG_SYS_GAFR1_U_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GAFR2_L
-       ldr     r1,   =CONFIG_SYS_GAFR2_L_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GAFR2_U
-       ldr     r1,   =CONFIG_SYS_GAFR2_U_VAL
-       str     r1,   [r0]
-
-       /* enable GPIO pins */
-       ldr     r0,   =PSSR
-       ldr     r1,   =CONFIG_SYS_PSSR_VAL
-       str     r1,   [r0]
-
-
-/*********************************************************************
-    Initlialize Memory Controller
-
-    See PXA250 Operating System Developer's Guide
-
-    pause for 200 uSecs- allow internal clocks to settle
-    *Note: only need this if hard reset... doing it anyway for now
-*/
-
-       @ Step 1
-       @ ---- Wait 200 usec
-       ldr     r3, =OSCR       @ reset the OS Timer Count to zero
-       mov     r2, #0
-       str     r2, [r3]
-       ldr     r4, =0x300      @ really 0x2E1 is about 200usec, so 0x300 should be plenty
-1:
-       ldr     r2, [r3]
-       cmp     r4, r2
-       bgt     1b
-
-mem_init:
-       @ get memory controller base address
-       ldr     r1,  =MEMC_BASE
-
-@****************************************************************************
-@  Step 2
-@
-
-       @ Step 2a
-       @ write msc0, read back to ensure data latches
-       @
-       ldr     r2,   =CONFIG_SYS_MSC0_VAL
-       str     r2,   [r1, #MSC0_OFFSET]
-       ldr     r2,   [r1, #MSC0_OFFSET]
-
-       @ write msc1
-       ldr     r2,  =CONFIG_SYS_MSC1_VAL
-       str     r2,  [r1, #MSC1_OFFSET]
-       ldr     r2,  [r1, #MSC1_OFFSET]
-
-       @ write msc2
-       ldr     r2,  =CONFIG_SYS_MSC2_VAL
-       str     r2,  [r1, #MSC2_OFFSET]
-       ldr     r2,  [r1, #MSC2_OFFSET]
-
-
-@ Step 2b
-       @ write mecr
-       ldr     r2,  =CONFIG_SYS_MECR_VAL
-       str     r2,  [r1, #MECR_OFFSET]
-
-       @ write mcmem0
-       ldr     r2,  =CONFIG_SYS_MCMEM0_VAL
-       str     r2,  [r1, #MCMEM0_OFFSET]
-
-       @ write mcmem1
-       ldr     r2,  =CONFIG_SYS_MCMEM1_VAL
-       str     r2,  [r1, #MCMEM1_OFFSET]
-
-       @ write mcatt0
-       ldr     r2,  =CONFIG_SYS_MCATT0_VAL
-       str     r2,  [r1, #MCATT0_OFFSET]
-
-       @ write mcatt1
-       ldr     r2,  =CONFIG_SYS_MCATT1_VAL
-       str     r2,  [r1, #MCATT1_OFFSET]
-
-       @ write mcio0
-       ldr     r2,  =CONFIG_SYS_MCIO0_VAL
-       str     r2,  [r1, #MCIO0_OFFSET]
-
-       @ write mcio1
-       ldr     r2,  =CONFIG_SYS_MCIO1_VAL
-       str     r2,  [r1, #MCIO1_OFFSET]
-
-@ Step 2c
-       @ fly-by-dma is defeatured on this part
-       @ write flycnfg
-       @ldr    r2,  =CONFIG_SYS_FLYCNFG_VAL
-       @str    r2,  [r1, #FLYCNFG_OFFSET]
-
-/* FIXME Does this sequence really make sense */
-#ifdef REDBOOT_WAY
-       @ Step 2d
-       @ get the mdrefr settings
-       ldr     r3,  =CONFIG_SYS_MDREFR_VAL
-
-       @ extract DRI field (we need a valid DRI field)
-       @
-       ldr     r2,  =0xFFF
-
-       @ valid DRI field in r3
-       @
-       and     r3,  r3,  r2
-
-       @ get the reset state of MDREFR
-       @
-       ldr     r4,  [r1, #MDREFR_OFFSET]
-
-       @ clear the DRI field
-       @
-       bic     r4,  r4,  r2
-
-       @ insert the valid DRI field loaded above
-       @
-       orr     r4,  r4,  r3
-
-       @ write back mdrefr
-       @
-       str     r4,  [r1, #MDREFR_OFFSET]
-
-       @ *Note: preserve the mdrefr value in r4 *
-
-@****************************************************************************
-@  Step 3
-@
-@ NO SRAM
-
-       mov     pc, r10
-
-
-@****************************************************************************
-@  Step 4
-@
-
-       @ Assumes previous mdrefr value in r4, if not then read current mdrefr
-
-       @ clear the free-running clock bits
-       @ (clear K0Free, K1Free, K2Free
-       @
-       bic     r4,  r4,  #(0x00800000 | 0x01000000 | 0x02000000)
-
-       @ set K0RUN for CPLD clock
-       @
-       orr     r4,  r4,  #0x00002000
-
-       @ set K1RUN if bank 0 installed
-       @
-       orr     r4,  r4,  #0x00010000
-
-       @ write back mdrefr
-       @
-       str     r4,  [r1, #MDREFR_OFFSET]
-       ldr     r4,  [r1, #MDREFR_OFFSET]
-
-       @ deassert SLFRSH
-       @
-       bic     r4,  r4,  #0x00400000
-
-       @ write back mdrefr
-       @
-       str     r4,  [r1, #MDREFR_OFFSET]
-
-       @ assert E1PIN
-       @
-       orr     r4,  r4,  #0x00008000
-
-       @ write back mdrefr
-       @
-       str     r4,  [r1, #MDREFR_OFFSET]
-       ldr     r4,  [r1, #MDREFR_OFFSET]
-       nop
-       nop
-#else
-       @ Step 2d
-       @ get the mdrefr settings
-       ldr     r3,  =CONFIG_SYS_MDREFR_VAL
-
-       @ write back mdrefr
-       @
-       str     r4,  [r1, #MDREFR_OFFSET]
-
-       @  Step 4
-
-       @ set K0RUN for CPLD clock
-       @
-       orr     r4,  r4,  #0x00002000
-
-       @ set K1RUN for bank 0
-       @
-       orr     r4,  r4,  #0x00010000
-
-       @ write back mdrefr
-       @
-       str     r4,  [r1, #MDREFR_OFFSET]
-       ldr     r4,  [r1, #MDREFR_OFFSET]
-
-       @ deassert SLFRSH
-       @
-       bic     r4,  r4,  #0x00400000
-
-       @ write back mdrefr
-       @
-       str     r4,  [r1, #MDREFR_OFFSET]
-
-       @ assert E1PIN
-       @
-       orr     r4,  r4,  #0x00008000
-
-       @ write back mdrefr
-       @
-       str     r4,  [r1, #MDREFR_OFFSET]
-       ldr     r4,  [r1, #MDREFR_OFFSET]
-       nop
-       nop
-#endif
-
-       @ Step 4d
-       @ fetch platform value of mdcnfg
-       @
-       ldr     r2,  =CONFIG_SYS_MDCNFG_VAL
-
-       @ disable all sdram banks
-       @
-       bic     r2,  r2,  #(MDCNFG_DE0 | MDCNFG_DE1)
-       bic     r2,  r2,  #(MDCNFG_DE2 | MDCNFG_DE3)
-
-       @ program banks 0/1 for bus width
-       @
-       bic     r2,  r2,  #MDCNFG_DWID0      @0=32-bit
-
-       @ write initial value of mdcnfg, w/o enabling sdram banks
-       @
-       str     r2,  [r1, #MDCNFG_OFFSET]
-
-       @ Step 4e
-       @ pause for 200 uSecs
-       @
-       ldr     r3, =OSCR       @ reset the OS Timer Count to zero
-       mov     r2, #0
-       str     r2, [r3]
-       ldr     r4, =0x300                      @ really 0x2E1 is about 200usec, so 0x300 should be plenty
-       1:
-       ldr     r2, [r3]
-       cmp     r4, r2
-       bgt     1b
-
-       /* Why is this here??? */
-       mov     r0, #0x78                @turn everything off
-       mcr     p15, 0, r0, c1, c0, 0      @(caches off, MMU off, etc.)
-
-       @ Step 4f
-       @ Access memory *not yet enabled* for CBR refresh cycles (8)
-       @ - CBR is generated for all banks
-
-       ldr     r2, =CONFIG_SYS_DRAM_BASE
-       str     r2, [r2]
-       str     r2, [r2]
-       str     r2, [r2]
-       str     r2, [r2]
-       str     r2, [r2]
-       str     r2, [r2]
-       str     r2, [r2]
-       str     r2, [r2]
-
-       @ Step 4g
-       @get memory controller base address
-       @
-       ldr     r1,  =MEMC_BASE
-
-       @fetch current mdcnfg value
-       @
-       ldr     r3,  [r1, #MDCNFG_OFFSET]
-
-       @enable sdram bank 0 if installed (must do for any populated bank)
-       @
-       orr     r3,  r3,  #MDCNFG_DE0
-
-       @write back mdcnfg, enabling the sdram bank(s)
-       @
-       str     r3,  [r1, #MDCNFG_OFFSET]
-
-       @ Step 4h
-       @ write mdmrs
-       @
-       ldr     r2,  =CONFIG_SYS_MDMRS_VAL
-       str     r2,  [r1, #MDMRS_OFFSET]
-
-       @ Done Memory Init
-
-       /*SET_LED 6 */
-
-       @********************************************************************
-       @ Disable (mask) all interrupts at the interrupt controller
-       @
-
-       @ clear the interrupt level register (use IRQ, not FIQ)
-       @
-       mov     r1, #0
-       ldr     r2,  =ICLR
-       str     r1,  [r2]
-
-       @ Set interrupt mask register
-       @
-       ldr     r1,  =CONFIG_SYS_ICMR_VAL
-       ldr     r2,  =ICMR
-       str     r1,  [r2]
-
-       @ ********************************************************************
-       @ Disable the peripheral clocks, and set the core clock
-       @
-
-       @ Turn Off ALL on-chip peripheral clocks for re-configuration
-       @
-       ldr     r1,  =CKEN
-       mov     r2,  #0
-       str     r2,  [r1]
-
-       @ set core clocks
-       @
-       ldr     r2,  =CONFIG_SYS_CCCR_VAL
-       ldr     r1,  =CCCR
-       str     r2,  [r1]
-
-       #ifdef ENABLE32KHZ
-       @ enable the 32Khz oscillator for RTC and PowerManager
-       @
-       ldr     r1,  =OSCC
-       mov     r2,  #OSCC_OON
-       str     r2,  [r1]
-
-       @ NOTE:  spin here until OSCC.OOK get set,
-       @        meaning the PLL has settled.
-       @
-60:
-       ldr     r2, [r1]
-       ands    r2, r2, #1
-       beq     60b
-#endif
-
-       @ Turn on needed clocks
-       @
-       ldr     r1,  =CKEN
-       ldr     r2,  =CONFIG_SYS_CKEN_VAL
-       str     r2,  [r1]
-
-       /*SET_LED 7 */
-
-/* Is this needed???? */
-#define NODEBUG
-#ifdef NODEBUG
-   /*Disable software and data breakpoints */
-       mov     r0,#0
-       mcr     p15,0,r0,c14,c8,0  /* ibcr0 */
-       mcr     p15,0,r0,c14,c9,0  /* ibcr1 */
-       mcr     p15,0,r0,c14,c4,0  /* dbcon */
-
-       /*Enable all debug functionality */
-       mov     r0,#0x80000000
-       mcr     p14,0,r0,c10,c0,0  /* dcsr */
-
-#endif
-
-       mov     pc, r10
-
-@ End lowlevel_init
index 97c37eaa3939d88cbc712473ba2f98518fde886b..5a16cc76e81c5fd0a0b15d5cad8d854e65449167 100644 (file)
@@ -36,8 +36,9 @@ DECLARE_GLOBAL_DATA_PTR;
 
 int board_init (void)
 {
-       /* memory and cpu-speed are setup before relocation */
-       /* so we do _nothing_ here */
+       /* We have RAM, disable cache */
+       dcache_disable();
+       icache_disable();
 
        /* arch number of Lubbock-Board */
        gd->bd->bi_arch_number = MACH_TYPE_PLEB2;
@@ -55,17 +56,16 @@ int board_late_init(void)
        return 0;
 }
 
+extern void pxa_dram_init(void);
+int dram_init(void)
+{
+       pxa_dram_init();
+       gd->ram_size = PHYS_SDRAM_1_SIZE;
+       return 0;
+}
 
-int dram_init (void)
+void dram_init_banksize(void)
 {
        gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
        gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
-       gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
-       gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
-       gd->bd->bi_dram[2].start = PHYS_SDRAM_3;
-       gd->bd->bi_dram[2].size = PHYS_SDRAM_3_SIZE;
-       gd->bd->bi_dram[3].start = PHYS_SDRAM_4;
-       gd->bd->bi_dram[3].size = PHYS_SDRAM_4_SIZE;
-
-       return 0;
 }
index 119bc534e7b8f9916bb9656a4b102cf95de43fe1..d9961dd18636a9a86425888883e576e2e3092747 100644 (file)
@@ -21,6 +21,7 @@
  * MA 02111-1307 USA
  */
 
+#include <asm-offsets.h>
 #include <ppc_asm.tmpl>
 #include <asm/mmu.h>
 #include <config.h>
index 4892b42bc156d8d44dd6504d39cdcbe9cb62b399..2835f37554ce0614c223810e0f51b338f9799700 100644 (file)
@@ -27,17 +27,15 @@ include $(TOPDIR)/config.mk
 LIB    = $(obj)lib$(BOARD).a
 
 COBJS  := pxa_idp.o
-SOBJS  := lowlevel_init.o
 
-SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+SRCS   := $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
-SOBJS  := $(addprefix $(obj),$(SOBJS))
 
-$(LIB):        $(obj).depend $(OBJS) $(SOBJS)
-       $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+$(LIB):        $(obj).depend $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS)
 
 clean:
-       rm -f $(SOBJS) $(OBJS)
+       rm -f $(OBJS)
 
 distclean:     clean
        rm -f $(LIB) core *.bak $(obj).depend
diff --git a/board/pxa255_idp/config.mk b/board/pxa255_idp/config.mk
deleted file mode 100644 (file)
index f30f695..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#CONFIG_SYS_TEXT_BASE = 0xa1700000
-CONFIG_SYS_TEXT_BASE = 0xa3080000
-#CONFIG_SYS_TEXT_BASE = 0
diff --git a/board/pxa255_idp/lowlevel_init.S b/board/pxa255_idp/lowlevel_init.S
deleted file mode 100644 (file)
index a50760f..0000000
+++ /dev/null
@@ -1,496 +0,0 @@
-/*
- * Most of this taken from Redboot hal_platform_setup.h with cleanup
- *
- * NOTE: I haven't clean this up considerably, just enough to get it
- * running. See hal_platform_setup.h for the source. See
- * board/cradle/lowlevel_init.S for another PXA250 setup that is
- * much cleaner.
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include <config.h>
-#include <version.h>
-#include <asm/arch/pxa-regs.h>
-
-DRAM_SIZE:  .long   CONFIG_SYS_DRAM_SIZE
-
-/* wait for coprocessor write complete */
-       .macro CPWAIT reg
-       mrc  p15,0,\reg,c2,c0,0
-       mov  \reg,\reg
-       sub  pc,pc,#4
-       .endm
-
-/*
- *     Memory setup
- */
-.globl lowlevel_init
-lowlevel_init:
-
-       mov      r10, lr
-
-#ifdef DEBUG_BLINK_ENABLE
-       /* 3rd blink */
-       bl      blink
-#endif
-
-       /* Set up GPIO pins first ----------------------------------------- */
-       ldr             r0,     =GPSR0
-       ldr             r1,     =CONFIG_SYS_GPSR0_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPSR1
-       ldr             r1,     =CONFIG_SYS_GPSR1_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPSR2
-       ldr             r1,     =CONFIG_SYS_GPSR2_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPCR0
-       ldr             r1,     =CONFIG_SYS_GPCR0_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPCR1
-       ldr             r1,     =CONFIG_SYS_GPCR1_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPCR2
-       ldr             r1,     =CONFIG_SYS_GPCR2_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPDR0
-       ldr             r1,     =CONFIG_SYS_GPDR0_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPDR1
-       ldr             r1,     =CONFIG_SYS_GPDR1_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPDR2
-       ldr             r1,     =CONFIG_SYS_GPDR2_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GAFR0_L
-       ldr             r1,     =CONFIG_SYS_GAFR0_L_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GAFR0_U
-       ldr             r1,     =CONFIG_SYS_GAFR0_U_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GAFR1_L
-       ldr             r1,     =CONFIG_SYS_GAFR1_L_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GAFR1_U
-       ldr             r1,     =CONFIG_SYS_GAFR1_U_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GAFR2_L
-       ldr             r1,     =CONFIG_SYS_GAFR2_L_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GAFR2_U
-       ldr             r1,     =CONFIG_SYS_GAFR2_U_VAL
-       str             r1,   [r0]
-
-       ldr     r0,     =PSSR           /* enable GPIO pins */
-       ldr             r1,     =CONFIG_SYS_PSSR_VAL
-       str             r1,   [r0]
-
-#ifdef DEBUG_BLINK_ENABLE
-       /* 4th debug blink */
-       bl      blink
-#endif
-
-       /* ---------------------------------------------------------------- */
-       /* Enable memory interface                                          */
-       /*                                                                  */
-       /* The sequence below is based on the recommended init steps        */
-       /* detailed in the Intel PXA250 Operating Systems Developers Guide, */
-       /* Chapter 10.                                                      */
-       /* ---------------------------------------------------------------- */
-
-       /* ---------------------------------------------------------------- */
-       /* Step 1: Wait for at least 200 microsedonds to allow internal     */
-       /*         clocks to settle. Only necessary after hard reset...     */
-       /*         FIXME: can be optimized later                            */
-       /* ---------------------------------------------------------------- */
-
-       ldr r3, =OSCR                   /* reset the OS Timer Count to zero */
-       mov r2, #0
-       str r2, [r3]
-       ldr r4, =0x300                  /* really 0x2E1 is about 200usec,   */
-                                       /* so 0x300 should be plenty        */
-1:
-       ldr r2, [r3]
-       cmp r4, r2
-       bgt 1b
-
-mem_init:
-
-       ldr     r1,  =MEMC_BASE         /* get memory controller base addr. */
-
-       /* ---------------------------------------------------------------- */
-       /* Step 2a: Initialize Asynchronous static memory controller        */
-       /* ---------------------------------------------------------------- */
-
-       /* MSC registers: timing, bus width, mem type                       */
-
-       /* MSC0: nCS(0,1)                                                   */
-       ldr     r2,   =CONFIG_SYS_MSC0_VAL
-       str     r2,   [r1, #MSC0_OFFSET]
-       ldr     r2,   [r1, #MSC0_OFFSET]        /* read back to ensure      */
-                                               /* that data latches        */
-       /* MSC1: nCS(2,3)                                                   */
-       ldr     r2,  =CONFIG_SYS_MSC1_VAL
-       str     r2,  [r1, #MSC1_OFFSET]
-       ldr     r2,  [r1, #MSC1_OFFSET]
-
-       /* MSC2: nCS(4,5)                                                   */
-       ldr     r2,  =CONFIG_SYS_MSC2_VAL
-       str     r2,  [r1, #MSC2_OFFSET]
-       ldr     r2,  [r1, #MSC2_OFFSET]
-
-       /* ---------------------------------------------------------------- */
-       /* Step 2b: Initialize Card Interface                               */
-       /* ---------------------------------------------------------------- */
-
-       /* MECR: Memory Expansion Card Register                             */
-       ldr     r2,  =CONFIG_SYS_MECR_VAL
-       str     r2,  [r1, #MECR_OFFSET]
-       ldr     r2,     [r1, #MECR_OFFSET]
-
-       /* MCMEM0: Card Interface slot 0 timing                             */
-       ldr     r2,  =CONFIG_SYS_MCMEM0_VAL
-       str     r2,  [r1, #MCMEM0_OFFSET]
-       ldr     r2,     [r1, #MCMEM0_OFFSET]
-
-       /* MCMEM1: Card Interface slot 1 timing                             */
-       ldr     r2,  =CONFIG_SYS_MCMEM1_VAL
-       str     r2,  [r1, #MCMEM1_OFFSET]
-       ldr     r2,     [r1, #MCMEM1_OFFSET]
-
-       /* MCATT0: Card Interface Attribute Space Timing, slot 0            */
-       ldr     r2,  =CONFIG_SYS_MCATT0_VAL
-       str     r2,  [r1, #MCATT0_OFFSET]
-       ldr     r2,     [r1, #MCATT0_OFFSET]
-
-       /* MCATT1: Card Interface Attribute Space Timing, slot 1            */
-       ldr     r2,  =CONFIG_SYS_MCATT1_VAL
-       str     r2,  [r1, #MCATT1_OFFSET]
-       ldr     r2,     [r1, #MCATT1_OFFSET]
-
-       /* MCIO0: Card Interface I/O Space Timing, slot 0                   */
-       ldr     r2,  =CONFIG_SYS_MCIO0_VAL
-       str     r2,  [r1, #MCIO0_OFFSET]
-       ldr     r2,     [r1, #MCIO0_OFFSET]
-
-       /* MCIO1: Card Interface I/O Space Timing, slot 1                   */
-       ldr     r2,  =CONFIG_SYS_MCIO1_VAL
-       str     r2,  [r1, #MCIO1_OFFSET]
-       ldr     r2,     [r1, #MCIO1_OFFSET]
-
-#ifdef DEBUG_BLINK_ENABLE
-       /* 5th blink */
-       bl      blink
-#endif
-
-       /* ---------------------------------------------------------------- */
-       /* Step 2c: Write FLYCNFG  FIXME: what's that???                    */
-       /* ---------------------------------------------------------------- */
-
-       /* ---------------------------------------------------------------- */
-       /* Step 2d: Initialize Timing for Sync Memory (SDCLK0)              */
-       /* ---------------------------------------------------------------- */
-
-       /* Before accessing MDREFR we need a valid DRI field, so we set     */
-       /* this to power on defaults + DRI field.                           */
-
-       ldr     r3,     =CONFIG_SYS_MDREFR_VAL
-       ldr     r2,     =0xFFF
-       and     r3,     r3,  r2
-       ldr     r4,     =0x03ca4000
-       orr     r4,     r4,  r3
-       str     r4,     [r1, #MDREFR_OFFSET]    /* write back MDREFR        */
-       ldr     r4,  [r1, #MDREFR_OFFSET]
-
-       /* Note: preserve the mdrefr value in r4                            */
-
-       /* ---------------------------------------------------------------- */
-       /* Step 3: Initialize Synchronous Static Memory (Flash/Peripherals) */
-       /* ---------------------------------------------------------------- */
-
-       /* Initialize SXCNFG register. Assert the enable bits               */
-
-       /* Write SXMRS to cause an MRS command to all enabled banks of      */
-       /* synchronous static memory. Note that SXLCR need not be written   */
-       /* at this time.                                                    */
-
-       /* FIXME: we use async mode for now                                 */
-
-       /* ---------------------------------------------------------------- */
-       /* Step 4: Initialize SDRAM                                         */
-       /* ---------------------------------------------------------------- */
-
-       /* set MDREFR according to user define with exception of a few bits */
-
-       ldr     r4,     =CONFIG_SYS_MDREFR_VAL
-       orr     r4,     r4,     #(MDREFR_SLFRSH)
-       bic     r4,     r4,     #(MDREFR_E1PIN|MDREFR_E0PIN)
-       str     r4,     [r1, #MDREFR_OFFSET]    /* write back MDREFR        */
-       ldr     r4,  [r1, #MDREFR_OFFSET]
-
-       /* Step 4b: de-assert MDREFR:SLFRSH.                                */
-
-       bic     r4,     r4,     #(MDREFR_SLFRSH)
-       str     r4,     [r1, #MDREFR_OFFSET]    /* write back MDREFR        */
-       ldr     r4,  [r1, #MDREFR_OFFSET]
-
-       /* Step 4c: assert MDREFR:E1PIN and E0PIO as desired                */
-
-       ldr     r4,     =CONFIG_SYS_MDREFR_VAL
-       str     r4,     [r1, #MDREFR_OFFSET]    /* write back MDREFR        */
-       ldr     r4,     [r1, #MDREFR_OFFSET]
-
-
-       /* Step 4d: write MDCNFG with MDCNFG:DEx deasserted (set to 0), to  */
-       /*          configure but not enable each SDRAM partition pair.     */
-
-       ldr     r4,     =CONFIG_SYS_MDCNFG_VAL
-       bic     r4,     r4,     #(MDCNFG_DE0|MDCNFG_DE1)
-
-       str     r4,     [r1, #MDCNFG_OFFSET]    /* write back MDCNFG        */
-       ldr     r4,     [r1, #MDCNFG_OFFSET]
-
-       /* Step 4e: Wait for the clock to the SDRAMs to stabilize,          */
-       /*          100..200 Âµsec.                                          */
-
-       ldr r3, =OSCR                   /* reset the OS Timer Count to zero */
-       mov r2, #0
-           str r2, [r3]
-       ldr r4, =0x300                  /* really 0x2E1 is about 200usec,   */
-                                       /* so 0x300 should be plenty        */
-1:
-           ldr r2, [r3]
-           cmp r4, r2
-           bgt 1b
-
-       /* Step 4f: Trigger a number (usually 8) refresh cycles by          */
-       /*          attempting non-burst read or write accesses to disabled */
-       /*          SDRAM, as commonly specified in the power up sequence   */
-       /*          documented in SDRAM data sheets. The address(es) used   */
-       /*          for this purpose must not be cacheable.                 */
-
-       ldr     r3,     =CONFIG_SYS_DRAM_BASE
-       str     r2,     [r3]
-       str     r2,     [r3]
-       str     r2,     [r3]
-       str     r2,     [r3]
-       str     r2,     [r3]
-       str     r2,     [r3]
-       str     r2,     [r3]
-       str     r2,     [r3]
-
-       /* Step 4g: Write MDCNFG with enable bits asserted                  */
-       /*          (MDCNFG:DEx set to 1).                                  */
-
-       ldr     r3,  [r1, #MDCNFG_OFFSET]
-       orr     r3,     r3,     #(MDCNFG_DE0|MDCNFG_DE1)
-       str     r3,  [r1, #MDCNFG_OFFSET]
-
-       /* Step 4h: Write MDMRS.                                            */
-
-       ldr     r2,  =CONFIG_SYS_MDMRS_VAL
-       str     r2,  [r1, #MDMRS_OFFSET]
-
-       /* We are finished with Intel's memory controller initialisation    */
-#if 0
-       /* FIXME turn on serial ports */
-       /* look into moving this to board_init() */
-       ldr     r2, =(PXA_CS5_PHYS + 0x03C0002c)
-       mov     r3, #0x13
-       str     r3, [r2]
-#endif
-
-#ifdef DEBUG_BLINK_ENABLE
-       /* 6th blink */
-       bl      blink
-#endif
-
-       /* ---------------------------------------------------------------- */
-       /* Disable (mask) all interrupts at interrupt controller            */
-       /* ---------------------------------------------------------------- */
-
-initirqs:
-
-       mov     r1, #0          /* clear int. level register (IRQ, not FIQ) */
-       ldr     r2,  =ICLR
-       str     r1,  [r2]
-
-       ldr     r2,  =ICMR      /* mask all interrupts at the controller    */
-       str     r1,  [r2]
-
-       /* ---------------------------------------------------------------- */
-       /* Clock initialisation                                             */
-       /* ---------------------------------------------------------------- */
-
-initclks:
-
-       /* Disable the peripheral clocks, and set the core clock frequency  */
-       /* (hard-coding at 398.12MHz for now).                              */
-
-       /* Turn Off ALL on-chip peripheral clocks for re-configuration      */
-       /* Note: See label 'ENABLECLKS' for the re-enabling                 */
-#if 0
-       ldr     r1,  =CKEN
-       mov     r2,  #0
-       str     r2,  [r1]
-
-       /* default value in case no valid rotary switch setting is found    */
-       ldr     r2, =(CCCR_L27|CCCR_M2|CCCR_N10)  /* DEFAULT: {200/200/100} */
-
-       /* ... and write the core clock config register                     */
-       ldr     r1,  =CCCR
-       str     r2,  [r1]
-
-#endif
-
-#ifdef RTC
-       /* enable the 32Khz oscillator for RTC and PowerManager             */
-
-       ldr     r1,  =OSCC
-       mov     r2,  #OSCC_OON
-       str     r2,  [r1]
-
-       /* NOTE:  spin here until OSCC.OOK get set, meaning the PLL         */
-       /* has settled.                                                     */
-60:
-       ldr     r2, [r1]
-       ands    r2, r2, #1
-       beq     60b
-#endif
-
-       /* ---------------------------------------------------------------- */
-       /*                                                                  */
-       /* ---------------------------------------------------------------- */
-
-       /* Save SDRAM size */
-       ldr     r1, =DRAM_SIZE
-       str     r8, [r1]
-
-       /* Interrupt init: Mask all interrupts                              */
-       ldr     r0, =ICMR /* enable no sources */
-       mov r1, #0
-       str r1, [r0]
-
-       /* FIXME */
-
-#define NODEBUG
-#ifdef NODEBUG
-       /*Disable software and data breakpoints */
-       mov     r0,#0
-       mcr     p15,0,r0,c14,c8,0  /* ibcr0 */
-       mcr     p15,0,r0,c14,c9,0  /* ibcr1 */
-       mcr     p15,0,r0,c14,c4,0  /* dbcon */
-
-       /*Enable all debug functionality */
-       mov     r0,#0x80000000
-       mcr     p14,0,r0,c10,c0,0  /* dcsr */
-#endif
-
-       /* ---------------------------------------------------------------- */
-       /* End memsetup                                                     */
-       /* ---------------------------------------------------------------- */
-
-#ifdef DEBUG_BLINK_ENABLE
-       /* 7th blink */
-       bl      blink
-#endif
-
-endlowlevel_init:
-
-       mov     pc, r10
-
-
-#ifdef DEBUG_BLINK_ENABLE
-
-/* debug LED code */
-
-/* delay about 200ms */
-delay:
-
-       /* reset OSCR to 0 */
-       ldr     r8, =OSCR
-       mov     r9, #0
-       str     r9, [r8]
-
-       /* make sure new value has stuck */
-1:
-       ldr     r8, =OSCR
-       ldr     r9, [r8]
-       mov     r8, #0x10000
-       cmp     r9, r8
-       bgt     1b
-
-       /* now, wait for delay to expire */
-1:
-       ldr     r8, =OSCR
-       ldr     r9, [r8]
-       mov     r8, #0xd4000
-       cmp     r8, r9
-       bgt     1b
-
-       mov     pc, lr
-
-/* blink code -- trashes r7, r8, r9 */
-
-.globl blink
-blink:
-
-       mov     r7, lr
-
-       /* set GPIO10 as outout */
-       ldr     r8,  =GPDR0
-       ldr     r9,  [r8]
-       orr     r9,  r9, #(1<<10)
-       str     r9,  [r8]
-
-       /* turn LED off */
-       mov     r9,  #(1<<10)
-       ldr     r8,  =GPCR0
-       str     r9, [r8]
-       bl      delay
-
-       /* turn LED on */
-       mov     r9,  #(1<<10)
-       ldr     r8,  =GPSR0
-       str     r9, [r8]
-       bl      delay
-
-       /* turn LED off */
-       mov     r9,  #(1<<10)
-       ldr     r8,  =GPCR0
-       str     r9, [r8]
-
-       mov     pc, r7
-
-#endif
index a54a95dca907677a4ae0f3d5f0f88edb3cfcfd36..804d09c22bd72ad18268763b5c6ba21021323c68 100644 (file)
@@ -33,6 +33,7 @@
 #include <common.h>
 #include <netdev.h>
 #include <command.h>
+#include <asm/io.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -42,8 +43,9 @@ DECLARE_GLOBAL_DATA_PTR;
 
 int board_init (void)
 {
-       /* memory and cpu-speed are setup before relocation */
-       /* so we do _nothing_ here */
+       /* We have RAM, disable cache */
+       dcache_disable();
+       icache_disable();
 
        /* arch number of Lubbock-Board */
        gd->bd->bi_arch_number = MACH_TYPE_PXA_IDP;
@@ -56,14 +58,14 @@ int board_init (void)
 
        /* set PWM for LCD */
        /* a value that works is 60Hz, 77% duty cycle */
-       CKEN |= CKEN0_PWM0;
-       PWM_CTRL0 = 0x3f;
-       PWM_PERVAL0 = 0x3ff;
-       PWM_PWDUTY0 = 792;
+       writel(readl(CKEN) | CKEN0_PWM0, CKEN);
+       writel(0x3f, PWM_CTRL0);
+       writel(0x3ff, PWM_PERVAL0);
+       writel(792, PWM_PWDUTY0);
 
        /* clear reset to AC97 codec */
-       CKEN |= CKEN2_AC97;
-       GCR = GCR_COLD_RST;
+       writel(readl(CKEN) | CKEN2_AC97, CKEN);
+       writel(GCR_COLD_RST, GCR);
 
        /* enable LCD backlight */
        /* *(volatile unsigned int *)(PXA_CS5_PHYS + 0x03C00030) = 0x7; */
@@ -81,32 +83,30 @@ int board_late_init(void)
        return 0;
 }
 
+extern void pxa_dram_init(void);
+int dram_init(void)
+{
+       pxa_dram_init();
+       gd->ram_size = PHYS_SDRAM_1_SIZE;
+       return 0;
+}
 
-int dram_init (void)
+void dram_init_banksize(void)
 {
        gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
        gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
-       gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
-       gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
-       gd->bd->bi_dram[2].start = PHYS_SDRAM_3;
-       gd->bd->bi_dram[2].size = PHYS_SDRAM_3_SIZE;
-       gd->bd->bi_dram[3].start = PHYS_SDRAM_4;
-       gd->bd->bi_dram[3].size = PHYS_SDRAM_4_SIZE;
-
-       return 0;
 }
 
-
 #ifdef DEBUG_BLINKC_ENABLE
 
 void delay_c(void)
 {
        /* reset OSCR to 0 */
-       OSCR = 0;
-       while(OSCR > 0x10000)
+       writel(0, OSCR);
+       while (readl(OSCR) > 0x10000)
                ;
 
-       while(OSCR < 0xd4000)
+       while (readl(OSCR) < 0xd4000)
                ;
 }
 
@@ -114,12 +114,12 @@ void blink_c(void)
 {
        int led_bit = (1<<10);
 
-       GPDR0 = led_bit;
-       GPCR0 = led_bit;
+       writel(led_bit, GPDR0);
+       writel(led_bit, GPCR0);
        delay_c();
-       GPSR0 = led_bit;
+       writel(led_bit, GPSR0);
        delay_c();
-       GPCR0 = led_bit;
+       writel(led_bit, GPCR0);
 }
 
 int do_idpcmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
index 1a9038c75331c4c5054f13fadcb5664173560a12..6853d2b28beaf29a65f89fb73d6da467f70e3615 100644 (file)
@@ -24,6 +24,8 @@
 #
 sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp
 
-ifndef CONFIG_SYS_TEXT_BASE
+ifdef CONFIG_SH_32BIT
+CONFIG_SYS_TEXT_BASE = 0x8FF80000
+else
 CONFIG_SYS_TEXT_BASE = 0x0ff80000
 endif
index 531dcdf4ae22e5dd00c2c6f7718df775394927ea..61b4b55534226357e1f74120baf3f484c2feeec0 100644 (file)
@@ -25,6 +25,7 @@
 #define __ASSEMBLY__   1
 #endif
 
+#include <asm-offsets.h>
 #include <config.h>
 #include <asm/processor.h>
 #include <mpc824x.h>
index 54b2d0b166b71d434dc3de3a2d3b7abd353064a8..d954d2f6f74899c191f209248164e0887009aa9f 100644 (file)
@@ -206,100 +206,45 @@ int first_free_busno = 0;
 
 void pci_init_board(void)
 {
+       struct fsl_pci_info pci_info[2];
        volatile immap_t *immap = (immap_t *) CONFIG_SYS_CCSRBAR;
        volatile ccsr_gur_t *gur = &immap->im_gur;
-       uint devdisr = gur->devdisr;
+       uint devdisr = in_be32(&gur->devdisr);
        uint io_sel = (gur->pordevsr & MPC8641_PORDEVSR_IO_SEL)
                >> MPC8641_PORDEVSR_IO_SEL_SHIFT;
+       int pcie_ep;
+       int num = 0;
 
 #ifdef CONFIG_PCIE1
-{
-       volatile ccsr_fsl_pci_t *pci = (ccsr_fsl_pci_t *) CONFIG_SYS_PCIE1_ADDR;
-       struct pci_controller *hose = &pcie1_hose;
-       struct pci_region *r = hose->regions;
-#ifdef DEBUG
-       uint host1_agent = (gur->porbmsr & MPC8641_PORBMSR_HA)
-               >> MPC8641_PORBMSR_HA_SHIFT;
-       uint pex1_agent = (host1_agent == 0) || (host1_agent == 1);
-#endif
-       if ((io_sel == 2 || io_sel == 3 || io_sel == 5
-            || io_sel == 6 || io_sel == 7 || io_sel == 0xF)
-           && !(devdisr & MPC86xx_DEVDISR_PCIEX1)) {
-               debug("PCI-EXPRESS 1: %s \n", pex1_agent ? "Agent" : "Host");
-               debug("0x%08x=0x%08x ", &pci->pme_msg_det, pci->pme_msg_det);
-               if (pci->pme_msg_det) {
-                       pci->pme_msg_det = 0xffffffff;
-                       debug(" with errors.  Clearing.  Now 0x%08x",
-                             pci->pme_msg_det);
-               }
-               debug("\n");
-
-               /* outbound memory */
-               pci_set_region(r++,
-                              CONFIG_SYS_PCIE1_MEM_BUS,
-                              CONFIG_SYS_PCIE1_MEM_PHYS,
-                              CONFIG_SYS_PCIE1_MEM_SIZE,
-                              PCI_REGION_MEM);
-
-               /* outbound io */
-               pci_set_region(r++,
-                              CONFIG_SYS_PCIE1_IO_BUS,
-                              CONFIG_SYS_PCIE1_IO_PHYS,
-                              CONFIG_SYS_PCIE1_IO_SIZE,
-                              PCI_REGION_IO);
-
-               hose->region_count = r - hose->regions;
-
-               hose->first_busno=first_free_busno;
-
-               fsl_pci_init(hose, (u32)&pci->cfg_addr, (u32)&pci->cfg_data);
-
-               first_free_busno=hose->last_busno+1;
-               printf ("    PCI-EXPRESS 1 on bus %02x - %02x\n",
-                       hose->first_busno,hose->last_busno);
-
+       int pcie_configured = is_fsl_pci_cfg(LAW_TRGT_IF_PCIE_1, io_sel);
+
+       if (pcie_configured && !(devdisr & MPC86xx_DEVDISR_PCIEX1)) {
+               SET_STD_PCIE_INFO(pci_info[num], 1);
+               pcie_ep = fsl_setup_hose(&pcie1_hose, pci_info[num].regs);
+               printf("    PCIE1 connected as %s (base addr %lx)\n",
+                               pcie_ep ? "Endpoint" : "Root Complex",
+                               pci_info[num].regs);
+               first_free_busno = fsl_pci_init_port(&pci_info[num++],
+                                       &pcie1_hose, first_free_busno);
        } else {
-               puts("PCI-EXPRESS 1: Disabled\n");
+               puts("    PCIE1: disabled\n");
        }
-}
 #else
-       puts("PCI-EXPRESS1: Disabled\n");
+       puts("    PCIE1: disabled\n");
 #endif /* CONFIG_PCIE1 */
 
 #ifdef CONFIG_PCIE2
-{
-       volatile ccsr_fsl_pci_t *pci = (ccsr_fsl_pci_t *) CONFIG_SYS_PCIE2_ADDR;
-       struct pci_controller *hose = &pcie2_hose;
-       struct pci_region *r = hose->regions;
-
-       /* outbound memory */
-       pci_set_region(r++,
-                      CONFIG_SYS_PCIE2_MEM_BUS,
-                      CONFIG_SYS_PCIE2_MEM_PHYS,
-                      CONFIG_SYS_PCIE2_MEM_SIZE,
-                      PCI_REGION_MEM);
-
-       /* outbound io */
-       pci_set_region(r++,
-                      CONFIG_SYS_PCIE2_IO_BUS,
-                      CONFIG_SYS_PCIE2_IO_PHYS,
-                      CONFIG_SYS_PCIE2_IO_SIZE,
-                      PCI_REGION_IO);
-
-       hose->region_count = r - hose->regions;
 
-       hose->first_busno=first_free_busno;
-
-       fsl_pci_init(hose, (u32)&pci->cfg_addr, (u32)&pci->cfg_data);
-
-       first_free_busno=hose->last_busno+1;
-       printf ("    PCI-EXPRESS 2 on bus %02x - %02x\n",
-               hose->first_busno,hose->last_busno);
-}
+       SET_STD_PCIE_INFO(pci_info[num], 2);
+       pcie_ep = fsl_setup_hose(&pcie2_hose, pci_info[num].regs);
+       printf("    PCIE2 connected as %s (base addr %lx)\n",
+                       pcie_ep ? "Endpoint" : "Root Complex",
+                       pci_info[num].regs);
+       first_free_busno = fsl_pci_init_port(&pci_info[num++],
+                               &pcie2_hose, first_free_busno);
 #else
-       puts("PCI-EXPRESS 2: Disabled\n");
+       puts("    PCIE2: disabled\n");
 #endif /* CONFIG_PCIE2 */
-
 }
 
 
diff --git a/board/sbc8641d/u-boot.lds b/board/sbc8641d/u-boot.lds
deleted file mode 100644 (file)
index 4cea3b3..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright 2006, 2007 Freescale Semiconductor, Inc.
- *
- * 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
-{
-
-  /* Read-only sections, merged into text segment: */
-  .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      :
-  {
-    arch/powerpc/cpu/mpc86xx/start.o   (.text)
-    arch/powerpc/cpu/mpc86xx/traps.o (.text)
-    arch/powerpc/cpu/mpc86xx/interrupts.o (.text)
-    arch/powerpc/cpu/mpc86xx/cpu_init.o (.text)
-    arch/powerpc/cpu/mpc86xx/cpu.o (.text)
-    arch/powerpc/cpu/mpc86xx/speed.o (.text)
-    common/dlmalloc.o (.text)
-    lib/crc32.o (.text)
-    arch/powerpc/lib/extable.o (.text)
-    lib/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 ecd35ff7b6f08efcc412d2dd579d6d65aa647290..a24d6f3a0fb2e38223d9f58ce86e2c81fd232f0c 100644 (file)
@@ -21,6 +21,7 @@
  * MA 02111-1307 USA
  */
 
+#include <asm-offsets.h>
 #include <ppc_asm.tmpl>
 #include <config.h>
 #include <asm/mmu.h>
index 7e9a2c7494d95eef722e2fe84cd69beaba1bb141..e684ba2c2a436213025cd9e1fb395640814e3640 100644 (file)
@@ -71,7 +71,7 @@ struct law_entry law_table[] = {
        SET_LAW(CONFIG_SYS_LBC_FLASH_BASE, LAW_3_SIZE, LAW_TRGT_IF_LBC),
        SET_LAW(CONFIG_SYS_PCI1_IO_PHYS, LAW_SIZE_16M, LAW_TRGT_IF_PCI),
 #ifdef CONFIG_PCIE1
-       SET_LAW(CONFIG_SYS_PCIE1_MEM_BASE, LAW_5_SIZE, LAW_TRGT_IF_PCIE_1),
+       SET_LAW(CONFIG_SYS_PCIE1_MEM_BUS, LAW_5_SIZE, LAW_TRGT_IF_PCIE_1),
 #else /* !CONFIG_PCIE1 */
        SET_LAW(CONFIG_SYS_RIO_MEM_BASE, LAW_5_SIZE, LAW_TRGT_IF_RIO),
 #endif /* CONFIG_PCIE1 */
@@ -79,7 +79,7 @@ struct law_entry law_table[] = {
        SET_LAW(CONFIG_SYS_CAN_BASE, LAW_SIZE_16M, LAW_TRGT_IF_LBC),
 #endif /* CONFIG_CAN_DRIVER || CONFIG_NAND */
 #ifdef CONFIG_PCIE1
-       SET_LAW(CONFIG_SYS_PCIE1_IO_BASE, LAW_SIZE_16M, LAW_TRGT_IF_PCIE_1),
+       SET_LAW(CONFIG_SYS_PCIE1_IO_BUS, LAW_SIZE_16M, LAW_TRGT_IF_PCIE_1),
 #endif /* CONFIG_PCIE */
 };
 
index 71fe3ab49608ad270ea59b988d68d98ad407d262..75dd348aa529c7405580d6b288857b71438bd6a9 100644 (file)
@@ -80,7 +80,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
         * TLB 4:       256M    Non-cacheable, guarded
         * 0xc0000000   256M    PCI express MEM First half
         */
-       SET_TLB_ENTRY (1, CONFIG_SYS_PCIE1_MEM_BASE, CONFIG_SYS_PCIE1_MEM_BASE,
+       SET_TLB_ENTRY (1, CONFIG_SYS_PCIE1_MEM_BUS, CONFIG_SYS_PCIE1_MEM_BUS,
                       MAS3_SX | MAS3_SW | MAS3_SR, MAS2_I | MAS2_G,
                       0, 4, BOOKE_PAGESZ_256M, 1),
 
@@ -88,8 +88,8 @@ struct fsl_e_tlb_entry tlb_table[] = {
         * TLB 5:       256M    Non-cacheable, guarded
         * 0xd0000000   256M    PCI express MEM Second half
         */
-       SET_TLB_ENTRY (1, CONFIG_SYS_PCIE1_MEM_BASE + 0x10000000,
-                      CONFIG_SYS_PCIE1_MEM_BASE + 0x10000000,
+       SET_TLB_ENTRY (1, CONFIG_SYS_PCIE1_MEM_BUS + 0x10000000,
+                      CONFIG_SYS_PCIE1_MEM_BUS + 0x10000000,
                       MAS3_SX | MAS3_SW | MAS3_SR, MAS2_I | MAS2_G,
                       0, 5, BOOKE_PAGESZ_256M, 1),
 #else /* !CONFIG_PCIE */
@@ -155,7 +155,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
         * TLB 9:        16M    Non-cacheable, guarded
         * 0xef000000    16M    PCI express IO
         */
-       SET_TLB_ENTRY (1, CONFIG_SYS_PCIE1_IO_BASE, CONFIG_SYS_PCIE1_IO_BASE,
+       SET_TLB_ENTRY (1, CONFIG_SYS_PCIE1_IO_BUS, CONFIG_SYS_PCIE1_IO_BUS,
                       MAS3_SX | MAS3_SW | MAS3_SR, MAS2_I | MAS2_G,
                       0, 9, BOOKE_PAGESZ_16M, 1),
 #endif /* CONFIG_PCIE */
@@ -205,7 +205,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
         * TLB 6:       256M    Non-cacheable, guarded
         * 0xc0000000   256M    PCI express MEM First half
         */
-       SET_TLB_ENTRY (1, CONFIG_SYS_PCIE1_MEM_BASE, CONFIG_SYS_PCIE1_MEM_BASE,
+       SET_TLB_ENTRY (1, CONFIG_SYS_PCIE1_MEM_BUS, CONFIG_SYS_PCIE1_MEM_BUS,
                       MAS3_SX | MAS3_SW | MAS3_SR, MAS2_I | MAS2_G,
                       0, 6, BOOKE_PAGESZ_256M, 1),
 #else /* !CONFIG_PCIE */
index dda2cb6ed10c707f822a3a11fc5d158de57c29a7..2c3885f23c39f78d5b2d451d7018b7f469009f22 100644 (file)
@@ -38,6 +38,7 @@
 #include <asm/immap_85xx.h>
 #include <asm/fsl_pci.h>
 #include <asm/io.h>
+#include <linux/compiler.h>
 #include <ioports.h>
 #include <flash.h>
 #include <libfdt.h>
@@ -534,7 +535,6 @@ void local_bus_init (void)
 /*
  * Initialize PCI Devices, report devices found.
  */
-static int first_free_busno;
 
 #ifdef CONFIG_PCI1
 static struct pci_controller pci1_hose;
@@ -544,144 +544,77 @@ static struct pci_controller pci1_hose;
 static struct pci_controller pcie1_hose;
 #endif /* CONFIG_PCIE1 */
 
-static inline void init_pci1(void)
+void pci_init_board (void)
 {
-       volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
-#ifdef CONFIG_PCI1
-       volatile ccsr_fsl_pci_t *pci = (ccsr_fsl_pci_t *)CONFIG_SYS_PCI1_ADDR;
-       struct pci_controller *hose = &pci1_hose;
-       struct pci_region *r = hose->regions;
-
-       /* PORDEVSR[15] */
-       uint pci_32 = gur->pordevsr & MPC85xx_PORDEVSR_PCI1_PCI32;
-       /* PORDEVSR[14] */
-       uint pci_arb = gur->pordevsr & MPC85xx_PORDEVSR_PCI1_ARB;
-       /* PORPLLSR[16] */
-       uint pci_clk_sel = gur->porpllsr & MPC85xx_PORDEVSR_PCI1_SPD;
+       struct fsl_pci_info pci_info[2];
+       int first_free_busno = 0;
+       int num = 0;
+       int pcie_ep;
+       __maybe_unused int pcie_configured;
 
-       int pci_agent = fsl_setup_hose(hose, CONFIG_SYS_PCI1_ADDR);
+       volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
+       u32 devdisr = in_be32(&gur->devdisr);
+       u32 pordevsr = in_be32(&gur->pordevsr);
+       __maybe_unused uint io_sel = (pordevsr & MPC85xx_PORDEVSR_IO_SEL) >>
+                       MPC85xx_PORDEVSR_IO_SEL_SHIFT;
 
+#ifdef CONFIG_PCI1
+       uint pci_32 = in_be32(&gur->pordevsr) & MPC85xx_PORDEVSR_PCI1_PCI32;
+       uint pci_arb = in_be32(&gur->pordevsr) & MPC85xx_PORDEVSR_PCI1_ARB;
        uint pci_speed = CONFIG_SYS_CLK_FREQ;   /* PCI PSPEED in [4:5] */
+       uint pci_clk_sel = in_be32(&gur->porpllsr) & MPC85xx_PORDEVSR_PCI1_SPD;
 
-       if (!(gur->devdisr & MPC85xx_DEVDISR_PCI1)) {
-               printf ("PCI1:  %d bit, %s MHz, %s, %s, %s\n",
+       if (!(devdisr & MPC85xx_DEVDISR_PCI1)) {
+               SET_STD_PCI_INFO(pci_info[num], 1);
+               pcie_ep = fsl_setup_hose(&pci1_hose, pci_info[num].regs);
+               printf ("\n   PCI1:  %d bit, %s MHz, %s, %s, %s\n",
                        (pci_32) ? 32 : 64,
                        (pci_speed == 33333333) ? "33" :
                        (pci_speed == 66666666) ? "66" : "unknown",
                        pci_clk_sel ? "sync" : "async",
-                       pci_agent ? "agent" : "host",
+                       pcie_ep ? "agent" : "host",
                        pci_arb ? "arbiter" : "external-arbiter");
-
-               /* outbound memory */
-               pci_set_region (r++,
-                               CONFIG_SYS_PCI1_MEM_BASE,
-                               CONFIG_SYS_PCI1_MEM_PHYS,
-                               CONFIG_SYS_PCI1_MEM_SIZE,
-                               PCI_REGION_MEM);
-
-               /* outbound io */
-               pci_set_region (r++,
-                               CONFIG_SYS_PCI1_IO_BASE,
-                               CONFIG_SYS_PCI1_IO_PHYS,
-                               CONFIG_SYS_PCI1_IO_SIZE,
-                               PCI_REGION_IO);
-
-               hose->region_count = r - hose->regions;
-
-               hose->first_busno = first_free_busno;
-
-               fsl_pci_init(hose, (u32)&pci->cfg_addr, (u32)&pci->cfg_data);
-
-               printf ("       PCI on bus %02x..%02x\n",
-                       hose->first_busno, hose->last_busno);
-
-               first_free_busno = hose->last_busno + 1;
+               first_free_busno = fsl_pci_init_port(&pci_info[num++],
+                                       &pci1_hose, first_free_busno);
 #ifdef CONFIG_PCIX_CHECK
-               if (!(gur->pordevsr & MPC85xx_PORDEVSR_PCI1)) {
+               if (!(in_be32(&gur->pordevsr) & MPC85xx_PORDEVSR_PCI1)) {
                        ushort reg16 =
                                PCI_X_CMD_MAX_SPLIT | PCI_X_CMD_MAX_READ |
                                PCI_X_CMD_ERO | PCI_X_CMD_DPERR_E;
-                       uint dev = PCI_BDF(hose->first_busno, 0, 0);
+                       uint dev = PCI_BDF(0, 0, 0);
 
                        /* PCI-X init */
                        if (CONFIG_SYS_CLK_FREQ < 66000000)
                                puts ("PCI-X will only work at 66 MHz\n");
 
-                       pci_hose_write_config_word (hose, dev, PCIX_COMMAND,
-                                                   reg16);
+                       pci_write_config_word(dev, PCIX_COMMAND, reg16);
                }
 #endif
        } else {
-               puts ("PCI1:  disabled\n");
+               printf("    PCI1: disabled\n");
        }
-#else /* !CONFIG_PCI1 */
-       gur->devdisr |= MPC85xx_DEVDISR_PCI1; /* disable */
-#endif /* CONFIG_PCI1 */
-}
+#else
+       setbits_be32(&gur->devdisr, MPC85xx_DEVDISR_PCI1);
+#endif
 
-static inline void init_pcie1(void)
-{
-       volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
 #ifdef CONFIG_PCIE1
-       uint io_sel = (gur->pordevsr & MPC85xx_PORDEVSR_IO_SEL) >> 19;
-       volatile ccsr_fsl_pci_t *pci = (ccsr_fsl_pci_t *)CONFIG_SYS_PCIE1_ADDR;
-       struct pci_controller *hose = &pcie1_hose;
-       int pcie_ep;
-       struct pci_region *r = hose->regions;
-
-       int pcie_configured = is_fsl_pci_cfg(LAW_TRGT_IF_PCIE_1, io_sel);
-
-       pcie_ep = fsl_setup_hose(hose, CONFIG_SYS_PCIE1_ADDR);
-
-       if (pcie_configured && !(gur->devdisr & MPC85xx_DEVDISR_PCIE)){
-               printf ("PCIe:  %s, base address %x",
-                       pcie_ep ? "Endpoint" : "Root complex", (uint)pci);
-
-               if (pci->pme_msg_det) {
-                       pci->pme_msg_det = 0xffffffff;
-                       debug (", with errors. Clearing. Now 0x%08x",
-                              pci->pme_msg_det);
-               }
-               puts ("\n");
-
-               /* outbound memory */
-               pci_set_region (r++,
-                               CONFIG_SYS_PCIE1_MEM_BASE,
-                               CONFIG_SYS_PCIE1_MEM_PHYS,
-                               CONFIG_SYS_PCIE1_MEM_SIZE,
-                               PCI_REGION_MEM);
-
-               /* outbound io */
-               pci_set_region (r++,
-                               CONFIG_SYS_PCIE1_IO_BASE,
-                               CONFIG_SYS_PCIE1_IO_PHYS,
-                               CONFIG_SYS_PCIE1_IO_SIZE,
-                               PCI_REGION_IO);
-
-               hose->region_count = r - hose->regions;
-
-               hose->first_busno = first_free_busno;
-
-               fsl_pci_init(hose, (u32)&pci->cfg_addr, (u32)&pci->cfg_data);
-               printf ("       PCIe on bus %02x..%02x\n",
-                       hose->first_busno, hose->last_busno);
-
-               first_free_busno = hose->last_busno + 1;
-
+       pcie_configured = is_fsl_pci_cfg(LAW_TRGT_IF_PCIE_1, io_sel);
+
+       if (pcie_configured && !(devdisr & MPC85xx_DEVDISR_PCIE)) {
+               SET_STD_PCIE_INFO(pci_info[num], 1);
+               pcie_ep = fsl_setup_hose(&pcie1_hose, pci_info[num].regs);
+               printf("    PCIE1 connected as %s\n",
+                       pcie_ep ? "Endpoint" : "Root Complex");
+               first_free_busno = fsl_pci_init_port(&pci_info[num++],
+                                       &pcie1_hose, first_free_busno);
        } else {
-               printf ("PCIe:  disabled\n");
+               printf("    PCIE1: disabled\n");
        }
-#else /* !CONFIG_PCIE1 */
-       gur->devdisr |= MPC85xx_DEVDISR_PCIE; /* disable */
+#else
+       setbits_be32(&gur->devdisr, MPC85xx_DEVDISR_PCIE);
 #endif /* CONFIG_PCIE1 */
 }
 
-void pci_init_board (void)
-{
-       init_pci1();
-       init_pcie1();
-}
-
 #ifdef CONFIG_OF_BOARD_SETUP
 void ft_board_setup (void *blob, bd_t *bd)
 {
index 44c0d495ef2702445edcb0945ba5c1397f622d62..060ac890f7c4ab92ca0d56d7bc4ec234d7cd49e7 100644 (file)
@@ -26,17 +26,15 @@ include $(TOPDIR)/config.mk
 LIB    = $(obj)lib$(BOARD).a
 
 COBJS  := conxs.o eeprom.o
-SOBJS  := lowlevel_init.o pxavoltage.o
 
-SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+SRCS   := $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
-SOBJS  := $(addprefix $(obj),$(SOBJS))
 
-$(LIB):        $(obj).depend $(OBJS) $(SOBJS)
-       $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+$(LIB):        $(obj).depend $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS)
 
 clean:
-       rm -f $(SOBJS) $(OBJS)
+       rm -f $(OBJS)
 
 distclean:     clean
        rm -f $(LIB) core *.bak $(obj).depend
diff --git a/board/trizepsiv/config.mk b/board/trizepsiv/config.mk
deleted file mode 100644 (file)
index f04eb74..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CONFIG_SYS_TEXT_BASE =0xa1f00000
-# 0xa1700000
-#CONFIG_SYS_TEXT_BASE = 0
index 8c1145629f130044b293c2beac12c72e4b5b2d3e..99f665b47273092d2da96a41fcc224cf6c5d1001 100644 (file)
@@ -34,6 +34,7 @@
 #include <common.h>
 #include <asm/arch/pxa-regs.h>
 #include <netdev.h>
+#include <asm/io.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -44,7 +45,7 @@ extern struct serial_device serial_ffuart_device;
 extern struct serial_device serial_btuart_device;
 extern struct serial_device serial_stuart_device;
 
-#if CONFIG_POLARIS
+#if CONFIG_MK_POLARIS
 #define BOOT_CONSOLE   "serial_stuart"
 #else
 #define BOOT_CONSOLE   "serial_ffuart"
@@ -57,25 +58,27 @@ extern struct serial_device serial_stuart_device;
 
 int usb_board_init(void)
 {
-       UHCHR = (UHCHR | UHCHR_PCPL | UHCHR_PSPL) &
-               ~(UHCHR_SSEP0 | UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE);
+       writel((readl(UHCHR) | UHCHR_PCPL | UHCHR_PSPL) &
+               ~(UHCHR_SSEP0 | UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE),
+               UHCHR);
 
-       UHCHR |= UHCHR_FSBIR;
+       writel(readl(UHCHR) | UHCHR_FSBIR, UHCHR);
 
-       while (UHCHR & UHCHR_FSBIR);
+       while (readl(UHCHR) & UHCHR_FSBIR)
+               ;
 
-       UHCHR &= ~UHCHR_SSE;
-       UHCHIE = (UHCHIE_UPRIE | UHCHIE_RWIE);
+       writel(readl(UHCHR) & ~UHCHR_SSE, UHCHR);
+       writel((UHCHIE_UPRIE | UHCHIE_RWIE), UHCHIE);
 
        /* Clear any OTG Pin Hold */
-       if (PSSR & PSSR_OTGPH)
-               PSSR |= PSSR_OTGPH;
+       if (readl(PSSR) & PSSR_OTGPH)
+               writel(readl(PSSR) | PSSR_OTGPH, PSSR);
 
-       UHCRHDA &= ~(RH_A_NPS);
-       UHCRHDA |= RH_A_PSM;
+       writel(readl(UHCRHDA) & ~(RH_A_NPS), UHCRHDA);
+       writel(readl(UHCRHDA) | RH_A_PSM, UHCRHDA);
 
        /* Set port power control mask bits, only 3 ports. */
-       UHCRHDB |= (0x7<<17);
+       writel(readl(UHCRHDB) | (0x7<<17), UHCRHDB);
 
        return 0;
 }
@@ -87,22 +90,23 @@ void usb_board_init_fail(void)
 
 void usb_board_stop(void)
 {
-       UHCHR |= UHCHR_FHR;
+       writel(readl(UHCHR) | UHCHR_FHR, UHCHR);
        udelay(11);
-       UHCHR &= ~UHCHR_FHR;
+       writel(readl(UHCHR) & ~UHCHR_FHR, UHCHR);
 
-       UHCCOMS |= 1;
+       writel(readl(UHCCOMS) | 1, UHCCOMS);
        udelay(10);
 
-       CKEN &= ~CKEN10_USBHOST;
+       writel(readl(CKEN) & ~CKEN10_USBHOST, CKEN);
 
        return;
 }
 
 int board_init (void)
 {
-       /* memory and cpu-speed are setup before relocation */
-       /* so we do _nothing_ here */
+       /* We have RAM, disable cache */
+       dcache_disable();
+       icache_disable();
 
        /* arch number of ConXS Board */
        gd->bd->bi_arch_number = 776;
@@ -135,18 +139,18 @@ struct serial_device *default_serial_console (void)
        return &serial_ffuart_device;
 }
 
-int dram_init (void)
+extern void pxa_dram_init(void);
+int dram_init(void)
+{
+       pxa_dram_init();
+       gd->ram_size = PHYS_SDRAM_1_SIZE;
+       return 0;
+}
+
+void dram_init_banksize(void)
 {
        gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
        gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
-       gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
-       gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
-       gd->bd->bi_dram[2].start = PHYS_SDRAM_3;
-       gd->bd->bi_dram[2].size = PHYS_SDRAM_3_SIZE;
-       gd->bd->bi_dram[3].start = PHYS_SDRAM_4;
-       gd->bd->bi_dram[3].size = PHYS_SDRAM_4_SIZE;
-
-       return 0;
 }
 
 #ifdef CONFIG_DRIVER_DM9000
diff --git a/board/trizepsiv/lowlevel_init.S b/board/trizepsiv/lowlevel_init.S
deleted file mode 100644 (file)
index 128d554..0000000
+++ /dev/null
@@ -1,503 +0,0 @@
-/*
- * This was originally from the Lubbock u-boot port.
- *
- * Most of this taken from Redboot hal_platform_setup.h with cleanup
- *
- * NOTE: I haven't clean this up considerably, just enough to get it
- * running. See hal_platform_setup.h for the source. See
- * board/cradle/lowlevel_init.S for another PXA250 setup that is
- * much cleaner.
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include <config.h>
-#include <version.h>
-#include <asm/arch/pxa-regs.h>
-
-/* wait for coprocessor write complete */
-   .macro CPWAIT reg
-   mrc p15,0,\reg,c2,c0,0
-   mov \reg,\reg
-   sub pc,pc,#4
-   .endm
-
-
-/*
- *     Memory setup
- */
-
-.globl lowlevel_init
-lowlevel_init:
-
-       /* Set up GPIO pins first ----------------------------------------- */
-
-       ldr             r0,     =GPSR0
-       ldr             r1,     =CONFIG_SYS_GPSR0_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPSR1
-       ldr             r1,     =CONFIG_SYS_GPSR1_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPSR2
-       ldr             r1,     =CONFIG_SYS_GPSR2_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPSR3
-       ldr             r1,     =CONFIG_SYS_GPSR3_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPCR0
-       ldr             r1,     =CONFIG_SYS_GPCR0_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPCR1
-       ldr             r1,     =CONFIG_SYS_GPCR1_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPCR2
-       ldr             r1,     =CONFIG_SYS_GPCR2_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPCR3
-       ldr             r1,     =CONFIG_SYS_GPCR3_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GRER0
-       ldr             r1,     =CONFIG_SYS_GRER0_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GRER1
-       ldr             r1,     =CONFIG_SYS_GRER1_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GRER2
-       ldr             r1,     =CONFIG_SYS_GRER2_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GRER3
-       ldr             r1,     =CONFIG_SYS_GRER3_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GFER0
-       ldr             r1,     =CONFIG_SYS_GFER0_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GFER1
-       ldr             r1,     =CONFIG_SYS_GFER1_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GFER2
-       ldr             r1,     =CONFIG_SYS_GFER2_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GFER3
-       ldr             r1,     =CONFIG_SYS_GFER3_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPDR0
-       ldr             r1,     =CONFIG_SYS_GPDR0_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPDR1
-       ldr             r1,     =CONFIG_SYS_GPDR1_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPDR2
-       ldr             r1,     =CONFIG_SYS_GPDR2_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GPDR3
-       ldr             r1,     =CONFIG_SYS_GPDR3_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GAFR0_L
-       ldr             r1,     =CONFIG_SYS_GAFR0_L_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GAFR0_U
-       ldr             r1,     =CONFIG_SYS_GAFR0_U_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GAFR1_L
-       ldr             r1,     =CONFIG_SYS_GAFR1_L_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GAFR1_U
-       ldr             r1,     =CONFIG_SYS_GAFR1_U_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GAFR2_L
-       ldr             r1,     =CONFIG_SYS_GAFR2_L_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GAFR2_U
-       ldr             r1,     =CONFIG_SYS_GAFR2_U_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GAFR3_L
-       ldr             r1,     =CONFIG_SYS_GAFR3_L_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =GAFR3_U
-       ldr             r1,     =CONFIG_SYS_GAFR3_U_VAL
-       str             r1,   [r0]
-
-       ldr             r0,     =PSSR           /* enable GPIO pins */
-       ldr             r1,     =CONFIG_SYS_PSSR_VAL
-       str             r1,   [r0]
-
-       /* ---------------------------------------------------------------- */
-       /* Enable memory interface                                          */
-       /*                                                                  */
-       /* The sequence below is based on the recommended init steps        */
-       /* detailed in the Intel PXA250 Operating Systems Developers Guide, */
-       /* Chapter 10.                                                      */
-       /* ---------------------------------------------------------------- */
-
-       /* ---------------------------------------------------------------- */
-       /* Step 1: Wait for at least 200 microsedonds to allow internal     */
-       /*         clocks to settle. Only necessary after hard reset...     */
-       /*         FIXME: can be optimized later                            */
-       /* ---------------------------------------------------------------- */
-
-       ldr r3, =OSCR                   /* reset the OS Timer Count to zero */
-       mov r2, #0
-       str r2, [r3]
-       ldr r4, =0x300                  /* really 0x2E1 is about 200usec,   */
-                                       /* so 0x300 should be plenty        */
-1:
-       ldr r2, [r3]
-       cmp r4, r2
-       bgt 1b
-
-mem_init:
-
-       ldr     r1,  =MEMC_BASE         /* get memory controller base addr. */
-
-       /* ---------------------------------------------------------------- */
-       /* Step 2a: Initialize Asynchronous static memory controller        */
-       /* ---------------------------------------------------------------- */
-
-       /* MSC registers: timing, bus width, mem type                       */
-
-       /* MSC0: nCS(0,1)                                                   */
-       ldr     r2,   =CONFIG_SYS_MSC0_VAL
-       str     r2,   [r1, #MSC0_OFFSET]
-       ldr     r2,   [r1, #MSC0_OFFSET]        /* read back to ensure      */
-                                               /* that data latches        */
-       /* MSC1: nCS(2,3)                                                   */
-       ldr     r2,  =CONFIG_SYS_MSC1_VAL
-       str     r2,  [r1, #MSC1_OFFSET]
-       ldr     r2,  [r1, #MSC1_OFFSET]
-
-       /* MSC2: nCS(4,5)                                                   */
-       ldr     r2,  =CONFIG_SYS_MSC2_VAL
-       str     r2,  [r1, #MSC2_OFFSET]
-       ldr     r2,  [r1, #MSC2_OFFSET]
-
-       /* ---------------------------------------------------------------- */
-       /* Step 2b: Initialize Card Interface                               */
-       /* ---------------------------------------------------------------- */
-
-       /* MECR: Memory Expansion Card Register                             */
-       ldr     r2,  =CONFIG_SYS_MECR_VAL
-       str     r2,  [r1, #MECR_OFFSET]
-       ldr     r2,     [r1, #MECR_OFFSET]
-
-       /* MCMEM0: Card Interface slot 0 timing                             */
-       ldr     r2,  =CONFIG_SYS_MCMEM0_VAL
-       str     r2,  [r1, #MCMEM0_OFFSET]
-       ldr     r2,     [r1, #MCMEM0_OFFSET]
-
-       /* MCMEM1: Card Interface slot 1 timing                             */
-       ldr     r2,  =CONFIG_SYS_MCMEM1_VAL
-       str     r2,  [r1, #MCMEM1_OFFSET]
-       ldr     r2,     [r1, #MCMEM1_OFFSET]
-
-       /* MCATT0: Card Interface Attribute Space Timing, slot 0            */
-       ldr     r2,  =CONFIG_SYS_MCATT0_VAL
-       str     r2,  [r1, #MCATT0_OFFSET]
-       ldr     r2,     [r1, #MCATT0_OFFSET]
-
-       /* MCATT1: Card Interface Attribute Space Timing, slot 1            */
-       ldr     r2,  =CONFIG_SYS_MCATT1_VAL
-       str     r2,  [r1, #MCATT1_OFFSET]
-       ldr     r2,     [r1, #MCATT1_OFFSET]
-
-       /* MCIO0: Card Interface I/O Space Timing, slot 0                   */
-       ldr     r2,  =CONFIG_SYS_MCIO0_VAL
-       str     r2,  [r1, #MCIO0_OFFSET]
-       ldr     r2,     [r1, #MCIO0_OFFSET]
-
-       /* MCIO1: Card Interface I/O Space Timing, slot 1                   */
-       ldr     r2,  =CONFIG_SYS_MCIO1_VAL
-       str     r2,  [r1, #MCIO1_OFFSET]
-       ldr     r2,     [r1, #MCIO1_OFFSET]
-
-       /* ---------------------------------------------------------------- */
-       /* Step 2c: Write FLYCNFG  FIXME: what's that???                    */
-       /* ---------------------------------------------------------------- */
-       ldr     r2,  =CONFIG_SYS_FLYCNFG_VAL
-       str     r2,  [r1, #FLYCNFG_OFFSET]
-       str     r2,     [r1, #FLYCNFG_OFFSET]
-
-       /* ---------------------------------------------------------------- */
-       /* Step 2d: Initialize Timing for Sync Memory (SDCLK0)              */
-       /* ---------------------------------------------------------------- */
-
-       /* Before accessing MDREFR we need a valid DRI field, so we set     */
-       /* this to power on defaults + DRI field.                           */
-
-       ldr     r4,     [r1, #MDREFR_OFFSET]
-       ldr     r2,     =0xFFF
-       bic     r4,     r4, r2
-
-       ldr     r3,     =CONFIG_SYS_MDREFR_VAL
-       and     r3,     r3,  r2
-
-       orr     r4,     r4, r3
-       str     r4,     [r1, #MDREFR_OFFSET]    /* write back MDREFR        */
-
-       orr     r4,  r4, #MDREFR_K0RUN
-       orr     r4,  r4, #MDREFR_K0DB4
-       orr     r4,  r4, #MDREFR_K0FREE
-       orr     r4,  r4, #MDREFR_K0DB2
-       orr     r4,  r4, #MDREFR_K1DB2
-       bic     r4,  r4, #MDREFR_K1FREE
-       bic     r4,  r4, #MDREFR_K2FREE
-
-       str     r4,     [r1, #MDREFR_OFFSET]    /* write back MDREFR        */
-       ldr     r4,  [r1, #MDREFR_OFFSET]
-
-       /* Note: preserve the mdrefr value in r4                            */
-
-
-       /* ---------------------------------------------------------------- */
-       /* Step 3: Initialize Synchronous Static Memory (Flash/Peripherals) */
-       /* ---------------------------------------------------------------- */
-
-       /* Initialize SXCNFG register. Assert the enable bits               */
-
-       /* Write SXMRS to cause an MRS command to all enabled banks of      */
-       /* synchronous static memory. Note that SXLCR need not be written   */
-       /* at this time.                                                    */
-
-       ldr     r2,  =CONFIG_SYS_SXCNFG_VAL
-       str     r2,  [r1, #SXCNFG_OFFSET]
-
-       /* ---------------------------------------------------------------- */
-       /* Step 4: Initialize SDRAM                                         */
-       /* ---------------------------------------------------------------- */
-
-       bic     r4, r4, #(MDREFR_K2FREE |MDREFR_K1FREE | MDREFR_K0FREE)
-
-       orr     r4, r4, #MDREFR_K1RUN
-       bic     r4, r4, #MDREFR_K2DB2
-       str     r4, [r1, #MDREFR_OFFSET]
-       ldr     r4, [r1, #MDREFR_OFFSET]
-
-       bic     r4, r4, #MDREFR_SLFRSH
-       str     r4, [r1, #MDREFR_OFFSET]
-       ldr     r4, [r1, #MDREFR_OFFSET]
-
-       orr     r4, r4, #MDREFR_E1PIN
-       str     r4, [r1, #MDREFR_OFFSET]
-       ldr     r4, [r1, #MDREFR_OFFSET]
-
-       nop
-       nop
-
-
-       /* Step 4d: write MDCNFG with MDCNFG:DEx deasserted (set to 0), to  */
-       /*          configure but not enable each SDRAM partition pair.     */
-
-       ldr     r4,     =CONFIG_SYS_MDCNFG_VAL
-       bic     r4,     r4,     #(MDCNFG_DE0|MDCNFG_DE1)
-       bic     r4,     r4,     #(MDCNFG_DE2|MDCNFG_DE3)
-
-       str     r4,     [r1, #MDCNFG_OFFSET]    /* write back MDCNFG        */
-       ldr     r4,     [r1, #MDCNFG_OFFSET]
-
-
-       /* Step 4e: Wait for the clock to the SDRAMs to stabilize,          */
-       /*          100..200 Âµsec.                                          */
-
-       ldr r3, =OSCR                   /* reset the OS Timer Count to zero */
-       mov r2, #0
-       str r2, [r3]
-       ldr r4, =0x300                  /* really 0x2E1 is about 200usec,   */
-                                       /* so 0x300 should be plenty        */
-1:
-           ldr r2, [r3]
-           cmp r4, r2
-           bgt 1b
-
-
-       /* Step 4f: Trigger a number (usually 8) refresh cycles by          */
-       /*          attempting non-burst read or write accesses to disabled */
-       /*          SDRAM, as commonly specified in the power up sequence   */
-       /*          documented in SDRAM data sheets. The address(es) used   */
-       /*          for this purpose must not be cacheable.                 */
-
-       ldr     r3,     =CONFIG_SYS_DRAM_BASE
-       str     r2,     [r3]
-       str     r2,     [r3]
-       str     r2,     [r3]
-       str     r2,     [r3]
-       str     r2,     [r3]
-       str     r2,     [r3]
-       str     r2,     [r3]
-       str     r2,     [r3]
-
-
-       /* Step 4g: Write MDCNFG with enable bits asserted                  */
-       /*          (MDCNFG:DEx set to 1).                                  */
-
-       ldr     r3,     [r1, #MDCNFG_OFFSET]
-       mov     r4, r3
-       orr     r3,     r3,     #MDCNFG_DE0
-       str     r3,     [r1, #MDCNFG_OFFSET]
-       mov     r0, r3
-
-       /* Step 4h: Write MDMRS.                                            */
-
-       ldr     r2,  =CONFIG_SYS_MDMRS_VAL
-       str     r2,  [r1, #MDMRS_OFFSET]
-
-       /* enable APD */
-       ldr     r3,  [r1, #MDREFR_OFFSET]
-       orr     r3,  r3,  #MDREFR_APD
-       str     r3,  [r1, #MDREFR_OFFSET]
-
-       /* We are finished with Intel's memory controller initialisation    */
-
-
-setvoltage:
-
-       mov     r10,    lr
-       bl      initPXAvoltage  /* In case the board is rebooting with a    */
-       mov     lr,     r10     /* low voltage raise it up to a good one.   */
-
-#if 1
-       b initirqs
-#endif
-
-wakeup:
-       /* Are we waking from sleep? */
-       ldr     r0,     =RCSR
-       ldr     r1,     [r0]
-       and     r1,     r1, #(RCSR_GPR | RCSR_SMR | RCSR_WDR | RCSR_HWR)
-       str     r1,     [r0]
-       teq     r1,     #RCSR_SMR
-
-       bne     initirqs
-
-       ldr     r0,     =PSSR
-       mov     r1,     #PSSR_PH
-       str     r1,     [r0]
-
-       /* if so, resume at PSPR */
-       ldr     r0,     =PSPR
-       ldr     r1,     [r0]
-       mov     pc,     r1
-
-       /* ---------------------------------------------------------------- */
-       /* Disable (mask) all interrupts at interrupt controller            */
-       /* ---------------------------------------------------------------- */
-
-initirqs:
-
-       mov     r1,  #0         /* clear int. level register (IRQ, not FIQ) */
-       ldr     r2,  =ICLR
-       str     r1,  [r2]
-
-       ldr     r2,  =ICMR      /* mask all interrupts at the controller    */
-       str     r1,  [r2]
-
-       /* ---------------------------------------------------------------- */
-       /* Clock initialisation                                             */
-       /* ---------------------------------------------------------------- */
-
-initclks:
-
-       /* Disable the peripheral clocks, and set the core clock frequency  */
-
-       /* Turn Off on-chip peripheral clocks (except for memory)           */
-       /* for re-configuration.                                            */
-       ldr     r1,  =CKEN
-       ldr     r2,  =CONFIG_SYS_CKEN
-       str     r2,  [r1]
-
-       /* ... and write the core clock config register                     */
-       ldr     r2,  =CONFIG_SYS_CCCR
-       ldr     r1,  =CCCR
-       str     r2,  [r1]
-
-       /* Turn on turbo mode */
-       mrc     p14, 0, r2, c6, c0, 0
-       orr     r2, r2, #0xB            /* Turbo, Fast-Bus, Freq change**/
-       mcr     p14, 0, r2, c6, c0, 0
-
-       /* Re-write MDREFR */
-       ldr     r1, =MEMC_BASE
-       ldr     r2, [r1, #MDREFR_OFFSET]
-       str     r2, [r1, #MDREFR_OFFSET]
-#ifdef RTC
-       /* enable the 32Khz oscillator for RTC and PowerManager             */
-       ldr     r1,  =OSCC
-       mov     r2,  #OSCC_OON
-       str     r2,  [r1]
-
-       /* NOTE:  spin here until OSCC.OOK get set, meaning the PLL         */
-       /* has settled.                                                     */
-60:
-       ldr     r2, [r1]
-       ands    r2, r2, #1
-       beq     60b
-#else
-#error "RTC not defined"
-#endif
-
-       /* Interrupt init: Mask all interrupts                              */
-    ldr r0, =ICMR /* enable no sources */
-       mov r1, #0
-    str r1, [r0]
-       /* FIXME */
-
-#ifdef NODEBUG
-       /*Disable software and data breakpoints */
-       mov     r0,#0
-       mcr     p15,0,r0,c14,c8,0  /* ibcr0 */
-       mcr     p15,0,r0,c14,c9,0  /* ibcr1 */
-       mcr     p15,0,r0,c14,c4,0  /* dbcon */
-
-       /*Enable all debug functionality */
-       mov     r0,#0x80000000
-       mcr     p14,0,r0,c10,c0,0  /* dcsr */
-#endif
-
-       /* ---------------------------------------------------------------- */
-       /* End lowlevel_init                                                        */
-       /* ---------------------------------------------------------------- */
-
-endlowlevel_init:
-
-       mov     pc, lr
diff --git a/board/trizepsiv/pxavoltage.S b/board/trizepsiv/pxavoltage.S
deleted file mode 100644 (file)
index 9659c2b..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * (C) Copyright 2007
- * Stefano Babic, DENX Gmbh, sbabic@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 <asm/arch/pxa-regs.h>
-
-               .global initPXAvoltage
-
-initPXAvoltage:
-               mov     pc, lr
index c991ee271ec29c9f49d4634882ca7c152fa28651..f8ef4fc9c5134dfa23881150096f08a9cf4f8a0e 100644 (file)
@@ -26,7 +26,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
-#include <asm/arch/mx51_pins.h>
+#include <asm/arch/mx5x_pins.h>
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/iomux.h>
 #include <mxc_gpio.h>
 #include <fsl_esdhc.h>
 #include <fsl_pmic.h>
 #include <mc13892.h>
+#include <linux/fb.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
 static u32 system_rev;
 
+extern int mx51_fb_init(struct fb_videomode *mode);
+
 #ifdef CONFIG_HW_WATCHDOG
 #include <watchdog.h>
 
+static struct fb_videomode nec_nl6448bc26_09c = {
+       "NEC_NL6448BC26-09C",
+       60,     /* Refresh */
+       640,    /* xres */
+       480,    /* yres */
+       37650,  /* pixclock = 26.56Mhz */
+       48,     /* left margin */
+       16,     /* right margin */
+       31,     /* upper margin */
+       12,     /* lower margin */
+       96,     /* hsync-len */
+       2,      /* vsync-len */
+       0,      /* sync */
+       FB_VMODE_NONINTERLACED, /* vmode */
+       0,      /* flag */
+};
+
 void hw_watchdog_reset(void)
 {
        int val;
@@ -140,19 +160,8 @@ u32 get_board_rev(void)
 
 int dram_init(void)
 {
-#ifdef CONFIG_SYS_ARM_WITHOUT_RELOC
-       gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-       gd->bd->bi_dram[0].size = get_ram_size((long *)PHYS_SDRAM_1,
-               PHYS_SDRAM_1_SIZE);
-#if (CONFIG_NR_DRAM_BANKS > 1)
-       gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
-       gd->bd->bi_dram[1].size = get_ram_size((long *)PHYS_SDRAM_2,
-               PHYS_SDRAM_2_SIZE);
-#endif
-#else
        gd->ram_size = get_ram_size((long *)PHYS_SDRAM_1,
                PHYS_SDRAM_1_SIZE);
-#endif
 
        return 0;
 }
@@ -423,6 +432,9 @@ static void setup_gpios(void)
        mxc_request_iomux(MX51_PIN_CSPI1_RDY, IOMUX_CONFIG_ALT3);
        mxc_iomux_set_pad(MX51_PIN_CSPI1_RDY, 0x82);
 
+       /* PWM Output GPIO1_2 */
+       mxc_request_iomux(MX51_PIN_GPIO1_2, IOMUX_CONFIG_ALT1);
+
        /*
         * Set GPIO1_4 to high and output; it is used to reset
         * the system on reboot
@@ -630,11 +642,35 @@ int board_early_init_f(void)
        return 0;
 }
 
+static void backlight(int on)
+{
+       if (on) {
+               mxc_gpio_set(65, 1);
+               udelay(10000);
+               mxc_gpio_set(68, 1);
+       } else {
+               mxc_gpio_set(65, 0);
+               mxc_gpio_set(68, 0);
+       }
+}
+
+void lcd_enable(void)
+{
+       int ret;
+
+       mxc_request_iomux(MX51_PIN_DI1_PIN2, IOMUX_CONFIG_ALT0);
+       mxc_request_iomux(MX51_PIN_DI1_PIN3, IOMUX_CONFIG_ALT0);
+
+       mxc_gpio_set(2, 1);
+       mxc_request_iomux(MX51_PIN_GPIO1_2, IOMUX_CONFIG_ALT0);
+
+       ret = mx51_fb_init(&nec_nl6448bc26_09c);
+       if (ret)
+               puts("LCD cannot be configured\n");
+}
+
 int board_init(void)
 {
-#ifdef CONFIG_SYS_ARM_WITHOUT_RELOC
-       board_early_init_f();
-#endif
        gd->bd->bi_arch_number = MACH_TYPE_TTC_VISION2; /* board id for linux */
        /* address of boot parameters */
        gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
@@ -709,3 +745,21 @@ int checkboard(void)
        return 0;
 }
 
+int do_vision_lcd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+       int on;
+
+       if (argc < 2)
+               return cmd_usage(cmdtp);
+
+       on = (strcmp(argv[1], "on") == 0);
+       backlight(on);
+
+       return 0;
+}
+
+U_BOOT_CMD(
+       lcdbl, CONFIG_SYS_MAXARGS, 1, do_vision_lcd,
+       "Vision2 Backlight",
+       "lcdbl [on|off]\n"
+);
index c6f4c7c36f438af3f6e8d81eacb22bf895ff15e3..c3599178da7b98a38658d90ae089b2802dc8a1be 100644 (file)
@@ -1,10 +1,7 @@
-
 #
-# (C) Copyright 2000
-# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+# Voipac PXA270 Support
 #
-# See file CREDITS for list of people who contributed to this
-# project.
+# Copyright (C) 2010 Marek Vasut <marek.vasut@gmail.com>
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License as
@@ -27,17 +24,15 @@ include $(TOPDIR)/config.mk
 LIB    = $(obj)lib$(BOARD).a
 
 COBJS  := vpac270.o
-SOBJS  := lowlevel_init.o
 
-SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+SRCS   := $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
-SOBJS  := $(addprefix $(obj),$(SOBJS))
 
-$(LIB):        $(obj).depend $(OBJS) $(SOBJS)
-       $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+$(LIB):        $(obj).depend $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS)
 
 clean:
-       rm -f $(SOBJS) $(OBJS)
+       rm -f $(OBJS)
 
 distclean:     clean
        rm -f $(LIB) core *.bak $(obj).depend
diff --git a/board/vpac270/config.mk b/board/vpac270/config.mk
deleted file mode 100644 (file)
index 0f10662..0000000
+++ /dev/null
@@ -1 +0,0 @@
-CONFIG_SYS_TEXT_BASE = 0xa1000000
diff --git a/board/vpac270/lowlevel_init.S b/board/vpac270/lowlevel_init.S
deleted file mode 100644 (file)
index ec0d12c..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Voipac PXA270 Lowlevel Hardware Initialization
- *
- * Copyright (C) 2010 Marek Vasut <marek.vasut@gmail.com>
- *
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include <config.h>
-#include <version.h>
-#include <asm/arch/pxa-regs.h>
-#include <asm/arch/macro.h>
-
-.globl lowlevel_init
-lowlevel_init:
-       pxa_gpio_setup
-       pxa_wait_ticks  0x8000
-       pxa_mem_setup
-       pxa_wakeup
-       pxa_intr_setup
-       pxa_clock_setup
-
-       mov     pc, lr
diff --git a/board/vpac270/u-boot.lds b/board/vpac270/u-boot.lds
deleted file mode 100644 (file)
index 58c371d..0000000
+++ /dev/null
@@ -1,55 +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_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
-OUTPUT_ARCH(arm)
-ENTRY(_start)
-SECTIONS
-{
-       . = 0x00000000;
-
-       . = ALIGN(4);
-       .text      :
-       {
-         cpu/pxa/start.o       (.text)
-         *(.text)
-       }
-
-       . = ALIGN(4);
-       .rodata : { *(.rodata) }
-
-       . = ALIGN(4);
-       .data : { *(.data) }
-
-       . = ALIGN(4);
-       .got : { *(.got) }
-
-       __u_boot_cmd_start = .;
-       .u_boot_cmd : { *(.u_boot_cmd) }
-       __u_boot_cmd_end = .;
-
-       . = ALIGN(4);
-       __bss_start = .;
-       .bss : { *(.bss) }
-       _end = .;
-}
index 18e47e2212b67da8c2f578b16a6671257ee83a5e..43bbdff70e23fb4d5bb1a644552be130bb733d47 100644 (file)
@@ -1,16 +1,7 @@
 /*
- * (C) Copyright 2004
- * Robert Whaley, Applied Data Systems, Inc. rwhaley@applieddata.net
+ * Voipac PXA270 Support
  *
- * (C) Copyright 2002
- * Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net
- *
- * (C) Copyright 2002
- * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
- * Marius Groeger <mgroeger@sysgo.de>
- *
- * See file CREDITS for list of people who contributed to this
- * project.
+ * Copyright (C) 2010 Marek Vasut <marek.vasut@gmail.com>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
 #include <common.h>
 #include <asm/arch/hardware.h>
 #include <netdev.h>
+#include <serial.h>
+#include <asm/io.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
-/* ------------------------------------------------------------------------- */
-
 /*
  * Miscelaneous platform dependent initialisations
  */
-extern struct serial_device serial_ffuart_device;
-extern struct serial_device serial_btuart_device;
-extern struct serial_device serial_stuart_device;
-
-struct serial_device *default_serial_console (void)
+int board_init(void)
 {
-       return &serial_ffuart_device;
-}
+       /* We have RAM, disable cache */
+       dcache_disable();
+       icache_disable();
 
-int board_init (void)
-{
        /* memory and cpu-speed are setup before relocation */
        /* so we do _nothing_ here */
 
-       /* arch number of vpac270 */
+       /* Arch number of vpac270 */
        gd->bd->bi_arch_number = MACH_TYPE_VPAC270;
 
        /* adress of boot parameters */
@@ -62,41 +48,58 @@ int board_init (void)
        return 0;
 }
 
-int dram_init (void)
+struct serial_device *default_serial_console(void)
 {
-       gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-       gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
+       return &serial_ffuart_device;
+}
 
+extern void pxa_dram_init(void);
+int dram_init(void)
+{
+       pxa_dram_init();
+       gd->ram_size = PHYS_SDRAM_1_SIZE;
+       return 0;
+}
+
+void dram_init_banksize(void)
+{
+       gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
        gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
-       gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
 
-       return 0;
+#ifdef CONFIG_RAM_256M
+       gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
+       gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
+#endif
 }
 
+#ifdef CONFIG_CMD_USB
 int usb_board_init(void)
 {
-       UHCHR = (UHCHR | UHCHR_PCPL | UHCHR_PSPL) &
-               ~(UHCHR_SSEP0 | UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE);
+       writel((UHCHR | UHCHR_PCPL | UHCHR_PSPL) &
+               ~(UHCHR_SSEP0 | UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE),
+               UHCHR);
 
-       UHCHR |= UHCHR_FSBIR;
+       writel(readl(UHCHR) | UHCHR_FSBIR, UHCHR);
 
-       while (UHCHR & UHCHR_FSBIR);
+       while (readl(UHCHR) & UHCHR_FSBIR)
+               ;
 
-       UHCHR &= ~UHCHR_SSE;
-       UHCHIE = (UHCHIE_UPRIE | UHCHIE_RWIE);
+       writel(readl(UHCHR) & ~UHCHR_SSE, UHCHR);
+       writel((UHCHIE_UPRIE | UHCHIE_RWIE), UHCHIE);
 
        /* Clear any OTG Pin Hold */
-       if (PSSR & PSSR_OTGPH)
-               PSSR |= PSSR_OTGPH;
+       if (readl(PSSR) & PSSR_OTGPH)
+               writel(readl(PSSR) | PSSR_OTGPH, PSSR);
 
-       UHCRHDA &= ~(0x200);
-       UHCRHDA |= 0x100;
+       writel(readl(UHCRHDA) & ~(0x200), UHCRHDA);
+       writel(readl(UHCRHDA) | 0x100, UHCRHDA);
 
        /* Set port power control mask bits, only 3 ports. */
-       UHCRHDB |= (0x7<<17);
+       writel(readl(UHCRHDB) | (0x7<<17), UHCRHDB);
 
        /* enable port 2 */
-       UP2OCR |= UP2OCR_HXOE | UP2OCR_HXS | UP2OCR_DMPDE | UP2OCR_DPPDE;
+       writel(readl(UP2OCR) | UP2OCR_HXOE | UP2OCR_HXS |
+               UP2OCR_DMPDE | UP2OCR_DPPDE, UP2OCR);
 
        return 0;
 }
@@ -108,17 +111,18 @@ void usb_board_init_fail(void)
 
 void usb_board_stop(void)
 {
-       UHCHR |= UHCHR_FHR;
+       writel(readl(UHCHR) | UHCHR_FHR, UHCHR);
        udelay(11);
-       UHCHR &= ~UHCHR_FHR;
+       writel(readl(UHCHR) & ~UHCHR_FHR, UHCHR);
 
-       UHCCOMS |= 1;
+       writel(readl(UHCCOMS) | 1, UHCCOMS);
        udelay(10);
 
-       CKEN &= ~CKEN10_USBHOST;
+       writel(readl(CKEN) & ~CKEN10_USBHOST, CKEN);
 
        return;
 }
+#endif
 
 #ifdef CONFIG_DRIVER_DM9000
 int board_eth_init(bd_t *bis)
diff --git a/board/wepep250/Makefile b/board/wepep250/Makefile
deleted file mode 100644 (file)
index 0669b0e..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# (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  := wepep250.o flash.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/wepep250/config.mk b/board/wepep250/config.mk
deleted file mode 100644 (file)
index 60cbc24..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-# This is config used for compilation of WEP EP250 sources
-#
-# You might change location of U-Boot in memory by setting right CONFIG_SYS_TEXT_BASE.
-# This allows for example having one copy located at the end of ram and stored
-# in flash device and later on while developing use other location to test
-# the code in RAM device only.
-#
-
-CONFIG_SYS_TEXT_BASE = 0xa1fe0000
-#CONFIG_SYS_TEXT_BASE = 0xa1001000
diff --git a/board/wepep250/flash.c b/board/wepep250/flash.c
deleted file mode 100644 (file)
index c6e9171..0000000
+++ /dev/null
@@ -1,324 +0,0 @@
-/*
- * Copyright (C) 2003 ETC s.r.o.
- *
- * This code was inspired by Marius Groeger and Kyle Harris code
- * available in other board ports for U-Boot
- *
- * 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
- *
- * Written by Peter Figuli <peposh@etc.sk>, 2003.
- *
- */
-
-#include <common.h>
-#include "intel.h"
-
-
-/*
- * This code should handle CFI FLASH memory device. This code is very
- * minimalistic approach without many essential error handling code as well.
- * Because U-Boot actually is missing smart handling of FLASH device,
- * we just set flash_id to anything else to FLASH_UNKNOW, so common code
- * can call us without any restrictions.
- * TODO: Add CFI Query, to be able to determine FLASH device.
- * TODO: Add error handling code
- * NOTE: This code was tested with BUS_WIDTH 4 and ITERLEAVE 2 only, but
- *       hopefully may work with other configurations.
- */
-
-#if ( WEP_FLASH_BUS_WIDTH == 1 )
-#  define FLASH_BUS vu_char
-#  define FLASH_BUS_RET u_char
-#  if ( WEP_FLASH_INTERLEAVE == 1 )
-#    define FLASH_CMD( x ) x
-#  else
-#    error "With 8bit bus only one chip is allowed"
-#  endif
-
-
-#elif ( WEP_FLASH_BUS_WIDTH == 2 )
-#  define FLASH_BUS vu_short
-#  define FLASH_BUS_RET u_short
-#  if ( WEP_FLASH_INTERLEAVE == 1 )
-#    define FLASH_CMD( x ) x
-#  elif ( WEP_FLASH_INTERLEAVE == 2 )
-#    define FLASH_CMD( x ) (( x << 8 )| x )
-#  else
-#    error "With 16bit bus only 1 or 2 chip(s) are allowed"
-#  endif
-
-
-#elif ( WEP_FLASH_BUS_WIDTH == 4 )
-#  define FLASH_BUS vu_long
-#  define FLASH_BUS_RET u_long
-#  if ( WEP_FLASH_INTERLEAVE == 1 )
-#    define FLASH_CMD( x ) x
-#  elif ( WEP_FLASH_INTERLEAVE == 2 )
-#    define FLASH_CMD( x ) (( x << 16 )| x )
-#  elif ( WEP_FLASH_INTERLEAVE == 4 )
-#    define FLASH_CMD( x ) (( x << 24 )|( x << 16 ) ( x << 8 )| x )
-#  else
-#    error "With 32bit bus only 1,2 or 4 chip(s) are allowed"
-#  endif
-
-#else
-#  error "Flash bus width might be 1,2,4 for 8,16,32 bit configuration"
-#endif
-
-
-flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS];
-
-static FLASH_BUS_RET flash_status_reg (void)
-{
-
-       FLASH_BUS *addr = (FLASH_BUS *) 0;
-
-       *addr = FLASH_CMD (CFI_INTEL_CMD_READ_STATUS_REGISTER);
-
-       return *addr;
-}
-
-static int flash_ready (ulong timeout)
-{
-       int ok = 1;
-
-       reset_timer_masked ();
-       while ((flash_status_reg () & FLASH_CMD (CFI_INTEL_SR_READY)) !=
-                  FLASH_CMD (CFI_INTEL_SR_READY)) {
-               if (get_timer_masked () > timeout && timeout != 0) {
-                       ok = 0;
-                       break;
-               }
-       }
-       return ok;
-}
-
-#if ( CONFIG_SYS_MAX_FLASH_BANKS != 1 )
-#  error "WEP platform has only one flash bank!"
-#endif
-
-
-ulong flash_init (void)
-{
-       int i;
-       FLASH_BUS address = WEP_FLASH_BASE;
-
-       flash_info[0].size = WEP_FLASH_BANK_SIZE;
-       flash_info[0].sector_count = CONFIG_SYS_MAX_FLASH_SECT;
-       flash_info[0].flash_id = INTEL_MANUFACT;
-       memset (flash_info[0].protect, 0, CONFIG_SYS_MAX_FLASH_SECT);
-
-       for (i = 0; i < CONFIG_SYS_MAX_FLASH_SECT; i++) {
-               flash_info[0].start[i] = address;
-#ifdef WEP_FLASH_UNLOCK
-               /* Some devices are hw locked after start. */
-               *((FLASH_BUS *) address) = FLASH_CMD (CFI_INTEL_CMD_LOCK_SETUP);
-               *((FLASH_BUS *) address) = FLASH_CMD (CFI_INTEL_CMD_UNLOCK_BLOCK);
-               flash_ready (0);
-               *((FLASH_BUS *) address) = FLASH_CMD (CFI_INTEL_CMD_READ_ARRAY);
-#endif
-               address += WEP_FLASH_SECT_SIZE;
-       }
-
-       flash_protect (FLAG_PROTECT_SET,
-                                  CONFIG_SYS_FLASH_BASE,
-                                  CONFIG_SYS_FLASH_BASE + monitor_flash_len - 1,
-                                  &flash_info[0]);
-
-       flash_protect (FLAG_PROTECT_SET,
-                                  CONFIG_ENV_ADDR,
-                                  CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]);
-
-       return WEP_FLASH_BANK_SIZE;
-}
-
-void flash_print_info (flash_info_t * info)
-{
-       int i;
-
-       printf (" Intel vendor\n");
-       printf ("  Size: %ld MB in %d Sectors\n",
-                       info->size >> 20, info->sector_count);
-
-       printf ("  Sector Start Addresses:");
-       for (i = 0; i < info->sector_count; i++) {
-               if (!(i % 5)) {
-                       printf ("\n");
-               }
-
-               printf (" %08lX%s", info->start[i],
-                               info->protect[i] ? " (RO)" : "     ");
-       }
-       printf ("\n");
-}
-
-
-int flash_erase (flash_info_t * info, int s_first, int s_last)
-{
-       int flag, non_protected = 0, sector;
-       int rc = ERR_OK;
-
-       FLASH_BUS *address;
-
-       for (sector = s_first; sector <= s_last; sector++) {
-               if (!info->protect[sector]) {
-                       non_protected++;
-               }
-       }
-
-       if (!non_protected) {
-               return ERR_PROTECTED;
-       }
-
-       /*
-        * Disable interrupts which might cause a timeout
-        * here. Remember that our exception vectors are
-        * at address 0 in the flash, and we don't want a
-        * (ticker) exception to happen while the flash
-        * chip is in programming mode.
-        */
-       flag = disable_interrupts ();
-
-
-       /* Start erase on unprotected sectors */
-       for (sector = s_first; sector <= s_last && !ctrlc (); sector++) {
-               if (info->protect[sector]) {
-                       printf ("Protected sector %2d skipping...\n", sector);
-                       continue;
-               } else {
-                       printf ("Erasing sector %2d ... ", sector);
-               }
-
-               address = (FLASH_BUS *) (info->start[sector]);
-
-               *address = FLASH_CMD (CFI_INTEL_CMD_BLOCK_ERASE);
-               *address = FLASH_CMD (CFI_INTEL_CMD_CONFIRM);
-               if (flash_ready (CONFIG_SYS_FLASH_ERASE_TOUT)) {
-                       *address = FLASH_CMD (CFI_INTEL_CMD_CLEAR_STATUS_REGISTER);
-                       printf ("ok.\n");
-               } else {
-                       *address = FLASH_CMD (CFI_INTEL_CMD_SUSPEND);
-                       rc = ERR_TIMOUT;
-                       printf ("timeout! Aborting...\n");
-                       break;
-               }
-               *address = FLASH_CMD (CFI_INTEL_CMD_READ_ARRAY);
-       }
-       if (ctrlc ())
-               printf ("User Interrupt!\n");
-
-       /* allow flash to settle - wait 10 ms */
-       udelay_masked (10000);
-       if (flag) {
-               enable_interrupts ();
-       }
-
-       return rc;
-}
-
-static int write_data (flash_info_t * info, ulong dest, FLASH_BUS data)
-{
-       FLASH_BUS *address = (FLASH_BUS *) dest;
-       int rc = ERR_OK;
-       int flag;
-
-       /* Check if Flash is (sufficiently) erased */
-       if ((*address & data) != data) {
-               return ERR_NOT_ERASED;
-       }
-
-       /*
-        * Disable interrupts which might cause a timeout
-        * here. Remember that our exception vectors are
-        * at address 0 in the flash, and we don't want a
-        * (ticker) exception to happen while the flash
-        * chip is in programming mode.
-        */
-
-       flag = disable_interrupts ();
-
-       *address = FLASH_CMD (CFI_INTEL_CMD_CLEAR_STATUS_REGISTER);
-       *address = FLASH_CMD (CFI_INTEL_CMD_PROGRAM1);
-       *address = data;
-
-       if (!flash_ready (CONFIG_SYS_FLASH_WRITE_TOUT)) {
-               *address = FLASH_CMD (CFI_INTEL_CMD_SUSPEND);
-               rc = ERR_TIMOUT;
-               printf ("timeout! Aborting...\n");
-       }
-
-       *address = FLASH_CMD (CFI_INTEL_CMD_READ_ARRAY);
-       if (flag) {
-               enable_interrupts ();
-       }
-
-       return rc;
-}
-
-int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt)
-{
-       ulong read_addr, write_addr;
-       FLASH_BUS data;
-       int i, result = ERR_OK;
-
-
-       read_addr = addr & ~(sizeof (FLASH_BUS) - 1);
-       write_addr = read_addr;
-       if (read_addr != addr) {
-               data = 0;
-               for (i = 0; i < sizeof (FLASH_BUS); i++) {
-                       if (read_addr < addr || cnt == 0) {
-                               data |= *((uchar *) read_addr) << i * 8;
-                       } else {
-                               data |= (*src++) << i * 8;
-                               cnt--;
-                       }
-                       read_addr++;
-               }
-               if ((result = write_data (info, write_addr, data)) != ERR_OK) {
-                       return result;
-               }
-               write_addr += sizeof (FLASH_BUS);
-       }
-       for (; cnt >= sizeof (FLASH_BUS); cnt -= sizeof (FLASH_BUS)) {
-               if ((result = write_data (info, write_addr,
-                                                                 *((FLASH_BUS *) src))) != ERR_OK) {
-                       return result;
-               }
-               write_addr += sizeof (FLASH_BUS);
-               src += sizeof (FLASH_BUS);
-       }
-       if (cnt > 0) {
-               read_addr = write_addr;
-               data = 0;
-               for (i = 0; i < sizeof (FLASH_BUS); i++) {
-                       if (cnt > 0) {
-                               data |= (*src++) << i * 8;
-                               cnt--;
-                       } else {
-                               data |= *((uchar *) read_addr) << i * 8;
-                       }
-                       read_addr++;
-               }
-               if ((result = write_data (info, write_addr, data)) != 0) {
-                       return result;
-               }
-       }
-       return ERR_OK;
-}
diff --git a/board/wepep250/intel.h b/board/wepep250/intel.h
deleted file mode 100644 (file)
index 77498b6..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (C) 2002 ETC s.r.o.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the ETC s.r.o. nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Written by Marcel Telka <marcel@telka.sk>, 2002.
- *
- * Documentation:
- * [1] Intel Corporation, "3 Volt Intel Strata Flash Memory 28F128J3A, 28F640J3A,
- *     28F320J3A (x8/x16)", April 2002, Order Number: 290667-011
- * [2] Intel Corporation, "3 Volt Synchronous Intel Strata Flash Memory 28F640K3, 28F640K18,
- *     28F128K3, 28F128K18, 28F256K3, 28F256K18 (x16)", June 2002, Order Number: 290737-005
- *
- * This file is taken from OpenWinCE project hosted by SourceForge.net
- *
- */
-
-#ifndef        FLASH_INTEL_H
-#define        FLASH_INTEL_H
-
-#include <common.h>
-
-/* Intel CFI commands - see Table 4. in [1] and Table 3. in [2] */
-
-#define        CFI_INTEL_CMD_READ_ARRAY                0xFF    /* 28FxxxJ3A, 28FxxxK3, 28FxxxK18 */
-#define        CFI_INTEL_CMD_READ_IDENTIFIER           0x90    /* 28FxxxJ3A, 28FxxxK3, 28FxxxK18 */
-#define        CFI_INTEL_CMD_READ_QUERY                0x98    /* 28FxxxJ3A, 28FxxxK3, 28FxxxK18 */
-#define        CFI_INTEL_CMD_READ_STATUS_REGISTER      0x70    /* 28FxxxJ3A, 28FxxxK3, 28FxxxK18 */
-#define        CFI_INTEL_CMD_CLEAR_STATUS_REGISTER     0x50    /* 28FxxxJ3A, 28FxxxK3, 28FxxxK18 */
-#define        CFI_INTEL_CMD_PROGRAM1                  0x40    /* 28FxxxJ3A, 28FxxxK3, 28FxxxK18 */
-#define        CFI_INTEL_CMD_PROGRAM2                  0x10    /* 28FxxxJ3A, 28FxxxK3, 28FxxxK18 */
-#define        CFI_INTEL_CMD_WRITE_TO_BUFFER           0xE8    /* 28FxxxJ3A, 28FxxxK3, 28FxxxK18 */
-#define        CFI_INTEL_CMD_CONFIRM                   0xD0    /* 28FxxxJ3A, 28FxxxK3, 28FxxxK18 */
-#define        CFI_INTEL_CMD_BLOCK_ERASE               0x20    /* 28FxxxJ3A, 28FxxxK3, 28FxxxK18 */
-#define        CFI_INTEL_CMD_SUSPEND                   0xB0    /* 28FxxxJ3A, 28FxxxK3, 28FxxxK18 */
-#define        CFI_INTEL_CMD_RESUME                    0xD0    /* 28FxxxJ3A, 28FxxxK3, 28FxxxK18 */
-#define        CFI_INTEL_CMD_LOCK_SETUP                0x60    /* 28FxxxJ3A, 28FxxxK3, 28FxxxK18 */
-#define        CFI_INTEL_CMD_LOCK_BLOCK                0x01    /* 28FxxxJ3A, 28FxxxK3, 28FxxxK18 */
-#define        CFI_INTEL_CMD_UNLOCK_BLOCK              0xD0    /* 28FxxxJ3A - unlocks all blocks, 28FFxxxK3, 28FxxxK18 */
-#define        CFI_INTEL_CMD_LOCK_DOWN_BLOCK           0x2F    /* 28FxxxK3, 28FxxxK18 */
-
-/* Intel CFI Status Register bits - see Table 6. in [1] and Table 7. in [2] */
-
-#define        CFI_INTEL_SR_READY                      1 << 7  /* 28FxxxJ3A, 28FxxxK3, 28FxxxK18 */
-#define        CFI_INTEL_SR_ERASE_SUSPEND              1 << 6  /* 28FxxxJ3A, 28FxxxK3, 28FxxxK18 */
-#define        CFI_INTEL_SR_ERASE_ERROR                1 << 5  /* 28FxxxJ3A, 28FxxxK3, 28FxxxK18 */
-#define        CFI_INTEL_SR_PROGRAM_ERROR              1 << 4  /* 28FxxxJ3A, 28FxxxK3, 28FxxxK18 */
-#define        CFI_INTEL_SR_VPEN_ERROR                 1 << 3  /* 28FxxxJ3A, 28FxxxK3, 28FxxxK18 */
-#define        CFI_INTEL_SR_PROGRAM_SUSPEND            1 << 2  /* 28FxxxJ3A, 28FxxxK3, 28FxxxK18 */
-#define        CFI_INTEL_SR_BLOCK_LOCKED               1 << 1  /* 28FxxxJ3A, 28FxxxK3, 28FxxxK18 */
-#define        CFI_INTEL_SR_BEFP                       1 << 0  /* 28FxxxK3, 28FxxxK18 */
-
-/* Intel flash device ID codes for 28FxxxJ3A - see Table 5. in [1] */
-
-#define        CFI_CHIP_INTEL_28F320J3A                0x0016
-#define        CFI_CHIPN_INTEL_28F320J3A               "28F320J3A"
-#define        CFI_CHIP_INTEL_28F640J3A                0x0017
-#define        CFI_CHIPN_INTEL_28F640J3A               "28F640J3A"
-#define        CFI_CHIP_INTEL_28F128J3A                0x0018
-#define        CFI_CHIPN_INTEL_28F128J3A               "28F128J3A"
-
-/* Intel flash device ID codes for 28FxxxK3 and 28FxxxK18 - see Table 8. in [2] */
-
-#define        CFI_CHIP_INTEL_28F640K3                 0x8801
-#define        CFI_CHIPN_INTEL_28F640K3                "28F640K3"
-#define        CFI_CHIP_INTEL_28F128K3                 0x8802
-#define        CFI_CHIPN_INTEL_28F128K3                "28F128K3"
-#define        CFI_CHIP_INTEL_28F256K3                 0x8803
-#define        CFI_CHIPN_INTEL_28F256K3                "28F256K3"
-#define        CFI_CHIP_INTEL_28F640K18                0x8805
-#define        CFI_CHIPN_INTEL_28F640K18               "28F640K18"
-#define        CFI_CHIP_INTEL_28F128K18                0x8806
-#define        CFI_CHIPN_INTEL_28F128K18               "28F128K18"
-#define        CFI_CHIP_INTEL_28F256K18                0x8807
-#define        CFI_CHIPN_INTEL_28F256K18               "28F256K18"
-
-#endif /* FLASH_INTEL_H */
diff --git a/board/wepep250/lowlevel_init.S b/board/wepep250/lowlevel_init.S
deleted file mode 100644 (file)
index 9bb091f..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright (C) 2001, 2002 ETC s.r.o.
- *
- * 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.
- *
- * Written by Marcel Telka <marcel@telka.sk>, 2001, 2002.
- * Changes for U-Boot Peter Figuli <peposh@etc.sk>, 2003.
- *
- * This file is taken from OpenWinCE project hosted by SourceForge.net
- *
- * Documentation:
- * [1] Intel Corporation, "Intel PXA250 and PXA210 Application Processors
- *     Developer's Manual", February 2002, Order Number: 278522-001
- * [2] Samsung Electronics, "8Mx16 SDRAM 54CSP K4S281633D-RL/N/P",
- *     Revision 1.0, February 2002
- * [3] Samsung Electronics, "16Mx16 SDRAM 54CSP K4S561633C-RL(N)",
- *     Revision 1.0, February 2002
- *
-*/
-
-#include <config.h>
-#include <version.h>
-#include <asm/arch/pxa-regs.h>
-
-.globl lowlevel_init
-lowlevel_init:
-
-       mov     r10, lr
-
-/*     setup memory - see 6.12 in [1]
- *     Step 1  - wait 200 us
- */
-       mov     r0,#0x2700                      /* wait 200 us @ 99.5 MHz */
-1:     subs    r0, r0, #1
-       bne     1b
-/*     TODO: complete step 1 for Synchronous Static memory*/
-
-       ldr     r0, =0x48000000                 /* MC_BASE */
-
-
-/*     step 1.a - setup MSCx
- */
-       ldr     r1, =0x000012B3                 /* MSC0_RRR0(1) | MSC0_RDN0(2) | MSC0_RDF0(11) | MSC0_RT0(3) */
-       str     r1, [r0, #0x8]                  /* MSC0_OFFSET */
-
-/*     step 1.c - clear MDREFR:K1FREE, set MDREFR:DRI
- *     see AUTO REFRESH chapter in section D. in [2] and in [3]
- *     DRI = (64ms / 4096) * 99.53MHz / 32 = 48 for K4S281633
- *     DRI = (64ms / 8192) * 99.52MHz / 32 = 24 for K4S561633
- *     TODO: complete for Synchronous Static memory
- */
-       ldr     r1, [r0, #4]                    /* MDREFR_OFFSET */
-       ldr     r2, =0x01000FFF                 /* MDREFR_K1FREE | MDREFR_DRI_MASK */
-       bic     r1, r1, r2
-#if defined( WEP_SDRAM_K4S281633 )
-       orr     r1, r1, #48                     /* MDREFR_DRI(48) */
-#elif defined( WEP_SDRAM_K4S561633 )
-       orr     r1, r1, #24                     /* MDREFR_DRI(24) */
-#else
-#error SDRAM chip is not defined
-#endif
-
-       str     r1, [r0, #4]                    /* MDREFR_OFFSET */
-
-/*     Step 2 - only for Synchronous Static memory (TODO)
- *
- *     Step 3 - same as step 4
- *
- *     Step 4
- *
- *     Step 4.a - set MDREFR:K1RUN, clear MDREFR:K1DB2
- */
-       orr     r1, r1, #0x00010000             /* MDREFR_K1RUN */
-       bic     r1, r1, #0x00020000             /* MDREFR_K1DB2 */
-       str     r1, [r0, #4]                    /* MDREFR_OFFSET */
-
-/*     Step 4.b - clear MDREFR:SLFRSH */
-       bic     r1, r1, #0x00400000             /* MDREFR_SLFRSH */
-       str     r1, [r0, #4]                    /* MDREFR_OFFSET */
-
-/*     Step 4.c - set MDREFR:E1PIN */
-       orr     r1, r1, #0x00008000             /* MDREFR_E1PIN */
-       str     r1, [r0, #4]                    /* MDREFR_OFFSET */
-
-/*     Step 4.d - automatically done
- *
- *     Steps 4.e and 4.f - configure SDRAM
- */
-#if defined( WEP_SDRAM_K4S281633 )
-       ldr     r1, =0x00000AA8                 /* MDCNFG_DTC0(2) | MDCNFG_DLATCH0 | MDCNFG_DCAC0(1) | MDCNFG_DRAC0(1) | MDCNFG_DNB0 */
-#elif defined( WEP_SDRAM_K4S561633 )
-       ldr     r1, =0x00000AC8                 /* MDCNFG_DTC0(2) | MDCNFG_DLATCH0 | MDCNFG_DCAC0(1) | MDCNFG_DRAC0(2) | MDCNFG_DNB0 */
-#else
-#error SDRAM chip is not defined
-#endif
-       str     r1, [r0, #0]                    /* MDCNFG_OFFSET */
-
-/*     Step 5 - wait at least 200 us for SDRAM
- *     see section B. in [2]
- */
-       mov     r2,#0x2700                      /* wait 200 us @ 99.5 MHz */
-1:     subs    r2, r2, #1
-       bne     1b
-
-/*     Step 6 - after reset dcache is disabled, so automatically done
- *
- *     Step 7 - eight refresh cycles
- */
-       mov     r2, #0xA0000000
-       ldr     r3, [r2]
-       ldr     r3, [r2]
-       ldr     r3, [r2]
-       ldr     r3, [r2]
-       ldr     r3, [r2]
-       ldr     r3, [r2]
-       ldr     r3, [r2]
-       ldr     r3, [r2]
-
-/*     Step 8 - we don't need dcache now
- *
- *     Step 9 - enable SDRAM partition 0
- */
-       orr     r1, r1, #1                      /* MDCNFG_DE0 */
-       str     r1, [r0, #0]                    /* MDCNFG_OFFSET */
-
-/*     Step 10 - write MDMRS */
-       mov     r1, #0
-       str     r1, [r0, #0x40]                 /* MDMRS_OFFSET */
-
-/*     Step 11 - optional (TODO) */
-
-       mov     pc,r10
diff --git a/board/wepep250/wepep250.c b/board/wepep250/wepep250.c
deleted file mode 100644 (file)
index fe4b6a9..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2003 ETC s.r.o.
- *
- * 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
- *
- * Written by Peter Figuli <peposh@etc.sk>, 2003.
- *
- */
-
-#include <common.h>
-#include <asm/arch/pxa-regs.h>
-
-DECLARE_GLOBAL_DATA_PTR;
-
-int board_init (void)
-{
-       gd->bd->bi_arch_number = MACH_TYPE_WEP_EP250;
-       gd->bd->bi_boot_params = 0xa0000000;
-/*
- * Setup GPIO stuff to get serial working
- */
-#if defined( CONFIG_FFUART )
-       GPDR1 = 0x80;
-       GAFR1_L = 0x8010;
-#elif defined( CONFIG_BTUART )
-       GPDR1 = 0x800;
-       GAFR1_L = 0x900000;
-#endif
-       PSSR = 0x20;
-
-       return 0;
-}
-
-int dram_init (void)
-{
-#if ( CONFIG_NR_DRAM_BANKS > 0 )
-       gd->bd->bi_dram[0].start = WEP_SDRAM_1;
-       gd->bd->bi_dram[0].size = WEP_SDRAM_1_SIZE;
-#endif
-#if ( CONFIG_NR_DRAM_BANKS > 1 )
-       gd->bd->bi_dram[1].start = WEP_SDRAM_2;
-       gd->bd->bi_dram[1].size = WEP_SDRAM_2_SIZE;
-#endif
-#if ( CONFIG_NR_DRAM_BANKS > 2 )
-       gd->bd->bi_dram[2].start = WEP_SDRAM_3;
-       gd->bd->bi_dram[2].size = WEP_SDRAM_3_SIZE;
-#endif
-#if ( CONFIG_NR_DRAM_BANKS > 3 )
-       gd->bd->bi_dram[3].start = WEP_SDRAM_4;
-       gd->bd->bi_dram[3].size = WEP_SDRAM_4_SIZE;
-#endif
-
-       return 0;
-}
index 7dd2ea04a6958fbd3208aedef1b23126f7020dce..554915a6f98d0ac7329e8c28a0d86bcccb92ae54 100644 (file)
@@ -26,17 +26,15 @@ include $(TOPDIR)/config.mk
 LIB    = $(obj)lib$(BOARD).a
 
 COBJS  := xaeniax.o flash.o
-SOBJS  := lowlevel_init.o
 
-SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+SRCS   := $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
-SOBJS  := $(addprefix $(obj),$(SOBJS))
 
-$(LIB):        $(obj).depend $(OBJS) $(SOBJS)
-       $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+$(LIB):        $(obj).depend $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS)
 
 clean:
-       rm -f $(SOBJS) $(OBJS)
+       rm -f $(OBJS)
 
 distclean:     clean
        rm -f $(LIB) core *.bak $(obj).depend
diff --git a/board/xaeniax/config.mk b/board/xaeniax/config.mk
deleted file mode 100644 (file)
index c639752..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-CONFIG_SYS_TEXT_BASE = 0xa3FB0000
-#CONFIG_SYS_TEXT_BASE = 0
diff --git a/board/xaeniax/lowlevel_init.S b/board/xaeniax/lowlevel_init.S
deleted file mode 100644 (file)
index 57e1620..0000000
+++ /dev/null
@@ -1,424 +0,0 @@
- /*
- * Most of this taken from Redboot hal_platform_setup.h with cleanup
- *
- * NOTE: I haven't clean this up considerably, just enough to get it
- * running. See hal_platform_setup.h for the source. See
- * board/cradle/lowlevel_init.S for another PXA250 setup that is
- * much cleaner.
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include <config.h>
-#include <version.h>
-#include <asm/arch/pxa-regs.h>
-
-DRAM_SIZE:  .long   CONFIG_SYS_DRAM_SIZE
-
-/* wait for coprocessor write complete */
-       .macro CPWAIT reg
-       mrc  p15,0,\reg,c2,c0,0
-       mov  \reg,\reg
-       sub  pc,pc,#4
-       .endm
-
-
-.globl lowlevel_init
-lowlevel_init:
-
-       mov      r10, lr
-
-       /* Set up GPIO pins first ----------------------------------------- */
-
-       ldr     r0,=GPSR0
-       ldr     r1,=CONFIG_SYS_GPSR0_VAL
-       str     r1,[r0]
-
-       ldr     r0,=GPSR1
-       ldr     r1,=CONFIG_SYS_GPSR1_VAL
-       str     r1,[r0]
-
-       ldr     r0,=GPSR2
-       ldr     r1,=CONFIG_SYS_GPSR2_VAL
-       str     r1,[r0]
-
-       ldr     r0,=GPCR0
-       ldr     r1,=CONFIG_SYS_GPCR0_VAL
-       str     r1,[r0]
-
-       ldr     r0,=GPCR1
-       ldr     r1,=CONFIG_SYS_GPCR1_VAL
-       str     r1,[r0]
-
-       ldr     r0,=GPCR2
-       ldr     r1,=CONFIG_SYS_GPCR2_VAL
-       str     r1,[r0]
-
-       ldr     r0,=GPDR0
-       ldr     r1,=CONFIG_SYS_GPDR0_VAL
-       str     r1,[r0]
-
-       ldr     r0,=GPDR1
-       ldr     r1,=CONFIG_SYS_GPDR1_VAL
-       str     r1,[r0]
-
-       ldr     r0,=GPDR2
-       ldr     r1,=CONFIG_SYS_GPDR2_VAL
-       str     r1,[r0]
-
-       ldr     r0,=GAFR0_L
-       ldr     r1,=CONFIG_SYS_GAFR0_L_VAL
-       str     r1,[r0]
-
-       ldr     r0,=GAFR0_U
-       ldr     r1,=CONFIG_SYS_GAFR0_U_VAL
-       str     r1,[r0]
-
-       ldr     r0,=GAFR1_L
-       ldr     r1,=CONFIG_SYS_GAFR1_L_VAL
-       str     r1,[r0]
-
-       ldr     r0,=GAFR1_U
-       ldr     r1,=CONFIG_SYS_GAFR1_U_VAL
-       str     r1,[r0]
-
-       ldr     r0,=GAFR2_L
-       ldr     r1,=CONFIG_SYS_GAFR2_L_VAL
-       str     r1,[r0]
-
-       ldr     r0,=GAFR2_U
-       ldr     r1,=CONFIG_SYS_GAFR2_U_VAL
-       str     r1,[r0]
-
-       ldr     r0,=PSSR                /* enable GPIO pins */
-       ldr     r1,=CONFIG_SYS_PSSR_VAL
-       str     r1,[r0]
-
-       /* ---------------------------------------------------------------- */
-       /* Enable memory interface                                          */
-       /*                                                                  */
-       /* The sequence below is based on the recommended init steps        */
-       /* detailed in the Intel PXA250 Operating Systems Developers Guide, */
-       /* Chapter 10.                                                      */
-       /* ---------------------------------------------------------------- */
-
-       /* ---------------------------------------------------------------- */
-       /* Step 1: Wait for at least 200 microsedonds to allow internal     */
-       /*         clocks to settle. Only necessary after hard reset...     */
-       /*         FIXME: can be optimized later                            */
-       /* ---------------------------------------------------------------- */
-
-       ldr     r3, =OSCR               /* reset the OS Timer Count to zero */
-       mov     r2, #0
-       str     r2, [r3]
-       ldr     r4, =0x300              /* really 0x2E1 is about 200usec,   */
-                                       /* so 0x300 should be plenty        */
-1:
-       ldr     r2, [r3]
-       cmp     r4, r2
-       bgt     1b
-
-mem_init:
-
-       ldr     r1,=MEMC_BASE           /* get memory controller base addr. */
-
-       /* ---------------------------------------------------------------- */
-       /* Step 2a: Initialize Asynchronous static memory controller        */
-       /* ---------------------------------------------------------------- */
-
-       /* MSC registers: timing, bus width, mem type                       */
-
-       /* MSC0: nCS(0,1)                                                   */
-       ldr     r2,=CONFIG_SYS_MSC0_VAL
-       str     r2,[r1, #MSC0_OFFSET]
-       ldr     r2,[r1, #MSC0_OFFSET]   /* read back to ensure data latches */
-
-       /* MSC1: nCS(2,3)                                                   */
-       ldr     r2,=CONFIG_SYS_MSC1_VAL
-       str     r2,[r1, #MSC1_OFFSET]
-       ldr     r2,[r1, #MSC1_OFFSET]
-
-       /* MSC2: nCS(4,5)                                                   */
-       ldr     r2,=CONFIG_SYS_MSC2_VAL
-       str     r2,[r1, #MSC2_OFFSET]
-       ldr     r2,[r1, #MSC2_OFFSET]
-
-       /* ---------------------------------------------------------------- */
-       /* Step 2b: Initialize Card Interface                               */
-       /* ---------------------------------------------------------------- */
-
-       /* MECR: Memory Expansion Card Register                             */
-       ldr     r2,=CONFIG_SYS_MECR_VAL
-       str     r2,[r1, #MECR_OFFSET]
-       ldr     r2,[r1, #MECR_OFFSET]
-
-       /* MCMEM0: Card Interface slot 0 timing                             */
-       ldr     r2,=CONFIG_SYS_MCMEM0_VAL
-       str     r2,[r1, #MCMEM0_OFFSET]
-       ldr     r2,[r1, #MCMEM0_OFFSET]
-
-       /* MCMEM1: Card Interface slot 1 timing                             */
-       ldr     r2,=CONFIG_SYS_MCMEM1_VAL
-       str     r2,[r1, #MCMEM1_OFFSET]
-       ldr     r2,[r1, #MCMEM1_OFFSET]
-
-       /* MCATT0: Card Interface Attribute Space Timing, slot 0            */
-       ldr     r2,=CONFIG_SYS_MCATT0_VAL
-       str     r2,[r1, #MCATT0_OFFSET]
-       ldr     r2,[r1, #MCATT0_OFFSET]
-
-       /* MCATT1: Card Interface Attribute Space Timing, slot 1            */
-       ldr     r2,=CONFIG_SYS_MCATT1_VAL
-       str     r2,[r1, #MCATT1_OFFSET]
-       ldr     r2,[r1, #MCATT1_OFFSET]
-
-       /* MCIO0: Card Interface I/O Space Timing, slot 0                   */
-       ldr     r2,=CONFIG_SYS_MCIO0_VAL
-       str     r2,[r1, #MCIO0_OFFSET]
-       ldr     r2,[r1, #MCIO0_OFFSET]
-
-       /* MCIO1: Card Interface I/O Space Timing, slot 1                   */
-       ldr     r2,=CONFIG_SYS_MCIO1_VAL
-       str     r2,[r1, #MCIO1_OFFSET]
-       ldr     r2,[r1, #MCIO1_OFFSET]
-
-       /* ---------------------------------------------------------------- */
-       /* Step 2c: Write FLYCNFG  FIXME: what's that???                    */
-       /* ---------------------------------------------------------------- */
-
-       /* ---------------------------------------------------------------- */
-       /* Step 2d: Initialize Timing for Sync Memory (SDCLK0)              */
-       /* ---------------------------------------------------------------- */
-
-       @ get the mdrefr settings
-       ldr     r4,=CONFIG_SYS_MDREFR_VAL
-
-       @ write back mdrefr
-       str     r4,[r1, #MDREFR_OFFSET]
-       ldr     r4,[r1, #MDREFR_OFFSET]
-
-       /* ---------------------------------------------------------------- */
-       /* Step 3: Initialize Synchronous Static Memory (Flash/Peripherals) */
-       /* ---------------------------------------------------------------- */
-
-       /* Initialize SXCNFG register. Assert the enable bits               */
-
-       /* Write SXMRS to cause an MRS command to all enabled banks of      */
-       /* synchronous static memory. Note that SXLCR need not be written   */
-       /* at this time.                                                    */
-
-       /* FIXME: we use async mode for now                                 */
-
-       /* ---------------------------------------------------------------- */
-       /* Step 4: Initialize SDRAM                                         */
-       /* ---------------------------------------------------------------- */
-
-       @ set K1RUN for bank 0
-       @
-       orr   r4,  r4,  #MDREFR_K1RUN
-
-       @ write back mdrefr
-       @
-       str     r4,  [r1, #MDREFR_OFFSET]
-       ldr     r4,  [r1, #MDREFR_OFFSET]
-
-       @ deassert SLFRSH
-       @
-       bic     r4,  r4,  #MDREFR_SLFRSH
-
-       @ write back mdrefr
-       @
-       str     r4,  [r1, #MDREFR_OFFSET]
-       ldr     r4,  [r1, #MDREFR_OFFSET]
-
-       @ assert E1PIN
-       @ if E0PIN is also used:         #(MDREFR_E1PIN|MDREFR_E0PIN)
-       orr     r4,  r4, #(MDREFR_E1PIN)
-
-       @ write back mdrefr
-       @
-       str     r4,  [r1, #MDREFR_OFFSET]
-       ldr     r4,  [r1, #MDREFR_OFFSET]
-       nop
-       nop
-
-       /* Step 4d:                                                     */
-       /* fetch platform value of mdcnfg                               */
-       @
-       ldr     r2,  =CONFIG_SYS_MDCNFG_VAL
-
-       @ disable all sdram banks
-       @
-       bic     r2,  r2,  #(MDCNFG_DE0 | MDCNFG_DE1)
-       bic     r2,  r2,  #(MDCNFG_DE2 | MDCNFG_DE3)
-
-       @ program banks 0/1 for bus width
-       @
-       bic   r2,  r2,  #MDCNFG_DWID0      @0=32-bit
-
-       @ write initial value of mdcnfg, w/o enabling sdram banks
-       @
-       str     r2,  [r1, #MDCNFG_OFFSET]
-
-       /* Step 4e: Wait for the clock to the SDRAMs to stabilize,          */
-       /*          100..200 Âµsec.                                          */
-
-       ldr     r3, =OSCR               /* reset the OS Timer Count to zero */
-       mov     r2, #0
-       str     r2, [r3]
-       ldr     r4, =0x300              /* really 0x2E1 is about 200usec,   */
-                                       /* so 0x300 should be plenty        */
-1:
-       ldr     r2, [r3]
-       cmp     r4, r2
-       bgt     1b
-
-
-       /* Step 4f: Trigger a number (usually 8) refresh cycles by          */
-       /*          attempting non-burst read or write accesses to disabled */
-       /*          SDRAM, as commonly specified in the power up sequence   */
-       /*          documented in SDRAM data sheets. The address(es) used   */
-       /*          for this purpose must not be cacheable.                 */
-
-       ldr     r3,     =CONFIG_SYS_DRAM_BASE
-       str     r2,     [r3]
-       str     r2,     [r3]
-       str     r2,     [r3]
-       str     r2,     [r3]
-       str     r2,     [r3]
-       str     r2,     [r3]
-       str     r2,     [r3]
-       str     r2,     [r3]
-       str     r2,     [r3]
-
-
-       /* Step 4g: Write MDCNFG with enable bits asserted                  */
-       /* get memory controller base address                               */
-       ldr     r1,  =MEMC_BASE
-
-       @fetch current mdcnfg value
-       @
-       ldr     r3,  [r1, #MDCNFG_OFFSET]
-
-       @enable sdram bank 0 if installed (must do for any populated bank)
-       @
-       orr     r3,  r3,  #MDCNFG_DE0
-
-       @write back mdcnfg, enabling the sdram bank(s)
-       @
-       str     r3,  [r1, #MDCNFG_OFFSET]
-
-       /* Step 4h: Write MDMRS.                                            */
-
-       ldr     r2,     =CONFIG_SYS_MDMRS_VAL
-       str     r2,     [r1, #MDMRS_OFFSET]
-
-
-       /* We are finished with Intel's memory controller initialisation    */
-
-
-       /* ---------------------------------------------------------------- */
-       /* Disable (mask) all interrupts at interrupt controller            */
-       /* ---------------------------------------------------------------- */
-
-initirqs:
-       mov     r1, #0          /* clear int. level register (IRQ, not FIQ) */
-       ldr     r2,  =ICLR
-       str     r1,  [r2]
-
-       ldr     r1,  =CONFIG_SYS_ICMR_VAL /* mask all interrupts at the controller */
-       ldr     r2,  =ICMR
-       str     r1,  [r2]
-
-
-       /* ---------------------------------------------------------------- */
-       /* Clock initialisation                                             */
-       /* ---------------------------------------------------------------- */
-
-initclks:
-
-       /* Disable the peripheral clocks, and set the core clock frequency  */
-       /* (hard-coding at 398.12MHz for now).                              */
-       /* Turn Off ALL on-chip peripheral clocks for re-configuration      */
-       /* Note: See label 'ENABLECLKS' for the re-enabling                 */
-       ldr     r1,  =CKEN
-       mov     r2,  #0
-       str     r2,  [r1]
-
-
-       /* default value                                                    */
-       ldr     r2, =(CCCR_L27|CCCR_M2|CCCR_N10)  /* DEFAULT: {200/200/100} */
-
-       /* ... and write the core clock config register                     */
-       ldr     r1,  =CCCR
-       str     r2,  [r1]
-
-#ifdef RTC
-       /* enable the 32Khz oscillator for RTC and PowerManager             */
-
-       ldr     r1,  =OSCC
-       mov     r2,  #OSCC_OON
-       str     r2,  [r1]
-
-       /* NOTE:  spin here until OSCC.OOK get set, meaning the PLL         */
-       /* has settled.                                                     */
-60:
-       ldr     r2, [r1]
-       ands    r2, r2, #1
-       beq     60b
-#endif
-
-       @ Turn on needed clocks
-       @
-test:
-       ldr     r1,  =CKEN
-       ldr     r2,  =CONFIG_SYS_CKEN_VAL
-       str     r2,  [r1]
-
-       /* ---------------------------------------------------------------- */
-       /*                                                                  */
-       /* ---------------------------------------------------------------- */
-
-       /* Save SDRAM size ?*/
-       ldr     r1, =DRAM_SIZE
-       str     r8, [r1]
-
-       /* FIXME */
-
-#define NODEBUG
-#ifdef NODEBUG
-       /*Disable software and data breakpoints */
-       mov     r0,#0
-       mcr     p15,0,r0,c14,c8,0  /* ibcr0 */
-       mcr     p15,0,r0,c14,c9,0  /* ibcr1 */
-       mcr     p15,0,r0,c14,c4,0  /* dbcon */
-
-       /*Enable all debug functionality */
-       mov     r0,#0x80000000
-       mcr     p14,0,r0,c10,c0,0  /* dcsr */
-
-#endif
-
-       /* ---------------------------------------------------------------- */
-       /* End lowlevel_init                                                     */
-       /* ---------------------------------------------------------------- */
-
-endlowlevel_init:
-
-       mov     pc, lr
index 4c19c4dd4ef888a56e748d89c353ca60cb7d49ce..40b0f3b30e21b319581350fb58e95da05ec156c4 100644 (file)
@@ -39,8 +39,9 @@ DECLARE_GLOBAL_DATA_PTR;
 
 int board_init (void)
 {
-       /* memory and cpu-speed are setup before relocation */
-       /* so we do _nothing_ here */
+       /* We have RAM, disable cache */
+       dcache_disable();
+       icache_disable();
 
        /* arch number of xaeniax */
        gd->bd->bi_arch_number = 585;
@@ -58,19 +59,18 @@ int board_late_init(void)
        return 0;
 }
 
+extern void pxa_dram_init(void);
+int dram_init(void)
+{
+       pxa_dram_init();
+       gd->ram_size = PHYS_SDRAM_1_SIZE;
+       return 0;
+}
 
-int dram_init (void)
+void dram_init_banksize(void)
 {
        gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
        gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
-       /*      gd->bd->bi_dram[1].start = PHYS_SDRAM_2;*/
-       /*      gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;*/
-       /*      gd->bd->bi_dram[2].start = PHYS_SDRAM_3; */
-       /*      gd->bd->bi_dram[2].size = PHYS_SDRAM_3_SIZE; */
-       /*      gd->bd->bi_dram[3].start = PHYS_SDRAM_4; */
-       /*      gd->bd->bi_dram[3].size = PHYS_SDRAM_4_SIZE; */
-
-       return 0;
 }
 
 #ifdef CONFIG_CMD_NET
index d022831830a2de6020b7a80ead8e69e58b65c41f..16e0b66218a446a684245b3392ab7835d0e4726c 100644 (file)
@@ -32,7 +32,11 @@ LIB  = $(obj)lib$(VENDOR).a
 COBJS-$(CONFIG_FSL_PCI_INIT)   += fsl_8xxx_pci.o
 COBJS-$(CONFIG_MPC8572)                += fsl_8xxx_clk.o
 COBJS-$(CONFIG_MPC86xx)                += fsl_8xxx_clk.o
+COBJS-$(CONFIG_P2020)          += fsl_8xxx_clk.o
 COBJS-$(CONFIG_FSL_DDR2)       += fsl_8xxx_ddr.o
+COBJS-$(CONFIG_FSL_DDR3)       += fsl_8xxx_ddr.o
+COBJS-$(CONFIG_MPC85xx)                += fsl_8xxx_misc.o board.o
+COBJS-$(CONFIG_MPC86xx)                += fsl_8xxx_misc.o board.o
 COBJS-$(CONFIG_NAND_ACTL)      += actl_nand.o
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
diff --git a/board/xes/common/board.c b/board/xes/common/board.c
new file mode 100644 (file)
index 0000000..738f0a6
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2009 Extreme Engineering Solutions, Inc.
+ *
+ * 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.
+ */
+
+#include <common.h>
+#include "fsl_8xxx_misc.h"
+
+int checkboard(void)
+{
+       char name[] = CONFIG_SYS_BOARD_NAME;
+       char *s;
+
+#ifdef CONFIG_SYS_FORM_CUSTOM
+       s = "Custom";
+#elif CONFIG_SYS_FORM_6U_CPCI
+       s = "6U CompactPCI";
+#elif CONFIG_SYS_FORM_ATCA_PMC
+       s = "ATCA w/PMC";
+#elif CONFIG_SYS_FORM_ATCA_AMC
+       s = "ATCA w/AMC";
+#elif CONFIG_SYS_FORM_VME
+       s = "VME";
+#elif CONFIG_SYS_FORM_6U_VPX
+       s = "6U VPX";
+#elif CONFIG_SYS_FORM_PMC
+       s = "PMC";
+#elif CONFIG_SYS_FORM_PCI
+       s = "PCI";
+#elif CONFIG_SYS_FORM_3U_CPCI
+       s = "3U CompactPCI";
+#elif CONFIG_SYS_FORM_AMC
+       s = "AdvancedMC";
+#elif CONFIG_SYS_FORM_XMC
+       s = "XMC";
+#elif CONFIG_SYS_FORM_PMC_XMC
+       s = "PMC/XMC";
+#elif CONFIG_SYS_FORM_PCI_EXPRESS
+       s = "PCI Express";
+#elif CONFIG_SYS_FORM_3U_VPX
+       s = "3U VPX";
+#else
+#error "Form factor not defined"
+#endif
+
+       name[strlen(name) - 1] += get_board_derivative();
+       printf("Board: X-ES %s %s SBC\n", name, s);
+
+       /* Display board specific information */
+       puts("       ");
+       if ((s = getenv("board_rev")))
+               printf("Rev %s, ", s);
+       if ((s = getenv("serial#")))
+               printf("Serial# %s, ", s);
+       if ((s = getenv("board_cfg")))
+               printf("Cfg %s", s);
+       puts("\n");
+
+       return 0;
+}
index f4a17b78c6060e9463e31ff213be0302a03cbfd3..20d0a308b9a17f6fd4c70d022264bc6372260f61 100644 (file)
@@ -38,7 +38,11 @@ unsigned long get_board_sys_clk(ulong dummy)
        if (in_be32(&gur->gpporcr) & 0x10000)
                return 66666666;
        else
+#ifdef CONFIG_P2020
+               return 100000000;
+#else
                return 50000000;
+#endif
 }
 
 #ifdef CONFIG_MPC85xx
@@ -54,6 +58,13 @@ unsigned long get_board_ddr_clk(ulong dummy)
        if (ddr_ratio == 0x7)
                return get_board_sys_clk(dummy);
 
+#ifdef CONFIG_P2020
+       if (in_be32(&gur->gpporcr) & 0x20000)
+               return 66666666;
+       else
+               return 100000000;
+#else
        return 66666666;
+#endif
 }
 #endif
diff --git a/board/xes/common/fsl_8xxx_misc.c b/board/xes/common/fsl_8xxx_misc.c
new file mode 100644 (file)
index 0000000..36e9146
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2008 Extreme Engineering Solutions, Inc.
+ *
+ * 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/mmu.h>
+#ifdef CONFIG_PCA953X
+#include <pca953x.h>
+
+/*
+ * Determine if a board's flashes are write protected
+ */
+int board_flash_wp_on(void)
+{
+       if (pca953x_get_val(CONFIG_SYS_I2C_PCA953X_ADDR0) &
+                       CONFIG_SYS_PCA953X_NVM_WP)
+               return 1;
+
+       return 0;
+}
+#endif
+
+/*
+ * Return a board's derivative model number.  For example:
+ * return 2 for the XPedite5372 and return 1 for the XPedite5201.
+ */
+uint get_board_derivative(void)
+{
+#if defined(CONFIG_MPC85xx)
+       volatile ccsr_gur_t *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR;
+#elif defined(CONFIG_MPC86xx)
+       volatile immap_t *immap = (immap_t *)CONFIG_SYS_CCSRBAR;
+       volatile ccsr_gur_t *gur = &immap->im_gur;
+#endif
+
+       /*
+       * The top 4 lines of the local bus address are pulled low/high and
+       * can be read to determine the least significant digit of a board's
+       * model number.
+       */
+       return gur->gpporcr >> 28;
+}
diff --git a/board/xes/common/fsl_8xxx_misc.h b/board/xes/common/fsl_8xxx_misc.h
new file mode 100644 (file)
index 0000000..ecc70da
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2008 Extreme Engineering Solutions, Inc.
+ *
+ * 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 __FSL_8XXX_MISC_H___
+#define __FSL_8XXX_MISC_H___
+
+uint get_board_derivative(void);
+
+#endif /* __FSL_8XXX_MISC_H__ */
index ece7882577852c5faca67d0a453226e99ddcd3c6..f425ceedc45664f90b48e13b3f84b3adb12f6429 100644 (file)
 #include <pci.h>
 #include <asm/fsl_pci.h>
 #include <asm/io.h>
+#include <linux/compiler.h>
 #include <libfdt.h>
 #include <fdt_support.h>
 
-int first_free_busno = 0;
 
 #ifdef CONFIG_PCI1
 static struct pci_controller pci1_hose;
@@ -43,111 +43,6 @@ static struct pci_controller pcie2_hose;
 static struct pci_controller pcie3_hose;
 #endif
 
-#ifdef CONFIG_MPC8572
-/* Correlate host/agent POR bits to usable info. Table 4-14 */
-struct host_agent_cfg_t {
-       uchar pcie_root[3];
-       uchar rio_host;
-} host_agent_cfg[8] = {
-       {{0, 0, 0}, 0},
-       {{0, 1, 1}, 1},
-       {{1, 0, 1}, 0},
-       {{1, 1, 0}, 1},
-       {{0, 0, 1}, 0},
-       {{0, 1, 0}, 1},
-       {{1, 0, 0}, 0},
-       {{1, 1, 1}, 1}
-};
-
-/* Correlate port width POR bits to usable info. Table 4-15 */
-struct io_port_cfg_t {
-       uchar pcie_width[3];
-       uchar rio_width;
-} io_port_cfg[16] = {
-       {{0, 0, 0}, 0},
-       {{0, 0, 0}, 0},
-       {{4, 0, 0}, 0},
-       {{4, 4, 0}, 0},
-       {{0, 0, 0}, 0},
-       {{0, 0, 0}, 0},
-       {{0, 0, 0}, 4},
-       {{4, 2, 2}, 0},
-       {{0, 0, 0}, 0},
-       {{0, 0, 0}, 0},
-       {{0, 0, 0}, 0},
-       {{4, 0, 0}, 4},
-       {{4, 0, 0}, 4},
-       {{0, 0, 0}, 4},
-       {{0, 0, 0}, 4},
-       {{8, 0, 0}, 0},
-};
-#elif defined CONFIG_MPC8548
-/* Correlate host/agent POR bits to usable info. Table 4-12 */
-struct host_agent_cfg_t {
-       uchar pci_host[2];
-       uchar pcie_root[1];
-       uchar rio_host;
-} host_agent_cfg[8] = {
-       {{1, 1}, {0}, 0},
-       {{1, 1}, {1}, 0},
-       {{1, 1}, {0}, 1},
-       {{0, 0}, {0}, 0}, /* reserved */
-       {{0, 1}, {1}, 0},
-       {{1, 1}, {1}, 0},
-       {{0, 1}, {1}, 1},
-       {{1, 1}, {1}, 1}
-};
-
-/* Correlate port width POR bits to usable info. Table 4-13 */
-struct io_port_cfg_t {
-       uchar pcie_width[1];
-       uchar rio_width;
-} io_port_cfg[8] = {
-       {{0}, 0},
-       {{0}, 0},
-       {{0}, 0},
-       {{4}, 4},
-       {{4}, 4},
-       {{0}, 4},
-       {{0}, 4},
-       {{8}, 0},
-};
-#elif defined CONFIG_MPC86xx
-/* Correlate host/agent POR bits to usable info. Table 4-17 */
-struct host_agent_cfg_t {
-       uchar pcie_root[2];
-       uchar rio_host;
-} host_agent_cfg[8] = {
-       {{0, 0}, 0},
-       {{1, 0}, 1},
-       {{0, 1}, 0},
-       {{1, 1}, 1}
-};
-
-/* Correlate port width POR bits to usable info. Table 4-16 */
-struct io_port_cfg_t {
-       uchar pcie_width[2];
-       uchar rio_width;
-} io_port_cfg[16] = {
-       {{0, 0}, 0},
-       {{0, 0}, 0},
-       {{8, 0}, 0},
-       {{8, 8}, 0},
-       {{0, 0}, 0},
-       {{8, 0}, 4},
-       {{8, 0}, 4},
-       {{8, 0}, 4},
-       {{0, 0}, 0},
-       {{0, 0}, 4},
-       {{0, 0}, 4},
-       {{0, 0}, 4},
-       {{0, 0}, 0},
-       {{0, 0}, 0},
-       {{0, 8}, 0},
-       {{8, 8}, 0},
-};
-#endif
-
 /*
  * 85xx and 86xx share naming conventions, but different layout.
  * Correlate names to CPU-specific values to share common
@@ -173,22 +68,22 @@ struct io_port_cfg_t {
 
 void pci_init_board(void)
 {
-       struct pci_controller *hose;
-       volatile ccsr_fsl_pci_t *pci;
-       int width;
-       int host;
+       struct fsl_pci_info pci_info[3];
+       int first_free_busno = 0;
+       int num = 0;
+       int pcie_ep;
+       __maybe_unused int pcie_configured;
+
 #if defined(CONFIG_MPC85xx)
        volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
 #elif defined(CONFIG_MPC86xx)
        immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
        volatile ccsr_gur_t *gur = &immap->im_gur;
 #endif
-       uint devdisr = in_be32(&gur->devdisr);
-       uint io_sel = (in_be32(&gur->pordevsr) & MPC8xxx_PORDEVSR_IO_SEL) >>
+       u32 devdisr = in_be32(&gur->devdisr);
+       u32 pordevsr = in_be32(&gur->pordevsr);
+       __maybe_unused uint io_sel = (pordevsr & MPC8xxx_PORDEVSR_IO_SEL) >>
                        MPC8xxx_PORDEVSR_IO_SEL_SHIFT;
-       uint host_agent = (in_be32(&gur->porbmsr) & MPC8xxx_PORBMSR_HA) >>
-                       MPC8xxx_PORBMSR_HA_SHIFT;
-       struct pci_region *r;
 
 #ifdef CONFIG_PCI1
        uint pci_spd_norm = in_be32(&gur->pordevsr) & MPC85xx_PORDEVSR_PCI1_SPD;
@@ -197,49 +92,19 @@ void pci_init_board(void)
        uint pcix = in_be32(&gur->pordevsr) & MPC85xx_PORDEVSR_PCI1;
        uint freq = CONFIG_SYS_CLK_FREQ / 1000 / 1000;
 
-       width = 0; /* Silence compiler warning... */
-       io_sel &= 0xf; /* Silence compiler warning... */
-       pci = (ccsr_fsl_pci_t *) CONFIG_SYS_PCI1_ADDR;
-       hose = &pci1_hose;
-       host = host_agent_cfg[host_agent].pci_host[0];
-       r = hose->regions;
-
        if (!(devdisr & MPC85xx_DEVDISR_PCI1)) {
+               SET_STD_PCI_INFO(pci_info[num], 1);
+               pcie_ep = fsl_setup_hose(&pci1_hose, pci_info[num].regs);
                printf("\n    PCI1: %d bit %s, %s %d MHz, %s, %s\n",
                        pci_32 ? 32 : 64,
                        pcix ? "PCIX" : "PCI",
                        pci_spd_norm ? ">=" : "<=",
                        pcix ? freq * 2 : freq,
-                       host ? "host" : "agent",
+                       pcie_ep ? "agent" : "host",
                        pci_arb ? "arbiter" : "external-arbiter");
 
-               /* outbound memory */
-               pci_set_region(r++,
-                               CONFIG_SYS_PCI1_MEM_BASE,
-                               CONFIG_SYS_PCI1_MEM_PHYS,
-                               CONFIG_SYS_PCI1_MEM_SIZE,
-                               PCI_REGION_MEM);
-
-               /* outbound io */
-               pci_set_region(r++,
-                               CONFIG_SYS_PCI1_IO_BASE,
-                               CONFIG_SYS_PCI1_IO_PHYS,
-                               CONFIG_SYS_PCI1_IO_SIZE,
-                               PCI_REGION_IO);
-
-               hose->region_count = r - hose->regions;
-
-               hose->first_busno = first_free_busno;
-
-               fsl_pci_init(hose, (u32)&pci->cfg_addr, (u32)&pci->cfg_data);
-
-               /* Unlock inbound PCI configuration cycles */
-               if (!host)
-                       fsl_pci_config_unlock(hose);
-
-               first_free_busno = hose->last_busno + 1;
-               printf("    PCI1 on bus %02x - %02x\n",
-                       hose->first_busno, hose->last_busno);
+               first_free_busno = fsl_pci_init_port(&pci_info[num++],
+                                       &pci1_hose, first_free_busno);
        } else {
                printf("    PCI1: disabled\n");
        }
@@ -247,148 +112,53 @@ void pci_init_board(void)
        /* PCI1 not present on MPC8572 */
        setbits_be32(&gur->devdisr, MPC85xx_DEVDISR_PCI1);
 #endif
-#ifdef CONFIG_PCIE1
-       pci = (ccsr_fsl_pci_t *) CONFIG_SYS_PCIE1_ADDR;
-       hose = &pcie1_hose;
-       host = host_agent_cfg[host_agent].pcie_root[0];
-       width = io_port_cfg[io_sel].pcie_width[0];
-       r = hose->regions;
-
-       if (width && !(devdisr & MPC8xxx_DEVDISR_PCIE1)) {
-               printf("\n    PCIE1 connected as %s (x%d)",
-                       host ? "Root Complex" : "Endpoint", width);
-               if (in_be32(&pci->pme_msg_det)) {
-                       out_be32(&pci->pme_msg_det, 0xffffffff);
-                       debug(" with errors.  Clearing.  Now 0x%08x",
-                               in_be32(&pci->pme_msg_det));
-               }
-               printf("\n");
-
-               /* outbound memory */
-               pci_set_region(r++,
-                               CONFIG_SYS_PCIE1_MEM_BASE,
-                               CONFIG_SYS_PCIE1_MEM_PHYS,
-                               CONFIG_SYS_PCIE1_MEM_SIZE,
-                               PCI_REGION_MEM);
-
-               /* outbound io */
-               pci_set_region(r++,
-                               CONFIG_SYS_PCIE1_IO_BASE,
-                               CONFIG_SYS_PCIE1_IO_PHYS,
-                               CONFIG_SYS_PCIE1_IO_SIZE,
-                               PCI_REGION_IO);
-
-               hose->region_count = r - hose->regions;
-
-               hose->first_busno = first_free_busno;
-
-               fsl_pci_init(hose, (u32)&pci->cfg_addr, (u32)&pci->cfg_data);
 
-               /* Unlock inbound PCI configuration cycles */
-               if (!host)
-                       fsl_pci_config_unlock(hose);
-
-               first_free_busno = hose->last_busno + 1;
-               printf("    PCIE1 on bus %02x - %02x\n",
-                               hose->first_busno, hose->last_busno);
+#ifdef CONFIG_PCIE1
+       pcie_configured = is_fsl_pci_cfg(LAW_TRGT_IF_PCIE_1, io_sel);
+
+       if (pcie_configured && !(devdisr & MPC8xxx_DEVDISR_PCIE1)) {
+               SET_STD_PCIE_INFO(pci_info[num], 1);
+               pcie_ep = fsl_setup_hose(&pcie1_hose, pci_info[num].regs);
+               printf("    PCIE1 connected as %s\n",
+                       pcie_ep ? "Endpoint" : "Root Complex");
+               first_free_busno = fsl_pci_init_port(&pci_info[num++],
+                                       &pcie1_hose, first_free_busno);
+       } else {
+               printf("    PCIE1: disabled\n");
        }
 #else
        setbits_be32(&gur->devdisr, MPC8xxx_DEVDISR_PCIE1);
 #endif /* CONFIG_PCIE1 */
 
 #ifdef CONFIG_PCIE2
-       pci = (ccsr_fsl_pci_t *) CONFIG_SYS_PCIE2_ADDR;
-       hose = &pcie2_hose;
-       host = host_agent_cfg[host_agent].pcie_root[1];
-       width = io_port_cfg[io_sel].pcie_width[1];
-       r = hose->regions;
-
-       if (width && !(devdisr & MPC8xxx_DEVDISR_PCIE2)) {
-               printf("\n    PCIE2 connected as %s (x%d)",
-                       host ? "Root Complex" : "Endpoint", width);
-               if (in_be32(&pci->pme_msg_det)) {
-                       out_be32(&pci->pme_msg_det, 0xffffffff);
-                       debug(" with errors.  Clearing.  Now 0x%08x",
-                               in_be32(&pci->pme_msg_det));
-               }
-               printf("\n");
-
-               /* outbound memory */
-               pci_set_region(r++,
-                               CONFIG_SYS_PCIE2_MEM_BASE,
-                               CONFIG_SYS_PCIE2_MEM_PHYS,
-                               CONFIG_SYS_PCIE2_MEM_SIZE,
-                               PCI_REGION_MEM);
-
-               /* outbound io */
-               pci_set_region(r++,
-                               CONFIG_SYS_PCIE2_IO_BASE,
-                               CONFIG_SYS_PCIE2_IO_PHYS,
-                               CONFIG_SYS_PCIE2_IO_SIZE,
-                               PCI_REGION_IO);
-
-               hose->region_count = r - hose->regions;
-
-               hose->first_busno = first_free_busno;
-
-               fsl_pci_init(hose, (u32)&pci->cfg_addr, (u32)&pci->cfg_data);
-
-               /* Unlock inbound PCI configuration cycles */
-               if (!host)
-                       fsl_pci_config_unlock(hose);
-
-               first_free_busno = hose->last_busno + 1;
-               printf("    PCIE2 on bus %02x - %02x\n",
-                               hose->first_busno, hose->last_busno);
+       pcie_configured = is_fsl_pci_cfg(LAW_TRGT_IF_PCIE_2, io_sel);
+
+       if (pcie_configured && !(devdisr & MPC8xxx_DEVDISR_PCIE2)) {
+               SET_STD_PCIE_INFO(pci_info[num], 2);
+               pcie_ep = fsl_setup_hose(&pcie2_hose, pci_info[num].regs);
+               printf("    PCIE2 connected as %s\n",
+                       pcie_ep ? "Endpoint" : "Root Complex");
+               first_free_busno = fsl_pci_init_port(&pci_info[num++],
+                                       &pcie2_hose, first_free_busno);
+       } else {
+               printf("    PCIE2: disabled\n");
        }
 #else
        setbits_be32(&gur->devdisr, MPC8xxx_DEVDISR_PCIE2);
 #endif /* CONFIG_PCIE2 */
 
 #ifdef CONFIG_PCIE3
-       pci = (ccsr_fsl_pci_t *) CONFIG_SYS_PCIE3_ADDR;
-       hose = &pcie3_hose;
-       host = host_agent_cfg[host_agent].pcie_root[2];
-       width = io_port_cfg[io_sel].pcie_width[2];
-       r = hose->regions;
-
-       if (width && !(devdisr & MPC8xxx_DEVDISR_PCIE3)) {
-               printf("\n    PCIE3 connected as %s (x%d)",
-                       host ? "Root Complex" : "Endpoint", width);
-               if (in_be32(&pci->pme_msg_det)) {
-                       out_be32(&pci->pme_msg_det, 0xffffffff);
-                       debug(" with errors.  Clearing.  Now 0x%08x",
-                               in_be32(&pci->pme_msg_det));
-               }
-               printf("\n");
-
-               /* outbound memory */
-               pci_set_region(r++,
-                               CONFIG_SYS_PCIE3_MEM_BASE,
-                               CONFIG_SYS_PCIE3_MEM_PHYS,
-                               CONFIG_SYS_PCIE3_MEM_SIZE,
-                               PCI_REGION_MEM);
-
-               /* outbound io */
-               pci_set_region(r++,
-                               CONFIG_SYS_PCIE3_IO_BASE,
-                               CONFIG_SYS_PCIE3_IO_PHYS,
-                               CONFIG_SYS_PCIE3_IO_SIZE,
-                               PCI_REGION_IO);
-
-               hose->region_count = r - hose->regions;
-
-               hose->first_busno = first_free_busno;
-
-               fsl_pci_init(hose, (u32)&pci->cfg_addr, (u32)&pci->cfg_data);
-
-               /* Unlock inbound PCI configuration cycles */
-               if (!host)
-                       fsl_pci_config_unlock(hose);
-
-               first_free_busno = hose->last_busno + 1;
-               printf("    PCIE3 on bus %02x - %02x\n",
-                               hose->first_busno, hose->last_busno);
+       pcie_configured = is_fsl_pci_cfg(LAW_TRGT_IF_PCIE_3, io_sel);
+
+       if (pcie_configured && !(devdisr & MPC8xxx_DEVDISR_PCIE3)) {
+               SET_STD_PCIE_INFO(pci_info[num], 3);
+               pcie_ep = fsl_setup_hose(&pcie3_hose, pci_info[num].regs);
+               printf("    PCIE3 connected as %s\n",
+                       pcie_ep ? "Endpoint" : "Root Complex");
+               first_free_busno = fsl_pci_init_port(&pci_info[num++],
+                                       &pcie3_hose, first_free_busno);
+       } else {
+               printf("    PCIE3: disabled\n");
        }
 #else
        setbits_be32(&gur->devdisr, MPC8xxx_DEVDISR_PCIE3);
diff --git a/board/xes/xpedite5170/Makefile b/board/xes/xpedite5170/Makefile
deleted file mode 100644 (file)
index fea6686..0000000
+++ /dev/null
@@ -1,52 +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
-#
-
-include $(TOPDIR)/config.mk
-
-LIB    = $(obj)lib$(BOARD).a
-
-COBJS-y        += $(BOARD).o
-COBJS-y        += ddr.o
-COBJS-y        += law.o
-
-SRCS   := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
-OBJS   := $(addprefix $(obj),$(COBJS-y))
-SOBJS  := $(addprefix $(obj),$(SOBJS-y))
-
-$(LIB):        $(obj).depend $(OBJS) $(SOBJS)
-       $(AR) $(ARFLAGS) $@ $(OBJS)
-
-clean:
-       rm -f $(OBJS) $(SOBJS)
-
-distclean:     clean
-       rm -f $(LIB) core *.bak .depend
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude ($obj).depend
-
-#########################################################################
diff --git a/board/xes/xpedite5170/ddr.c b/board/xes/xpedite5170/ddr.c
deleted file mode 100644 (file)
index 1d57d09..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Copyright 2009 Extreme Engineering Solutions, Inc.
- * Copyright 2007-2008 Freescale Semiconductor, Inc.
- *
- * 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 <i2c.h>
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
-
-static void get_spd(ddr2_spd_eeprom_t *spd, unsigned char i2c_address)
-{
-       i2c_read(i2c_address, SPD_EEPROM_OFFSET, 2, (uchar *)spd,
-               sizeof(ddr2_spd_eeprom_t));
-}
-
-unsigned int fsl_ddr_get_mem_data_rate(void)
-{
-       return get_bus_freq(0);
-}
-
-void fsl_ddr_get_spd(ddr2_spd_eeprom_t *ctrl_dimms_spd,
-                       unsigned int ctrl_num)
-{
-       unsigned int i;
-       unsigned int i2c_address = 0;
-
-       for (i = 0; i < CONFIG_DIMM_SLOTS_PER_CTLR; i++) {
-               if (ctrl_num == 0) {
-                       i2c_address = SPD_EEPROM_ADDRESS1;
-#ifdef SPD_EEPROM_ADDRESS2
-               } else if (ctrl_num == 1) {
-                       i2c_address = SPD_EEPROM_ADDRESS2;
-#endif
-               } else {
-                       /* An inalid ctrl number was give, use default SPD */
-                       printf("ERROR: invalid DDR ctrl: %d\n", ctrl_num);
-                       i2c_address = SPD_EEPROM_ADDRESS1;
-               }
-
-               get_spd(&(ctrl_dimms_spd[i]), i2c_address);
-       }
-}
-
-/*
- * There are four board-specific SDRAM timing parameters which must be
- * calculated based on the particular PCB artwork.  These are:
- *   1.) CPO (Read Capture Delay)
- *           - TIMING_CFG_2 register
- *           Source: Calculation based on board trace lengths and
- *                   chip-specific internal delays.
- *   2.) WR_DATA_DELAY (Write Command to Data Strobe Delay)
- *           - TIMING_CFG_2 register
- *           Source: Calculation based on board trace lengths.
- *                   Unless clock and DQ lanes are very different
- *                   lengths (>2"), this should be set to the nominal value
- *                   of 1/2 clock delay.
- *   3.) CLK_ADJUST (Clock and Addr/Cmd alignment control)
- *           - DDR_SDRAM_CLK_CNTL register
- *           Source: Signal Integrity Simulations
- *   4.) 2T Timing on Addr/Ctl
- *           - TIMING_CFG_2 register
- *           Source: Signal Integrity Simulations
- *           Usually only needed with heavy load/very high speed (>DDR2-800)
- *
- *     PCB routing on the XPedite5170 is nearly identical to the XPedite5370
- *     so we use the XPedite5370 settings as a basis for the XPedite5170.
- */
-
-typedef struct board_memctl_options {
-       uint16_t datarate_mhz_low;
-       uint16_t datarate_mhz_high;
-       uint8_t clk_adjust;
-       uint8_t cpo_override;
-       uint8_t write_data_delay;
-} board_memctl_options_t;
-
-static struct board_memctl_options bopts_ctrl[][2] = {
-       {
-               /* Controller 0 */
-               {
-                       /* DDR2 600/667 */
-                       .datarate_mhz_low       = 500,
-                       .datarate_mhz_high      = 750,
-                       .clk_adjust             = 5,
-                       .cpo_override           = 8,
-                       .write_data_delay       = 2,
-               },
-               {
-                       /* DDR2 800 */
-                       .datarate_mhz_low       = 750,
-                       .datarate_mhz_high      = 850,
-                       .clk_adjust             = 5,
-                       .cpo_override           = 9,
-                       .write_data_delay       = 2,
-               },
-       },
-       {
-               /* Controller 1 */
-               {
-                       /* DDR2 600/667 */
-                       .datarate_mhz_low       = 500,
-                       .datarate_mhz_high      = 750,
-                       .clk_adjust             = 5,
-                       .cpo_override           = 7,
-                       .write_data_delay       = 2,
-               },
-               {
-                       /* DDR2 800 */
-                       .datarate_mhz_low       = 750,
-                       .datarate_mhz_high      = 850,
-                       .clk_adjust             = 5,
-                       .cpo_override           = 8,
-                       .write_data_delay       = 2,
-               },
-       },
-};
-
-void fsl_ddr_board_options(memctl_options_t *popts,
-                       dimm_params_t *pdimm,
-                       unsigned int ctrl_num)
-{
-       struct board_memctl_options *bopts = bopts_ctrl[ctrl_num];
-       sys_info_t sysinfo;
-       int i;
-       unsigned int datarate;
-
-       get_sys_info(&sysinfo);
-       datarate = fsl_ddr_get_mem_data_rate() / 1000000;
-
-       for (i = 0; i < ARRAY_SIZE(bopts_ctrl[ctrl_num]); i++) {
-               if ((bopts[i].datarate_mhz_low <= datarate) &&
-                   (bopts[i].datarate_mhz_high >= datarate)) {
-                       debug("controller %d:\n", ctrl_num);
-                       debug(" clk_adjust = %d\n", bopts[i].clk_adjust);
-                       debug(" cpo = %d\n", bopts[i].cpo_override);
-                       debug(" write_data_delay = %d\n",
-                               bopts[i].write_data_delay);
-                       popts->clk_adjust = bopts[i].clk_adjust;
-                       popts->cpo_override = bopts[i].cpo_override;
-                       popts->write_data_delay = bopts[i].write_data_delay;
-               }
-       }
-
-       /*
-        * Factors to consider for half-strength driver enable:
-        *      - number of DIMMs installed
-        */
-       popts->half_strength_driver_enable = 0;
-}
diff --git a/board/xes/xpedite5170/law.c b/board/xes/xpedite5170/law.c
deleted file mode 100644 (file)
index 0b7d9ef..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2008 Freescale Semiconductor, Inc.
- *
- * (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
- */
-
-#include <common.h>
-#include <asm/fsl_law.h>
-#include <asm/mmu.h>
-
-/*
- * Notes:
- *    CCSRBAR don't need a configured Local Access Window.
- *    If flash is 8M at default position (last 8M), no LAW needed.
- */
-
-struct law_entry law_table[] = {
-       SET_LAW(CONFIG_SYS_FLASH_BASE2, LAW_SIZE_256M, LAW_TRGT_IF_LBC),
-#ifdef CONFIG_SYS_NAND_BASE
-       /* NAND LAW covers 2 NAND flashes */
-       SET_LAW(CONFIG_SYS_NAND_BASE, LAW_SIZE_512K, LAW_TRGT_IF_LBC),
-#endif
-#ifdef CONFIG_SYS_PCIE1_MEM_PHYS
-       SET_LAW(CONFIG_SYS_PCIE1_MEM_PHYS, LAW_SIZE_1G, LAW_TRGT_IF_PCIE_1),
-       SET_LAW(CONFIG_SYS_PCIE1_IO_PHYS, LAW_SIZE_8M, LAW_TRGT_IF_PCIE_1),
-#endif
-#ifdef CONFIG_SYS_PCIE2_MEM_PHYS
-       SET_LAW(CONFIG_SYS_PCIE2_MEM_PHYS, LAW_SIZE_256M, LAW_TRGT_IF_PCIE_2),
-       SET_LAW(CONFIG_SYS_PCIE2_IO_PHYS, LAW_SIZE_8M, LAW_TRGT_IF_PCIE_2),
-#endif
-};
-
-int num_law_entries = ARRAY_SIZE(law_table);
diff --git a/board/xes/xpedite5170/u-boot.lds b/board/xes/xpedite5170/u-boot.lds
deleted file mode 100644 (file)
index 4cea3b3..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright 2006, 2007 Freescale Semiconductor, Inc.
- *
- * 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
-{
-
-  /* Read-only sections, merged into text segment: */
-  .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      :
-  {
-    arch/powerpc/cpu/mpc86xx/start.o   (.text)
-    arch/powerpc/cpu/mpc86xx/traps.o (.text)
-    arch/powerpc/cpu/mpc86xx/interrupts.o (.text)
-    arch/powerpc/cpu/mpc86xx/cpu_init.o (.text)
-    arch/powerpc/cpu/mpc86xx/cpu.o (.text)
-    arch/powerpc/cpu/mpc86xx/speed.o (.text)
-    common/dlmalloc.o (.text)
-    lib/crc32.o (.text)
-    arch/powerpc/lib/extable.o (.text)
-    lib/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 = .);
-}
diff --git a/board/xes/xpedite5170/xpedite5170.c b/board/xes/xpedite5170/xpedite5170.c
deleted file mode 100644 (file)
index 5822941..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright 2009 Extreme Engineering Solutions, Inc.
- *
- * 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/processor.h>
-#include <asm/mmu.h>
-#include <asm/io.h>
-#include <fdt_support.h>
-#include <pca953x.h>
-
-#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_PCI)
-extern void ft_board_pci_setup(void *blob, bd_t *bd);
-#endif
-
-int checkboard(void)
-{
-       char *s;
-
-       printf("Board: X-ES %s 3U VPX SBC\n", CONFIG_SYS_BOARD_NAME);
-       printf("       ");
-       s = getenv("board_rev");
-       if (s)
-               printf("Rev %s, ", s);
-       s = getenv("serial#");
-       if (s)
-               printf("Serial# %s, ", s);
-       s = getenv("board_cfg");
-       if (s)
-               printf("Cfg %s", s);
-       printf("\n");
-
-       return 0;
-}
-/*
- * Print out which flash was booted from and if booting from the 2nd flash,
- * swap flash chip selects to maintain consistent flash numbering/addresses.
- */
-static void flash_cs_fixup(void)
-{
-       int flash_sel;
-
-       /*
-        * Print boot dev and swap flash flash chip selects if booted from 2nd
-        * flash.  Swapping chip selects presents user with a common memory
-        * map regardless of which flash was booted from.
-        */
-       flash_sel = !((pca953x_get_val(CONFIG_SYS_I2C_PCA953X_ADDR0) &
-                       CONFIG_SYS_PCA953X_C0_FLASH_PASS_CS));
-       printf("FLASH: Executed from FLASH%d\n", flash_sel ? 2 : 1);
-
-       if (flash_sel) {
-               set_lbc_br(0, CONFIG_SYS_BR1_PRELIM);
-               set_lbc_or(0, CONFIG_SYS_OR1_PRELIM);
-
-               set_lbc_br(1, CONFIG_SYS_BR0_PRELIM);
-               set_lbc_or(1, CONFIG_SYS_OR0_PRELIM);
-       }
-}
-
-int board_early_init_r(void)
-{
-       /* Initialize PCA9557 devices */
-       pca953x_set_pol(CONFIG_SYS_I2C_PCA953X_ADDR0, 0xff, 0);
-       pca953x_set_pol(CONFIG_SYS_I2C_PCA953X_ADDR1, 0xff, 0);
-       pca953x_set_pol(CONFIG_SYS_I2C_PCA953X_ADDR2, 0xff, 0);
-       pca953x_set_pol(CONFIG_SYS_I2C_PCA953X_ADDR3, 0xff, 0);
-
-       flash_cs_fixup();
-
-       return 0;
-}
-
-#if defined(CONFIG_OF_BOARD_SETUP)
-void ft_board_setup(void *blob, bd_t *bd)
-{
-#ifdef CONFIG_PCI
-       ft_board_pci_setup(blob, bd);
-#endif
-       ft_cpu_setup(blob, bd);
-}
-#endif
-
-#ifdef CONFIG_MP
-extern void cpu_mp_lmb_reserve(struct lmb *lmb);
-
-void board_lmb_reserve(struct lmb *lmb)
-{
-       cpu_mp_lmb_reserve(lmb);
-}
-#endif
diff --git a/board/xes/xpedite517x/Makefile b/board/xes/xpedite517x/Makefile
new file mode 100644 (file)
index 0000000..fea6686
--- /dev/null
@@ -0,0 +1,52 @@
+#
+# (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
+#
+
+include $(TOPDIR)/config.mk
+
+LIB    = $(obj)lib$(BOARD).a
+
+COBJS-y        += $(BOARD).o
+COBJS-y        += ddr.o
+COBJS-y        += law.o
+
+SRCS   := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS-y))
+SOBJS  := $(addprefix $(obj),$(SOBJS-y))
+
+$(LIB):        $(obj).depend $(OBJS) $(SOBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS)
+
+clean:
+       rm -f $(OBJS) $(SOBJS)
+
+distclean:     clean
+       rm -f $(LIB) core *.bak .depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude ($obj).depend
+
+#########################################################################
diff --git a/board/xes/xpedite517x/ddr.c b/board/xes/xpedite517x/ddr.c
new file mode 100644 (file)
index 0000000..1d57d09
--- /dev/null
@@ -0,0 +1,168 @@
+/*
+ * Copyright 2009 Extreme Engineering Solutions, Inc.
+ * Copyright 2007-2008 Freescale Semiconductor, Inc.
+ *
+ * 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 <i2c.h>
+#include <asm/fsl_ddr_sdram.h>
+#include <asm/fsl_ddr_dimm_params.h>
+
+static void get_spd(ddr2_spd_eeprom_t *spd, unsigned char i2c_address)
+{
+       i2c_read(i2c_address, SPD_EEPROM_OFFSET, 2, (uchar *)spd,
+               sizeof(ddr2_spd_eeprom_t));
+}
+
+unsigned int fsl_ddr_get_mem_data_rate(void)
+{
+       return get_bus_freq(0);
+}
+
+void fsl_ddr_get_spd(ddr2_spd_eeprom_t *ctrl_dimms_spd,
+                       unsigned int ctrl_num)
+{
+       unsigned int i;
+       unsigned int i2c_address = 0;
+
+       for (i = 0; i < CONFIG_DIMM_SLOTS_PER_CTLR; i++) {
+               if (ctrl_num == 0) {
+                       i2c_address = SPD_EEPROM_ADDRESS1;
+#ifdef SPD_EEPROM_ADDRESS2
+               } else if (ctrl_num == 1) {
+                       i2c_address = SPD_EEPROM_ADDRESS2;
+#endif
+               } else {
+                       /* An inalid ctrl number was give, use default SPD */
+                       printf("ERROR: invalid DDR ctrl: %d\n", ctrl_num);
+                       i2c_address = SPD_EEPROM_ADDRESS1;
+               }
+
+               get_spd(&(ctrl_dimms_spd[i]), i2c_address);
+       }
+}
+
+/*
+ * There are four board-specific SDRAM timing parameters which must be
+ * calculated based on the particular PCB artwork.  These are:
+ *   1.) CPO (Read Capture Delay)
+ *           - TIMING_CFG_2 register
+ *           Source: Calculation based on board trace lengths and
+ *                   chip-specific internal delays.
+ *   2.) WR_DATA_DELAY (Write Command to Data Strobe Delay)
+ *           - TIMING_CFG_2 register
+ *           Source: Calculation based on board trace lengths.
+ *                   Unless clock and DQ lanes are very different
+ *                   lengths (>2"), this should be set to the nominal value
+ *                   of 1/2 clock delay.
+ *   3.) CLK_ADJUST (Clock and Addr/Cmd alignment control)
+ *           - DDR_SDRAM_CLK_CNTL register
+ *           Source: Signal Integrity Simulations
+ *   4.) 2T Timing on Addr/Ctl
+ *           - TIMING_CFG_2 register
+ *           Source: Signal Integrity Simulations
+ *           Usually only needed with heavy load/very high speed (>DDR2-800)
+ *
+ *     PCB routing on the XPedite5170 is nearly identical to the XPedite5370
+ *     so we use the XPedite5370 settings as a basis for the XPedite5170.
+ */
+
+typedef struct board_memctl_options {
+       uint16_t datarate_mhz_low;
+       uint16_t datarate_mhz_high;
+       uint8_t clk_adjust;
+       uint8_t cpo_override;
+       uint8_t write_data_delay;
+} board_memctl_options_t;
+
+static struct board_memctl_options bopts_ctrl[][2] = {
+       {
+               /* Controller 0 */
+               {
+                       /* DDR2 600/667 */
+                       .datarate_mhz_low       = 500,
+                       .datarate_mhz_high      = 750,
+                       .clk_adjust             = 5,
+                       .cpo_override           = 8,
+                       .write_data_delay       = 2,
+               },
+               {
+                       /* DDR2 800 */
+                       .datarate_mhz_low       = 750,
+                       .datarate_mhz_high      = 850,
+                       .clk_adjust             = 5,
+                       .cpo_override           = 9,
+                       .write_data_delay       = 2,
+               },
+       },
+       {
+               /* Controller 1 */
+               {
+                       /* DDR2 600/667 */
+                       .datarate_mhz_low       = 500,
+                       .datarate_mhz_high      = 750,
+                       .clk_adjust             = 5,
+                       .cpo_override           = 7,
+                       .write_data_delay       = 2,
+               },
+               {
+                       /* DDR2 800 */
+                       .datarate_mhz_low       = 750,
+                       .datarate_mhz_high      = 850,
+                       .clk_adjust             = 5,
+                       .cpo_override           = 8,
+                       .write_data_delay       = 2,
+               },
+       },
+};
+
+void fsl_ddr_board_options(memctl_options_t *popts,
+                       dimm_params_t *pdimm,
+                       unsigned int ctrl_num)
+{
+       struct board_memctl_options *bopts = bopts_ctrl[ctrl_num];
+       sys_info_t sysinfo;
+       int i;
+       unsigned int datarate;
+
+       get_sys_info(&sysinfo);
+       datarate = fsl_ddr_get_mem_data_rate() / 1000000;
+
+       for (i = 0; i < ARRAY_SIZE(bopts_ctrl[ctrl_num]); i++) {
+               if ((bopts[i].datarate_mhz_low <= datarate) &&
+                   (bopts[i].datarate_mhz_high >= datarate)) {
+                       debug("controller %d:\n", ctrl_num);
+                       debug(" clk_adjust = %d\n", bopts[i].clk_adjust);
+                       debug(" cpo = %d\n", bopts[i].cpo_override);
+                       debug(" write_data_delay = %d\n",
+                               bopts[i].write_data_delay);
+                       popts->clk_adjust = bopts[i].clk_adjust;
+                       popts->cpo_override = bopts[i].cpo_override;
+                       popts->write_data_delay = bopts[i].write_data_delay;
+               }
+       }
+
+       /*
+        * Factors to consider for half-strength driver enable:
+        *      - number of DIMMs installed
+        */
+       popts->half_strength_driver_enable = 0;
+}
diff --git a/board/xes/xpedite517x/law.c b/board/xes/xpedite517x/law.c
new file mode 100644 (file)
index 0000000..0b7d9ef
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2008 Freescale Semiconductor, Inc.
+ *
+ * (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
+ */
+
+#include <common.h>
+#include <asm/fsl_law.h>
+#include <asm/mmu.h>
+
+/*
+ * Notes:
+ *    CCSRBAR don't need a configured Local Access Window.
+ *    If flash is 8M at default position (last 8M), no LAW needed.
+ */
+
+struct law_entry law_table[] = {
+       SET_LAW(CONFIG_SYS_FLASH_BASE2, LAW_SIZE_256M, LAW_TRGT_IF_LBC),
+#ifdef CONFIG_SYS_NAND_BASE
+       /* NAND LAW covers 2 NAND flashes */
+       SET_LAW(CONFIG_SYS_NAND_BASE, LAW_SIZE_512K, LAW_TRGT_IF_LBC),
+#endif
+#ifdef CONFIG_SYS_PCIE1_MEM_PHYS
+       SET_LAW(CONFIG_SYS_PCIE1_MEM_PHYS, LAW_SIZE_1G, LAW_TRGT_IF_PCIE_1),
+       SET_LAW(CONFIG_SYS_PCIE1_IO_PHYS, LAW_SIZE_8M, LAW_TRGT_IF_PCIE_1),
+#endif
+#ifdef CONFIG_SYS_PCIE2_MEM_PHYS
+       SET_LAW(CONFIG_SYS_PCIE2_MEM_PHYS, LAW_SIZE_256M, LAW_TRGT_IF_PCIE_2),
+       SET_LAW(CONFIG_SYS_PCIE2_IO_PHYS, LAW_SIZE_8M, LAW_TRGT_IF_PCIE_2),
+#endif
+};
+
+int num_law_entries = ARRAY_SIZE(law_table);
diff --git a/board/xes/xpedite517x/xpedite517x.c b/board/xes/xpedite517x/xpedite517x.c
new file mode 100644 (file)
index 0000000..0f7fa6c
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * Copyright 2009 Extreme Engineering Solutions, Inc.
+ *
+ * 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/processor.h>
+#include <asm/mmu.h>
+#include <asm/io.h>
+#include <fdt_support.h>
+#include <pca953x.h>
+#include "../common/fsl_8xxx_misc.h"
+
+#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_PCI)
+extern void ft_board_pci_setup(void *blob, bd_t *bd);
+#endif
+
+/*
+ * Print out which flash was booted from and if booting from the 2nd flash,
+ * swap flash chip selects to maintain consistent flash numbering/addresses.
+ */
+static void flash_cs_fixup(void)
+{
+       int flash_sel;
+
+       /*
+        * Print boot dev and swap flash flash chip selects if booted from 2nd
+        * flash.  Swapping chip selects presents user with a common memory
+        * map regardless of which flash was booted from.
+        */
+       flash_sel = !((pca953x_get_val(CONFIG_SYS_I2C_PCA953X_ADDR0) &
+                       CONFIG_SYS_PCA953X_C0_FLASH_PASS_CS));
+       printf("FLASH: Executed from FLASH%d\n", flash_sel ? 2 : 1);
+
+       if (flash_sel) {
+               set_lbc_br(0, CONFIG_SYS_BR1_PRELIM);
+               set_lbc_or(0, CONFIG_SYS_OR1_PRELIM);
+
+               set_lbc_br(1, CONFIG_SYS_BR0_PRELIM);
+               set_lbc_or(1, CONFIG_SYS_OR0_PRELIM);
+       }
+}
+
+int board_early_init_r(void)
+{
+       /* Initialize PCA9557 devices */
+       pca953x_set_pol(CONFIG_SYS_I2C_PCA953X_ADDR0, 0xff, 0);
+       pca953x_set_pol(CONFIG_SYS_I2C_PCA953X_ADDR1, 0xff, 0);
+       pca953x_set_pol(CONFIG_SYS_I2C_PCA953X_ADDR2, 0xff, 0);
+       pca953x_set_pol(CONFIG_SYS_I2C_PCA953X_ADDR3, 0xff, 0);
+
+       flash_cs_fixup();
+
+       return 0;
+}
+
+#if defined(CONFIG_OF_BOARD_SETUP)
+void ft_board_setup(void *blob, bd_t *bd)
+{
+#ifdef CONFIG_PCI
+       ft_board_pci_setup(blob, bd);
+#endif
+       ft_cpu_setup(blob, bd);
+}
+#endif
+
+#ifdef CONFIG_MP
+extern void cpu_mp_lmb_reserve(struct lmb *lmb);
+
+void board_lmb_reserve(struct lmb *lmb)
+{
+       cpu_mp_lmb_reserve(lmb);
+}
+#endif
diff --git a/board/xes/xpedite5200/Makefile b/board/xes/xpedite5200/Makefile
deleted file mode 100644 (file)
index 02fe8fc..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-#
-# Copyright 2008 Extreme Engineering Solutions, Inc.
-# Copyright 2004 Freescale Semiconductor.
-# (C) Copyright 2001-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-y        += $(BOARD).o
-COBJS-y        += ddr.o
-COBJS-y        += law.o
-COBJS-y        += tlb.o
-
-SRCS   := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
-OBJS   := $(addprefix $(obj),$(COBJS-y))
-SOBJS  := $(addprefix $(obj),$(SOBJS-y))
-
-$(LIB):        $(obj).depend $(OBJS) $(SOBJS)
-       $(AR) $(ARFLAGS) $@ $(OBJS)
-
-clean:
-       rm -f $(OBJS) $(SOBJS)
-
-distclean:     clean
-       rm -f $(LIB) core *.bak .depend
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
diff --git a/board/xes/xpedite5200/ddr.c b/board/xes/xpedite5200/ddr.c
deleted file mode 100644 (file)
index c5616d5..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright 2008 Freescale Semiconductor, Inc.
- *
- * 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.
- */
-
-#include <common.h>
-#include <i2c.h>
-
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
-
-static void
-get_spd(ddr2_spd_eeprom_t *spd, unsigned char i2c_address)
-{
-       i2c_read(i2c_address, 0, 1, (uchar *)spd, sizeof(ddr2_spd_eeprom_t));
-
-       /* We use soldered memory, but use an SPD EEPROM to describe it.
-        * The SPD has an unspecified dimm type, but the DDR2 initialization
-        * code requires a specific type to be specified. This sets the type
-        * as a standard unregistered SO-DIMM. */
-       if (spd->dimm_type == 0) {
-               spd->dimm_type = 0x4;
-               ((uchar *)spd)[63] += 0x4;
-       }
-}
-
-unsigned int fsl_ddr_get_mem_data_rate(void)
-{
-       return get_ddr_freq(0);
-}
-
-void fsl_ddr_get_spd(ddr2_spd_eeprom_t *ctrl_dimms_spd,
-                       unsigned int ctrl_num)
-{
-       unsigned int i;
-
-       if (ctrl_num) {
-               printf("%s: invalid ctrl_num = %d\n", __func__, ctrl_num);
-               return;
-       }
-
-       for (i = 0; i < CONFIG_DIMM_SLOTS_PER_CTLR; i++)
-               get_spd(&(ctrl_dimms_spd[i]), SPD_EEPROM_ADDRESS);
-}
-
-void fsl_ddr_board_options(memctl_options_t *popts,
-                               dimm_params_t *pdimm,
-                               unsigned int ctrl_num)
-{
-       /*
-        * Factors to consider for clock adjust:
-        *      - number of chips on bus
-        *      - position of slot
-        *      - DDR1 vs. DDR2?
-        *      - ???
-        *
-        * This needs to be determined on a board-by-board basis.
-        *      0110    3/4 cycle late
-        *      0111    7/8 cycle late
-        */
-       popts->clk_adjust = 7;
-
-       /*
-        * Factors to consider for CPO:
-        *      - frequency
-        *      - ddr1 vs. ddr2
-        */
-       popts->cpo_override = 9;
-
-       /*
-        * Factors to consider for write data delay:
-        *      - number of DIMMs
-        *
-        * 1 = 1/4 clock delay
-        * 2 = 1/2 clock delay
-        * 3 = 3/4 clock delay
-        * 4 = 1   clock delay
-        * 5 = 5/4 clock delay
-        * 6 = 3/2 clock delay
-        */
-       popts->write_data_delay = 3;
-
-       /*
-        * Factors to consider for half-strength driver enable:
-        *      - number of DIMMs installed
-        */
-       popts->half_strength_driver_enable = 0;
-}
diff --git a/board/xes/xpedite5200/law.c b/board/xes/xpedite5200/law.c
deleted file mode 100644 (file)
index bbfcb9d..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2008 Extreme Engineering Solutions, Inc.
- * Copyright 2008 Freescale Semiconductor, Inc.
- *
- * (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
- */
-
-#include <common.h>
-#include <asm/fsl_law.h>
-#include <asm/mmu.h>
-
-/*
- * Notes:
- *    CCSRBAR and L2-as-SRAM don't need a configured Local Access Window.
- *    If flash is 8M at default position (last 8M), no LAW needed.
- */
-
-struct law_entry law_table[] = {
-       /* LBC window - maps 256M 0xf0000000 -> 0xffffffff */
-       SET_LAW(CONFIG_SYS_FLASH_BASE2, LAW_SIZE_256M, LAW_TRGT_IF_LBC),
-       SET_LAW(CONFIG_SYS_NAND_BASE, LAW_SIZE_1M, LAW_TRGT_IF_LBC),
-#if CONFIG_SYS_PCI1_MEM_PHYS
-       SET_LAW(CONFIG_SYS_PCI1_MEM_PHYS, LAW_SIZE_1G, LAW_TRGT_IF_PCI_1),
-       SET_LAW(CONFIG_SYS_PCI1_IO_PHYS, LAW_SIZE_8M, LAW_TRGT_IF_PCI_1),
-#endif
-#if CONFIG_SYS_PCI2_MEM_PHYS
-       SET_LAW(CONFIG_SYS_PCI2_MEM_PHYS, LAW_SIZE_256M, LAW_TRGT_IF_PCI_2),
-       SET_LAW(CONFIG_SYS_PCI2_IO_PHYS, LAW_SIZE_8M, LAW_TRGT_IF_PCI_2),
-#endif
-};
-
-int num_law_entries = ARRAY_SIZE(law_table);
diff --git a/board/xes/xpedite5200/tlb.c b/board/xes/xpedite5200/tlb.c
deleted file mode 100644 (file)
index bd7bff8..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright 2008 Extreme Engineering Solutions, Inc.
- * Copyright 2008 Freescale Semiconductor, Inc.
- *
- * (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
- */
-
-#include <common.h>
-#include <asm/mmu.h>
-
-struct fsl_e_tlb_entry tlb_table[] = {
-       /* TLB 0 - for temp stack in cache */
-       SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR, CONFIG_SYS_INIT_RAM_ADDR,
-               MAS3_SX|MAS3_SW|MAS3_SR, 0,
-               0, 0, BOOKE_PAGESZ_4K, 0),
-       SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR + 4 * 1024,
-               CONFIG_SYS_INIT_RAM_ADDR + 4 * 1024,
-               MAS3_SX|MAS3_SW|MAS3_SR, 0,
-               0, 0, BOOKE_PAGESZ_4K, 0),
-       SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR + 8 * 1024,
-               CONFIG_SYS_INIT_RAM_ADDR + 8 * 1024,
-               MAS3_SX|MAS3_SW|MAS3_SR, 0,
-               0, 0, BOOKE_PAGESZ_4K, 0),
-       SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR + 12 * 1024,
-               CONFIG_SYS_INIT_RAM_ADDR + 12 * 1024,
-               MAS3_SX|MAS3_SW|MAS3_SR, 0,
-               0, 0, BOOKE_PAGESZ_4K, 0),
-
-       /* W**G* - NOR flashes */
-       /* This will be changed to *I*G* after relocation to RAM. */
-       SET_TLB_ENTRY(1, CONFIG_SYS_FLASH_BASE2, CONFIG_SYS_FLASH_BASE2,
-               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_W|MAS2_G,
-               0, 0, BOOKE_PAGESZ_256M, 1),
-
-       SET_TLB_ENTRY(1, CONFIG_SYS_CCSRBAR, CONFIG_SYS_CCSRBAR_PHYS,
-               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
-               0, 1, BOOKE_PAGESZ_1M, 1),
-
-       /* *I*G* - NAND flash */
-       SET_TLB_ENTRY(1, CONFIG_SYS_NAND_BASE, CONFIG_SYS_NAND_BASE,
-               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
-               0, 2, BOOKE_PAGESZ_1M, 1),
-
-#if CONFIG_PCI1
-       /* *I*G* - PCI MEM */
-       SET_TLB_ENTRY(1, CONFIG_SYS_PCI1_MEM_PHYS, CONFIG_SYS_PCI1_MEM_PHYS,
-               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
-               0, 3, BOOKE_PAGESZ_1G, 1),
-#endif
-
-#if CONFIG_PCI2
-       /* *I*G* - PCI MEM */
-       SET_TLB_ENTRY(1, CONFIG_SYS_PCI2_MEM_PHYS, CONFIG_SYS_PCI2_MEM_PHYS,
-               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
-               0, 4, BOOKE_PAGESZ_256M, 1),
-#endif
-
-#if defined(CONFIG_PCI1) || defined(CONFIG_PCI2)
-       /* *I*G* - PCI IO */
-       SET_TLB_ENTRY(1, CONFIG_SYS_PCI1_IO_PHYS, CONFIG_SYS_PCI1_IO_PHYS,
-               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
-               0, 5, BOOKE_PAGESZ_16M, 1),
-#endif
-};
-
-int num_tlb_entries = ARRAY_SIZE(tlb_table);
diff --git a/board/xes/xpedite5200/xpedite5200.c b/board/xes/xpedite5200/xpedite5200.c
deleted file mode 100644 (file)
index a2627f8..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright 2008 Extreme Engineering Solutions, Inc.
- * Copyright 2004, 2007 Freescale Semiconductor, Inc.
- *
- * 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 <pci.h>
-#include <asm/processor.h>
-#include <asm/immap_85xx.h>
-#include <asm/fsl_pci.h>
-#include <asm/io.h>
-#include <asm/cache.h>
-#include <asm/mmu.h>
-#include <libfdt.h>
-#include <fdt_support.h>
-#include <pca953x.h>
-
-extern void ft_board_pci_setup(void *blob, bd_t *bd);
-
-int checkboard(void)
-{
-       volatile fsl_lbc_t *lbc = LBC_BASE_ADDR;
-       volatile ccsr_local_ecm_t *ecm = (void *)(CONFIG_SYS_MPC85xx_ECM_ADDR);
-       char *s;
-
-       printf("Board: X-ES %s PMC\n", CONFIG_SYS_BOARD_NAME);
-       printf("       ");
-       s = getenv("board_rev");
-       if (s)
-               printf("Rev %s, ", s);
-       s = getenv("serial#");
-       if (s)
-               printf("Serial# %s, ", s);
-       s = getenv("board_cfg");
-       if (s)
-               printf("Cfg %s", s);
-       printf("\n");
-
-       out_be32(&lbc->ltesr, 0xffffffff);      /* Clear LBC error IRQs */
-       out_be32(&lbc->lteir, 0xffffffff);      /* Enable LBC error IRQs */
-       out_be32(&ecm->eedr, 0xffffffff);       /* Clear ecm errors */
-       out_be32(&ecm->eeer, 0xffffffff);       /* Enable ecm errors */
-
-       return 0;
-}
-
-static void flash_cs_fixup(void)
-{
-       int flash_sel;
-
-       /*
-        * Print boot dev and swap flash flash chip selects if booted from 2nd
-        * flash.  Swapping chip selects presents user with a common memory
-        * map regardless of which flash was booted from.
-        */
-       flash_sel = !((pca953x_get_val(CONFIG_SYS_I2C_PCA953X_ADDR0) &
-                       CONFIG_SYS_PCA953X_FLASH_PASS_CS));
-       printf("FLASH: Executed from FLASH%d\n", flash_sel ? 2 : 1);
-
-       if (flash_sel) {
-               set_lbc_br(0, CONFIG_SYS_BR1_PRELIM);
-               set_lbc_or(0, CONFIG_SYS_OR1_PRELIM);
-
-               set_lbc_br(1, CONFIG_SYS_BR0_PRELIM);
-               set_lbc_or(1, CONFIG_SYS_OR0_PRELIM);
-       }
-}
-
-int board_early_init_r(void)
-{
-       /* Initialize PCA9557 devices */
-       pca953x_set_pol(CONFIG_SYS_I2C_PCA953X_ADDR0, 0xff, 0);
-       pca953x_set_pol(CONFIG_SYS_I2C_PCA953X_ADDR1, 0xff, 0);
-
-       /*
-        * Remap NOR flash region to caching-inhibited
-        * so that flash can be erased/programmed properly.
-        */
-
-       /* Flush d-cache and invalidate i-cache of any FLASH data */
-       flush_dcache();
-       invalidate_icache();
-
-       /* Invalidate existing TLB entry for NOR flash */
-       disable_tlb(0);
-       set_tlb(1, (CONFIG_SYS_FLASH_BASE2 & 0xf0000000),
-               (CONFIG_SYS_FLASH_BASE2 & 0xf0000000),
-               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
-               0, 0, BOOKE_PAGESZ_256M, 1);
-
-       flash_cs_fixup();
-
-       return 0;
-}
-
-#if defined(CONFIG_OF_BOARD_SETUP)
-void ft_board_setup(void *blob, bd_t *bd)
-{
-#ifdef CONFIG_PCI
-       ft_board_pci_setup(blob, bd);
-#endif
-       ft_cpu_setup(blob, bd);
-}
-#endif
diff --git a/board/xes/xpedite520x/Makefile b/board/xes/xpedite520x/Makefile
new file mode 100644 (file)
index 0000000..02fe8fc
--- /dev/null
@@ -0,0 +1,55 @@
+#
+# Copyright 2008 Extreme Engineering Solutions, Inc.
+# Copyright 2004 Freescale Semiconductor.
+# (C) Copyright 2001-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-y        += $(BOARD).o
+COBJS-y        += ddr.o
+COBJS-y        += law.o
+COBJS-y        += tlb.o
+
+SRCS   := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS-y))
+SOBJS  := $(addprefix $(obj),$(SOBJS-y))
+
+$(LIB):        $(obj).depend $(OBJS) $(SOBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS)
+
+clean:
+       rm -f $(OBJS) $(SOBJS)
+
+distclean:     clean
+       rm -f $(LIB) core *.bak .depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
diff --git a/board/xes/xpedite520x/ddr.c b/board/xes/xpedite520x/ddr.c
new file mode 100644 (file)
index 0000000..c5616d5
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * Copyright 2008 Freescale Semiconductor, Inc.
+ *
+ * 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.
+ */
+
+#include <common.h>
+#include <i2c.h>
+
+#include <asm/fsl_ddr_sdram.h>
+#include <asm/fsl_ddr_dimm_params.h>
+
+static void
+get_spd(ddr2_spd_eeprom_t *spd, unsigned char i2c_address)
+{
+       i2c_read(i2c_address, 0, 1, (uchar *)spd, sizeof(ddr2_spd_eeprom_t));
+
+       /* We use soldered memory, but use an SPD EEPROM to describe it.
+        * The SPD has an unspecified dimm type, but the DDR2 initialization
+        * code requires a specific type to be specified. This sets the type
+        * as a standard unregistered SO-DIMM. */
+       if (spd->dimm_type == 0) {
+               spd->dimm_type = 0x4;
+               ((uchar *)spd)[63] += 0x4;
+       }
+}
+
+unsigned int fsl_ddr_get_mem_data_rate(void)
+{
+       return get_ddr_freq(0);
+}
+
+void fsl_ddr_get_spd(ddr2_spd_eeprom_t *ctrl_dimms_spd,
+                       unsigned int ctrl_num)
+{
+       unsigned int i;
+
+       if (ctrl_num) {
+               printf("%s: invalid ctrl_num = %d\n", __func__, ctrl_num);
+               return;
+       }
+
+       for (i = 0; i < CONFIG_DIMM_SLOTS_PER_CTLR; i++)
+               get_spd(&(ctrl_dimms_spd[i]), SPD_EEPROM_ADDRESS);
+}
+
+void fsl_ddr_board_options(memctl_options_t *popts,
+                               dimm_params_t *pdimm,
+                               unsigned int ctrl_num)
+{
+       /*
+        * Factors to consider for clock adjust:
+        *      - number of chips on bus
+        *      - position of slot
+        *      - DDR1 vs. DDR2?
+        *      - ???
+        *
+        * This needs to be determined on a board-by-board basis.
+        *      0110    3/4 cycle late
+        *      0111    7/8 cycle late
+        */
+       popts->clk_adjust = 7;
+
+       /*
+        * Factors to consider for CPO:
+        *      - frequency
+        *      - ddr1 vs. ddr2
+        */
+       popts->cpo_override = 9;
+
+       /*
+        * Factors to consider for write data delay:
+        *      - number of DIMMs
+        *
+        * 1 = 1/4 clock delay
+        * 2 = 1/2 clock delay
+        * 3 = 3/4 clock delay
+        * 4 = 1   clock delay
+        * 5 = 5/4 clock delay
+        * 6 = 3/2 clock delay
+        */
+       popts->write_data_delay = 3;
+
+       /*
+        * Factors to consider for half-strength driver enable:
+        *      - number of DIMMs installed
+        */
+       popts->half_strength_driver_enable = 0;
+}
diff --git a/board/xes/xpedite520x/law.c b/board/xes/xpedite520x/law.c
new file mode 100644 (file)
index 0000000..bbfcb9d
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2008 Extreme Engineering Solutions, Inc.
+ * Copyright 2008 Freescale Semiconductor, Inc.
+ *
+ * (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
+ */
+
+#include <common.h>
+#include <asm/fsl_law.h>
+#include <asm/mmu.h>
+
+/*
+ * Notes:
+ *    CCSRBAR and L2-as-SRAM don't need a configured Local Access Window.
+ *    If flash is 8M at default position (last 8M), no LAW needed.
+ */
+
+struct law_entry law_table[] = {
+       /* LBC window - maps 256M 0xf0000000 -> 0xffffffff */
+       SET_LAW(CONFIG_SYS_FLASH_BASE2, LAW_SIZE_256M, LAW_TRGT_IF_LBC),
+       SET_LAW(CONFIG_SYS_NAND_BASE, LAW_SIZE_1M, LAW_TRGT_IF_LBC),
+#if CONFIG_SYS_PCI1_MEM_PHYS
+       SET_LAW(CONFIG_SYS_PCI1_MEM_PHYS, LAW_SIZE_1G, LAW_TRGT_IF_PCI_1),
+       SET_LAW(CONFIG_SYS_PCI1_IO_PHYS, LAW_SIZE_8M, LAW_TRGT_IF_PCI_1),
+#endif
+#if CONFIG_SYS_PCI2_MEM_PHYS
+       SET_LAW(CONFIG_SYS_PCI2_MEM_PHYS, LAW_SIZE_256M, LAW_TRGT_IF_PCI_2),
+       SET_LAW(CONFIG_SYS_PCI2_IO_PHYS, LAW_SIZE_8M, LAW_TRGT_IF_PCI_2),
+#endif
+};
+
+int num_law_entries = ARRAY_SIZE(law_table);
diff --git a/board/xes/xpedite520x/tlb.c b/board/xes/xpedite520x/tlb.c
new file mode 100644 (file)
index 0000000..bd7bff8
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * Copyright 2008 Extreme Engineering Solutions, Inc.
+ * Copyright 2008 Freescale Semiconductor, Inc.
+ *
+ * (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
+ */
+
+#include <common.h>
+#include <asm/mmu.h>
+
+struct fsl_e_tlb_entry tlb_table[] = {
+       /* TLB 0 - for temp stack in cache */
+       SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR, CONFIG_SYS_INIT_RAM_ADDR,
+               MAS3_SX|MAS3_SW|MAS3_SR, 0,
+               0, 0, BOOKE_PAGESZ_4K, 0),
+       SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR + 4 * 1024,
+               CONFIG_SYS_INIT_RAM_ADDR + 4 * 1024,
+               MAS3_SX|MAS3_SW|MAS3_SR, 0,
+               0, 0, BOOKE_PAGESZ_4K, 0),
+       SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR + 8 * 1024,
+               CONFIG_SYS_INIT_RAM_ADDR + 8 * 1024,
+               MAS3_SX|MAS3_SW|MAS3_SR, 0,
+               0, 0, BOOKE_PAGESZ_4K, 0),
+       SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR + 12 * 1024,
+               CONFIG_SYS_INIT_RAM_ADDR + 12 * 1024,
+               MAS3_SX|MAS3_SW|MAS3_SR, 0,
+               0, 0, BOOKE_PAGESZ_4K, 0),
+
+       /* W**G* - NOR flashes */
+       /* This will be changed to *I*G* after relocation to RAM. */
+       SET_TLB_ENTRY(1, CONFIG_SYS_FLASH_BASE2, CONFIG_SYS_FLASH_BASE2,
+               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_W|MAS2_G,
+               0, 0, BOOKE_PAGESZ_256M, 1),
+
+       SET_TLB_ENTRY(1, CONFIG_SYS_CCSRBAR, CONFIG_SYS_CCSRBAR_PHYS,
+               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+               0, 1, BOOKE_PAGESZ_1M, 1),
+
+       /* *I*G* - NAND flash */
+       SET_TLB_ENTRY(1, CONFIG_SYS_NAND_BASE, CONFIG_SYS_NAND_BASE,
+               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+               0, 2, BOOKE_PAGESZ_1M, 1),
+
+#if CONFIG_PCI1
+       /* *I*G* - PCI MEM */
+       SET_TLB_ENTRY(1, CONFIG_SYS_PCI1_MEM_PHYS, CONFIG_SYS_PCI1_MEM_PHYS,
+               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+               0, 3, BOOKE_PAGESZ_1G, 1),
+#endif
+
+#if CONFIG_PCI2
+       /* *I*G* - PCI MEM */
+       SET_TLB_ENTRY(1, CONFIG_SYS_PCI2_MEM_PHYS, CONFIG_SYS_PCI2_MEM_PHYS,
+               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+               0, 4, BOOKE_PAGESZ_256M, 1),
+#endif
+
+#if defined(CONFIG_PCI1) || defined(CONFIG_PCI2)
+       /* *I*G* - PCI IO */
+       SET_TLB_ENTRY(1, CONFIG_SYS_PCI1_IO_PHYS, CONFIG_SYS_PCI1_IO_PHYS,
+               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+               0, 5, BOOKE_PAGESZ_16M, 1),
+#endif
+};
+
+int num_tlb_entries = ARRAY_SIZE(tlb_table);
diff --git a/board/xes/xpedite520x/xpedite520x.c b/board/xes/xpedite520x/xpedite520x.c
new file mode 100644 (file)
index 0000000..dc5c965
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2008 Extreme Engineering Solutions, Inc.
+ * Copyright 2004, 2007 Freescale Semiconductor, Inc.
+ *
+ * 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 <pci.h>
+#include <asm/processor.h>
+#include <asm/immap_85xx.h>
+#include <asm/fsl_pci.h>
+#include <asm/io.h>
+#include <asm/cache.h>
+#include <asm/mmu.h>
+#include <libfdt.h>
+#include <fdt_support.h>
+#include <pca953x.h>
+
+extern void ft_board_pci_setup(void *blob, bd_t *bd);
+
+static void flash_cs_fixup(void)
+{
+       int flash_sel;
+
+       /*
+        * Print boot dev and swap flash flash chip selects if booted from 2nd
+        * flash.  Swapping chip selects presents user with a common memory
+        * map regardless of which flash was booted from.
+        */
+       flash_sel = !((pca953x_get_val(CONFIG_SYS_I2C_PCA953X_ADDR0) &
+                       CONFIG_SYS_PCA953X_FLASH_PASS_CS));
+       printf("FLASH: Executed from FLASH%d\n", flash_sel ? 2 : 1);
+
+       if (flash_sel) {
+               set_lbc_br(0, CONFIG_SYS_BR1_PRELIM);
+               set_lbc_or(0, CONFIG_SYS_OR1_PRELIM);
+
+               set_lbc_br(1, CONFIG_SYS_BR0_PRELIM);
+               set_lbc_or(1, CONFIG_SYS_OR0_PRELIM);
+       }
+}
+
+int board_early_init_r(void)
+{
+       /* Initialize PCA9557 devices */
+       pca953x_set_pol(CONFIG_SYS_I2C_PCA953X_ADDR0, 0xff, 0);
+       pca953x_set_pol(CONFIG_SYS_I2C_PCA953X_ADDR1, 0xff, 0);
+
+       /*
+        * Remap NOR flash region to caching-inhibited
+        * so that flash can be erased/programmed properly.
+        */
+
+       /* Flush d-cache and invalidate i-cache of any FLASH data */
+       flush_dcache();
+       invalidate_icache();
+
+       /* Invalidate existing TLB entry for NOR flash */
+       disable_tlb(0);
+       set_tlb(1, (CONFIG_SYS_FLASH_BASE2 & 0xf0000000),
+               (CONFIG_SYS_FLASH_BASE2 & 0xf0000000),
+               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+               0, 0, BOOKE_PAGESZ_256M, 1);
+
+       flash_cs_fixup();
+
+       return 0;
+}
+
+#if defined(CONFIG_OF_BOARD_SETUP)
+void ft_board_setup(void *blob, bd_t *bd)
+{
+#ifdef CONFIG_PCI
+       ft_board_pci_setup(blob, bd);
+#endif
+       ft_cpu_setup(blob, bd);
+}
+#endif
diff --git a/board/xes/xpedite5370/Makefile b/board/xes/xpedite5370/Makefile
deleted file mode 100644 (file)
index 919397c..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# Copyright 2008 Extreme Engineering Solutions, Inc.
-# Copyright 2007 Freescale Semiconductor, Inc.
-# (C) Copyright 2001-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.
-#
-
-include $(TOPDIR)/config.mk
-
-LIB    = $(obj)lib$(BOARD).a
-
-COBJS-y        += $(BOARD).o
-COBJS-y        += ddr.o
-COBJS-y        += law.o
-COBJS-y        += tlb.o
-
-SRCS   := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
-OBJS   := $(addprefix $(obj),$(COBJS-y))
-SOBJS  := $(addprefix $(obj),$(SOBJS-y))
-
-$(LIB):        $(obj).depend $(OBJS) $(SOBJS)
-       $(AR) $(ARFLAGS) $@ $(OBJS)
-
-clean:
-       rm -f $(OBJS) $(SOBJS)
-
-distclean:     clean
-       rm -f $(LIB) core *.bak .depend
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
diff --git a/board/xes/xpedite5370/ddr.c b/board/xes/xpedite5370/ddr.c
deleted file mode 100644 (file)
index 4d3f255..0000000
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
- * Copyright 2008 Extreme Engineering Solutions, Inc.
- * Copyright 2008 Freescale Semiconductor, Inc.
- *
- * 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 <i2c.h>
-
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
-
-static void get_spd(ddr2_spd_eeprom_t *spd, unsigned char i2c_address)
-{
-       i2c_read(i2c_address, SPD_EEPROM_OFFSET, 2, (uchar *)spd,
-                sizeof(ddr2_spd_eeprom_t));
-}
-
-unsigned int fsl_ddr_get_mem_data_rate(void)
-{
-       return get_ddr_freq(0);
-}
-
-void fsl_ddr_get_spd(ddr2_spd_eeprom_t *ctrl_dimms_spd,
-                     unsigned int ctrl_num)
-{
-       unsigned int i;
-       unsigned int i2c_address = 0;
-
-       for (i = 0; i < CONFIG_DIMM_SLOTS_PER_CTLR; i++) {
-               if (ctrl_num == 0)
-                       i2c_address = SPD_EEPROM_ADDRESS1;
-               if (ctrl_num == 1)
-                       i2c_address = SPD_EEPROM_ADDRESS2;
-               get_spd(&(ctrl_dimms_spd[i]), i2c_address);
-       }
-}
-
-/*
- * There are four board-specific SDRAM timing parameters which must be
- * calculated based on the particular PCB artwork.  These are:
- *   1.) CPO (Read Capture Delay)
- *           - TIMING_CFG_2 register
- *           Source: Calculation based on board trace lengths and
- *                   chip-specific internal delays.
- *   2.) WR_DATA_DELAY (Write Command to Data Strobe Delay)
- *           - TIMING_CFG_2 register
- *           Source: Calculation based on board trace lengths.
- *                   Unless clock and DQ lanes are very different
- *                   lengths (>2"), this should be set to the nominal value
- *                   of 1/2 clock delay.
- *   3.) CLK_ADJUST (Clock and Addr/Cmd alignment control)
- *           - DDR_SDRAM_CLK_CNTL register
- *           Source: Signal Integrity Simulations
- *   4.) 2T Timing on Addr/Ctl
- *           - TIMING_CFG_2 register
- *           Source: Signal Integrity Simulations
- *           Usually only needed with heavy load/very high speed (>DDR2-800)
- *
- *     ====== XPedite5370 DDR2-600 read delay calculations ======
- *
- *     See Freescale's App Note AN2583 as refrence.  This document also
- *     contains the chip-specific delays for 8548E, 8572, etc.
- *
- *     For MPC8572E
- *     Minimum chip delay (Ch 0): 1.372ns
- *     Maximum chip delay (Ch 0): 2.914ns
- *     Minimum chip delay (Ch 1): 1.220ns
- *     Maximum chip delay (Ch 1): 2.595ns
- *
- *     CLK adjust = 5 (from simulations) = 5/8* 3.33ns = 2080ps
- *
- *     Minimum delay calc (Ch 0):
- *     clock prop - dram skew + min dqs prop delay + clk_adjust + min chip dly
- *     2.3" * 180 - 400ps     + 1.9" * 180         + 2080ps     + 1372ps
- *                                                 = 3808ps
- *                                                 = 3.808ns
- *
- *     Maximum delay calc (Ch 0):
- *     clock prop + dram skew + max dqs prop delay + clk_adjust + max chip dly
- *     2.3" * 180 + 400ps     + 2.4" * 180         + 2080ps     + 2914ps
- *                                                 = 6240ps
- *                                                 = 6.240ns
- *
- *     Minimum delay calc (Ch 1):
- *     clock prop - dram skew + min dqs prop delay + clk_adjust + min chip dly
- *     1.46" * 180- 400ps     + 0.7" * 180         + 2080ps     + 1220ps
- *                                                 = 3288ps
- *                                                 = 3.288ns
- *
- *     Maximum delay calc (Ch 1):
- *     clock prop + dram skew + max dqs prop delay + clk_adjust + min chip dly
- *     1.46" * 180+ 400ps     + 1.1" * 180         + 2080ps     + 2595ps
- *                                                 = 5536ps
- *                                                 = 5.536ns
- *
- *     Ch.0: 3.808ns to 6.240ns additional delay needed  (pick 5ns as target)
- *              This is 1.5 clock cycles, pick CPO = READ_LAT + 3/2 (0x8)
- *     Ch.1: 3.288ns to 5.536ns additional delay needed  (pick 4.4ns as target)
- *              This is 1.32 clock cycles, pick CPO = READ_LAT + 5/4 (0x7)
- *
- *
- *     ====== XPedite5370 DDR2-800 read delay calculations ======
- *
- *     See Freescale's App Note AN2583 as refrence.  This document also
- *     contains the chip-specific delays for 8548E, 8572, etc.
- *
- *     For MPC8572E
- *     Minimum chip delay (Ch 0): 1.372ns
- *     Maximum chip delay (Ch 0): 2.914ns
- *     Minimum chip delay (Ch 1): 1.220ns
- *     Maximum chip delay (Ch 1): 2.595ns
- *
- *     CLK adjust = 5 (from simulations) = 5/8* 2.5ns = 1563ps
- *
- *     Minimum delay calc (Ch 0):
- *     clock prop - dram skew + min dqs prop delay + clk_adjust + min chip dly
- *     2.3" * 180 - 350ps     + 1.9" * 180         + 1563ps     + 1372ps
- *                                                 = 3341ps
- *                                                 = 3.341ns
- *
- *     Maximum delay calc (Ch 0):
- *     clock prop + dram skew + max dqs prop delay + clk_adjust + max chip dly
- *     2.3" * 180 + 350ps     + 2.4" * 180         + 1563ps     + 2914ps
- *                                                 = 5673ps
- *                                                 = 5.673ns
- *
- *     Minimum delay calc (Ch 1):
- *     clock prop - dram skew + min dqs prop delay + clk_adjust + min chip dly
- *     1.46" * 180- 350ps     + 0.7" * 180         + 1563ps     + 1220ps
- *                                                 = 2822ps
- *                                                 = 2.822ns
- *
- *     Maximum delay calc (Ch 1):
- *     clock prop + dram skew + max dqs prop delay + clk_adjust + min chip dly
- *     1.46" * 180+ 350ps     + 1.1" * 180         + 1563ps     + 2595ps
- *                                                 = 4968ps
- *                                                 = 4.968ns
- *
- *     Ch.0: 3.341ns to 5.673ns additional delay needed  (pick 4.5ns as target)
- *              This is 1.8 clock cycles, pick CPO = READ_LAT + 7/4 (0x9)
- *     Ch.1: 2.822ns to 4.968ns additional delay needed  (pick 3.9ns as target)
- *              This is 1.56 clock cycles, pick CPO = READ_LAT + 3/2 (0x8)
- *
- * Write latency (WR_DATA_DELAY) is calculated by doing the following:
- *
- *      The DDR SDRAM specification requires DQS be received no sooner than
- *      75% of an SDRAM clock period—and no later than 125% of a clock
- *      period—from the capturing clock edge of the command/address at the
- *      SDRAM.
- *
- * Based on the above tracelengths, the following are calculated:
- *      Ch. 0 8572 to DRAM propagation (DQ lanes) : 1.9" * 180 =  0.342ns
- *      Ch. 0 8572 to DRAM propagation (CLKs) :     2.3" * 180 =  0.414ns
- *      Ch. 1 8572 to DRAM propagation (DQ lanes) : 0.7" * 180 =  0.126ns
- *      Ch. 1 8572 to DRAM propagation (CLKs   ) : 1.47" * 180 =  0.264ns
- *
- * Difference in arrival time CLK vs. DQS:
- *      Ch. 0 0.072ns
- *      Ch. 1 0.138ns
- *
- *      Both of these values are much less than 25% of the clock
- *      period at DDR2-600 or DDR2-800, so no additional delay is needed over
- *      the 1/2 cycle which normally aligns the first DQS transition
- *      exactly WL (CAS latency minus one cycle) after the CAS strobe.
- *      See Figure 9-53 in MPC8572E manual: "1/2 delay" in Freescale's
- *      terminology corresponds to exactly one clock period delay after
- *      the CAS strobe. (due to the fact that the "delay" is referenced
- *      from the *falling* edge of the CLK, just after the rising edge
- *      which the CAS strobe is latched on.
- */
-
-typedef struct board_memctl_options {
-       uint16_t datarate_mhz_low;
-       uint16_t datarate_mhz_high;
-       uint8_t clk_adjust;
-       uint8_t cpo_override;
-       uint8_t write_data_delay;
-} board_memctl_options_t;
-
-static struct board_memctl_options bopts_ctrl[][2] = {
-       {
-               /* Controller 0 */
-               {
-                       /* DDR2 600/667 */
-                       .datarate_mhz_low       = 500,
-                       .datarate_mhz_high      = 750,
-                       .clk_adjust             = 5,
-                       .cpo_override           = 8,
-                       .write_data_delay       = 2,
-               },
-               {
-                       /* DDR2 800 */
-                       .datarate_mhz_low       = 750,
-                       .datarate_mhz_high      = 850,
-                       .clk_adjust             = 5,
-                       .cpo_override           = 9,
-                       .write_data_delay       = 2,
-               },
-       },
-       {
-               /* Controller 1 */
-               {
-                       /* DDR2 600/667 */
-                       .datarate_mhz_low       = 500,
-                       .datarate_mhz_high      = 750,
-                       .clk_adjust             = 5,
-                       .cpo_override           = 7,
-                       .write_data_delay       = 2,
-               },
-               {
-                       /* DDR2 800 */
-                       .datarate_mhz_low       = 750,
-                       .datarate_mhz_high      = 850,
-                       .clk_adjust             = 5,
-                       .cpo_override           = 8,
-                       .write_data_delay       = 2,
-               },
-       },
-};
-
-void fsl_ddr_board_options(memctl_options_t *popts,
-                          dimm_params_t *pdimm,
-                          unsigned int ctrl_num)
-{
-       struct board_memctl_options *bopts = bopts_ctrl[ctrl_num];
-       sys_info_t sysinfo;
-       int i;
-       unsigned int datarate;
-
-       get_sys_info(&sysinfo);
-       datarate = sysinfo.freqDDRBus / 1000 / 1000;
-
-       for (i = 0; i < ARRAY_SIZE(bopts_ctrl[ctrl_num]); i++) {
-               if ((bopts[i].datarate_mhz_low <= datarate) &&
-                   (bopts[i].datarate_mhz_high >= datarate)) {
-                       debug("controller %d:\n", ctrl_num);
-                       debug(" clk_adjust = %d\n", bopts[i].clk_adjust);
-                       debug(" cpo = %d\n", bopts[i].cpo_override);
-                       debug(" write_data_delay = %d\n",
-                             bopts[i].write_data_delay);
-                       popts->clk_adjust = bopts[i].clk_adjust;
-                       popts->cpo_override = bopts[i].cpo_override;
-                       popts->write_data_delay = bopts[i].write_data_delay;
-               }
-       }
-
-       /*
-        * Factors to consider for half-strength driver enable:
-        *      - number of DIMMs installed
-        */
-       popts->half_strength_driver_enable = 0;
-}
diff --git a/board/xes/xpedite5370/law.c b/board/xes/xpedite5370/law.c
deleted file mode 100644 (file)
index daee676..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2008 Extreme Engineering Solutions, Inc.
- * Copyright 2008 Freescale Semiconductor, Inc.
- *
- * (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
- */
-
-#include <common.h>
-#include <asm/fsl_law.h>
-#include <asm/mmu.h>
-
-/*
- * Notes:
- *    CCSRBAR and L2-as-SRAM don't need a configured Local Access Window.
- *    If flash is 8M at default position (last 8M), no LAW needed.
- */
-
-struct law_entry law_table[] = {
-       SET_LAW(CONFIG_SYS_FLASH_BASE2, LAW_SIZE_256M, LAW_TRGT_IF_LBC),
-       SET_LAW(CONFIG_SYS_NAND_BASE, LAW_SIZE_1M, LAW_TRGT_IF_LBC),
-#ifdef CONFIG_SYS_PCIE1_MEM_PHYS
-       SET_LAW(CONFIG_SYS_PCIE1_MEM_PHYS, LAW_SIZE_1G, LAW_TRGT_IF_PCIE_1),
-       SET_LAW(CONFIG_SYS_PCIE1_IO_PHYS, LAW_SIZE_8M, LAW_TRGT_IF_PCIE_1),
-#endif
-#ifdef CONFIG_SYS_PCIE2_MEM_PHYS
-       SET_LAW(CONFIG_SYS_PCIE2_MEM_PHYS, LAW_SIZE_256M, LAW_TRGT_IF_PCIE_2),
-       SET_LAW(CONFIG_SYS_PCIE2_IO_PHYS, LAW_SIZE_8M, LAW_TRGT_IF_PCIE_2),
-#endif
-#ifdef CONFIG_SYS_PCIE3_MEM_PHYS
-       SET_LAW(CONFIG_SYS_PCIE3_MEM_PHYS, LAW_SIZE_256M, LAW_TRGT_IF_PCIE_3),
-       SET_LAW(CONFIG_SYS_PCIE3_IO_PHYS, LAW_SIZE_8M, LAW_TRGT_IF_PCIE_3),
-#endif
-};
-
-int num_law_entries = ARRAY_SIZE(law_table);
diff --git a/board/xes/xpedite5370/tlb.c b/board/xes/xpedite5370/tlb.c
deleted file mode 100644 (file)
index a465ce3..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright 2008 Extreme Engineering Solutions, Inc.
- * Copyright 2008 Freescale Semiconductor, Inc.
- *
- * (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
- */
-
-#include <common.h>
-#include <asm/mmu.h>
-
-struct fsl_e_tlb_entry tlb_table[] = {
-       /* TLB 0 - for temp stack in cache */
-       SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR, CONFIG_SYS_INIT_RAM_ADDR,
-               MAS3_SX|MAS3_SW|MAS3_SR, 0,
-               0, 0, BOOKE_PAGESZ_4K, 0),
-       SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR + 4 * 1024,
-               CONFIG_SYS_INIT_RAM_ADDR + 4 * 1024,
-               MAS3_SX|MAS3_SW|MAS3_SR, 0,
-               0, 0, BOOKE_PAGESZ_4K, 0),
-       SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR + 8 * 1024,
-               CONFIG_SYS_INIT_RAM_ADDR + 8 * 1024,
-               MAS3_SX|MAS3_SW|MAS3_SR, 0,
-               0, 0, BOOKE_PAGESZ_4K, 0),
-       SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR + 12 * 1024,
-               CONFIG_SYS_INIT_RAM_ADDR + 12 * 1024,
-               MAS3_SX|MAS3_SW|MAS3_SR, 0,
-               0, 0, BOOKE_PAGESZ_4K, 0),
-
-       /* W**G* - NOR flashes */
-       /* This will be changed to *I*G* after relocation to RAM. */
-       SET_TLB_ENTRY(1, CONFIG_SYS_FLASH_BASE2, CONFIG_SYS_FLASH_BASE2,
-               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_W|MAS2_G,
-               0, 0, BOOKE_PAGESZ_256M, 1),
-
-       /* *I*G* - CCSRBAR */
-       SET_TLB_ENTRY(1, CONFIG_SYS_CCSRBAR, CONFIG_SYS_CCSRBAR_PHYS,
-               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
-               0, 1, BOOKE_PAGESZ_1M, 1),
-
-       /* *I*G* - NAND flash */
-       SET_TLB_ENTRY(1, CONFIG_SYS_NAND_BASE, CONFIG_SYS_NAND_BASE,
-               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
-               0, 2, BOOKE_PAGESZ_1M, 1),
-
-       /* **M** - Boot page for secondary processors */
-       SET_TLB_ENTRY(1, CONFIG_BPTR_VIRT_ADDR, CONFIG_BPTR_VIRT_ADDR,
-               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_M,
-               0, 3, BOOKE_PAGESZ_4K, 1),
-
-#ifdef CONFIG_PCIE1
-       /* *I*G* - PCIe */
-       SET_TLB_ENTRY(1, CONFIG_SYS_PCIE1_MEM_PHYS, CONFIG_SYS_PCIE1_MEM_PHYS,
-               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
-               0, 4, BOOKE_PAGESZ_1G, 1),
-#endif
-
-#ifdef CONFIG_PCIE2
-       /* *I*G* - PCIe */
-       SET_TLB_ENTRY(1, CONFIG_SYS_PCIE2_MEM_PHYS, CONFIG_SYS_PCIE2_MEM_PHYS,
-               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
-               0, 5, BOOKE_PAGESZ_256M, 1),
-#endif
-
-#ifdef CONFIG_PCIE3
-       /* *I*G* - PCIe */
-       SET_TLB_ENTRY(1, CONFIG_SYS_PCIE3_MEM_PHYS, CONFIG_SYS_PCIE3_MEM_PHYS,
-               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
-               0, 6, BOOKE_PAGESZ_256M, 1),
-#endif
-
-#if defined(CONFIG_PCIE1) || defined(CONFIG_PCIE2) || defined(CONFIG_PCIE3)
-       /* *I*G* - PCIe */
-       SET_TLB_ENTRY(1, CONFIG_SYS_PCIE1_IO_PHYS, CONFIG_SYS_PCIE1_IO_PHYS,
-               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
-               0, 7, BOOKE_PAGESZ_64M, 1),
-#endif
-
-};
-
-int num_tlb_entries = ARRAY_SIZE(tlb_table);
diff --git a/board/xes/xpedite5370/xpedite5370.c b/board/xes/xpedite5370/xpedite5370.c
deleted file mode 100644 (file)
index 2a060c2..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright 2008 Extreme Engineering Solutions, Inc.
- *
- * 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 <asm/processor.h>
-#include <asm/mmu.h>
-#include <asm/immap_85xx.h>
-#include <asm/fsl_pci.h>
-#include <asm/io.h>
-#include <asm/cache.h>
-#include <libfdt.h>
-#include <fdt_support.h>
-#include <pca953x.h>
-
-DECLARE_GLOBAL_DATA_PTR;
-
-extern void ft_board_pci_setup(void *blob, bd_t *bd);
-
-int checkboard(void)
-{
-       char *s;
-
-       printf("Board: X-ES %s 3U VPX SBC\n", CONFIG_SYS_BOARD_NAME);
-       printf("       ");
-       s = getenv("board_rev");
-       if (s)
-               printf("Rev %s, ", s);
-       s = getenv("serial#");
-       if (s)
-               printf("Serial# %s, ", s);
-       s = getenv("board_cfg");
-       if (s)
-               printf("Cfg %s", s);
-       printf("\n");
-
-       return 0;
-}
-
-static void flash_cs_fixup(void)
-{
-       int flash_sel;
-
-       /*
-        * Print boot dev and swap flash flash chip selects if booted from 2nd
-        * flash.  Swapping chip selects presents user with a common memory
-        * map regardless of which flash was booted from.
-        */
-       flash_sel = !((pca953x_get_val(CONFIG_SYS_I2C_PCA953X_ADDR0) &
-                       CONFIG_SYS_PCA953X_C0_FLASH_PASS_CS));
-       printf("FLASH: Executed from FLASH%d\n", flash_sel ? 2 : 1);
-
-       if (flash_sel) {
-               set_lbc_br(0, CONFIG_SYS_BR1_PRELIM);
-               set_lbc_or(0, CONFIG_SYS_OR1_PRELIM);
-
-               set_lbc_br(1, CONFIG_SYS_BR0_PRELIM);
-               set_lbc_or(1, CONFIG_SYS_OR0_PRELIM);
-       }
-}
-
-int board_early_init_r(void)
-{
-       /* Initialize PCA9557 devices */
-       pca953x_set_pol(CONFIG_SYS_I2C_PCA953X_ADDR0, 0xff, 0);
-       pca953x_set_pol(CONFIG_SYS_I2C_PCA953X_ADDR1, 0xff, 0);
-       pca953x_set_pol(CONFIG_SYS_I2C_PCA953X_ADDR2, 0xff, 0);
-       pca953x_set_pol(CONFIG_SYS_I2C_PCA953X_ADDR3, 0xff, 0);
-
-       /*
-        * Remap NOR flash region to caching-inhibited
-        * so that flash can be erased/programmed properly.
-        */
-
-       /* Flush d-cache and invalidate i-cache of any FLASH data */
-       flush_dcache();
-       invalidate_icache();
-
-       /* Invalidate existing TLB entry for NOR flash */
-       disable_tlb(0);
-       set_tlb(1, (CONFIG_SYS_FLASH_BASE2 & 0xf0000000),
-               (CONFIG_SYS_FLASH_BASE2 & 0xf0000000),
-               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
-               0, 0, BOOKE_PAGESZ_256M, 1);
-
-       flash_cs_fixup();
-
-       return 0;
-}
-
-#if defined(CONFIG_OF_BOARD_SETUP)
-void ft_board_setup(void *blob, bd_t *bd)
-{
-#ifdef CONFIG_PCI
-       ft_board_pci_setup(blob, bd);
-#endif
-       ft_cpu_setup(blob, bd);
-}
-#endif
-
-#ifdef CONFIG_MP
-extern void cpu_mp_lmb_reserve(struct lmb *lmb);
-
-void board_lmb_reserve(struct lmb *lmb)
-{
-       cpu_mp_lmb_reserve(lmb);
-}
-#endif
diff --git a/board/xes/xpedite537x/Makefile b/board/xes/xpedite537x/Makefile
new file mode 100644 (file)
index 0000000..919397c
--- /dev/null
@@ -0,0 +1,45 @@
+#
+# Copyright 2008 Extreme Engineering Solutions, Inc.
+# Copyright 2007 Freescale Semiconductor, Inc.
+# (C) Copyright 2001-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.
+#
+
+include $(TOPDIR)/config.mk
+
+LIB    = $(obj)lib$(BOARD).a
+
+COBJS-y        += $(BOARD).o
+COBJS-y        += ddr.o
+COBJS-y        += law.o
+COBJS-y        += tlb.o
+
+SRCS   := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS-y))
+SOBJS  := $(addprefix $(obj),$(SOBJS-y))
+
+$(LIB):        $(obj).depend $(OBJS) $(SOBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS)
+
+clean:
+       rm -f $(OBJS) $(SOBJS)
+
+distclean:     clean
+       rm -f $(LIB) core *.bak .depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
diff --git a/board/xes/xpedite537x/ddr.c b/board/xes/xpedite537x/ddr.c
new file mode 100644 (file)
index 0000000..4d3f255
--- /dev/null
@@ -0,0 +1,270 @@
+/*
+ * Copyright 2008 Extreme Engineering Solutions, Inc.
+ * Copyright 2008 Freescale Semiconductor, Inc.
+ *
+ * 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 <i2c.h>
+
+#include <asm/fsl_ddr_sdram.h>
+#include <asm/fsl_ddr_dimm_params.h>
+
+static void get_spd(ddr2_spd_eeprom_t *spd, unsigned char i2c_address)
+{
+       i2c_read(i2c_address, SPD_EEPROM_OFFSET, 2, (uchar *)spd,
+                sizeof(ddr2_spd_eeprom_t));
+}
+
+unsigned int fsl_ddr_get_mem_data_rate(void)
+{
+       return get_ddr_freq(0);
+}
+
+void fsl_ddr_get_spd(ddr2_spd_eeprom_t *ctrl_dimms_spd,
+                     unsigned int ctrl_num)
+{
+       unsigned int i;
+       unsigned int i2c_address = 0;
+
+       for (i = 0; i < CONFIG_DIMM_SLOTS_PER_CTLR; i++) {
+               if (ctrl_num == 0)
+                       i2c_address = SPD_EEPROM_ADDRESS1;
+               if (ctrl_num == 1)
+                       i2c_address = SPD_EEPROM_ADDRESS2;
+               get_spd(&(ctrl_dimms_spd[i]), i2c_address);
+       }
+}
+
+/*
+ * There are four board-specific SDRAM timing parameters which must be
+ * calculated based on the particular PCB artwork.  These are:
+ *   1.) CPO (Read Capture Delay)
+ *           - TIMING_CFG_2 register
+ *           Source: Calculation based on board trace lengths and
+ *                   chip-specific internal delays.
+ *   2.) WR_DATA_DELAY (Write Command to Data Strobe Delay)
+ *           - TIMING_CFG_2 register
+ *           Source: Calculation based on board trace lengths.
+ *                   Unless clock and DQ lanes are very different
+ *                   lengths (>2"), this should be set to the nominal value
+ *                   of 1/2 clock delay.
+ *   3.) CLK_ADJUST (Clock and Addr/Cmd alignment control)
+ *           - DDR_SDRAM_CLK_CNTL register
+ *           Source: Signal Integrity Simulations
+ *   4.) 2T Timing on Addr/Ctl
+ *           - TIMING_CFG_2 register
+ *           Source: Signal Integrity Simulations
+ *           Usually only needed with heavy load/very high speed (>DDR2-800)
+ *
+ *     ====== XPedite5370 DDR2-600 read delay calculations ======
+ *
+ *     See Freescale's App Note AN2583 as refrence.  This document also
+ *     contains the chip-specific delays for 8548E, 8572, etc.
+ *
+ *     For MPC8572E
+ *     Minimum chip delay (Ch 0): 1.372ns
+ *     Maximum chip delay (Ch 0): 2.914ns
+ *     Minimum chip delay (Ch 1): 1.220ns
+ *     Maximum chip delay (Ch 1): 2.595ns
+ *
+ *     CLK adjust = 5 (from simulations) = 5/8* 3.33ns = 2080ps
+ *
+ *     Minimum delay calc (Ch 0):
+ *     clock prop - dram skew + min dqs prop delay + clk_adjust + min chip dly
+ *     2.3" * 180 - 400ps     + 1.9" * 180         + 2080ps     + 1372ps
+ *                                                 = 3808ps
+ *                                                 = 3.808ns
+ *
+ *     Maximum delay calc (Ch 0):
+ *     clock prop + dram skew + max dqs prop delay + clk_adjust + max chip dly
+ *     2.3" * 180 + 400ps     + 2.4" * 180         + 2080ps     + 2914ps
+ *                                                 = 6240ps
+ *                                                 = 6.240ns
+ *
+ *     Minimum delay calc (Ch 1):
+ *     clock prop - dram skew + min dqs prop delay + clk_adjust + min chip dly
+ *     1.46" * 180- 400ps     + 0.7" * 180         + 2080ps     + 1220ps
+ *                                                 = 3288ps
+ *                                                 = 3.288ns
+ *
+ *     Maximum delay calc (Ch 1):
+ *     clock prop + dram skew + max dqs prop delay + clk_adjust + min chip dly
+ *     1.46" * 180+ 400ps     + 1.1" * 180         + 2080ps     + 2595ps
+ *                                                 = 5536ps
+ *                                                 = 5.536ns
+ *
+ *     Ch.0: 3.808ns to 6.240ns additional delay needed  (pick 5ns as target)
+ *              This is 1.5 clock cycles, pick CPO = READ_LAT + 3/2 (0x8)
+ *     Ch.1: 3.288ns to 5.536ns additional delay needed  (pick 4.4ns as target)
+ *              This is 1.32 clock cycles, pick CPO = READ_LAT + 5/4 (0x7)
+ *
+ *
+ *     ====== XPedite5370 DDR2-800 read delay calculations ======
+ *
+ *     See Freescale's App Note AN2583 as refrence.  This document also
+ *     contains the chip-specific delays for 8548E, 8572, etc.
+ *
+ *     For MPC8572E
+ *     Minimum chip delay (Ch 0): 1.372ns
+ *     Maximum chip delay (Ch 0): 2.914ns
+ *     Minimum chip delay (Ch 1): 1.220ns
+ *     Maximum chip delay (Ch 1): 2.595ns
+ *
+ *     CLK adjust = 5 (from simulations) = 5/8* 2.5ns = 1563ps
+ *
+ *     Minimum delay calc (Ch 0):
+ *     clock prop - dram skew + min dqs prop delay + clk_adjust + min chip dly
+ *     2.3" * 180 - 350ps     + 1.9" * 180         + 1563ps     + 1372ps
+ *                                                 = 3341ps
+ *                                                 = 3.341ns
+ *
+ *     Maximum delay calc (Ch 0):
+ *     clock prop + dram skew + max dqs prop delay + clk_adjust + max chip dly
+ *     2.3" * 180 + 350ps     + 2.4" * 180         + 1563ps     + 2914ps
+ *                                                 = 5673ps
+ *                                                 = 5.673ns
+ *
+ *     Minimum delay calc (Ch 1):
+ *     clock prop - dram skew + min dqs prop delay + clk_adjust + min chip dly
+ *     1.46" * 180- 350ps     + 0.7" * 180         + 1563ps     + 1220ps
+ *                                                 = 2822ps
+ *                                                 = 2.822ns
+ *
+ *     Maximum delay calc (Ch 1):
+ *     clock prop + dram skew + max dqs prop delay + clk_adjust + min chip dly
+ *     1.46" * 180+ 350ps     + 1.1" * 180         + 1563ps     + 2595ps
+ *                                                 = 4968ps
+ *                                                 = 4.968ns
+ *
+ *     Ch.0: 3.341ns to 5.673ns additional delay needed  (pick 4.5ns as target)
+ *              This is 1.8 clock cycles, pick CPO = READ_LAT + 7/4 (0x9)
+ *     Ch.1: 2.822ns to 4.968ns additional delay needed  (pick 3.9ns as target)
+ *              This is 1.56 clock cycles, pick CPO = READ_LAT + 3/2 (0x8)
+ *
+ * Write latency (WR_DATA_DELAY) is calculated by doing the following:
+ *
+ *      The DDR SDRAM specification requires DQS be received no sooner than
+ *      75% of an SDRAM clock period—and no later than 125% of a clock
+ *      period—from the capturing clock edge of the command/address at the
+ *      SDRAM.
+ *
+ * Based on the above tracelengths, the following are calculated:
+ *      Ch. 0 8572 to DRAM propagation (DQ lanes) : 1.9" * 180 =  0.342ns
+ *      Ch. 0 8572 to DRAM propagation (CLKs) :     2.3" * 180 =  0.414ns
+ *      Ch. 1 8572 to DRAM propagation (DQ lanes) : 0.7" * 180 =  0.126ns
+ *      Ch. 1 8572 to DRAM propagation (CLKs   ) : 1.47" * 180 =  0.264ns
+ *
+ * Difference in arrival time CLK vs. DQS:
+ *      Ch. 0 0.072ns
+ *      Ch. 1 0.138ns
+ *
+ *      Both of these values are much less than 25% of the clock
+ *      period at DDR2-600 or DDR2-800, so no additional delay is needed over
+ *      the 1/2 cycle which normally aligns the first DQS transition
+ *      exactly WL (CAS latency minus one cycle) after the CAS strobe.
+ *      See Figure 9-53 in MPC8572E manual: "1/2 delay" in Freescale's
+ *      terminology corresponds to exactly one clock period delay after
+ *      the CAS strobe. (due to the fact that the "delay" is referenced
+ *      from the *falling* edge of the CLK, just after the rising edge
+ *      which the CAS strobe is latched on.
+ */
+
+typedef struct board_memctl_options {
+       uint16_t datarate_mhz_low;
+       uint16_t datarate_mhz_high;
+       uint8_t clk_adjust;
+       uint8_t cpo_override;
+       uint8_t write_data_delay;
+} board_memctl_options_t;
+
+static struct board_memctl_options bopts_ctrl[][2] = {
+       {
+               /* Controller 0 */
+               {
+                       /* DDR2 600/667 */
+                       .datarate_mhz_low       = 500,
+                       .datarate_mhz_high      = 750,
+                       .clk_adjust             = 5,
+                       .cpo_override           = 8,
+                       .write_data_delay       = 2,
+               },
+               {
+                       /* DDR2 800 */
+                       .datarate_mhz_low       = 750,
+                       .datarate_mhz_high      = 850,
+                       .clk_adjust             = 5,
+                       .cpo_override           = 9,
+                       .write_data_delay       = 2,
+               },
+       },
+       {
+               /* Controller 1 */
+               {
+                       /* DDR2 600/667 */
+                       .datarate_mhz_low       = 500,
+                       .datarate_mhz_high      = 750,
+                       .clk_adjust             = 5,
+                       .cpo_override           = 7,
+                       .write_data_delay       = 2,
+               },
+               {
+                       /* DDR2 800 */
+                       .datarate_mhz_low       = 750,
+                       .datarate_mhz_high      = 850,
+                       .clk_adjust             = 5,
+                       .cpo_override           = 8,
+                       .write_data_delay       = 2,
+               },
+       },
+};
+
+void fsl_ddr_board_options(memctl_options_t *popts,
+                          dimm_params_t *pdimm,
+                          unsigned int ctrl_num)
+{
+       struct board_memctl_options *bopts = bopts_ctrl[ctrl_num];
+       sys_info_t sysinfo;
+       int i;
+       unsigned int datarate;
+
+       get_sys_info(&sysinfo);
+       datarate = sysinfo.freqDDRBus / 1000 / 1000;
+
+       for (i = 0; i < ARRAY_SIZE(bopts_ctrl[ctrl_num]); i++) {
+               if ((bopts[i].datarate_mhz_low <= datarate) &&
+                   (bopts[i].datarate_mhz_high >= datarate)) {
+                       debug("controller %d:\n", ctrl_num);
+                       debug(" clk_adjust = %d\n", bopts[i].clk_adjust);
+                       debug(" cpo = %d\n", bopts[i].cpo_override);
+                       debug(" write_data_delay = %d\n",
+                             bopts[i].write_data_delay);
+                       popts->clk_adjust = bopts[i].clk_adjust;
+                       popts->cpo_override = bopts[i].cpo_override;
+                       popts->write_data_delay = bopts[i].write_data_delay;
+               }
+       }
+
+       /*
+        * Factors to consider for half-strength driver enable:
+        *      - number of DIMMs installed
+        */
+       popts->half_strength_driver_enable = 0;
+}
diff --git a/board/xes/xpedite537x/law.c b/board/xes/xpedite537x/law.c
new file mode 100644 (file)
index 0000000..daee676
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2008 Extreme Engineering Solutions, Inc.
+ * Copyright 2008 Freescale Semiconductor, Inc.
+ *
+ * (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
+ */
+
+#include <common.h>
+#include <asm/fsl_law.h>
+#include <asm/mmu.h>
+
+/*
+ * Notes:
+ *    CCSRBAR and L2-as-SRAM don't need a configured Local Access Window.
+ *    If flash is 8M at default position (last 8M), no LAW needed.
+ */
+
+struct law_entry law_table[] = {
+       SET_LAW(CONFIG_SYS_FLASH_BASE2, LAW_SIZE_256M, LAW_TRGT_IF_LBC),
+       SET_LAW(CONFIG_SYS_NAND_BASE, LAW_SIZE_1M, LAW_TRGT_IF_LBC),
+#ifdef CONFIG_SYS_PCIE1_MEM_PHYS
+       SET_LAW(CONFIG_SYS_PCIE1_MEM_PHYS, LAW_SIZE_1G, LAW_TRGT_IF_PCIE_1),
+       SET_LAW(CONFIG_SYS_PCIE1_IO_PHYS, LAW_SIZE_8M, LAW_TRGT_IF_PCIE_1),
+#endif
+#ifdef CONFIG_SYS_PCIE2_MEM_PHYS
+       SET_LAW(CONFIG_SYS_PCIE2_MEM_PHYS, LAW_SIZE_256M, LAW_TRGT_IF_PCIE_2),
+       SET_LAW(CONFIG_SYS_PCIE2_IO_PHYS, LAW_SIZE_8M, LAW_TRGT_IF_PCIE_2),
+#endif
+#ifdef CONFIG_SYS_PCIE3_MEM_PHYS
+       SET_LAW(CONFIG_SYS_PCIE3_MEM_PHYS, LAW_SIZE_256M, LAW_TRGT_IF_PCIE_3),
+       SET_LAW(CONFIG_SYS_PCIE3_IO_PHYS, LAW_SIZE_8M, LAW_TRGT_IF_PCIE_3),
+#endif
+};
+
+int num_law_entries = ARRAY_SIZE(law_table);
diff --git a/board/xes/xpedite537x/tlb.c b/board/xes/xpedite537x/tlb.c
new file mode 100644 (file)
index 0000000..a465ce3
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * Copyright 2008 Extreme Engineering Solutions, Inc.
+ * Copyright 2008 Freescale Semiconductor, Inc.
+ *
+ * (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
+ */
+
+#include <common.h>
+#include <asm/mmu.h>
+
+struct fsl_e_tlb_entry tlb_table[] = {
+       /* TLB 0 - for temp stack in cache */
+       SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR, CONFIG_SYS_INIT_RAM_ADDR,
+               MAS3_SX|MAS3_SW|MAS3_SR, 0,
+               0, 0, BOOKE_PAGESZ_4K, 0),
+       SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR + 4 * 1024,
+               CONFIG_SYS_INIT_RAM_ADDR + 4 * 1024,
+               MAS3_SX|MAS3_SW|MAS3_SR, 0,
+               0, 0, BOOKE_PAGESZ_4K, 0),
+       SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR + 8 * 1024,
+               CONFIG_SYS_INIT_RAM_ADDR + 8 * 1024,
+               MAS3_SX|MAS3_SW|MAS3_SR, 0,
+               0, 0, BOOKE_PAGESZ_4K, 0),
+       SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR + 12 * 1024,
+               CONFIG_SYS_INIT_RAM_ADDR + 12 * 1024,
+               MAS3_SX|MAS3_SW|MAS3_SR, 0,
+               0, 0, BOOKE_PAGESZ_4K, 0),
+
+       /* W**G* - NOR flashes */
+       /* This will be changed to *I*G* after relocation to RAM. */
+       SET_TLB_ENTRY(1, CONFIG_SYS_FLASH_BASE2, CONFIG_SYS_FLASH_BASE2,
+               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_W|MAS2_G,
+               0, 0, BOOKE_PAGESZ_256M, 1),
+
+       /* *I*G* - CCSRBAR */
+       SET_TLB_ENTRY(1, CONFIG_SYS_CCSRBAR, CONFIG_SYS_CCSRBAR_PHYS,
+               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+               0, 1, BOOKE_PAGESZ_1M, 1),
+
+       /* *I*G* - NAND flash */
+       SET_TLB_ENTRY(1, CONFIG_SYS_NAND_BASE, CONFIG_SYS_NAND_BASE,
+               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+               0, 2, BOOKE_PAGESZ_1M, 1),
+
+       /* **M** - Boot page for secondary processors */
+       SET_TLB_ENTRY(1, CONFIG_BPTR_VIRT_ADDR, CONFIG_BPTR_VIRT_ADDR,
+               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_M,
+               0, 3, BOOKE_PAGESZ_4K, 1),
+
+#ifdef CONFIG_PCIE1
+       /* *I*G* - PCIe */
+       SET_TLB_ENTRY(1, CONFIG_SYS_PCIE1_MEM_PHYS, CONFIG_SYS_PCIE1_MEM_PHYS,
+               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+               0, 4, BOOKE_PAGESZ_1G, 1),
+#endif
+
+#ifdef CONFIG_PCIE2
+       /* *I*G* - PCIe */
+       SET_TLB_ENTRY(1, CONFIG_SYS_PCIE2_MEM_PHYS, CONFIG_SYS_PCIE2_MEM_PHYS,
+               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+               0, 5, BOOKE_PAGESZ_256M, 1),
+#endif
+
+#ifdef CONFIG_PCIE3
+       /* *I*G* - PCIe */
+       SET_TLB_ENTRY(1, CONFIG_SYS_PCIE3_MEM_PHYS, CONFIG_SYS_PCIE3_MEM_PHYS,
+               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+               0, 6, BOOKE_PAGESZ_256M, 1),
+#endif
+
+#if defined(CONFIG_PCIE1) || defined(CONFIG_PCIE2) || defined(CONFIG_PCIE3)
+       /* *I*G* - PCIe */
+       SET_TLB_ENTRY(1, CONFIG_SYS_PCIE1_IO_PHYS, CONFIG_SYS_PCIE1_IO_PHYS,
+               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+               0, 7, BOOKE_PAGESZ_64M, 1),
+#endif
+
+};
+
+int num_tlb_entries = ARRAY_SIZE(tlb_table);
diff --git a/board/xes/xpedite537x/xpedite537x.c b/board/xes/xpedite537x/xpedite537x.c
new file mode 100644 (file)
index 0000000..89fa6c7
--- /dev/null
@@ -0,0 +1,107 @@
+/*
+ * Copyright 2008 Extreme Engineering Solutions, Inc.
+ *
+ * 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 <asm/processor.h>
+#include <asm/mmu.h>
+#include <asm/immap_85xx.h>
+#include <asm/fsl_pci.h>
+#include <asm/io.h>
+#include <asm/cache.h>
+#include <libfdt.h>
+#include <fdt_support.h>
+#include <pca953x.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+extern void ft_board_pci_setup(void *blob, bd_t *bd);
+
+static void flash_cs_fixup(void)
+{
+       int flash_sel;
+
+       /*
+        * Print boot dev and swap flash flash chip selects if booted from 2nd
+        * flash.  Swapping chip selects presents user with a common memory
+        * map regardless of which flash was booted from.
+        */
+       flash_sel = !((pca953x_get_val(CONFIG_SYS_I2C_PCA953X_ADDR0) &
+                       CONFIG_SYS_PCA953X_C0_FLASH_PASS_CS));
+       printf("FLASH: Executed from FLASH%d\n", flash_sel ? 2 : 1);
+
+       if (flash_sel) {
+               set_lbc_br(0, CONFIG_SYS_BR1_PRELIM);
+               set_lbc_or(0, CONFIG_SYS_OR1_PRELIM);
+
+               set_lbc_br(1, CONFIG_SYS_BR0_PRELIM);
+               set_lbc_or(1, CONFIG_SYS_OR0_PRELIM);
+       }
+}
+
+int board_early_init_r(void)
+{
+       /* Initialize PCA9557 devices */
+       pca953x_set_pol(CONFIG_SYS_I2C_PCA953X_ADDR0, 0xff, 0);
+       pca953x_set_pol(CONFIG_SYS_I2C_PCA953X_ADDR1, 0xff, 0);
+       pca953x_set_pol(CONFIG_SYS_I2C_PCA953X_ADDR2, 0xff, 0);
+       pca953x_set_pol(CONFIG_SYS_I2C_PCA953X_ADDR3, 0xff, 0);
+
+       /*
+        * Remap NOR flash region to caching-inhibited
+        * so that flash can be erased/programmed properly.
+        */
+
+       /* Flush d-cache and invalidate i-cache of any FLASH data */
+       flush_dcache();
+       invalidate_icache();
+
+       /* Invalidate existing TLB entry for NOR flash */
+       disable_tlb(0);
+       set_tlb(1, (CONFIG_SYS_FLASH_BASE2 & 0xf0000000),
+               (CONFIG_SYS_FLASH_BASE2 & 0xf0000000),
+               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+               0, 0, BOOKE_PAGESZ_256M, 1);
+
+       flash_cs_fixup();
+
+       return 0;
+}
+
+#if defined(CONFIG_OF_BOARD_SETUP)
+void ft_board_setup(void *blob, bd_t *bd)
+{
+#ifdef CONFIG_PCI
+       ft_board_pci_setup(blob, bd);
+#endif
+       ft_cpu_setup(blob, bd);
+}
+#endif
+
+#ifdef CONFIG_MP
+extern void cpu_mp_lmb_reserve(struct lmb *lmb);
+
+void board_lmb_reserve(struct lmb *lmb)
+{
+       cpu_mp_lmb_reserve(lmb);
+}
+#endif
diff --git a/board/xes/xpedite550x/Makefile b/board/xes/xpedite550x/Makefile
new file mode 100644 (file)
index 0000000..8980a4b
--- /dev/null
@@ -0,0 +1,39 @@
+#
+# Copyright 2007-2008 Freescale Semiconductor, Inc.
+#
+# 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.
+#
+
+include $(TOPDIR)/config.mk
+
+LIB    = $(obj)lib$(BOARD).a
+
+COBJS-y        += $(BOARD).o
+COBJS-y        += ddr.o
+COBJS-y        += law.o
+COBJS-y        += tlb.o
+
+SRCS   := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS-y))
+SOBJS  := $(addprefix $(obj),$(SOBJS-y))
+
+$(LIB):        $(obj).depend $(OBJS) $(SOBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS)
+
+clean:
+       rm -f $(OBJS) $(SOBJS)
+
+distclean:     clean
+       rm -f $(LIB) core *.bak .depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
diff --git a/board/xes/xpedite550x/ddr.c b/board/xes/xpedite550x/ddr.c
new file mode 100644 (file)
index 0000000..38a4597
--- /dev/null
@@ -0,0 +1,164 @@
+/*
+ * Copyright 2010 Extreme Engineering Solutions, Inc.
+ * Copyright 2007-2008 Freescale Semiconductor, Inc.
+ *
+ * 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 <i2c.h>
+
+#include <asm/fsl_ddr_sdram.h>
+#include <asm/fsl_ddr_dimm_params.h>
+
+static void get_spd(ddr3_spd_eeprom_t *spd, unsigned char i2c_address)
+{
+       i2c_read(i2c_address, SPD_EEPROM_OFFSET, 2, (uchar *)spd,
+                sizeof(ddr3_spd_eeprom_t));
+}
+
+void fsl_ddr_get_spd(ddr3_spd_eeprom_t *ctrl_dimms_spd,
+                     unsigned int ctrl_num)
+{
+       unsigned int i;
+       unsigned int i2c_address = 0;
+
+       for (i = 0; i < CONFIG_DIMM_SLOTS_PER_CTLR; i++) {
+               if (ctrl_num == 0 && i == 0)
+                       i2c_address = SPD_EEPROM_ADDRESS1;
+               get_spd(&(ctrl_dimms_spd[i]), i2c_address);
+       }
+}
+
+unsigned int fsl_ddr_get_mem_data_rate(void)
+{
+       return get_ddr_freq(0);
+}
+
+/*
+ *     There are traditionally three board-specific SDRAM timing parameters
+ *     which must be calculated based on the particular PCB artwork.  These are:
+ *     1.) CPO (Read Capture Delay)
+ *            - TIMING_CFG_2 register
+ *            Source: Calculation based on board trace lengths and
+ *                    chip-specific internal delays.
+ *     2.) CLK_ADJUST (Clock and Addr/Cmd alignment control)
+ *            - DDR_SDRAM_CLK_CNTL register
+ *            Source: Signal Integrity Simulations
+ *     3.) 2T Timing on Addr/Ctl
+ *            - TIMING_CFG_2 register
+ *            Source: Signal Integrity Simulations
+ *            Usually only needed with heavy load/very high speed (>DDR2-800)
+ *
+ *     ====== XPedite550x DDR3-800 read delay calculations ======
+ *
+ *     The P2020 processor provides an autoleveling option. Setting CPO to
+ *     0x1f enables this auto configuration.
+ */
+
+typedef struct {
+       unsigned short datarate_mhz_low;
+       unsigned short datarate_mhz_high;
+       unsigned char clk_adjust;
+       unsigned char cpo;
+} board_specific_parameters_t;
+
+const board_specific_parameters_t board_specific_parameters[][20] = {
+       {
+               /* Controller 0 */
+               {
+                       /* DDR3-600/667 */
+                       .datarate_mhz_low       = 500,
+                       .datarate_mhz_high      = 750,
+                       .clk_adjust             = 5,
+                       .cpo                    = 31,
+               },
+               {
+                       /* DDR3-800 */
+                       .datarate_mhz_low       = 750,
+                       .datarate_mhz_high      = 850,
+                       .clk_adjust             = 5,
+                       .cpo                    = 31,
+               },
+       },
+};
+
+void fsl_ddr_board_options(memctl_options_t *popts,
+                               dimm_params_t *pdimm,
+                               unsigned int ctrl_num)
+{
+       const board_specific_parameters_t *pbsp =
+                               &(board_specific_parameters[ctrl_num][0]);
+       u32 num_params = sizeof(board_specific_parameters[ctrl_num]) /
+                               sizeof(board_specific_parameters[0][0]);
+       u32 i;
+       ulong ddr_freq;
+
+       /*
+        * Set odt_rd_cfg and odt_wr_cfg. If the there is only one dimm in
+        * that controller, set odt_wr_cfg to 4 for CS0, and 0 to CS1. If
+        * there are two dimms in the controller, set odt_rd_cfg to 3 and
+        * odt_wr_cfg to 3 for the even CS, 0 for the odd CS.
+        */
+       for (i = 0; i < CONFIG_CHIP_SELECTS_PER_CTRL; i++) {
+               if (i&1) {      /* odd CS */
+                       popts->cs_local_opts[i].odt_rd_cfg = 0;
+                       popts->cs_local_opts[i].odt_wr_cfg = 0;
+               } else {        /* even CS */
+                       if (CONFIG_DIMM_SLOTS_PER_CTLR == 1) {
+                               popts->cs_local_opts[i].odt_rd_cfg = 0;
+                               popts->cs_local_opts[i].odt_wr_cfg = 4;
+                       } else if (CONFIG_DIMM_SLOTS_PER_CTLR == 2) {
+                               popts->cs_local_opts[i].odt_rd_cfg = 3;
+                               popts->cs_local_opts[i].odt_wr_cfg = 3;
+                       }
+               }
+       }
+
+       /*
+        * Get clk_adjust, cpo, write_data_delay,2T, according to the board ddr
+        * freqency and n_banks specified in board_specific_parameters table.
+        */
+       ddr_freq = get_ddr_freq(0) / 1000000;
+
+       for (i = 0; i < num_params; i++) {
+               if (ddr_freq >= pbsp->datarate_mhz_low &&
+                   ddr_freq <= pbsp->datarate_mhz_high) {
+                       popts->clk_adjust = pbsp->clk_adjust;
+                       popts->cpo_override = pbsp->cpo;
+                       popts->twoT_en = 0;
+               }
+               pbsp++;
+       }
+
+       /*
+        * Factors to consider for half-strength driver enable:
+        *      - number of DIMMs installed
+        */
+       popts->half_strength_driver_enable = 0;
+
+       /*
+        * Enable on-die termination.
+        * From the Micron Technical Node TN-41-04, RTT_Nom should typically
+        * be 30 to 40 ohms, while RTT_WR should be 120 ohms.  Setting RTT_WR
+        * is handled in the Freescale DDR3 driver.  Set RTT_Nom here.
+        */
+       popts->rtt_override = 1;
+       popts->rtt_override_value = 3;
+}
diff --git a/board/xes/xpedite550x/law.c b/board/xes/xpedite550x/law.c
new file mode 100644 (file)
index 0000000..4d4445d
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2010 Extreme Engineering Solutions, Inc.
+ * Copyright 2008 Freescale Semiconductor, Inc.
+ *
+ * (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
+ */
+
+#include <common.h>
+#include <asm/fsl_law.h>
+#include <asm/mmu.h>
+
+/*
+ * Notes:
+ *    CCSRBAR and L2-as-SRAM don't need a configured Local Access Window.
+ *    If flash is 8M at default position (last 8M), no LAW needed.
+ */
+
+struct law_entry law_table[] = {
+       SET_LAW(CONFIG_SYS_FLASH_BASE2, LAW_SIZE_256M, LAW_TRGT_IF_LBC),
+       SET_LAW(CONFIG_SYS_NAND_BASE, LAW_SIZE_1M, LAW_TRGT_IF_LBC),
+#ifdef CONFIG_SYS_PCIE1_MEM_PHYS
+       SET_LAW(CONFIG_SYS_PCIE1_MEM_PHYS, LAW_SIZE_1G, LAW_TRGT_IF_PCIE_1),
+       SET_LAW(CONFIG_SYS_PCIE1_IO_PHYS, LAW_SIZE_8M, LAW_TRGT_IF_PCIE_1),
+#endif
+#ifdef CONFIG_SYS_PCIE2_MEM_PHYS
+       SET_LAW(CONFIG_SYS_PCIE2_MEM_PHYS, LAW_SIZE_256M, LAW_TRGT_IF_PCIE_2),
+       SET_LAW(CONFIG_SYS_PCIE2_IO_PHYS, LAW_SIZE_8M, LAW_TRGT_IF_PCIE_2),
+#endif
+#ifdef CONFIG_SYS_PCIE3_MEM_PHYS
+       SET_LAW(CONFIG_SYS_PCIE3_MEM_PHYS, LAW_SIZE_256M, LAW_TRGT_IF_PCIE_3),
+       SET_LAW(CONFIG_SYS_PCIE3_IO_PHYS, LAW_SIZE_8M, LAW_TRGT_IF_PCIE_3),
+#endif
+};
+
+int num_law_entries = ARRAY_SIZE(law_table);
diff --git a/board/xes/xpedite550x/tlb.c b/board/xes/xpedite550x/tlb.c
new file mode 100644 (file)
index 0000000..cf3ff4d
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+ * Copyright 2008 Extreme Engineering Solutions, Inc.
+ * Copyright 2008 Freescale Semiconductor, Inc.
+ *
+ * (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
+ */
+
+#include <common.h>
+#include <asm/mmu.h>
+
+struct fsl_e_tlb_entry tlb_table[] = {
+       /* TLB 0 - for temp stack in cache */
+       SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR, CONFIG_SYS_INIT_RAM_ADDR,
+               MAS3_SX|MAS3_SW|MAS3_SR, 0,
+               0, 0, BOOKE_PAGESZ_4K, 0),
+       SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR + 4 * 1024,
+               CONFIG_SYS_INIT_RAM_ADDR + 4 * 1024,
+               MAS3_SX|MAS3_SW|MAS3_SR, 0,
+               0, 0, BOOKE_PAGESZ_4K, 0),
+       SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR + 8 * 1024,
+               CONFIG_SYS_INIT_RAM_ADDR + 8 * 1024,
+               MAS3_SX|MAS3_SW|MAS3_SR, 0,
+               0, 0, BOOKE_PAGESZ_4K, 0),
+       SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR + 12 * 1024,
+               CONFIG_SYS_INIT_RAM_ADDR + 12 * 1024,
+               MAS3_SX|MAS3_SW|MAS3_SR, 0,
+               0, 0, BOOKE_PAGESZ_4K, 0),
+
+       /* W**G* - NOR flashes */
+       /* This will be changed to *I*G* after relocation to RAM. */
+       SET_TLB_ENTRY(1, CONFIG_SYS_FLASH_BASE2, CONFIG_SYS_FLASH_BASE2,
+               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_W|MAS2_G,
+               0, 0, BOOKE_PAGESZ_256M, 1),
+
+       /* *I*G* - CCSRBAR */
+       SET_TLB_ENTRY(1, CONFIG_SYS_CCSRBAR, CONFIG_SYS_CCSRBAR_PHYS,
+               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+               0, 1, BOOKE_PAGESZ_1M, 1),
+
+       /* *I*G* - NAND flash */
+       SET_TLB_ENTRY(1, CONFIG_SYS_NAND_BASE, CONFIG_SYS_NAND_BASE,
+               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+               0, 2, BOOKE_PAGESZ_1M, 1),
+
+       /* **M** - Boot page for secondary processors */
+       SET_TLB_ENTRY(1, CONFIG_BPTR_VIRT_ADDR, CONFIG_BPTR_VIRT_ADDR,
+               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_M,
+               0, 3, BOOKE_PAGESZ_4K, 1),
+
+#ifdef CONFIG_PCIE1
+       /* *I*G* - PCIe */
+       SET_TLB_ENTRY(1, CONFIG_SYS_PCIE1_MEM_PHYS, CONFIG_SYS_PCIE1_MEM_PHYS,
+               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+               0, 4, BOOKE_PAGESZ_1G, 1),
+#endif
+
+#ifdef CONFIG_PCIE2
+       /* *I*G* - PCIe */
+       SET_TLB_ENTRY(1, CONFIG_SYS_PCIE2_MEM_PHYS, CONFIG_SYS_PCIE2_MEM_PHYS,
+               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+               0, 5, BOOKE_PAGESZ_256M, 1),
+#endif
+
+#ifdef CONFIG_PCIE3
+       /* *I*G* - PCIe */
+       SET_TLB_ENTRY(1, CONFIG_SYS_PCIE3_MEM_PHYS, CONFIG_SYS_PCIE3_MEM_PHYS,
+               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+               0, 6, BOOKE_PAGESZ_256M, 1),
+#endif
+
+#if defined(CONFIG_PCIE1) || defined(CONFIG_PCIE2) || defined(CONFIG_PCIE3)
+       /* *I*G* - PCIe */
+       SET_TLB_ENTRY(1, CONFIG_SYS_PCIE1_IO_PHYS, CONFIG_SYS_PCIE1_IO_PHYS,
+               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+               0, 7, BOOKE_PAGESZ_64M, 1),
+#endif
+};
+
+int num_tlb_entries = ARRAY_SIZE(tlb_table);
diff --git a/board/xes/xpedite550x/xpedite550x.c b/board/xes/xpedite550x/xpedite550x.c
new file mode 100644 (file)
index 0000000..2ad30a3
--- /dev/null
@@ -0,0 +1,107 @@
+/*
+ * Copyright 2010 Extreme Engineering Solutions, Inc.
+ *
+ * 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 <asm/processor.h>
+#include <asm/mmu.h>
+#include <asm/immap_85xx.h>
+#include <asm/fsl_pci.h>
+#include <asm/io.h>
+#include <asm/cache.h>
+#include <libfdt.h>
+#include <fdt_support.h>
+#include <pca953x.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+extern void ft_board_pci_setup(void *blob, bd_t *bd);
+
+static void flash_cs_fixup(void)
+{
+       int flash_sel;
+
+       /*
+        * Print boot dev and swap flash flash chip selects if booted from 2nd
+        * flash.  Swapping chip selects presents user with a common memory
+        * map regardless of which flash was booted from.
+        */
+       flash_sel = !((pca953x_get_val(CONFIG_SYS_I2C_PCA953X_ADDR0) &
+                       CONFIG_SYS_PCA953X_C0_FLASH_PASS_CS));
+       printf("FLASH: Executed from FLASH%d\n", flash_sel ? 2 : 1);
+
+       if (flash_sel) {
+               set_lbc_br(0, CONFIG_SYS_BR1_PRELIM);
+               set_lbc_or(0, CONFIG_SYS_OR1_PRELIM);
+
+               set_lbc_br(1, CONFIG_SYS_BR0_PRELIM);
+               set_lbc_or(1, CONFIG_SYS_OR0_PRELIM);
+       }
+}
+
+int board_early_init_r(void)
+{
+       /* Initialize PCA9557 devices */
+       pca953x_set_pol(CONFIG_SYS_I2C_PCA953X_ADDR0, 0xff, 0);
+       pca953x_set_pol(CONFIG_SYS_I2C_PCA953X_ADDR1, 0xff, 0);
+       pca953x_set_pol(CONFIG_SYS_I2C_PCA953X_ADDR2, 0xff, 0);
+       pca953x_set_pol(CONFIG_SYS_I2C_PCA953X_ADDR3, 0xff, 0);
+
+       /*
+        * Remap NOR flash region to caching-inhibited
+        * so that flash can be erased/programmed properly.
+        */
+
+       /* Flush d-cache and invalidate i-cache of any FLASH data */
+       flush_dcache();
+       invalidate_icache();
+
+       /* Invalidate existing TLB entry for NOR flash */
+       disable_tlb(0);
+       set_tlb(1, (CONFIG_SYS_FLASH_BASE2 & 0xf0000000),
+               (CONFIG_SYS_FLASH_BASE2 & 0xf0000000),
+               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+               0, 0, BOOKE_PAGESZ_256M, 1);
+
+       flash_cs_fixup();
+
+       return 0;
+}
+
+#if defined(CONFIG_OF_BOARD_SETUP)
+void ft_board_setup(void *blob, bd_t *bd)
+{
+#ifdef CONFIG_PCI
+       ft_board_pci_setup(blob, bd);
+#endif
+       ft_cpu_setup(blob, bd);
+}
+#endif
+
+#ifdef CONFIG_MP
+extern void cpu_mp_lmb_reserve(struct lmb *lmb);
+
+void board_lmb_reserve(struct lmb *lmb)
+{
+       cpu_mp_lmb_reserve(lmb);
+}
+#endif
index a174f66199e0802bf2cb9c0e30bc8c9531dcd932..11e2b304c28208970622f8f27b178c8479e2995e 100644 (file)
@@ -26,17 +26,15 @@ include $(TOPDIR)/config.mk
 LIB    = $(obj)lib$(BOARD).a
 
 COBJS  := xm250.o flash.o
-SOBJS  := lowlevel_init.o
 
-SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+SRCS   := $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
-SOBJS  := $(addprefix $(obj),$(SOBJS))
 
-$(LIB):        $(obj).depend $(OBJS) $(SOBJS)
-       $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+$(LIB):        $(obj).depend $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS)
 
 clean:
-       rm -f $(SOBJS) $(OBJS)
+       rm -f $(OBJS)
 
 distclean:     clean
        rm -f $(LIB) core *.bak $(obj).depend
diff --git a/board/xm250/config.mk b/board/xm250/config.mk
deleted file mode 100644 (file)
index a3fa0e5..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# (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
-#
-
-#
-# MicroSys XM250 board:
-#
-
-
-# This is the address where U-Boot lives in flash:
-#CONFIG_SYS_TEXT_BASE = 0
-
-# FIXME: armboot does only work correctly when being compiled
-# for the addresses _after_ relocation to RAM!! Otherwhise the
-# .bss segment is assumed in flash...
-CONFIG_SYS_TEXT_BASE = 0xA3F80000
diff --git a/board/xm250/lowlevel_init.S b/board/xm250/lowlevel_init.S
deleted file mode 100644 (file)
index 8230550..0000000
+++ /dev/null
@@ -1,519 +0,0 @@
-/*
- * Most of this taken from Redboot hal_platform_setup.h with cleanup
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include <config.h>
-#include <version.h>
-#include <asm/arch/pxa-regs.h>
-
-DRAM_SIZE:  .long   CONFIG_SYS_DRAM_SIZE
-
-/* wait for coprocessor write complete */
-       .macro CPWAIT reg
-       mrc     p15,0,\reg,c2,c0,0
-       mov     \reg,\reg
-       sub     pc,pc,#4
-       .endm
-/*
-       .macro SET_LED val
-       ldr     r6, =CRADLE_LED_CLR_REG
-       ldr     r7, =0
-       str     r7, [r6]
-       ldr     r6, =CRADLE_LED_SET_REG
-       ldr     r7, =\val
-       str     r7, [r6]
-       .endm
-*/
-
-.globl lowlevel_init
-lowlevel_init:
-
-       mov     r10, lr
-
-       /* Set up GPIO pins first */
-
-       ldr     r0,   =GPSR0
-       ldr     r1,   =CONFIG_SYS_GPSR0_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GPSR1
-       ldr     r1,   =CONFIG_SYS_GPSR1_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GPSR2
-       ldr     r1,   =CONFIG_SYS_GPSR2_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GPCR0
-       ldr     r1,   =CONFIG_SYS_GPCR0_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GPCR1
-       ldr     r1,   =CONFIG_SYS_GPCR1_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GPCR2
-       ldr     r1,   =CONFIG_SYS_GPCR2_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GRER0
-       ldr     r1,   =CONFIG_SYS_GRER0_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GRER1
-       ldr     r1,   =CONFIG_SYS_GRER1_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GRER2
-       ldr     r1,   =CONFIG_SYS_GRER2_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GFER0
-       ldr     r1,   =CONFIG_SYS_GFER0_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GFER1
-       ldr     r1,   =CONFIG_SYS_GFER1_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GFER2
-       ldr     r1,   =CONFIG_SYS_GFER2_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GPDR0
-       ldr     r1,   =CONFIG_SYS_GPDR0_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GPDR1
-       ldr     r1,   =CONFIG_SYS_GPDR1_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GPDR2
-       ldr     r1,   =CONFIG_SYS_GPDR2_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GAFR0_L
-       ldr     r1,   =CONFIG_SYS_GAFR0_L_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GAFR0_U
-       ldr     r1,   =CONFIG_SYS_GAFR0_U_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GAFR1_L
-       ldr     r1,   =CONFIG_SYS_GAFR1_L_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GAFR1_U
-       ldr     r1,   =CONFIG_SYS_GAFR1_U_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GAFR2_L
-       ldr     r1,   =CONFIG_SYS_GAFR2_L_VAL
-       str     r1,   [r0]
-
-       ldr     r0,   =GAFR2_U
-       ldr     r1,   =CONFIG_SYS_GAFR2_U_VAL
-       str     r1,   [r0]
-
-       /* enable GPIO pins */
-       ldr     r0,   =PSSR
-       ldr     r1,   =CONFIG_SYS_PSSR_VAL
-       str     r1,   [r0]
-
-       /* SET_LED 1 */
-
-       ldr     r3, =MSC1               /* low - bank 2 Lubbock Registers / SRAM */
-       ldr     r2, =CONFIG_SYS_MSC1_VAL        /* high - bank 3 Ethernet Controller */
-       str     r2, [r3]                /* need to set MSC1 before trying to write to the HEX LEDs */
-       ldr     r2, [r3]                /* need to read it back to make sure the value latches (see MSC section of manual) */
-
-
-/*********************************************************************
- *  Initlialize Memory Controller
- *
- *  See PXA250 Operating System Developer's Guide
- *
- *  pause for 200 uSecs- allow internal clocks to settle
- *  *Note: only need this if hard reset... doing it anyway for now
- */
-
-       @ Step 1
-       @ ---- Wait 200 usec
-       ldr     r3, =OSCR       @ reset the OS Timer Count to zero
-       mov     r2, #0
-       str     r2, [r3]
-       ldr     r4, =0x300      @ really 0x2E1 is about 200usec, so 0x300 should be plenty
-1:
-       ldr     r2, [r3]
-       cmp     r4, r2
-       bgt     1b
-
-       /* SET_LED 2 */
-
-mem_init:
-       @ get memory controller base address
-       ldr     r1,  =MEMC_BASE
-
-
-@****************************************************************************
-@  Step 2
-@
-
-       @ Step 2a
-       @ write msc0, read back to ensure data latches
-       @
-       ldr     r2,   =CONFIG_SYS_MSC0_VAL
-       str     r2,   [r1, #MSC0_OFFSET]
-       ldr     r2,   [r1, #MSC0_OFFSET]
-
-       @ write msc1
-       ldr     r2,  =CONFIG_SYS_MSC1_VAL
-       str     r2,  [r1, #MSC1_OFFSET]
-       ldr     r2,  [r1, #MSC1_OFFSET]
-
-       @ write msc2
-       ldr     r2,  =CONFIG_SYS_MSC2_VAL
-       str     r2,  [r1, #MSC2_OFFSET]
-       ldr     r2,  [r1, #MSC2_OFFSET]
-
-       @ Step 2b
-       @ write mecr
-       ldr     r2,  =CONFIG_SYS_MECR_VAL
-       str     r2,  [r1, #MECR_OFFSET]
-
-       @ write mcmem0
-       ldr     r2,  =CONFIG_SYS_MCMEM0_VAL
-       str     r2,  [r1, #MCMEM0_OFFSET]
-
-       @ write mcmem1
-       ldr     r2,  =CONFIG_SYS_MCMEM1_VAL
-       str     r2,  [r1, #MCMEM1_OFFSET]
-
-       @ write mcatt0
-       ldr     r2,  =CONFIG_SYS_MCATT0_VAL
-       str     r2,  [r1, #MCATT0_OFFSET]
-
-       @ write mcatt1
-       ldr     r2,  =CONFIG_SYS_MCATT1_VAL
-       str     r2,  [r1, #MCATT1_OFFSET]
-
-       @ write mcio0
-       ldr     r2,  =CONFIG_SYS_MCIO0_VAL
-       str     r2,  [r1, #MCIO0_OFFSET]
-
-       @ write mcio1
-       ldr     r2,  =CONFIG_SYS_MCIO1_VAL
-       str     r2,  [r1, #MCIO1_OFFSET]
-
-       /*SET_LED 3 */
-
-       @ Step 2c
-       @ fly-by-dma is defeatured on this part
-       @ write flycnfg
-       @ldr    r2,  =CONFIG_SYS_FLYCNFG_VAL
-       @str    r2,  [r1, #FLYCNFG_OFFSET]
-
-/* FIXME Does this sequence really make sense */
-#ifdef REDBOOT_WAY
-       @ Step 2d
-       @ get the mdrefr settings
-       ldr     r3,  =CONFIG_SYS_MDREFR_VAL
-
-       @ extract DRI field (we need a valid DRI field)
-       @
-       ldr     r2,  =0xFFF
-
-       @ valid DRI field in r3
-       @
-       and     r3,  r3,  r2
-
-       @ get the reset state of MDREFR
-       @
-       ldr     r4,  [r1, #MDREFR_OFFSET]
-
-       @ clear the DRI field
-       @
-       bic     r4,  r4,  r2
-
-       @ insert the valid DRI field loaded above
-       @
-       orr     r4,  r4,  r3
-
-       @ write back mdrefr
-       @
-       str     r4,  [r1, #MDREFR_OFFSET]
-
-       @ *Note: preserve the mdrefr value in r4 *
-
-       /*SET_LED 4 */
-
-@****************************************************************************
-@  Step 3
-@
-@ NO SRAM
-
-       mov   pc, r10
-
-
-@****************************************************************************
-@  Step 4
-@
-
-       @ Assumes previous mdrefr value in r4, if not then read current mdrefr
-
-       @ clear the free-running clock bits
-       @ (clear K0Free, K1Free, K2Free
-       @
-       bic     r4,  r4,  #(0x00800000 | 0x01000000 | 0x02000000)
-
-       @ set K0RUN for CPLD clock
-       @
-       orr     r4,  r4, #0x00002000
-
-       @ set K1RUN if bank 0 installed
-       @
-       orr     r4,  r4, #0x00010000
-
-       @ write back mdrefr
-       @
-       str     r4,  [r1, #MDREFR_OFFSET]
-       ldr     r4,  [r1, #MDREFR_OFFSET]
-
-       @ deassert SLFRSH
-       @
-       bic     r4,  r4,  #0x00400000
-
-       @ write back mdrefr
-       @
-       str     r4,  [r1, #MDREFR_OFFSET]
-
-       @ assert E1PIN
-       @
-       orr     r4,  r4,  #0x00008000
-
-       @ write back mdrefr
-       @
-       str     r4,  [r1, #MDREFR_OFFSET]
-       ldr     r4,  [r1, #MDREFR_OFFSET]
-       nop
-       nop
-#else
-       @ Step 2d
-       @ get the mdrefr settings
-       ldr     r4,  =CONFIG_SYS_MDREFR_VAL
-
-       @ write back mdrefr
-       @
-       str     r4,  [r1, #MDREFR_OFFSET]
-
-       @  Step 4
-
-       @ set K0RUN for FLASH clock
-       @
-       orr     r4,  r4, #0x00002000
-
-       @ set K1RUN for bank DRAM 0
-       @
-       orr     r4,  r4, #0x00010000
-
-       @ set K2RUN for bank PLD
-       @
-       orr     r4,  r4, #0x00040000
-
-       @ write back mdrefr
-       @
-       str     r4,  [r1, #MDREFR_OFFSET]
-       ldr     r4,  [r1, #MDREFR_OFFSET]
-
-       @ deassert SLFRSH
-       @
-       bic     r4,  r4,  #0x00400000
-
-       @ write back mdrefr
-       @
-       str     r4,  [r1, #MDREFR_OFFSET]
-
-       @ assert E1PIN
-       @
-       orr     r4,  r4,  #0x00008000
-
-       @ write back mdrefr
-       @
-       str     r4,  [r1, #MDREFR_OFFSET]
-       ldr     r4,  [r1, #MDREFR_OFFSET]
-       nop
-       nop
-#endif
-
-       @ Step 4d
-       @ fetch platform value of mdcnfg
-       @
-       ldr     r2,  =CONFIG_SYS_MDCNFG_VAL
-
-       @ disable all sdram banks
-       @
-       bic     r2,  r2,  #(MDCNFG_DE0 | MDCNFG_DE1)
-       bic     r2,  r2,  #(MDCNFG_DE2 | MDCNFG_DE3)
-
-       @ program banks 0/1 for bus width
-       @
-       bic     r2,  r2,  #MDCNFG_DWID0         @0=32-bit
-
-       @ write initial value of mdcnfg, w/o enabling sdram banks
-       @
-       str     r2,  [r1, #MDCNFG_OFFSET]
-
-       @ Step 4e
-       @ pause for 200 uSecs
-       @
-       ldr     r3, =OSCR       @ reset the OS Timer Count to zero
-       mov     r2, #0
-       str     r2, [r3]
-       ldr     r4, =0x300      @ really 0x2E1 is about 200usec, so 0x300 should be plenty
-1:
-       ldr     r2, [r3]
-       cmp     r4, r2
-       bgt     1b
-
-       /*SET_LED 5 */
-
-       /* Why is this here??? */
-       mov     r0, #0x78               @turn everything off
-       mcr     p15, 0, r0, c1, c0, 0   @(caches off, MMU off, etc.)
-
-       @ Step 4f
-       @ Access memory *not yet enabled* for CBR refresh cycles (8)
-       @ - CBR is generated for all banks
-
-       ldr     r2, =CONFIG_SYS_DRAM_BASE
-       str     r2, [r2]
-       str     r2, [r2]
-       str     r2, [r2]
-       str     r2, [r2]
-       str     r2, [r2]
-       str     r2, [r2]
-       str     r2, [r2]
-       str     r2, [r2]
-
-       @ Step 4g
-       @get memory controller base address
-       @
-       ldr     r1,  =MEMC_BASE
-
-       @fetch current mdcnfg value
-       @
-       ldr     r3,  [r1, #MDCNFG_OFFSET]
-
-       @enable sdram bank 0 if installed (must do for any populated bank)
-       @
-       orr     r3,  r3,  #MDCNFG_DE0
-
-       @write back mdcnfg, enabling the sdram bank(s)
-       @
-       str     r3,  [r1, #MDCNFG_OFFSET]
-
-       @ Step 4h
-       @ write mdmrs
-       @
-       ldr     r2,  =CONFIG_SYS_MDMRS_VAL
-       str     r2,  [r1, #MDMRS_OFFSET]
-
-       @ Done Memory Init
-
-       /*SET_LED 6 */
-
-       @********************************************************************
-       @ Disable (mask) all interrupts at the interrupt controller
-       @
-
-       @ clear the interrupt level register (use IRQ, not FIQ)
-       @
-       mov     r1, #0
-       ldr     r2,  =ICLR
-       str     r1,  [r2]
-
-       @ Set interrupt mask register
-       @
-       ldr     r1,  =CONFIG_SYS_ICMR_VAL
-       ldr     r2,  =ICMR
-       str     r1,  [r2]
-
-       @ ********************************************************************
-       @ Disable the peripheral clocks, and set the core clock
-       @
-
-       @ Turn Off ALL on-chip peripheral clocks for re-configuration
-       @
-       ldr     r1,  =CKEN
-       mov     r2,  #0
-       str     r2,  [r1]
-
-       @ set core clocks
-       @
-       ldr     r2,  =CONFIG_SYS_CCCR_VAL
-       ldr     r1,  =CCCR
-       str     r2,  [r1]
-
-#ifdef ENABLE32KHZ
-       @ enable the 32Khz oscillator for RTC and PowerManager
-       @
-       ldr     r1,  =OSCC
-       mov     r2,  #OSCC_OON
-       str     r2,  [r1]
-
-       @ NOTE:  spin here until OSCC.OOK get set,
-       @        meaning the PLL has settled.
-       @
-60:
-       ldr     r2, [r1]
-       ands    r2, r2, #1
-       beq     60b
-#endif
-
-       @ Turn on needed clocks
-       @
-       ldr     r1,  =CKEN
-       ldr     r2,  =CONFIG_SYS_CKEN_VAL
-       str     r2,  [r1]
-
-       /*SET_LED 7 */
-
-/* Is this needed???? */
-#define NODEBUG
-#ifdef NODEBUG
-       /*Disable software and data breakpoints */
-       mov     r0,#0
-       mcr     p15,0,r0,c14,c8,0       /* ibcr0 */
-       mcr     p15,0,r0,c14,c9,0       /* ibcr1 */
-       mcr     p15,0,r0,c14,c4,0       /* dbcon */
-
-       /*Enable all debug functionality */
-       mov     r0,#0x80000000
-       mcr     p14,0,r0,c10,c0,0       /* dcsr */
-
-#endif
-
-       /*SET_LED 8 */
-
-       mov     pc, r10
-
-@ End lowlevel_init
index 246bdde750271f1068dcc20ef0e70371b0371652..3188cf2fabb5aff0047fcd33e0162ad6fbbe0560 100644 (file)
@@ -56,6 +56,10 @@ int
 board_init (void)
 /**********************************************************/
 {
+       /* We have RAM, disable cache */
+       dcache_disable();
+       icache_disable();
+
        /* arch number of MicroSys XM250 */
        gd->bd->bi_arch_number = MACH_TYPE_XM250;
 
@@ -65,21 +69,18 @@ board_init (void)
        return 0;
 }
 
-int
-/**********************************************************/
-dram_init (void)
-/**********************************************************/
+extern void pxa_dram_init(void);
+int dram_init(void)
 {
-       gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-       gd->bd->bi_dram[0].size  = PHYS_SDRAM_1_SIZE;
-       gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
-       gd->bd->bi_dram[1].size  = PHYS_SDRAM_2_SIZE;
-       gd->bd->bi_dram[2].start = PHYS_SDRAM_3;
-       gd->bd->bi_dram[2].size  = PHYS_SDRAM_3_SIZE;
-       gd->bd->bi_dram[3].start = PHYS_SDRAM_4;
-       gd->bd->bi_dram[3].size  = PHYS_SDRAM_4_SIZE;
+       pxa_dram_init();
+       gd->ram_size = PHYS_SDRAM_1_SIZE;
+       return 0;
+}
 
-       return (0);
+void dram_init_banksize(void)
+{
+       gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
+       gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
 }
 
 #ifdef CONFIG_CMD_NET
diff --git a/board/xsengine/Makefile b/board/xsengine/Makefile
deleted file mode 100644 (file)
index fc23935..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# (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  := xsengine.o flash.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/xsengine/config.mk b/board/xsengine/config.mk
deleted file mode 100644 (file)
index 821bb3b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-CONFIG_SYS_TEXT_BASE = 0xA3F80000
diff --git a/board/xsengine/flash.c b/board/xsengine/flash.c
deleted file mode 100644 (file)
index 736905a..0000000
+++ /dev/null
@@ -1,470 +0,0 @@
-/*
- * (C) Copyright 2002
- * Robert Schwebel, Pengutronix, <r.schwebel@pengutronix.de>
- *
- * (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
- */
-
-#include <common.h>
-#include <linux/byteorder/swab.h>
-
-#define SWAP(x)               __swab32(x)
-
-flash_info_t   flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH chips */
-
-/* Functions */
-static ulong flash_get_size (vu_long *addr, flash_info_t *info);
-static int write_word (flash_info_t *info, ulong dest, ulong data);
-static void flash_get_offsets (ulong base, flash_info_t *info);
-
-/*-----------------------------------------------------------------------
- */
-unsigned long flash_init (void)
-{
-       int i;
-       ulong size = 0;
-
-       for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; i++) {
-               switch (i) {
-               case 0:
-                       flash_get_size ((vu_long *) PHYS_FLASH_1, &flash_info[i]);
-                       flash_get_offsets (PHYS_FLASH_1, &flash_info[i]);
-                       break;
-               case 1:
-                       flash_get_size ((vu_long *) PHYS_FLASH_2, &flash_info[i]);
-                       flash_get_offsets (PHYS_FLASH_2, &flash_info[i]);
-                       break;
-               default:
-                       panic ("configured too many flash banks!\n");
-                       break;
-               }
-               size += flash_info[i].size;
-       }
-
-       /* Protect monitor and environment sectors */
-       flash_protect ( FLAG_PROTECT_SET,CONFIG_SYS_FLASH_BASE,CONFIG_SYS_FLASH_BASE + monitor_flash_len - 1,&flash_info[0] );
-       flash_protect ( FLAG_PROTECT_SET,CONFIG_ENV_ADDR,CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0] );
-
-       return size;
-}
-
-/*-----------------------------------------------------------------------
- */
-static void flash_get_offsets (ulong base, flash_info_t *info)
-{
-       int i;
-
-       if (info->flash_id == FLASH_UNKNOWN) return;
-
-       if ((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_AMD) {
-               for (i = 0; i < info->sector_count; i++) {
-                       info->start[i] = base + (i * PHYS_FLASH_SECT_SIZE);
-                       info->protect[i] = 0;
-               }
-       }
-}
-
-/*-----------------------------------------------------------------------
- */
-void flash_print_info  (flash_info_t *info)
-{
-       int i;
-
-       if (info->flash_id == FLASH_UNKNOWN) {
-               printf ("missing or unknown FLASH type\n");
-               return;
-       }
-
-       switch (info->flash_id & FLASH_VENDMASK) {
-       case FLASH_MAN_AMD:     printf ("AMD ");                break;
-       case FLASH_MAN_FUJ:     printf ("FUJITSU ");            break;
-       default:                printf ("Unknown Vendor ");     break;
-       }
-
-       switch (info->flash_id & FLASH_TYPEMASK) {
-       case FLASH_AMLV640U:    printf ("AM29LV640ML (64Mbit, uniform sector size)\n");
-                               break;
-       case FLASH_S29GL064M:   printf ("S29GL064M (64Mbit, top boot sector size)\n");
-                               break;
-       default:                printf ("Unknown Chip Type\n");
-                               break;
-       }
-
-       printf ("  Size: %ld MB in %d Sectors\n",
-               info->size >> 20, info->sector_count);
-
-       printf ("  Sector Start Addresses:");
-       for (i=0; i<info->sector_count; ++i) {
-               if ((i % 5) == 0)
-                       printf ("\n   ");
-               printf (" %08lX%s",
-                       info->start[i],
-                       info->protect[i] ? " (RO)" : "     "
-               );
-       }
-       printf ("\n");
-       return;
-}
-
-/*
- * The following code cannot be run from FLASH!
- */
-static ulong flash_get_size (vu_long *addr, flash_info_t *info)
-{
-       short i;
-       ulong value;
-       ulong base = (ulong)addr;
-
-       /* Write auto select command: read Manufacturer ID */
-       addr[0x0555] = 0x00AA00AA;
-       addr[0x02AA] = 0x00550055;
-       addr[0x0555] = 0x00900090;
-
-       value = addr[0];
-
-       debug ("Manuf. ID @ 0x%08lx: 0x%08lx\n", (ulong)addr, value);
-
-       switch (value) {
-       case AMD_MANUFACT:
-               debug ("Manufacturer: AMD\n");
-               info->flash_id = FLASH_MAN_AMD;
-               break;
-       case FUJ_MANUFACT:
-               debug ("Manufacturer: FUJITSU\n");
-               info->flash_id = FLASH_MAN_FUJ;
-               break;
-       default:
-               debug ("Manufacturer: *** unknown ***\n");
-               info->flash_id = FLASH_UNKNOWN;
-               info->sector_count = 0;
-               info->size = 0;
-               return (0);                     /* no or unknown flash  */
-       }
-
-       value = addr[1];                        /* device ID            */
-
-       debug ("Device ID @ 0x%08lx: 0x%08lx\n", (ulong)(&addr[1]), value);
-
-       switch (value) {
-
-       case AMD_ID_MIRROR:
-               debug ("Mirror Bit flash: addr[14] = %08lX  addr[15] = %08lX\n",
-                       addr[14], addr[15]);
-               switch(addr[14]) {
-               case AMD_ID_LV640U_2:
-                       if (addr[15] != AMD_ID_LV640U_3) {
-                               debug ("Chip: AMLV640U -> unknown\n");
-                               info->flash_id = FLASH_UNKNOWN;
-                       } else {
-                               debug ("Chip: AMLV640U\n");
-                               info->flash_id += FLASH_AMLV640U;
-                               info->sector_count = 128;
-                               info->size = 0x01000000;
-                       }
-                       break;                          /* => 16 MB     */
-               case AMD_ID_GL064MT_2:
-                       if (addr[15] != AMD_ID_GL064MT_3) {
-                               debug ("Chip: S29GL064M-R3 -> unknown\n");
-                               info->flash_id = FLASH_UNKNOWN;
-                       } else {
-                               debug ("Chip: S29GL064M-R3\n");
-                               info->flash_id += FLASH_S29GL064M;
-                               info->sector_count = 128;
-                               info->size = 0x01000000;
-                       }
-                       break;                          /* => 16 MB     */
-               default:
-                       debug ("Chip: *** unknown ***\n");
-                       info->flash_id = FLASH_UNKNOWN;
-                       break;
-               }
-               break;
-
-       default:
-               info->flash_id = FLASH_UNKNOWN;
-               return (0);                     /* => no or unknown flash */
-       }
-
-       /* set up sector start address table */
-       switch (value) {
-       case AMD_ID_MIRROR:
-               switch (info->flash_id & FLASH_TYPEMASK) {
-               /* only known types here - no default */
-               case FLASH_AMLV128U:
-               case FLASH_AMLV640U:
-               case FLASH_AMLV320U:
-                       for (i = 0; i < info->sector_count; i++) {
-                               info->start[i] = base;
-                               base += 0x20000;
-                       }
-                       break;
-               case FLASH_AMLV320B:
-                       for (i = 0; i < info->sector_count; i++) {
-                               info->start[i] = base;
-                               /*
-                                * The first 8 sectors are 8 kB,
-                                * all the other ones  are 64 kB
-                                */
-                               base += (i < 8)
-                                       ?  2 * ( 8 << 10)
-                                       :  2 * (64 << 10);
-                       }
-                       break;
-               }
-               break;
-
-       default:
-               return (0);
-               break;
-       }
-
-#if 0
-       /* check for protected sectors */
-       for (i = 0; i < info->sector_count; i++) {
-               /* read sector protection at sector address, (A7 .. A0) = 0x02 */
-               /* D0 = 1 if protected */
-               addr = (volatile unsigned long *)(info->start[i]);
-               info->protect[i] = addr[2] & 1;
-       }
-#endif
-
-       /*
-        * Prevent writes to uninitialized FLASH.
-        */
-       if (info->flash_id != FLASH_UNKNOWN) {
-               addr = (volatile unsigned long *)info->start[0];
-
-               *addr = 0x00F000F0;     /* reset bank */
-       }
-
-       return (info->size);
-}
-
-
-/*-----------------------------------------------------------------------
- */
-
-int    flash_erase (flash_info_t *info, int s_first, int s_last)
-{
-       vu_long *addr = (vu_long*)(info->start[0]);
-       int flag, prot, sect, l_sect;
-       ulong start, now, last;
-
-       debug ("flash_erase: first: %d last: %d\n", s_first, s_last);
-
-       if ((s_first < 0) || (s_first > s_last)) {
-               if (info->flash_id == FLASH_UNKNOWN) {
-                       printf ("- missing\n");
-               } else {
-                       printf ("- no sectors to erase\n");
-               }
-               return 1;
-       }
-
-       if ((info->flash_id == FLASH_UNKNOWN) ||
-           (info->flash_id > FLASH_AMD_COMP)) {
-               printf ("Can't erase unknown flash type %08lx - aborted\n",
-                       info->flash_id);
-               return 1;
-       }
-
-       prot = 0;
-       for (sect=s_first; sect<=s_last; ++sect) {
-               if (info->protect[sect]) {
-                       prot++;
-               }
-       }
-
-       if (prot) {
-               printf ("- Warning: %d protected sectors will not be erased!\n",
-                       prot);
-       } else {
-               printf ("\n");
-       }
-
-       l_sect = -1;
-
-       /* Disable interrupts which might cause a timeout here */
-       flag = disable_interrupts();
-
-       addr[0x0555] = 0x00AA00AA;
-       addr[0x02AA] = 0x00550055;
-       addr[0x0555] = 0x00800080;
-       addr[0x0555] = 0x00AA00AA;
-       addr[0x02AA] = 0x00550055;
-
-       /* Start erase on unprotected sectors */
-       for (sect = s_first; sect<=s_last; sect++) {
-               if (info->protect[sect] == 0) { /* not protected */
-                       addr = (vu_long*)(info->start[sect]);
-                       addr[0] = 0x00300030;
-                       l_sect = sect;
-               }
-       }
-
-       /* re-enable interrupts if necessary */
-       if (flag)
-               enable_interrupts();
-
-       /* wait at least 80us - let's wait 1 ms */
-       udelay (1000);
-
-       /*
-        * We wait for the last triggered sector
-        */
-       if (l_sect < 0)
-               goto DONE;
-
-       start = get_timer (0);
-       last  = start;
-       addr = (vu_long*)(info->start[l_sect]);
-       while ((addr[0] & 0x00800080) != 0x00800080) {
-               if ((now = get_timer(start)) > CONFIG_SYS_FLASH_ERASE_TOUT) {
-                       printf ("Timeout\n");
-                       return 1;
-               }
-               /* show that we're waiting */
-               if ((now - last) > 100000) {    /* every second */
-                       putc ('.');
-                       last = now;
-               }
-       }
-
-DONE:
-       /* reset to read mode */
-       addr = (volatile unsigned long *)info->start[0];
-       addr[0] = 0x00F000F0;   /* reset bank */
-
-       printf (" done\n");
-       return 0;
-}
-
-/*-----------------------------------------------------------------------
- * Copy memory to flash, returns:
- * 0 - OK
- * 1 - write timeout
- * 2 - Flash not erased
- */
-
-int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
-{
-       ulong cp, wp, data;
-       int i, l, rc;
-
-       wp = (addr & ~3);       /* get lower word aligned address */
-
-       /*
-        * handle unaligned start bytes
-        */
-       if ((l = addr - wp) != 0) {
-               data = 0;
-               for (i=0, cp=wp; i<l; ++i, ++cp) {
-                       data = (data << 8) | (*(uchar *)cp);
-               }
-               for (; i<4 && cnt>0; ++i) {
-                       data = (data << 8) | *src++;
-                       --cnt;
-                       ++cp;
-               }
-               for (; cnt==0 && i<4; ++i, ++cp) {
-                       data = (data << 8) | (*(uchar *)cp);
-               }
-
-               if ((rc = write_word(info, wp, SWAP(data))) != 0) {
-                       return (rc);
-               }
-               wp += 4;
-       }
-
-       /*
-        * handle word aligned part
-        */
-       while (cnt >= 4) {
-               data = 0;
-               for (i=0; i<4; ++i) {
-                       data = (data << 8) | *src++;
-               }
-               if ((rc = write_word(info, wp, SWAP(data))) != 0) {
-                       return (rc);
-               }
-               wp  += 4;
-               cnt -= 4;
-       }
-
-       if (cnt == 0) {
-               return (0);
-       }
-
-       /*
-        * handle unaligned tail bytes
-        */
-       data = 0;
-       for (i=0, cp=wp; i<4 && cnt>0; ++i, ++cp) {
-               data = (data << 8) | *src++;
-               --cnt;
-       }
-       for (; i<4; ++i, ++cp) {
-               data = (data << 8) | (*(uchar *)cp);
-       }
-
-       return (write_word(info, wp, SWAP(data)));
-}
-
-/*-----------------------------------------------------------------------
- * Write a word to Flash, returns:
- * 0 - OK
- * 1 - write timeout
- * 2 - Flash not erased
- */
-static int write_word (flash_info_t *info, ulong dest, ulong data)
-{
-       vu_long *addr = (vu_long*)(info->start[0]);
-       ulong start;
-       int flag;
-
-       /* Check if Flash is (sufficiently) erased */
-       if ((*((vu_long *)dest) & data) != data) {
-               return (2);
-       }
-
-       /* Disable interrupts which might cause a timeout here */
-       flag = disable_interrupts();
-
-       addr[0x0555] = 0x00AA00AA;
-       addr[0x02AA] = 0x00550055;
-       addr[0x0555] = 0x00A000A0;
-
-       *((vu_long *)dest) = data;
-
-       /* re-enable interrupts if necessary */
-       if (flag)
-               enable_interrupts();
-
-       /* data polling for D7 */
-       start = get_timer (0);
-       while ((*((vu_long *)dest) & 0x00800080) != (data & 0x00800080)) {
-               if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT) {
-                       return (1);
-               }
-       }
-       return (0);
-}
diff --git a/board/xsengine/lowlevel_init.S b/board/xsengine/lowlevel_init.S
deleted file mode 100644 (file)
index 0d94ab6..0000000
+++ /dev/null
@@ -1,221 +0,0 @@
-#include <config.h>
-#include <version.h>
-#include <asm/arch/pxa-regs.h>
-
-DRAM_SIZE:  .long   CONFIG_SYS_DRAM_SIZE
-
-.globl lowlevel_init
-lowlevel_init:
-
-   mov      r10, lr
-
-/* ---- GPIO INITIALISATION ---- */
-/* Set up GPIO pins first (3 groups [31:0] [63:32] [80:64]) */
-
-   /* General purpose set registers */
-   ldr      r0,   =GPSR0
-   ldr      r1,   =CONFIG_SYS_GPSR0_VAL
-   str      r1,   [r0]
-   ldr      r0,   =GPSR1
-   ldr      r1,   =CONFIG_SYS_GPSR1_VAL
-   str      r1,   [r0]
-   ldr      r0,   =GPSR2
-   ldr      r1,   =CONFIG_SYS_GPSR2_VAL
-   str      r1,   [r0]
-
-   /* General purpose clear registers */
-   ldr      r0,   =GPCR0
-   ldr      r1,   =CONFIG_SYS_GPCR0_VAL
-   str      r1,   [r0]
-   ldr      r0,   =GPCR1
-   ldr      r1,   =CONFIG_SYS_GPCR1_VAL
-   str      r1,   [r0]
-   ldr      r0,   =GPCR2
-   ldr      r1,   =CONFIG_SYS_GPCR2_VAL
-   str      r1,   [r0]
-
-   /* General rising edge registers */
-   ldr      r0,   =GRER0
-   ldr      r1,   =CONFIG_SYS_GRER0_VAL
-   str      r1,   [r0]
-   ldr      r0,   =GRER1
-   ldr      r1,   =CONFIG_SYS_GRER1_VAL
-   str      r1,   [r0]
-   ldr      r0,   =GRER2
-   ldr      r1,   =CONFIG_SYS_GRER2_VAL
-   str      r1,   [r0]
-
-   /* General falling edge registers */
-   ldr      r0,   =GFER0
-   ldr      r1,   =CONFIG_SYS_GFER0_VAL
-   str      r1,   [r0]
-   ldr      r0,   =GFER1
-   ldr      r1,   =CONFIG_SYS_GFER1_VAL
-   str      r1,   [r0]
-   ldr      r0,   =GFER2
-   ldr      r1,   =CONFIG_SYS_GFER2_VAL
-   str      r1,   [r0]
-
-   /* General edge detect registers */
-   ldr      r0,   =GPDR0
-   ldr      r1,   =CONFIG_SYS_GPDR0_VAL
-   str      r1,   [r0]
-   ldr      r0,   =GPDR1
-   ldr      r1,   =CONFIG_SYS_GPDR1_VAL
-   str      r1,   [r0]
-   ldr      r0,   =GPDR2
-   ldr      r1,   =CONFIG_SYS_GPDR2_VAL
-   str      r1,   [r0]
-
-   /* General alternate function registers */
-   ldr      r0,   =GAFR0_L             /* [0:15] */
-   ldr      r1,   =CONFIG_SYS_GAFR0_L_VAL
-   str      r1,   [r0]
-   ldr      r0,   =GAFR0_U             /* [31:16] */
-   ldr      r1,   =CONFIG_SYS_GAFR0_U_VAL
-   str      r1,   [r0]
-   ldr      r0,   =GAFR1_L             /* [47:32] */
-   ldr      r1,   =CONFIG_SYS_GAFR1_L_VAL
-   str      r1,   [r0]
-   ldr      r0,   =GAFR1_U             /* [63:48] */
-   ldr      r1,   =CONFIG_SYS_GAFR1_U_VAL
-   str      r1,   [r0]
-   ldr      r0,   =GAFR2_L             /* [79:64] */
-   ldr      r1,   =CONFIG_SYS_GAFR2_L_VAL
-   str      r1,   [r0]
-   ldr      r0,   =GAFR2_U             /* [80] */
-   ldr      r1,   =CONFIG_SYS_GAFR2_U_VAL
-   str      r1,   [r0]
-
-   /* General purpose direction registers */
-   ldr      r0,   =GPDR0
-   ldr      r1,   =CONFIG_SYS_GPDR0_VAL
-   str      r1,   [r0]
-   ldr      r0,   =GPDR1
-   ldr      r1,   =CONFIG_SYS_GPDR1_VAL
-   str      r1,   [r0]
-   ldr      r0,   =GPDR2
-   ldr      r1,   =CONFIG_SYS_GPDR2_VAL
-   str      r1,   [r0]
-
-   /* Power manager sleep status */
-   ldr      r0,   =PSSR
-   ldr      r1,   =CONFIG_SYS_PSSR_VAL
-   str      r1,   [r0]
-
-/* ---- MEMORY INITIALISATION ---- */
-/* Initialize Memory Controller, see PXA250 Operating System Developer's Guide */
-/* pause for 200 uSecs- allow internal clocks to settle */
-   ldr r3, =OSCR       /* reset the OS Timer Count to zero */
-   mov r2, #0
-   str r2, [r3]
-   ldr r4, =0x300      /* really 0x2E1 is about 200usec, so 0x300 should be plenty */
-1:
-   ldr r2, [r3]
-   cmp r4, r2
-   bgt 1b
-
-mem_init:
-/* get memory controller base address */
-   ldr     r1,  =MEMC_BASE
-
-/* ---- FLASH INITIALISATION ---- */
-/* Write MSC0 and read back to ensure data change is accepted by cpu */
-   ldr     r2,   =CONFIG_SYS_MSC0_VAL
-   str     r2,   [r1, #MSC0_OFFSET]
-   ldr     r2,   [r1, #MSC0_OFFSET]
-
-/* ---- SDRAM INITIALISATION ---- */
-/* get the MDREFR settings */
-   ldr     r2,  =CONFIG_SYS_MDREFR_VAL
-   str     r2,  [r1, #MDREFR_OFFSET]
-
-/* fetch platform value of MDCNFG */
-   ldr     r2,  =CONFIG_SYS_MDCNFG_VAL
-
-/* disable all sdram banks */
-   bic     r2,  r2,  #(MDCNFG_DE0 | MDCNFG_DE1)
-   bic     r2,  r2,  #(MDCNFG_DE2 | MDCNFG_DE3)
-
-/* write initial value of MDCNFG, w/o enabling sdram banks */
-   str     r2,  [r1, #MDCNFG_OFFSET]
-
-/* pause for 200 uSecs */
-   ldr r3, =OSCR       /* reset the OS Timer Count to zero */
-   mov r2, #0
-   str r2, [r3]
-   ldr r4, =0x300      /* about 200 usec */
-1:
-   ldr r2, [r3]
-   cmp r4, r2
-   bgt 1b
-
-/* Access memory *not yet enabled* for CBR refresh cycles (8) */
-/* CBR is generated for all banks */
-
-   ldr     r2, =CONFIG_SYS_DRAM_BASE
-   str     r2, [r2]
-   str     r2, [r2]
-   str     r2, [r2]
-   str     r2, [r2]
-   str     r2, [r2]
-   str     r2, [r2]
-   str     r2, [r2]
-   str     r2, [r2]
-
-/* get memory controller base address */
-   ldr     r2,  =MEMC_BASE
-
-/* Enable SDRAM bank 0 in MDCNFG register */
-   ldr     r2,  [r1, #MDCNFG_OFFSET]
-   orr     r2,  r2,  #MDCNFG_DE0
-   str     r2,  [r1, #MDCNFG_OFFSET]
-
-/* write MDMRS to trigger an MSR command to all enabled SDRAM banks */
-   ldr     r2,  =CONFIG_SYS_MDMRS_VAL
-   str     r2,  [r1, #MDMRS_OFFSET]
-
-/* ---- INTERRUPT INITIALISATION ---- */
-/* Disable (mask) all interrupts at the interrupt controller */
-/* clear the interrupt level register (use IRQ, not FIQ) */
-   mov     r1, #0
-   ldr     r2,  =ICLR
-   str     r1,  [r2]
-
-/* Set interrupt mask register */
-   ldr     r1,  =CONFIG_SYS_ICMR_VAL
-   ldr     r2,  =ICMR
-   str     r1,  [r2]
-
-/* ---- CLOCK INITIALISATION ---- */
-/* Disable the peripheral clocks, and set the core clock */
-
-/* Turn Off ALL on-chip peripheral clocks for re-configuration */
-   ldr     r1,  =CKEN
-   mov     r2,  #0
-   str     r2,  [r1]
-
-/* set core clocks */
-   ldr     r2,  =CONFIG_SYS_CCCR_VAL
-   ldr     r1,  =CCCR
-   str     r2,  [r1]
-
-#ifdef ENABLE32KHZ
-/* enable the 32Khz oscillator for RTC and PowerManager */
-   ldr     r1,  =OSCC
-   mov     r2,  #OSCC_OON
-   str     r2,  [r1]
-
-/* NOTE:  spin here until OSCC.OOK get set, meaning the PLL has settled. */
-60:
-   ldr     r2, [r1]
-   ands    r2, r2, #1
-   beq     60b
-#endif
-
-/* Turn on needed clocks */
-   ldr     r1,  =CKEN
-   ldr     r2,  =CONFIG_SYS_CKEN_VAL
-   str     r2,  [r1]
-
-   mov   pc, r10
diff --git a/board/xsengine/xsengine.c b/board/xsengine/xsengine.c
deleted file mode 100644 (file)
index 4464fd4..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * (C) Copyright 2002
- * Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net
- *
- * (C) Copyright 2002
- * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
- * Marius Groeger <mgroeger@sysgo.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 <netdev.h>
-
-DECLARE_GLOBAL_DATA_PTR;
-
-/*
- * Miscelaneous platform dependent initialisations
- */
-
-int board_init (void)
-{
-       /* memory and cpu-speed are setup before relocation */
-       /* so we do _nothing_ here */
-
-       /* arch number */
-       gd->bd->bi_arch_number = MACH_TYPE_XSENGINE;
-
-       /* adress of boot parameters */
-       gd->bd->bi_boot_params = 0xa0000100;
-
-       return 0;
-}
-
-int board_late_init (void)
-{
-       setenv ("stdout", "serial");
-       setenv ("stderr", "serial");
-       return 0;
-}
-
-int dram_init (void)
-{
-       gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-       gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
-
-       return 0;
-}
-
-#ifdef CONFIG_CMD_NET
-int board_eth_init(bd_t *bis)
-{
-       int rc = 0;
-#ifdef CONFIG_SMC91111
-       rc = smc91111_initialize(0, CONFIG_SMC91111_BASE);
-#endif
-       return rc;
-}
-#endif
index 267383550acbd557542595e5ac405dcd93917a1c..8d452de63cb8d00e12208261274e3a739ca8ccaa 100644 (file)
@@ -29,17 +29,15 @@ include $(TOPDIR)/config.mk
 LIB    = $(obj)lib$(BOARD).a
 
 COBJS  := zipitz2.o
-SOBJS  := lowlevel_init.o
 
-SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+SRCS   := $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
-SOBJS  := $(addprefix $(obj),$(SOBJS))
 
-$(LIB):        $(obj).depend $(OBJS) $(SOBJS)
-       $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+$(LIB):        $(obj).depend $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS)
 
 clean:
-       rm -f $(SOBJS) $(OBJS)
+       rm -f $(OBJS)
 
 distclean:     clean
        rm -f $(LIB) core *.bak $(obj).depend
diff --git a/board/zipitz2/config.mk b/board/zipitz2/config.mk
deleted file mode 100644 (file)
index 0f10662..0000000
+++ /dev/null
@@ -1 +0,0 @@
-CONFIG_SYS_TEXT_BASE = 0xa1000000
diff --git a/board/zipitz2/lowlevel_init.S b/board/zipitz2/lowlevel_init.S
deleted file mode 100644 (file)
index 82a52e8..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Aeronix Zipit Z2 Lowlevel Hardware Initialization
- *
- * Copyright (C) 2010 Marek Vasut <marek.vasut@gmail.com>
- *
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include <config.h>
-#include <version.h>
-#include <asm/arch/pxa-regs.h>
-#include <asm/arch/macro.h>
-
-.globl lowlevel_init
-lowlevel_init:
-       pxa_gpio_setup
-       pxa_wait_ticks  0x8000
-       pxa_mem_setup
-       pxa_wakeup
-       pxa_intr_setup
-       pxa_clock_setup
-
-       mov     pc, lr
index 14d1d763b1e81a845214b726f5b68c57c71713bf..9e6a0d51c4e8d1e0eddc1cdf41aac20a109c6a45 100644 (file)
@@ -28,6 +28,7 @@
 #include <serial.h>
 #include <asm/arch/hardware.h>
 #include <spi.h>
+#include <asm/io.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -43,10 +44,11 @@ inline void lcd_start(void) {};
 
 int board_init (void)
 {
-       /* memory and cpu-speed are setup before relocation */
-       /* so we do _nothing_ here */
+       /* We have RAM, disable cache */
+       dcache_disable();
+       icache_disable();
 
-       /* arch number of Lubbock-Board */
+       /* arch number of Z2 */
        gd->bd->bi_arch_number = MACH_TYPE_ZIPIT2;
 
        /* adress of boot parameters */
@@ -58,24 +60,23 @@ int board_init (void)
        return 0;
 }
 
-int board_late_init(void)
+struct serial_device *default_serial_console (void)
 {
-       setenv("stdout", "serial");
-       setenv("stderr", "serial");
-       return 0;
+       return &serial_stuart_device;
 }
 
-struct serial_device *default_serial_console (void)
+extern void pxa_dram_init(void);
+int dram_init(void)
 {
-       return &serial_stuart_device;
+       pxa_dram_init();
+       gd->ram_size = PHYS_SDRAM_1_SIZE;
+       return 0;
 }
 
-int dram_init (void)
+void dram_init_banksize(void)
 {
        gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
        gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
-
-       return 0;
 }
 
 #ifdef CONFIG_CMD_SPI
@@ -129,24 +130,24 @@ void zipitz2_spi_sda(int set)
 {
        /* GPIO 13 */
        if (set)
-               GPSR0 = (1 << 13);
+               writel((1 << 13), GPSR0);
        else
-               GPCR0 = (1 << 13);
+               writel((1 << 13), GPCR0);
 }
 
 void zipitz2_spi_scl(int set)
 {
        /* GPIO 22 */
        if (set)
-               GPCR0 = (1 << 22);
+               writel((1 << 22), GPCR0);
        else
-               GPSR0 = (1 << 22);
+               writel((1 << 22), GPSR0);
 }
 
 unsigned char zipitz2_spi_read(void)
 {
        /* GPIO 40 */
-       return !!(GPLR1 & (1 << 8));
+       return !!(readl(GPLR1) & (1 << 8));
 }
 
 int spi_cs_is_valid(unsigned int bus, unsigned int cs)
@@ -158,13 +159,13 @@ int spi_cs_is_valid(unsigned int bus, unsigned int cs)
 void spi_cs_activate(struct spi_slave *slave)
 {
        /* GPIO 88 low */
-       GPCR2 = (1 << 24);
+       writel((1 << 24), GPCR2);
 }
 
 void spi_cs_deactivate(struct spi_slave *slave)
 {
        /* GPIO 88 high */
-       GPSR2 = (1 << 24);
+       writel((1 << 24), GPSR2);
 
 }
 
@@ -176,20 +177,20 @@ void lcd_start(void)
        unsigned char dummy[3] = { 0, 0, 0 };
 
        /* PWM2 AF */
-       GAFR0_L |= 0x00800000;
+       writel(readl(GAFR0_L) | 0x00800000, GAFR0_L);
        /* Enable clock to all PWM */
-       CKEN |= 0x3;
+       writel(readl(CKEN) | 0x3, CKEN);
        /* Configure PWM2 */
-       PWM_CTRL2 = 0x4f;
-       PWM_PWDUTY2 = 0x2ff;
-       PWM_PERVAL2 = 792;
+       writel(0x4f, PWM_CTRL2);
+       writel(0x2ff, PWM_PWDUTY2);
+       writel(792, PWM_PERVAL2);
 
        /* Toggle the reset pin to reset the LCD */
-       GPSR0 = (1 << 19);
+       writel((1 << 19), GPSR0);
        udelay(100000);
-       GPCR0 = (1 << 19);
+       writel((1 << 19), GPCR0);
        udelay(20000);
-       GPSR0 = (1 << 19);
+       writel((1 << 19), GPSR0);
        udelay(20000);
 
        /* Program the LCD init sequence */
@@ -208,6 +209,6 @@ void lcd_start(void)
                        udelay(lcd_data[i].mdelay * 1000);
        }
 
-       GPSR0 = (1 << 11);
+       writel((1 << 11), GPSR0);
 }
 #endif
index 7cad1ac049cbdc7c955cb88b5c3cfae84724d3f8..71d18a6f5f8230b8cdca0bb8b50c9ae68d9c29c9 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 #include <common.h>
+#include <asm/io.h>
 
 #if defined(CONFIG_CMD_NAND)
 
@@ -95,7 +96,7 @@ static void dfc_write_buf(struct mtd_info *mtd, const u_char *buf, int len)
        if(bytes_multi) {
                for(i=0; i<bytes_multi; i+=4) {
                        long_buf = (unsigned long*) &buf[i];
-                       NDDB = *long_buf;
+                       writel(*long_buf, NDDB);
                }
        }
        if(rest) {
@@ -125,7 +126,7 @@ static void dfc_read_buf(struct mtd_info *mtd, u_char* const buf, int len)
        if(bytes_multi) {
                for(i=0; i<bytes_multi; i+=4) {
                        long_buf = (unsigned long*) &buf[i];
-                       *long_buf = NDDB;
+                       *long_buf = readl(NDDB);
                }
        }
 
@@ -171,8 +172,8 @@ static u_char dfc_read_byte(struct mtd_info *mtd)
        unsigned long dummy;
 
        if(bytes_read < 0) {
-               read_buf = NDDB;
-               dummy = NDDB;
+               read_buf = readl(NDDB);
+               dummy = readl(NDDB);
                bytes_read = 0;
        }
        byte = (unsigned char) (read_buf>>(8 * bytes_read++));
@@ -186,7 +187,7 @@ static u_char dfc_read_byte(struct mtd_info *mtd)
 /* calculate delta between OSCR values start and now  */
 static unsigned long get_delta(unsigned long start)
 {
-       unsigned long cur = OSCR;
+       unsigned long cur = readl(OSCR);
 
        if(cur < start) /* OSCR overflowed */
                return (cur + (start^0xffffffff));
@@ -197,7 +198,7 @@ static unsigned long get_delta(unsigned long start)
 /* delay function, this doesn't belong here */
 static void wait_us(unsigned long us)
 {
-       unsigned long start = OSCR;
+       unsigned long start = readl(OSCR);
        us = DIV_ROUND_UP(us * OSCR_CLK_FREQ, 1000);
 
        while (get_delta(start) < us) {
@@ -207,14 +208,14 @@ static void wait_us(unsigned long us)
 
 static void dfc_clear_nddb(void)
 {
-       NDCR &= ~NDCR_ND_RUN;
+       writel(readl(NDCR) & ~NDCR_ND_RUN, NDCR);
        wait_us(CONFIG_SYS_NAND_OTHER_TO);
 }
 
 /* wait_event with timeout */
 static unsigned long dfc_wait_event(unsigned long event)
 {
-       unsigned long ndsr, timeout, start = OSCR;
+       unsigned long ndsr, timeout, start = readl(OSCR);
 
        if(!event)
                return 0xff000000;
@@ -226,9 +227,9 @@ static unsigned long dfc_wait_event(unsigned long event)
                                        * OSCR_CLK_FREQ, 1000);
 
        while(1) {
-               ndsr = NDSR;
+               ndsr = readl(NDSR);
                if(ndsr & event) {
-                       NDSR |= event;
+                       writel(readl(NDSR) | event, NDSR);
                        break;
                }
                if(get_delta(start) > timeout) {
@@ -248,11 +249,11 @@ static void dfc_new_cmd(void)
 
        while(retry++ <= CONFIG_SYS_NAND_SENDCMD_RETRY) {
                /* Clear NDSR */
-               NDSR = 0xFFF;
+               writel(0xFFF, NDSR);
 
                /* set NDCR[NDRUN] */
-               if(!(NDCR & NDCR_ND_RUN))
-                       NDCR |= NDCR_ND_RUN;
+               if (!(readl(NDCR) & NDCR_ND_RUN))
+                       writel(readl(NDCR) | NDCR_ND_RUN, NDCR);
 
                status = dfc_wait_event(NDSR_WRCMDREQ);
 
@@ -362,9 +363,9 @@ static void dfc_cmdfunc(struct mtd_info *mtd, unsigned command,
        }
 
  write_cmd:
-       NDCB0 = ndcb0;
-       NDCB0 = ndcb1;
-       NDCB0 = ndcb2;
+       writel(ndcb0, NDCB0);
+       writel(ndcb1, NDCB0);
+       writel(ndcb2, NDCB0);
 
        /*  wait_event: */
        dfc_wait_event(event);
@@ -377,36 +378,36 @@ static void dfc_gpio_init(void)
        DFC_DEBUG2("Setting up DFC GPIO's.\n");
 
        /* no idea what is done here, see zylonite.c */
-       GPIO4 = 0x1;
-
-       DF_ALE_WE1 = 0x00000001;
-       DF_ALE_WE2 = 0x00000001;
-       DF_nCS0 = 0x00000001;
-       DF_nCS1 = 0x00000001;
-       DF_nWE = 0x00000001;
-       DF_nRE = 0x00000001;
-       DF_IO0 = 0x00000001;
-       DF_IO8 = 0x00000001;
-       DF_IO1 = 0x00000001;
-       DF_IO9 = 0x00000001;
-       DF_IO2 = 0x00000001;
-       DF_IO10 = 0x00000001;
-       DF_IO3 = 0x00000001;
-       DF_IO11 = 0x00000001;
-       DF_IO4 = 0x00000001;
-       DF_IO12 = 0x00000001;
-       DF_IO5 = 0x00000001;
-       DF_IO13 = 0x00000001;
-       DF_IO6 = 0x00000001;
-       DF_IO14 = 0x00000001;
-       DF_IO7 = 0x00000001;
-       DF_IO15 = 0x00000001;
-
-       DF_nWE = 0x1901;
-       DF_nRE = 0x1901;
-       DF_CLE_NOE = 0x1900;
-       DF_ALE_WE1 = 0x1901;
-       DF_INT_RnB = 0x1900;
+       writel(0x1, GPIO4);
+
+       writel(0x00000001, DF_ALE_nWE1);
+       writel(0x00000001, DF_ALE_nWE2);
+       writel(0x00000001, DF_nCS0);
+       writel(0x00000001, DF_nCS1);
+       writel(0x00000001, DF_nWE);
+       writel(0x00000001, DF_nRE);
+       writel(0x00000001, DF_IO0);
+       writel(0x00000001, DF_IO8);
+       writel(0x00000001, DF_IO1);
+       writel(0x00000001, DF_IO9);
+       writel(0x00000001, DF_IO2);
+       writel(0x00000001, DF_IO10);
+       writel(0x00000001, DF_IO3);
+       writel(0x00000001, DF_IO11);
+       writel(0x00000001, DF_IO4);
+       writel(0x00000001, DF_IO12);
+       writel(0x00000001, DF_IO5);
+       writel(0x00000001, DF_IO13);
+       writel(0x00000001, DF_IO6);
+       writel(0x00000001, DF_IO14);
+       writel(0x00000001, DF_IO7);
+       writel(0x00000001, DF_IO15);
+
+       writel(0x1901, DF_nWE);
+       writel(0x1901, DF_nRE);
+       writel(0x1900, DF_CLE_nOE);
+       writel(0x1901, DF_ALE_nWE1);
+       writel(0x1900, DF_INT_RnB);
 }
 
 /*
@@ -435,7 +436,7 @@ int board_nand_init(struct nand_chip *nand)
        dfc_gpio_init();
 
        /* turn on the NAND Controller Clock (104 MHz @ D0) */
-       CKENA |= (CKENA_4_NAND | CKENA_9_SMC);
+       writel(readl(CKENA) | (CKENA_4_NAND | CKENA_9_SMC), CKENA);
 
 #undef CONFIG_SYS_TIMING_TIGHT
 #ifndef CONFIG_SYS_TIMING_TIGHT
@@ -490,17 +491,19 @@ int board_nand_init(struct nand_chip *nand)
                tRP_high = 0;
        }
 
-       NDTR0CS0 = (tCH << 19) |
+       writel((tCH << 19) |
                (tCS << 16) |
                (tWH << 11) |
                (tWP << 8) |
                (tRP_high << 6) |
                (tRH << 3) |
-               (tRP << 0);
+               (tRP << 0),
+               NDTR0CS0);
 
-       NDTR1CS0 = (tR << 16) |
+       writel((tR << 16) |
                (tWHR << 4) |
-               (tAR << 0);
+               (tAR << 0),
+               NDTR1CS0);
 
        /* If it doesn't work (unlikely) think about:
         *  - ecc enable
@@ -517,7 +520,7 @@ int board_nand_init(struct nand_chip *nand)
         */
        /* NDCR_NCSX |          /\* Chip select busy don't care *\/ */
 
-       NDCR = (NDCR_SPARE_EN |         /* use the spare area */
+       writel(NDCR_SPARE_EN |          /* use the spare area */
                NDCR_DWIDTH_C |         /* 16bit DFC data bus width  */
                NDCR_DWIDTH_M |         /* 16 bit Flash device data bus width */
                (2 << 16) |             /* read id count = 7 ???? mk@tbd */
@@ -533,7 +536,8 @@ int board_nand_init(struct nand_chip *nand)
                NDCR_SBERRM |           /* single bit error ir masked */
                NDCR_WRDREQM |          /* write data request ir masked */
                NDCR_RDDREQM |          /* read data request ir masked */
-               NDCR_WRCMDREQM);        /* write command request ir masked */
+               NDCR_WRCMDREQM,         /* write command request ir masked */
+               NDCR);
 
 
        /* wait 10 us due to cmd buffer clear reset */
index 3a965e9dc52136e94aede6c88fbac7f16ca0e881..6c2a6672ff314816a27a6806a76ee0b122cadc8a 100644 (file)
@@ -3,9 +3,7 @@
 #
 # Syntax:
 #      white-space separated list of entries;
-#      each entry has the following fields:
-#
-#      Targetname  Architecture  CPU  Boardname  Vendor  SoC
+#      each entry has the fields documented below.
 #
 #      Unused fields can be specified as "-", or omitted if they
 #      are the last field on the line.
 #      Lines starting with '#' are comments.
 #      Blank lines are ignored.
 #
+#      The options field takes the form:
+#              <board config name>[:comma separated config options]
+#      Each config option has the form (value defaults to "1"):
+#              option[=value]
+#      So if you have:
+#              FOO:HAS_BAR,BAZ=64
+#      The file include/configs/FOO.h will be used, and these defines created:
+#              #define CONFIG_HAS_BAR  1
+#              #define CONFIG_BAZ      64
+#
 # To keep the list sorted, use something like
 #
 #      :.,$! sort -f -k2,2 -k3,3 -k6,6 -k5,5 -k1,1
@@ -46,20 +54,27 @@ pm9263              arm     arm926ejs       -               ronetix         at91
 suen3          arm     arm926ejs       km_arm          keymile         kirkwood
 rd6281a                arm     arm926ejs       -               Marvell         kirkwood
 jadecpu                arm     arm926ejs       jadecpu         syteco          mb86r0x
-mx51evk                arm     armv7           mx51evk         freescale       mx51
-vision2                arm     armv7           vision2         ttcontrol       mx51
+mx51evk                arm     armv7           mx51evk         freescale       mx5
+vision2                arm     armv7           vision2         ttcontrol       mx5
 actux1         arm     ixp
 actux2         arm     ixp
 actux3         arm     ixp
 actux4         arm     ixp
 ixdp425                arm     ixp
+balloon3       arm     pxa
 cerf250                arm     pxa
 cradle         arm     pxa
 csb226         arm     pxa
-delta          arm     pxa
 innokom                arm     pxa
 lubbock                arm     pxa
+palmld         arm     pxa
+palmtc         arm     pxa
 pleb2          arm     pxa
+polaris                arm     pxa             trizepsiv       -               -               trizepsiv:POLARIS
+trizepsiv      arm     pxa
+vpac270_nor_128        arm     pxa             vpac270         -               -               vpac270:NOR,RAM_128M
+vpac270_nor_256        arm     pxa             vpac270         -               -               vpac270:NOR,RAM_256M
+vpac270_ond_256        arm     pxa             vpac270         -               -               vpac270:ONENAND,RAM_256M
 xaeniax                arm     pxa
 xm250          arm     pxa
 zipitz2                arm     pxa
@@ -69,6 +84,7 @@ dnp1110               arm     sa1100
 gcplus         arm     sa1100
 lart           arm     sa1100
 shannon                arm     sa1100
+jornada                arm     sa1100
 mimc200                avr32   at32ap          -               mimc            at32ap700x
 ip04           blackfin        blackfin
 eNET           i386    i386            -               -               sc520
@@ -244,7 +260,6 @@ TQM866M             powerpc mpc8xx          tqm8xx          tqc
 TQM885D                powerpc mpc8xx          tqm8xx          tqc
 AMX860         powerpc mpc8xx          amx860          westel
 AdderII                powerpc mpc8xx          adder           -               -       Adder:MPC852T
-CP850          powerpc mpc8xx          nc650           -               -       NC650:CP850=1,IDS852_REV2=1
 IVML24         powerpc mpc8xx          ivm             -               -       IVML24:IVML24_16M
 IVMS8          powerpc mpc8xx          ivm             -               -       IVMS8:IVMS8_16M
 NETTA          powerpc mpc8xx          netta           -               -       NETTA
@@ -344,7 +359,7 @@ modnet50    arm     arm720t
 lpc2292sodimm  arm     arm720t         -               -               lpc2292
 eb_cpux9k2     arm     arm920t         -               BuS             at91
 at91rm9200dk   arm     arm920t         -               atmel           at91rm9200
-at91rm9200ek   arm     arm920t         -               atmel           at91rm9200
+at91rm9200ek   arm     arm920t         -               atmel           at91
 sbc2410x       arm     arm920t         -               -               s3c24x0
 smdk2400       arm     arm920t         -               samsung         s3c24x0
 smdk2410       arm     arm920t         -               samsung         s3c24x0
@@ -386,8 +401,6 @@ lpd7a400    arm     lh7a40x         lpd7a40x
 lpd7a404       arm     lh7a40x         lpd7a40x
 colibri_pxa270 arm     pxa
 pxa255_idp     arm     pxa
-wepep250       arm     pxa
-xsengine       arm     pxa
 zylonite       arm     pxa
 atngw100       avr32   at32ap          -               atmel           at32ap700x
 atstk1002      avr32   at32ap          atstk1000       atmel           at32ap700x
@@ -400,6 +413,7 @@ bct-brettl2 blackfin        blackfin
 bf518f-ezbrd   blackfin        blackfin
 bf526-ezbrd    blackfin        blackfin
 bf527-ezkit    blackfin        blackfin
+bf527-ezkit-v2 blackfin        blackfin        bf527-ezkit     -       -       bf527-ezkit:BF527_EZKIT_REV_2_1
 bf527-sdp      blackfin        blackfin
 bf533-ezkit    blackfin        blackfin
 bf533-stamp    blackfin        blackfin
@@ -511,7 +525,6 @@ MPC8272ADS  powerpc mpc8260         mpc8260ads      freescale       -       MPC8260ADS:ADSTYPE=CONFIG_SYS
 PQ2FADS-VR     powerpc mpc8260         mpc8260ads      freescale       -       MPC8260ADS:ADSTYPE=CONFIG_SYS_PQ2FADS,8260_CLKIN=66000000
 PQ2FADS-ZU     powerpc mpc8260         mpc8260ads      freescale       -       MPC8260ADS:ADSTYPE=CONFIG_SYS_PQ2FADS
 PQ2FADS_lowboot        powerpc mpc8260         mpc8260ads      freescale       -       MPC8260ADS:ADSTYPE=CONFIG_SYS_PQ2FADS,SYS_TEXT_BASE=0xFF800000
-VoVPN-GW_100MHz        powerpc mpc8260         vovpn-gw        funkwerk        -       VoVPN-GW:CLKIN_100MHz
 VoVPN-GW_66MHz powerpc mpc8260         vovpn-gw        funkwerk        -       VoVPN-GW:CLKIN_66MHz
 MPC8308RDB     powerpc mpc83xx         mpc8308rdb      freescale
 MPC8323ERDB    powerpc mpc83xx         mpc8323erdb     freescale
@@ -540,8 +553,9 @@ MPC8540ADS  powerpc mpc85xx         mpc8540ads      freescale
 MPC8544DS      powerpc mpc85xx         mpc8544ds       freescale
 MPC8560ADS     powerpc mpc85xx         mpc8560ads      freescale
 MPC8568MDS     powerpc mpc85xx         mpc8568mds      freescale
-XPEDITE5200    powerpc mpc85xx         xpedite5200     xes
-XPEDITE5370    powerpc mpc85xx         xpedite5370     xes
+xpedite520x    powerpc mpc85xx         -               xes
+xpedite537x    powerpc mpc85xx         -               xes
+xpedite550x    powerpc mpc85xx         -               xes
 sbc8540_33     powerpc mpc85xx         sbc8560         -               -       SBC8540
 sbc8540_66     powerpc mpc85xx         sbc8560         -               -       SBC8540
 sbc8548_PCI_33 powerpc mpc85xx         sbc8548         -               -       sbc8548:PCI,33
@@ -581,7 +595,7 @@ P2020RDB_NAND       powerpc mpc85xx         p1_p2_rdb       freescale       -       P1_P2_RDB:P2020,NAND
 P2020RDB_SDCARD        powerpc mpc85xx         p1_p2_rdb       freescale       -       P1_P2_RDB:P2020,SDCARD
 sbc8641d       powerpc mpc86xx
 MPC8610HPCD    powerpc mpc86xx         mpc8610hpcd     freescale
-XPEDITE5170    powerpc mpc86xx         xpedite5170     xes
+xpedite517x    powerpc mpc86xx         -               xes
 MPC8641HPCN    powerpc mpc86xx         mpc8641hpcn     freescale       -       MPC8641HPCN
 cogent_mpc8xx  powerpc mpc8xx          cogent
 ESTEEM192E     powerpc mpc8xx          esteem192e
@@ -603,8 +617,6 @@ IVML24_128  powerpc mpc8xx          ivm             -               -       IVML24:IVML24_32M
 IVML24_256     powerpc mpc8xx          ivm             -               -       IVML24:IVML24_64M
 IVMS8_128      powerpc mpc8xx          ivm             -               -       IVMS8:IVMS8_32M
 IVMS8_256      powerpc mpc8xx          ivm             -               -       IVMS8:IVMS8_64M
-NC650_Rev1     powerpc mpc8xx          nc650           -               -       NC650:IDS852_REV2=1
-NC650_Rev2     powerpc mpc8xx          nc650           -               -       NC650:IDS852_REV1=1
 NETTA2_V2      powerpc mpc8xx          netta2          -               -       NETTA2:NETTA2_VERSION=2
 NETTA_6412     powerpc mpc8xx          netta           -               -       NETTA:NETTA_6412=1
 NETTA_ISDN     powerpc mpc8xx          netta           -               -       NETTA:NETTA_ISDN=1
@@ -630,11 +642,13 @@ CPCI405AB powerpc ppc4xx          cpci405         esd
 CPCI405DT      powerpc ppc4xx          cpci405         esd
 dlvision       powerpc ppc4xx          -               gdsys
 gdppc440etx    powerpc ppc4xx          -               gdsys
+io             powerpc ppc4xx          405ep           gdsys
+iocon          powerpc ppc4xx          405ep           gdsys
 CPCIISER4      powerpc ppc4xx          cpciiser4       esd
 DASA_SIM       powerpc ppc4xx          dasa_sim        esd
 PMC405DE       powerpc ppc4xx          pmc405de        esd
 METROBOX       powerpc ppc4xx          metrobox        sandburst
-XPEDITE1000    powerpc ppc4xx          xpedite1000     xes
+xpedite1000    powerpc ppc4xx          -               xes
 korat_perm     powerpc ppc4xx          korat           -               -       korat:KORAT_PERMANENT
 haleakala      powerpc ppc4xx          kilauea         amcc            -       kilauea:HALEAKALA
 sycamore       powerpc ppc4xx          walnut          amcc            -       walnut
@@ -718,5 +732,18 @@ davinci_dm6467evm arm      arm926ejs       dm6467evm       davinci         davinci
 davinci_schmoogie arm  arm926ejs       schmoogie       davinci         davinci
 davinci_dm355leopard arm arm926ejs     dm355leopard    davinci         davinci
 bf527-ad7160-eval blackfin     blackfin
+rsk7203        sh      sh2             rsk7203         renesas         -
+mpr2   sh      sh3             mpr2    -       -
+ms7720se       sh      sh3     ms7720se        -       -
+MigoRsh        sh4     MigoR   renesas -   
+ms7750se       sh      sh4     ms7750se        -       -   
+ms7722se       sh      sh4     ms7722se        -       -   
+r2dplus        sh      sh4     r2dplus renesas -   
+r7780mp        sh      sh4     r7780mp renesas -   
+sh7763rdp      sh      sh4     sh7763rdp       renesas -   
+sh7785lcr      sh      sh4     sh7785lcr       renesas -   
+sh7785lcr_32bit        sh  sh4 sh7785lcr       renesas -       sh7785lcr:SH_32BIT=1
+ap325rxa       sh      sh4     ap325rxa        renesas -   
+espt   sh      sh4     espt    -       -
 # Target       ARCH    CPU             Board name      Vendor          SoC             Options
 ###############################################################################################
index 1326c8fac194901a48e3f2b09c1ef42d803b2f65..bba73746097757f969bdb7a7e8ed335b6073fb2d 100644 (file)
@@ -192,7 +192,7 @@ int do_bdinfo(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
        printf("CONFIG_SYS_PROM_OFFSET        = 0x%lx (%d)\n", CONFIG_SYS_PROM_OFFSET,
               CONFIG_SYS_PROM_SIZE);
        printf("CONFIG_SYS_GBL_DATA_OFFSET    = 0x%lx (%d)\n", CONFIG_SYS_GBL_DATA_OFFSET,
-              CONFIG_SYS_GBL_DATA_SIZE);
+              GENERATED_GBL_DATA_SIZE);
 
 #if defined(CONFIG_CMD_NET)
        print_eth(0);
@@ -343,7 +343,6 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        printf ("ip_addr     = %pI4\n", &bd->bi_ip_addr);
 #endif
        printf ("baudrate    = %d bps\n", bd->bi_baudrate);
-#if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
 #if !(defined(CONFIG_SYS_NO_ICACHE) && defined(CONFIG_SYS_NO_DCACHE))
        print_num ("TLB addr", gd->tlb_addr);
 #endif
@@ -352,7 +351,6 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        print_num ("irq_sp", gd->irq_sp);       /* irq stack pointer */
        print_num ("sp start ", gd->start_addr_sp);
        print_num ("FB base  ", gd->fb_base);
-#endif
        return 0;
 }
 
index 6fa8a150235200f2c14037e9acebff5ab49ea36f..f2a48f751c24aa3590a2066a9c6fda4739f2ff07 100644 (file)
@@ -137,7 +137,7 @@ static cmd_tbl_t cmd_bmp_sub[] = {
        U_BOOT_CMD_MKENT(display, 5, 0, do_bmp_display, "", ""),
 };
 
-#ifndef CONFIG_RELOC_FIXUP_WORKS
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
 void bmp_reloc(void) {
        fixup_cmdtable(cmd_bmp_sub, ARRAY_SIZE(cmd_bmp_sub));
 }
index ce3c77c61574664f7fe38c482fc7a47604278cd3..1a024f168f7d1bea73fd7b0c26f81480ec602f4a 100644 (file)
@@ -590,7 +590,7 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        ulong           load_end = 0;
        int             ret;
        boot_os_fn      *boot_fn;
-#ifndef CONFIG_RELOC_FIXUP_WORKS
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
        static int relocated = 0;
 
        /* relocate boot function table */
index 50b42402673696c987e5f04e93b048f357ed64ba..8dbf16d32a1220772427fbbb133a8c9fd0282aba 100644 (file)
@@ -35,10 +35,10 @@ const char *weekdays[] = {
        "Sun", "Mon", "Tues", "Wednes", "Thurs", "Fri", "Satur",
 };
 
-#ifdef CONFIG_RELOC_FIXUP_WORKS
-#define RELOC(a)       a
-#else
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
 #define RELOC(a)       ((typeof(a))((unsigned long)(a) + gd->reloc_off))
+#else
+#define RELOC(a)       a
 #endif
 
 int mk_date (char *, struct rtc_time *);
index e50c9de876a22d3cb979bf48c738ecbd87a415d3..0ad310f531ea92c5e41966d6bb289e8e5c3f4664 100644 (file)
@@ -163,6 +163,7 @@ int do_fpga (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
        char *devstr = getenv ("fpga");
        char *datastr = getenv ("fpgadata");
        int rc = FPGA_FAIL;
+       int wrong_parms = 0;
 #if defined (CONFIG_FIT)
        const char *fit_uname = NULL;
        ulong fit_addr;
@@ -229,6 +230,32 @@ int do_fpga (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
                break;
        }
 
+       if (dev == FPGA_INVALID_DEVICE) {
+               puts("FPGA device not specified\n");
+               op = FPGA_NONE;
+       }
+
+       switch (op) {
+       case FPGA_NONE:
+       case FPGA_INFO:
+               break;
+       case FPGA_LOAD:
+       case FPGA_LOADB:
+       case FPGA_DUMP:
+               if (!fpga_data || !data_size)
+                       wrong_parms = 1;
+               break;
+       case FPGA_LOADMK:
+               if (!fpga_data)
+                       wrong_parms = 1;
+               break;
+       }
+
+       if (wrong_parms) {
+               puts("Wrong parameters for FPGA request\n");
+               op = FPGA_NONE;
+       }
+
        switch (op) {
        case FPGA_NONE:
                return cmd_usage(cmdtp);
@@ -342,17 +369,18 @@ static int fpga_get_op (char *opstr)
 }
 
 U_BOOT_CMD (fpga, 6, 1, do_fpga,
-           "loadable FPGA image support",
-           "fpga [operation type] [device number] [image address] [image size]\n"
-           "fpga operations:\n"
-           "\tinfo\tlist known device information\n"
-           "\tload\tLoad device from memory buffer\n"
-           "\tloadb\tLoad device from bitstream buffer (Xilinx devices only)\n"
-           "\tloadmk\tLoad device generated with mkimage\n"
-           "\tdump\tLoad device to memory buffer"
+       "loadable FPGA image support",
+       "[operation type] [device number] [image address] [image size]\n"
+       "fpga operations:\n"
+       "  dump\t[dev]\t\t\tLoad device to memory buffer\n"
+       "  info\t[dev]\t\t\tlist known device information\n"
+       "  load\t[dev] [address] [size]\tLoad device from memory buffer\n"
+       "  loadb\t[dev] [address] [size]\t"
+       "Load device from bitstream buffer (Xilinx only)\n"
+       "  loadmk [dev] [address]\tLoad device generated with mkimage"
 #if defined(CONFIG_FIT)
-           "\n"
-           "\tFor loadmk operating on FIT format uImage address must include\n"
-           "\tsubimage unit name in the form of addr:<subimg_uname>"
+       "\n"
+       "\tFor loadmk operating on FIT format uImage address must include\n"
+       "\tsubimage unit name in the form of addr:<subimg_uname>"
 #endif
 );
index 0a0cfceb45ca6d7e424655dec811a6540355df31..c272b0dd4f7dda1782c2abe8b24cff299e0f99ee 100644 (file)
@@ -1284,7 +1284,7 @@ static cmd_tbl_t cmd_i2c_sub[] = {
        U_BOOT_CMD_MKENT(speed, 1, 1, do_i2c_bus_speed, "", ""),
 };
 
-#ifndef CONFIG_RELOC_FIXUP_WORKS
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
 void i2c_reloc(void) {
        fixup_cmdtable(cmd_i2c_sub, ARRAY_SIZE(cmd_i2c_sub));
 }
index 3d30c321d5bae2a845fa2d00ab3db3ed8d4d3a4c..3fd8abc157f98f4f67326a90ceea5acbe6a77d25 100644 (file)
@@ -837,7 +837,7 @@ static cmd_tbl_t cmd_env_sub[] = {
        U_BOOT_CMD_MKENT(set, CONFIG_SYS_MAXARGS, 0, do_env_set, "", ""),
 };
 
-#if !defined(CONFIG_RELOC_FIXUP_WORKS)
+#if defined(CONFIG_NEEDS_MANUAL_RELOC)
 void env_reloc(void)
 {
        fixup_cmdtable(cmd_env_sub, ARRAY_SIZE(cmd_env_sub));
index 83d967bd18169bab10f4b004ea1fc7d509e1e4f9..33108f1b34a833a789cc26f0d95f62bac7b518a7 100644 (file)
@@ -525,10 +525,19 @@ static cmd_tbl_t cmd_onenand_sub[] = {
        U_BOOT_CMD_MKENT(markbad, CONFIG_SYS_MAXARGS, 0, do_onenand_markbad, "", ""),
 };
 
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
+void onenand_reloc(void) {
+       fixup_cmdtable(cmd_onenand_sub, ARRAY_SIZE(cmd_onenand_sub));
+}
+#endif
+
 static int do_onenand(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
 {
        cmd_tbl_t *c;
 
+       if (argc < 2)
+               return cmd_usage(cmdtp);
+
        mtd = &onenand_mtd;
 
        /* Strip off leading 'onenand' command argument */
index 4bde0599118dd805dcc2cf8c0295f90eebb0847a..ccf5adaaad6b13d8cd77e62ed1ea5d5e46ec5e7d 100644 (file)
@@ -497,6 +497,10 @@ int do_pci (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
                if ((bdf = get_pci_dev(argv[2])) == -1)
                        return 1;
                break;
+#ifdef CONFIG_CMD_PCI_ENUM
+       case 'e':
+               break;
+#endif
        default:                /* scan bus */
                value = 1; /* short listing */
                bdf = 0;   /* bus number  */
@@ -518,6 +522,11 @@ int do_pci (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
                return 0;
        case 'd':               /* display */
                return pci_cfg_display(bdf, addr, size, value);
+#ifdef CONFIG_CMD_PCI_ENUM
+       case 'e':
+               pci_init();
+               return 0;
+#endif
        case 'n':               /* next */
                if (argc < 4)
                        goto usage;
@@ -545,6 +554,10 @@ U_BOOT_CMD(
        "list and access PCI Configuration Space",
        "[bus] [long]\n"
        "    - short or long list of PCI devices on bus 'bus'\n"
+#ifdef CONFIG_CMD_PCI_ENUM
+       "pci enum\n"
+       "    - re-enumerate PCI buses\n"
+#endif
        "pci header b.d.f\n"
        "    - show header of PCI device 'bus.device.function'\n"
        "pci display[.b, .w, .l] b.d.f [address] [# of objects]\n"
index d47d719779fe728eb583c56c959c9704cef20dba..0020eacf5c46fe8d8da0617e4c449df03ad9e757 100644 (file)
@@ -466,7 +466,7 @@ int cmd_get_data_size(char* arg, int default_size)
 }
 #endif
 
-#if !defined(CONFIG_RELOC_FIXUP_WORKS)
+#if defined(CONFIG_NEEDS_MANUAL_RELOC)
 DECLARE_GLOBAL_DATA_PTR;
 
 void fixup_cmdtable(cmd_tbl_t *cmdtp, int size)
index fce7a762b1ed177906f03968c2ca0f4a8dcacbbf..4871f4b0990457a47732abe3c51f3f54a132f2e3 100644 (file)
@@ -1491,7 +1491,7 @@ static mbinptr av_[NAV * 2 + 2] = {
  IAV(120), IAV(121), IAV(122), IAV(123), IAV(124), IAV(125), IAV(126), IAV(127)
 };
 
-#ifndef CONFIG_RELOC_FIXUP_WORKS
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
 void malloc_bin_reloc (void)
 {
        unsigned long *p = (unsigned long *)(&av_[2]);
index 5acda4d49ed66225889aa7e9e409652c9ad03cce..a276efc634717eb4740b4ce5351402eb3c6ee483 100644 (file)
@@ -227,7 +227,7 @@ int env_import(const char *buf, int check)
 
 void env_relocate (void)
 {
-#if !defined(CONFIG_RELOC_FIXUP_WORKS)
+#if defined(CONFIG_NEEDS_MANUAL_RELOC)
        extern void env_reloc(void);
 
        env_reloc();
index 1da78b7102e4c13b3589abb9a18e04d71bd4a927..54c0bfec7624192276886dbfa0c886fc13052a02 100644 (file)
@@ -82,9 +82,6 @@ uchar env_get_char_spec(int index)
        return (*((uchar *)(gd->env_addr + index)));
 }
 
-#undef debug
-#define debug printf
-
 #ifdef CONFIG_ENV_ADDR_REDUND
 
 int  env_init(void)
index fb0c39b3ce8d654ea42a62acb4e8ced6d5af5f32..a597b24dcb35213c00eabedc73481219015bffe8 100644 (file)
@@ -51,7 +51,7 @@ static ulong env_new_offset = CONFIG_ENV_OFFSET_REDUND;
 
 #define ACTIVE_FLAG   1
 #define OBSOLETE_FLAG 0
-#endif /* CONFIG_ENV_ADDR_REDUND */
+#endif /* CONFIG_ENV_OFFSET_REDUND */
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -69,13 +69,6 @@ uchar env_get_char_spec(int index)
 }
 
 #if defined(CONFIG_ENV_OFFSET_REDUND)
-void swap_env(void)
-{
-       ulong tmp_offset = env_offset;
-
-       env_offset = env_new_offset;
-       env_new_offset = tmp_offset;
-}
 
 int saveenv(void)
 {
@@ -89,8 +82,13 @@ int saveenv(void)
        char    flag = OBSOLETE_FLAG, new_flag = ACTIVE_FLAG;
 
        if (!env_flash) {
-               puts("Environment SPI flash not initialized\n");
-               return 1;
+               env_flash = spi_flash_probe(CONFIG_ENV_SPI_BUS,
+                       CONFIG_ENV_SPI_CS,
+                       CONFIG_ENV_SPI_MAX_HZ, CONFIG_ENV_SPI_MODE);
+               if (!env_flash) {
+                       set_default_env("!spi_flash_probe() failed");
+                       return 1;
+               }
        }
 
        res = (char *)&env_new.data;
@@ -102,6 +100,14 @@ int saveenv(void)
        env_new.crc   = crc32(0, env_new.data, ENV_SIZE);
        env_new.flags = ACTIVE_FLAG;
 
+       if (gd->env_valid == 1) {
+               env_new_offset = CONFIG_ENV_OFFSET_REDUND;
+               env_offset = CONFIG_ENV_OFFSET;
+       } else {
+               env_new_offset = CONFIG_ENV_OFFSET;
+               env_offset = CONFIG_ENV_OFFSET_REDUND;
+       }
+
        /* Is the sector larger than the env (i.e. embedded) */
        if (CONFIG_ENV_SECT_SIZE > CONFIG_ENV_SIZE) {
                saved_size = CONFIG_ENV_SECT_SIZE - CONFIG_ENV_SIZE;
@@ -130,27 +136,9 @@ int saveenv(void)
                goto done;
 
        puts("Writing to SPI flash...");
-       ret = spi_flash_write(env_flash,
-               env_new_offset + offsetof(env_t, data),
-               sizeof(env_new.data), env_new.data);
-       if (ret)
-               goto done;
-
-       ret = spi_flash_write(env_flash,
-               env_new_offset + offsetof(env_t, crc),
-               sizeof(env_new.crc), &env_new.crc);
-       if (ret)
-               goto done;
 
-       ret = spi_flash_write(env_flash,
-               env_offset + offsetof(env_t, flags),
-               sizeof(env_new.flags), &flag);
-       if (ret)
-               goto done;
-
-       ret = spi_flash_write(env_flash,
-               env_new_offset + offsetof(env_t, flags),
-               sizeof(env_new.flags), &new_flag);
+       ret = spi_flash_write(env_flash, env_new_offset,
+               CONFIG_ENV_SIZE, &env_new);
        if (ret)
                goto done;
 
@@ -161,11 +149,18 @@ int saveenv(void)
                        goto done;
        }
 
-       swap_env();
+       ret = spi_flash_write(env_flash,
+               env_offset + offsetof(env_t, flags),
+               sizeof(env_new.flags), &flag);
+       if (ret)
+               goto done;
 
-       ret = 0;
        puts("done\n");
 
+       gd->env_valid = (gd->env_valid == 2 ? 1 : 2);
+
+       printf("Valid environment: %d\n", gd->env_valid);
+
  done:
        if (saved_buffer)
                free(saved_buffer);
@@ -178,7 +173,7 @@ void env_relocate_spec(void)
        int crc1_ok = 0, crc2_ok = 0;
        env_t *tmp_env1 = NULL;
        env_t *tmp_env2 = NULL;
-       env_t ep;
+       env_t *ep = NULL;
        uchar flag1, flag2;
        /* current_env is set only in case both areas are valid! */
        int current_env = 0;
@@ -219,90 +214,57 @@ void env_relocate_spec(void)
                flag2 = tmp_env2->flags;
        }
 
-       if (!crc1_ok && !crc2_ok)
-               goto err_crc;
-       else if (crc1_ok && !crc2_ok) {
+       if (!crc1_ok && !crc2_ok) {
+               free(tmp_env1);
+               free(tmp_env2);
+               set_default_env("!bad CRC");
+               return;
+       } else if (crc1_ok && !crc2_ok) {
                gd->env_valid = 1;
                ep = tmp_env1;
        } else if (!crc1_ok && crc2_ok) {
                gd->env_valid = 1;
-               ep = tmp_env2;
-               swap_env();
        } else if (flag1 == ACTIVE_FLAG && flag2 == OBSOLETE_FLAG) {
                gd->env_valid = 1;
-               ep = tmp_env1;
        } else if (flag1 == OBSOLETE_FLAG && flag2 == ACTIVE_FLAG) {
-               gd->env_valid = 1;
-               ep = tmp_env2;
-               swap_env();
+               gd->env_valid = 2;
        } else if (flag1 == flag2) {
                gd->env_valid = 2;
-               ep = tmp_env1;
-               current_env = 1;
        } else if (flag1 == 0xFF) {
                gd->env_valid = 2;
-               ep = tmp_env1;
-               current_env = 1;
        } else {
                /*
                 * this differs from code in env_flash.c, but I think a sane
                 * default path is desirable.
                 */
                gd->env_valid = 2;
-               ep = tmp_env2;
-               swap_env();
-               current_env = 2;
        }
 
-       rc = env_import((char *)ep, 0);
-       if (!rc) {
-               error("Cannot import environment: errno = %d\n", errno);
-               goto out;
-       }
+       free(env_ptr);
 
-       if (current_env == 1) {
-               if (flag2 != OBSOLETE_FLAG) {
-                       flag2 = OBSOLETE_FLAG;
-                       spi_flash_write(env_flash,
-                               env_new_offset + offsetof(env_t, flags),
-                               sizeof(env_new.flags), &flag2);
-               }
-               if (flag1 != ACTIVE_FLAG) {
-                       flag1 = ACTIVE_FLAG;
-                       spi_flash_write(env_flash,
-                               env_offset + offsetof(env_t, flags),
-                               sizeof(env_new.flags), &flag1);
-               }
-       } else if (current_env == 2) {
-               if (flag1 != OBSOLETE_FLAG) {
-                       flag1 = OBSOLETE_FLAG;
-                       spi_flash_write(env_flash,
-                               env_new_offset + offsetof(env_t, flags),
-                               sizeof(env_new.flags), &flag1);
-               }
-               if (flag2 != ACTIVE_FLAG) {
-                       flag2 = ACTIVE_FLAG;
-                       spi_flash_write(env_flash,
-                               env_offset + offsetof(env_t, flags),
-                               sizeof(env_new.flags), &flag2);
-               }
-       }
-       if (gd->env_valid == 2) {
-               puts("*** Warning - some problems detected "
-                       "reading environment; recovered successfully\n\n");
+       if (gd->env_valid == 1)
+               ep = tmp_env1;
+       else
+               ep = tmp_env2;
+
+       ret = env_import((char *)ep, 0);
+       if (!ret) {
+               error("Cannot import environment: errno = %d\n", errno);
+               set_default_env("env_import failed");
        }
-       if (tmp_env1)
-               free(tmp_env1);
-       if (tmp_env2)
-               free(tmp_env2);
-       return;
 
 err_read:
        spi_flash_free(env_flash);
        env_flash = NULL;
 out:
+       if (tmp_env1)
+               free(tmp_env1);
+       if (tmp_env2)
+               free(tmp_env2);
        free(tmp_env1);
        free(tmp_env2);
+
+       return;
 }
 #else
 int saveenv(void)
@@ -311,10 +273,18 @@ int saveenv(void)
        char *saved_buffer = NULL;
        u32 sector = 1;
        int ret;
+       env_t   env_new;
+       char    *res;
+       ssize_t len;
 
        if (!env_flash) {
-               puts("Environment SPI flash not initialized\n");
-               return 1;
+               env_flash = spi_flash_probe(CONFIG_ENV_SPI_BUS,
+                       CONFIG_ENV_SPI_CS,
+                       CONFIG_ENV_SPI_MAX_HZ, CONFIG_ENV_SPI_MODE);
+               if (!env_flash) {
+                       set_default_env("!spi_flash_probe() failed");
+                       return 1;
+               }
        }
 
        /* Is the sector larger than the env (i.e. embedded) */
@@ -326,7 +296,8 @@ int saveenv(void)
                        ret = 1;
                        goto done;
                }
-               ret = spi_flash_read(env_flash, saved_offset, saved_size, saved_buffer);
+               ret = spi_flash_read(env_flash, saved_offset,
+                       saved_size, saved_buffer);
                if (ret)
                        goto done;
        }
@@ -337,18 +308,29 @@ int saveenv(void)
                        sector++;
        }
 
+       res = (char *)&env_new.data;
+       len = hexport('\0', &res, ENV_SIZE);
+       if (len < 0) {
+               error("Cannot export environment: errno = %d\n", errno);
+               goto done;
+       }
+       env_new.crc = crc32(0, env_new.data, ENV_SIZE);
+
        puts("Erasing SPI flash...");
-       ret = spi_flash_erase(env_flash, CONFIG_ENV_OFFSET, sector * CONFIG_ENV_SECT_SIZE);
+       ret = spi_flash_erase(env_flash, CONFIG_ENV_OFFSET,
+               sector * CONFIG_ENV_SECT_SIZE);
        if (ret)
                goto done;
 
        puts("Writing to SPI flash...");
-       ret = spi_flash_write(env_flash, CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, env_ptr);
+       ret = spi_flash_write(env_flash, CONFIG_ENV_OFFSET,
+               CONFIG_ENV_SIZE, &env_new);
        if (ret)
                goto done;
 
        if (CONFIG_ENV_SECT_SIZE > CONFIG_ENV_SIZE) {
-               ret = spi_flash_write(env_flash, saved_offset, saved_size, saved_buffer);
+               ret = spi_flash_write(env_flash, saved_offset,
+                       saved_size, saved_buffer);
                if (ret)
                        goto done;
        }
index 90e909795b04d77bcdbbf181d5b3944551f5d635..5829afd2ad045ee830341a0b2d4f5c2d3bbe370e 100644 (file)
@@ -396,7 +396,6 @@ int fdt_fixup_memory_banks(void *blob, u64 start[], u64 size[], int banks)
        int addr_cell_len, size_cell_len, len;
        u8 tmp[banks * 8];
        int bank;
-       const u32 *addrcell, *sizecell;
 
        err = fdt_check_header(blob);
        if (err < 0) {
index 4dd9513b0365475d06c6ee8d98cf8a3e77332f79..2188fd4ac8dd23b57f719c48d95918751cf5fa2f 100644 (file)
@@ -3268,7 +3268,7 @@ int parse_file_outer(void)
 }
 
 #ifdef __U_BOOT__
-#ifndef CONFIG_RELOC_FIXUP_WORKS
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
 static void u_boot_hush_reloc(void)
 {
        unsigned long addr;
@@ -3290,7 +3290,7 @@ int u_boot_hush_start(void)
                top_vars->next = 0;
                top_vars->flg_export = 0;
                top_vars->flg_read_only = 1;
-#ifndef CONFIG_RELOC_FIXUP_WORKS
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
                u_boot_hush_reloc();
 #endif
        }
index 1f9f4a09b4b5a2293c995a9ef4a714b7a60099d0..3c9759fc557547fa8a2f0bc16fa87658fa166e23 100644 (file)
@@ -26,6 +26,8 @@
 #define min(a, b) (((a) < (b)) ? (a) : (b))
 #endif /* HWCONFIG_TEST */
 
+DECLARE_GLOBAL_DATA_PTR;
+
 static const char *hwconfig_parse(const char *opts, size_t maxlen,
                                  const char *opt, char *stopchs, char eqch,
                                  size_t *arglen)
@@ -69,9 +71,26 @@ next:
 const char *cpu_hwconfig __attribute__((weak));
 const char *board_hwconfig __attribute__((weak));
 
+#define HWCONFIG_PRE_RELOC_BUF_SIZE    128
+
 static const char *__hwconfig(const char *opt, size_t *arglen)
 {
-       const char *env_hwconfig = getenv("hwconfig");
+       const char *env_hwconfig = NULL;
+       char buf[HWCONFIG_PRE_RELOC_BUF_SIZE];
+
+       if (gd->flags & GD_FLG_ENV_READY) {
+               env_hwconfig = getenv("hwconfig");
+       } else {
+               /*
+                * Use our own on stack based buffer before relocation to allow
+                * accessing longer hwconfig strings that might be in the
+                * environment before we've relocated.  This is pretty fragile
+                * on both the use of stack and if the buffer is big enough.
+                * However we will get a warning from getenv_f for the later.
+                */
+               if ((getenv_f("hwconfig", buf, sizeof(buf))) > 0)
+                       env_hwconfig = buf;
+       }
 
        if (env_hwconfig)
                return hwconfig_parse(env_hwconfig, strlen(env_hwconfig),
index 385464d3eb0d6a79e37172c984119ff6d8421c5e..42f5b79cf2e6791f7966de3947c3cd4a6fce8ac7 100644 (file)
@@ -520,7 +520,7 @@ char *get_table_entry_name (table_entry_t *table, char *msg, int id)
 {
        for (; table->id >= 0; ++table) {
                if (table->id == id)
-#if defined(USE_HOSTCC) || defined(CONFIG_RELOC_FIXUP_WORKS)
+#if defined(USE_HOSTCC) || !defined(CONFIG_NEEDS_MANUAL_RELOC)
                        return table->lname;
 #else
                        return table->lname + gd->reloc_off;
@@ -585,10 +585,10 @@ int get_table_entry_id (table_entry_t *table,
        fprintf (stderr, "\n");
 #else
        for (t = table; t->id >= 0; ++t) {
-#ifdef CONFIG_RELOC_FIXUP_WORKS
-               if (t->sname && strcmp(t->sname, name) == 0)
-#else
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
                if (t->sname && strcmp(t->sname + gd->reloc_off, name) == 0)
+#else
+               if (t->sname && strcmp(t->sname, name) == 0)
 #endif
                        return (t->id);
        }
@@ -1176,8 +1176,10 @@ static int fit_check_fdt (const void *fit, int fdt_noffset, int verify)
  * @of_flat_tree: pointer to a char* variable, will hold fdt start address
  * @of_size: pointer to a ulong variable, will hold fdt length
  *
- * boot_relocate_fdt() determines if the of_flat_tree address is within
- * the bootmap and if not relocates it into that region
+ * boot_relocate_fdt() allocates a region of memory within the bootmap and
+ * relocates the of_flat_tree into that region, even if the fdt is already in
+ * the bootmap.  It also expands the size of the fdt by CONFIG_SYS_FDT_PAD
+ * bytes.
  *
  * of_flat_tree and of_size are set to final (after relocation) values
  *
@@ -1189,9 +1191,10 @@ static int fit_check_fdt (const void *fit, int fdt_noffset, int verify)
 int boot_relocate_fdt (struct lmb *lmb, ulong bootmap_base,
                char **of_flat_tree, ulong *of_size)
 {
-       char    *fdt_blob = *of_flat_tree;
-       ulong   relocate = 0;
+       void    *fdt_blob = *of_flat_tree;
+       void    *of_start = 0;
        ulong   of_len = 0;
+       int     err;
 
        /* nothing to do */
        if (*of_size == 0)
@@ -1202,62 +1205,32 @@ int boot_relocate_fdt (struct lmb *lmb, ulong bootmap_base,
                goto error;
        }
 
-#ifndef CONFIG_SYS_NO_FLASH
-       /* move the blob if it is in flash (set relocate) */
-       if (addr2info ((ulong)fdt_blob) != NULL)
-               relocate = 1;
-#endif
-
-       /*
-        * The blob needs to be inside the boot mapping.
-        */
-       if (fdt_blob < (char *)bootmap_base)
-               relocate = 1;
-
-       if ((fdt_blob + *of_size + CONFIG_SYS_FDT_PAD) >=
-                       ((char *)CONFIG_SYS_BOOTMAPSZ + bootmap_base))
-               relocate = 1;
-
-       /* move flattend device tree if needed */
-       if (relocate) {
-               int err;
-               ulong of_start = 0;
-
-               /* position on a 4K boundary before the alloc_current */
-               /* Pad the FDT by a specified amount */
-               of_len = *of_size + CONFIG_SYS_FDT_PAD;
-               of_start = (unsigned long)lmb_alloc_base(lmb, of_len, 0x1000,
-                               (CONFIG_SYS_BOOTMAPSZ + bootmap_base));
-
-               if (of_start == 0) {
-                       puts("device tree - allocation error\n");
-                       goto error;
-               }
-
-               debug ("## device tree at 0x%08lX ... 0x%08lX (len=%ld=0x%lX)\n",
-                       (ulong)fdt_blob, (ulong)fdt_blob + *of_size - 1,
-                       of_len, of_len);
+       /* position on a 4K boundary before the alloc_current */
+       /* Pad the FDT by a specified amount */
+       of_len = *of_size + CONFIG_SYS_FDT_PAD;
+       of_start = (void *)(unsigned long)lmb_alloc_base(lmb, of_len, 0x1000,
+                       (CONFIG_SYS_BOOTMAPSZ + bootmap_base));
 
-               printf ("   Loading Device Tree to %08lx, end %08lx ... ",
-                       of_start, of_start + of_len - 1);
+       if (of_start == 0) {
+               puts("device tree - allocation error\n");
+               goto error;
+       }
 
-               err = fdt_open_into (fdt_blob, (void *)of_start, of_len);
-               if (err != 0) {
-                       fdt_error ("fdt move failed");
-                       goto error;
-               }
-               puts ("OK\n");
+       debug ("## device tree at %p ... %p (len=%ld [0x%lX])\n",
+               fdt_blob, fdt_blob + *of_size - 1, of_len, of_len);
 
-               *of_flat_tree = (char *)of_start;
-               *of_size = of_len;
-       } else {
-               *of_flat_tree = fdt_blob;
-               of_len = *of_size + CONFIG_SYS_FDT_PAD;
-               lmb_reserve(lmb, (ulong)fdt_blob, of_len);
-               fdt_set_totalsize(*of_flat_tree, of_len);
+       printf ("   Loading Device Tree to %p, end %p ... ",
+               of_start, of_start + of_len - 1);
 
-               *of_size = of_len;
+       err = fdt_open_into (fdt_blob, of_start, of_len);
+       if (err != 0) {
+               fdt_error ("fdt move failed");
+               goto error;
        }
+       puts ("OK\n");
+
+       *of_flat_tree = of_start;
+       *of_size = of_len;
 
        set_working_fdt_addr(*of_flat_tree);
        return 0;
index 7bebc12a66d0c077aecd78cbf960c0f507f205a9..051ae4e1d22d2880446dd9e87e69df501b6a8fa1 100644 (file)
@@ -30,7 +30,7 @@ DECLARE_GLOBAL_DATA_PTR;
 static struct serial_device *serial_devices = NULL;
 static struct serial_device *serial_current = NULL;
 
-#if !defined(CONFIG_LWMON) && !defined(CONFIG_PXA27X)
+#if !defined(CONFIG_LWMON) && !defined(CONFIG_PXA250) && !defined(CONFIG_PXA27X)
 struct serial_device *__default_serial_console (void)
 {
 #if defined(CONFIG_8xx_CONS_SMC1) || defined(CONFIG_8xx_CONS_SMC2)
@@ -99,7 +99,7 @@ struct serial_device *default_serial_console(void) __attribute__((weak, alias("_
 
 int serial_register (struct serial_device *dev)
 {
-#ifndef CONFIG_RELOC_FIXUP_WORKS
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
        dev->init += gd->reloc_off;
        dev->setbrg += gd->reloc_off;
        dev->getc += gd->reloc_off;
index 25013693f7db72e2f88e70dc20a732faf7a0c182..ab7c5abde1bbe3c0eb4048b07c7b390ef47adaec 100644 (file)
@@ -193,7 +193,7 @@ int stdio_deregister(char *devname)
 
 int stdio_init (void)
 {
-#if !defined(CONFIG_RELOC_FIXUP_WORKS)
+#if defined(CONFIG_NEEDS_MANUAL_RELOC)
        /* already relocated for current ARM implementation */
        ulong relocation_offset = gd->reloc_off;
        int i;
@@ -203,7 +203,7 @@ int stdio_init (void)
                stdio_names[i] = (char *) (((ulong) stdio_names[i]) +
                                                relocation_offset);
        }
-#endif /* !CONFIG_RELOC_FIXUP_WORKS */
+#endif /* CONFIG_NEEDS_MANUAL_RELOC */
 
        /* Initialize the list */
        INIT_LIST_HEAD(&(devs.list));
index 613c4f0f1f7e79a653ad6267a8341e7c30207f80..1e6cd6af27491467870ad76cc61d7c631a8a277f 100644 (file)
@@ -70,7 +70,7 @@
 /* direction table -- this indicates the direction of the data
  * transfer for each command code -- a 1 indicates input
  */
-unsigned char us_direction[256/8] = {
+static const unsigned char us_direction[256/8] = {
        0x28, 0x81, 0x14, 0x14, 0x20, 0x01, 0x90, 0x77,
        0x0C, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01,
index 2b63db6c75f00f1b951f9bbf28dcbaab72929f82..13723f23b3113c74fa7b2590de65bf0d7d3c5a6b 100644 (file)
@@ -81,13 +81,13 @@ block_dev_desc_t *get_dev(char* ifname, int dev)
        char *name;
 
        name = drvr->name;
-#ifndef CONFIG_RELOC_FIXUP_WORKS
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
        name += gd->reloc_off;
 #endif
        while (name) {
                name = drvr->name;
                reloc_get_dev = drvr->get_dev;
-#ifndef CONFIG_RELOC_FIXUP_WORKS
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
                name += gd->reloc_off;
                reloc_get_dev += gd->reloc_off;
 #endif
index 521746e12912f56b8625ab4b6d3450bc8971d4d8..19977ea7e0d1aba27e961a82d090f3ba533698fe 100644 (file)
@@ -14,7 +14,6 @@ This function should control the state of the LED display. Argument is
 an ORed combination of the following values:
  DISPLAY_CLEAR -- clear the display
  DISPLAY_HOME  -- set the position to the beginning of display
- DISPLAY_MARK  -- enable mark (decimal point), if implemented
 
 int display_putc(char c);
 
index eeb218d39c64c064cd69143a848676074f3b9404..6815d491cf4fbcaf790c332722257a279564e54e 100644 (file)
@@ -659,12 +659,19 @@ not need any modifications for porting them to another board/CPU.
 2.2.2.1. I2C test
 
 For verifying the I2C bus, a full I2C bus scanning will be performed
-using the i2c_probe() routine. If any I2C device is found, the test
-will be considered as passed, otherwise failed. This particular way
-will be used because it provides the most common method of testing.
-For example, using the internal loopback mode of the CPM I2C
-controller for testing would not work on boards where the software
-I2C driver (also known as bit-banged driver) is used.
+using the i2c_probe() routine. If a board defines
+CONFIG_SYS_POST_I2C_ADDRS the I2C test will pass if all devices
+listed in CONFIG_SYS_POST_I2C_ADDRS are found, and no additional
+devices are detected.  If CONFIG_SYS_POST_I2C_ADDRS is not defined
+the test will pass if any I2C device is found.
+
+The CONFIG_SYS_POST_I2C_IGNORES define can be used to list I2C
+devices which may or may not be present when using
+CONFIG_SYS_POST_I2C_ADDRS.  The I2C POST test will pass regardless
+if the devices in CONFIG_SYS_POST_I2C_IGNORES are found or not.
+This is useful in cases when I2C devices are optional (eg on a
+daughtercard that may or may not be present) or not critical
+to board operation.
 
 2.2.2.2. Watchdog timer test
 
index 4ab3c7c0bd6be1feed94285534c750e02d48c542..c0957c210ceca37efd1c9c236768df57b8456c6e 100644 (file)
@@ -1,49 +1,46 @@
 To make relocation on arm working, the following changes are done:
 
-Add new compilerflag:
+At arch level: add linker flag -pie
 
--fPIC
+       This causes the linker to generate fixup tables .rel.dyn and .dynsym,
+       which must be applied to the relocated image before transferring
+       control to it.
 
-       -> compiler generates position independent code
+       These fixups are described in the ARM ELF documentation as type 23
+       (program-base-relative) and 2 (symbol-relative)
 
-changes in board code:
+At cpu level: modify linker file and add a relocation and fixup loop
 
-- dram_init:
-  - bd pointer is now at this point not accessible, so only
-    detect the real dramsize, and store it in gd->ram_size.
-    best detected with get_ram_size();
-    ToDo: move there also the dram initialization on boards where
-          it is possible.
-  - setup the bd_t dram bank info in the new function
-    dram_init_banksize().
+       the linker file must be modified to include the .rel.dyn and .dynsym
+       tables in the binary image, and to provide symbols for the relocation
+       code to access these tables
 
-- board.c code is adapted from ppc code
+       The relocation and fixup loop must be executed after executing
+       board_init_f at initial location and before executing board_init_r
+       at final location.
 
-- undef CONFIG_RELOC_FIXUP_WORKS
+At board level:
 
-  -> cmdtabl, and subcommand table must be handled from "hand"
-     collected in section "__datarellocal_start".
+       dram_init(): bd pointer is now at this point not accessible, so only
+       detect the real dramsize, and store it in gd->ram_size. Bst detected
+       with get_ram_size().
 
-  - How To fixup the sections:
+TODO:  move also dram initialization there on boards where it is possible.
 
-    __datarel_start, __datarelrolocal_start, __datarellocal_start and
-    __datarelro_start
+       Setup of the the bd_t dram bank info is done in the new function
+       dram_init_banksize() called after bd is accessible.
 
-    automatically? Then it should be possible to define again
-    CONFIG_RELOC_FIXUP_WORKS
+At lib level:
 
-- irq stack setup is now not longer on a fix position, instead it is
-  calculated in board_init_f, and stored in gd->irq_sp
+       Board.c code is adapted from ppc code
 
--------------------------------------------------------------------------------------
+* WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING *
 
-To compile a board without relocation, define CONFIG_SYS_ARM_WITHOUT_RELOC
-This possibility will removed!! So please fix your board to compile without
-CONFIG_SYS_ARM_WITHOUT_RELOC defined!!!
+Boards which are not fixed to support relocation will be REMOVED!
 
--------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------
 
-For boards which boot from nand_spl, it is possible to save a copy
+For boards which boot from nand_spl, it is possible to save one copy
 if CONFIG_SYS_TEXT_BASE == relocation address! This prevents that uboot code
 is copied again in relocate_code().
 
@@ -64,9 +61,9 @@ f) u-boot code steps through board_init_f() and calculates
 If CONFIG_SYS_TEXT_BASE == relocation address, the copying of u-boot
 in f) could be saved.
 
--------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------
 
-ToDo:
+TODO
 
 - fill in bd_t infos (check)
 - adapt all boards
@@ -80,7 +77,7 @@ ToDo:
 - new function dram_init_banksize() is actual board specific. Maybe
   we make a weak default function in arch/arm/lib/board.c ?
 
--------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------
 
 Relocation with NAND_SPL (example for the tx25):
 
@@ -88,168 +85,21 @@ Relocation with NAND_SPL (example for the tx25):
   and start with code execution on this address.
 
 - The First page contains u-boot code from u-boot:nand_spl/nand_boot_fsl_nfc.c
-  which inits the dram, cpu registers, reloacte itself to CONFIG_SYS_TEXT_BASE  and loads
+  which inits the dram, cpu registers, reloacte itself to CONFIG_SYS_TEXT_BASE and loads
   the "real" u-boot to CONFIG_SYS_NAND_U_BOOT_DST and starts execution
   @CONFIG_SYS_NAND_U_BOOT_START
 
-- This u-boot does no ram int, nor cpu register setup. Just looks
-  where it have to relocate and relocate itself to this address.
-  If relocate address = CONFIG_SYS_TEXT_BASE(not the same, as the TEXT_BASE
-  from the nand_spl code), no need to copy, just go on with bss clear
-  and jump to board_init_r.
-
--------------------------------------------------------------------------------------
-
-Relocation:
-How to translate flash addresses in GOT to ram addresses.
-This is automagically done from code, but this example
-shows, how this magic code works ;-)
-(example on the qong board)
-
-Find a variable:
-
-a) search it in System.map
-(for example flash_info)
-
-a005b4c0 B BootpID
-a005b4c4 B BootpTry
-a005b4c8 b slave
-a005b4cc B flash_info
-^^^^^^^^
-a005c908 b saved_sector.4002
-a005c910 b cfi_mtd_info
-a005c9c0 b cfi_mtd_names
-a005c9d0 B mtd_table
-
----------------------------------------
-
-b) create hexdump from u-boot code:
-
-hexdump -C u-boot > gnlmpfhex
-
----------------------------------------
-
-c) search the variables address in the hexdump
-
-
-*
-0005fc80  00 00 00 00 00 00 00 00  2c 06 01 a0 18 cd 05 a0  |........,.......|
-0005fc90  9c d4 05 a0 bc b4 05 a0  1c 7f 05 a0 f0 05 01 a0  |................|
-0005fca0  08 5a 04 a0 1c ab 05 a0  ec a4 05 a0 98 c3 01 a0  |.Z..............|
-0005fcb0  a0 d6 05 a0 04 71 05 a0  c0 f9 00 a0 3c cd 05 a0  |.....q......<...|
-0005fcc0  cc b4 05 a0 f0 fa 00 a0  f0 d6 05 a0 10 86 05 a0  |................|
-          ^^^^^^^^^^^
-0005fcd0  a4 16 06 a0 dc 64 05 a0  18 86 05 a0 52 48 05 a0  |.....d......RH..|
-0005fce0  c0 86 05 a0 24 6e 02 a0  b4 6c 05 a0 b0 94 01 a0  |....$n...l......|
-0005fcf0  1c 86 05 a0 50 85 05 a0  d4 0c 06 a0 bc 0b 06 a0  |....P...........|
-
-
--> 0005fcc0
-
-----------------------------------------
-
-d) know we calculate this address in RAM
-
-
-  8ff08000     (new address of code in RAM *1)
-
-+ 0005fcc0
-
-- 00008000     (offset of text *2)
-
-----------
-
-  8ff5fcc0     -> Addr GOT in RAM
-
-*1:
-activate debug and look for the line:
-Now running in RAM - U-Boot at: 8ff08000
-                                ^^^^^^^^
-                                new address of u-boot code in RAM
-
-*2:
-Section Headers:
-  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
-  [ 0]                   NULL            00000000 000000 000000 00      0   0  0
-  [ 1] .text             PROGBITS        a0000000 008000 04599c 00  AX  0   0 32
-                                                  ^^^^^^
-                                                  Offset of text
-
-----------------------------------------
+- This u-boot does no RAM init, nor CPU register setup. Just look
+  where it has to copy and relocate itself to this address. If
+  relocate address = CONFIG_SYS_TEXT_BASE (not the same, as the
+  CONFIG_SYS_TEXT_BASE from the nand_spl code), then there is no need
+  to copy, just go on with bss clear and jump to board_init_r.
 
-e) now we look in 8ff5fcc0 (RAM)
+-----------------------------------------------------------------------------
 
+How ELF relocations 23 and 2 work.
 
-QongEVB>md 0x8ff5fcc0
-8ff5fcc0 : a005b4cc a000faf0 a005d6f0 a0058610  ................
-           ^^^^^^^^
-           Bingo, here we have the old flash address (when relocation
-           is working, here is the fixed ram address. see @ f, how
-           it gets calculated)
-
-
-----------------------------------------
-
-f) now translate it in the new RAM address
-
-  a005b4cc
-
-- a0000000     TextBase
-
-+ 8ff08000     new address of u-boot in ram
-----------
-  8ff634cc
-
-QongEVB>mm 0x8ff5fcc0 0x8ff634cc 1
-QongEVB>md 0x8ff5fcc0
-8ff5fcc0 : 8ff634cc a000faf0 a005d6f0 a0058610  .4..............
-8ff5fcd0 : a00616a4 a00564dc a0058618 a0054852  .....d......RH..
-
-As this must be done for all address in the GOT, the u-boot
-code did this automagically ... :-)
-
-----------------------------------------------
-
-g) check if the new address is really in the bss section:
-
-bss start:
-8ff6054c       (8ff08000 + 0005854C monitorlen)
-
-bss end:
-8ff698ac       (8ff08000 + 618AC)
-
-8ff634cc is in bss :-)
-
-----------------------------------------------
-
-h) u-boot prints:
-
-important  addresses:
-
-U-Boot code: A0000000 -> A005854C  BSS: -> A00618AC    TextBase 0xa0000000
-Now running in RAM - U-Boot at: 8ff08000               relocBase 0x8ff08000
-
-
----------
-
-U-Boot 2010.06-rc2-00002-gf8fbb25-dirty (Jun 18 2010 - 17:07:19)
-
-U-Boot code: A0000000 -> A005854C  BSS: -> A00618AC
-CPU:   Freescale i.MX31 at 398 MHz
-Board: DAVE/DENX Qong
-mon: FFFFFFFF gd->monLen: 000618AC
-Top of RAM usable for U-Boot at: 90000000
-LCD panel info: 640 x 480, 16 bit/pix
-Reserving 600k for LCD Framebuffer at: 8ff6a000
-Reserving 390k for U-Boot at: 8ff08000
-Reserving 1280k for malloc() at: 8fdc8000
-Reserving 28 Bytes for Board Info at: 8fdc7fe4
-Reserving 48 Bytes for Global Data at: 8fdc7fb4
-New Stack Pointer is: 8fdc7fb0
-RAM Configuration:
-Bank #0: 80000000 256 MiB
-mon: 0005854C gd->monLen: 000618AC
-Now running in RAM - U-Boot at: 8ff08000
+TBC
 
 -------------------------------------------------------------------------------------
 
@@ -304,7 +154,7 @@ e) load new symbol table:
 
 (gdb) add-symbol-file u-boot 0x8ff08000
 add symbol table from file "u-boot" at
-        .text_addr = 0x8ff08000
+       .text_addr = 0x8ff08000
 (y or n) y
 Reading symbols from /home/hs/celf/u-boot/u-boot...done.
 (gdb) c
@@ -312,12 +162,12 @@ Continuing.
 ^C
 Program received signal SIGSTOP, Stopped (signal).
 0x8ff17f18 in serial_getc () at serial_mxc.c:192
-192             while (__REG(UART_PHYS + UTS) & UTS_RXEMPTY);
+192            while (__REG(UART_PHYS + UTS) & UTS_RXEMPTY);
 (gdb)
 
 add-symbol-file u-boot 0x8ff08000
-                       ^^^^^^^^^^
-                       get this address from u-boot debug printfs
+                      ^^^^^^^^^^
+                      get this address from u-boot debug printfs
 
 U-Boot 2010.06-rc2-00009-gf77b8b8-dirty (Jun 22 2010 - 09:43:46)
 
@@ -329,7 +179,7 @@ Top of RAM usable for U-Boot at: 90000000
 LCD panel info: 640 x 480, 16 bit/pix
 Reserving 600k for LCD Framebuffer at: 8ff6a000
 Reserving 391k for U-Boot at: 8ff08000
-                              ^^^^^^^^
+                             ^^^^^^^^
 Reserving 1280k for malloc() at: 8fdc8000
 Reserving 24 Bytes for Board Info at: 8fdc7fe8
 Reserving 52 Bytes for Global Data at: 8fdc7fb4
@@ -339,6 +189,6 @@ Bank #0: 80000000 256 MiB
 relocation Offset is: eff08000
 mon: 00058BAC gd->monLen: 00061F10
 Now running in RAM - U-Boot at: 8ff08000
-                                ^^^^^^^^
+                               ^^^^^^^^
 
 Now you can use gdb as usual :-)
index e108a0d50c94ad8867d3287859982a05f12cdac0..1657ef61702679919301536eab515d22089c9e1d 100644 (file)
@@ -78,6 +78,20 @@ If the DDR controller supports address hashing, it can be enabled by hwconfig.
 Syntax is:
 hwconfig=fsl_ddr:addr_hash=true
 
+
+Memory testing options for mpc85xx
+==================================
+1. Memory test can be done once U-boot prompt comes up using mtest, or
+2. Memory test can be done with Power-On-Self-Test function, activated at
+   compile time.
+
+   In order to enable the POST memory test, CONFIG_POST needs to be
+   defined in board configuraiton header file. By default, POST memory test
+   performs a fast test. A slow test can be enabled by changing the flag at
+   compiling time. To test memory bigger than 2GB, 36BIT support is needed.
+   Memory is tested within a 2GB window. TLBs are used to map the virtual 2GB
+   window to physical address so that all physical memory can be tested.
+
 Combination of hwconfig
 =======================
 Hwconfig can be combined with multiple parameters, for example, on a supported
diff --git a/doc/README.scrapyard b/doc/README.scrapyard
new file mode 100644 (file)
index 0000000..4286559
--- /dev/null
@@ -0,0 +1,30 @@
+Over time, support for more and more boards gets added to U-Boot -
+while other board support code dies a silent death caused by
+negligence in combination with ordinary bitrot.  Sometimes this goes
+by unnoticed, but often build errors will result.  If nobody cares any
+more to resolve such problems, then the code is really dead and will
+be removed from the U-Boot source tree.  The remainders rest in piece
+in the imperishable depths of the git history.  This document tries to
+maintain a list of such former fellows, so archeologists can check
+easily if here is something they might want to dig for...
+
+
+Board  Arch    CPU     removed     Commit      last known maintainer/contact
+=============================================================================
+VoVPN-GW_100MHz        powerpc MPC8260 - 2010-10-24    Juergen Selent <j.selent@elmeg.de>
+NC650  powerpc MPC852  333d86d   2010-10-19    Wolfgang Denk <wd@denx.de>
+CP850  powerpc MPC852  333d86d   2010-10-19    Wolfgang Denk <wd@denx.de>
+logodl ARM     PXA2xx  059e778   2010-10-18    August Hoeraendl <august.hoerandl@gmx.at>
+CCM    powerpc MPC860  dff07e1   2010-10-06    Wolfgang Grandegger <wg@denx.de>
+PCU_E  powerpc MPC860T 544d97e   2010-10-06    Wolfgang Denk <wd@denx.de>
+spieval        powerpc MPC5200 69434e4   2010-09-19
+smmaco4        powerpc MPC5200 9ddc3af   2010-09-19
+HMI10  powerpc MPC823  77efe35   2010-09-19    Wolfgang Denk <wd@denx.de>
+GTH    powerpc MPC860  0fe247b   2010-07-17    Thomas Lange <thomas@corelatus.se>
+AmigaOneG3SE           953b7e6   2010-06-23
+suzaku microblaze      4f18060   2009-10-03    Yasushi Shoji <yashi@atmark-techno.com>
+XUPV2P microblaze      8fab49e   2008-12-10    Michal Simek <monstr@monstr.eu>
+MVS1   powerpc MPC823  306620b   2008-08-26    Andre Schwarz <andre.schwarz@matrix-vision.de>
+adsvix ARM     PXA27x  7610db1   2008-07-30    Adrian Filipi <adrian.filipi@eurotech.com>
+R5200  ColdFire        48ead7a   2008-03-31    Zachary P. Landau <zachary.landau@labxtechnologies.com>
+CPCI440        powerpc 440GP   b568fd2   2007-12-27    Matthias Fuchs <matthias.fuchs@esd-electronics.com>
diff --git a/doc/README.ubi b/doc/README.ubi
new file mode 100644 (file)
index 0000000..da2dfac
--- /dev/null
@@ -0,0 +1,144 @@
+-------------------
+UBI usage in U-Boot
+-------------------
+
+Here the list of the currently implemented UBI commands:
+
+=> help ubi
+ubi - ubi commands
+
+Usage:
+ubi part [part] [offset]
+ - Show or set current partition (with optional VID header offset)
+ubi info [l[ayout]] - Display volume and ubi layout information
+ubi create[vol] volume [size] [type] - create volume name with size
+ubi write[vol] address volume size - Write volume from address with size
+ubi read[vol] address volume [size] - Read volume to address with size
+ubi remove[vol] volume - Remove volume
+[Legends]
+ volume: character name
+ size: specified in bytes
+ type: s[tatic] or d[ynamic] (default=dynamic)
+
+
+The first command that is needed to be issues is "ubi part" to connect
+one mtd partition to the UBI subsystem. This command will either create
+a new UBI device on the requested MTD partition. Or it will attach a
+previously created UBI device. The other UBI commands will only work
+when such a UBI device is attached (via "ubi part"). Here an example:
+
+=> mtdparts
+
+device nor0 <1fc000000.nor_flash>, # parts = 6
+ #: name                size            offset          mask_flags
+ 0: kernel              0x00200000      0x00000000      0
+ 1: dtb                 0x00040000      0x00200000      0
+ 2: root                0x00200000      0x00240000      0
+ 3: user                0x01ac0000      0x00440000      0
+ 4: env                 0x00080000      0x01f00000      0
+ 5: u-boot              0x00080000      0x01f80000      0
+
+active partition: nor0,0 - (kernel) 0x00200000 @ 0x00000000
+
+defaults:
+mtdids  : nor0=1fc000000.nor_flash
+mtdparts: mtdparts=1fc000000.nor_flash:2m(kernel),256k(dtb),2m(root),27392k(user),512k(env),512k(u-boot)
+
+=> ubi part root
+Creating 1 MTD partitions on "nor0":
+0x000000240000-0x000000440000 : "mtd=2"
+UBI: attaching mtd1 to ubi0
+UBI: physical eraseblock size:   262144 bytes (256 KiB)
+UBI: logical eraseblock size:    262016 bytes
+UBI: smallest flash I/O unit:    1
+UBI: VID header offset:          64 (aligned 64)
+UBI: data offset:                128
+UBI: attached mtd1 to ubi0
+UBI: MTD device name:            "mtd=2"
+UBI: MTD device size:            2 MiB
+UBI: number of good PEBs:        8
+UBI: number of bad PEBs:         0
+UBI: max. allowed volumes:       128
+UBI: wear-leveling threshold:    4096
+UBI: number of internal volumes: 1
+UBI: number of user volumes:     1
+UBI: available PEBs:             0
+UBI: total number of reserved PEBs: 8
+UBI: number of PEBs reserved for bad PEB handling: 0
+UBI: max/mean erase counter: 2/1
+
+
+Now that the UBI device is attached, this device can be modified
+using the following commands:
+
+ubi info       Display volume and ubi layout information
+ubi createvol  Create UBI volume on UBI device
+ubi removevol  Remove UBI volume from UBI device
+ubi read       Read data from UBI volume to memory
+ubi write      Write data from memory to UBI volume
+
+
+Here a few examples on the usage:
+
+=> ubi create testvol
+Creating dynamic volume testvol of size 1048064
+
+=> ubi info l
+UBI: volume information dump:
+UBI: vol_id          0
+UBI: reserved_pebs   4
+UBI: alignment       1
+UBI: data_pad        0
+UBI: vol_type        3
+UBI: name_len        7
+UBI: usable_leb_size 262016
+UBI: used_ebs        4
+UBI: used_bytes      1048064
+UBI: last_eb_bytes   262016
+UBI: corrupted       0
+UBI: upd_marker      0
+UBI: name            testvol
+
+UBI: volume information dump:
+UBI: vol_id          2147479551
+UBI: reserved_pebs   2
+UBI: alignment       1
+UBI: data_pad        0
+UBI: vol_type        3
+UBI: name_len        13
+UBI: usable_leb_size 262016
+UBI: used_ebs        2
+UBI: used_bytes      524032
+UBI: last_eb_bytes   2
+UBI: corrupted       0
+UBI: upd_marker      0
+UBI: name            layout volume
+
+=> ubi info
+UBI: MTD device name:            "mtd=2"
+UBI: MTD device size:            2 MiB
+UBI: physical eraseblock size:   262144 bytes (256 KiB)
+UBI: logical eraseblock size:    262016 bytes
+UBI: number of good PEBs:        8
+UBI: number of bad PEBs:         0
+UBI: smallest flash I/O unit:    1
+UBI: VID header offset:          64 (aligned 64)
+UBI: data offset:                128
+UBI: max. allowed volumes:       128
+UBI: wear-leveling threshold:    4096
+UBI: number of internal volumes: 1
+UBI: number of user volumes:     1
+UBI: available PEBs:             0
+UBI: total number of reserved PEBs: 8
+UBI: number of PEBs reserved for bad PEB handling: 0
+UBI: max/mean erase counter: 4/1
+
+=> ubi write 800000 testvol 80000
+Volume "testvol" found at volume id 0
+
+=> ubi read 900000 testvol 80000
+Volume testvol found at volume id 0
+read 524288 bytes from volume 0 to 900000(buf address)
+
+=> cmp.b 800000 900000 80000
+Total of 524288 bytes were the same
index ffe261513c86867b3b6a0c53191ad868e02b4532..180ead5d81bed77352ce6f3995b8c7ffd4d7fc7c 100644 (file)
@@ -5,33 +5,6 @@ and who is going to be doing the work. When the feature is removed
 from U-Boot, its corresponding entry should also be removed from this
 file.
 
----------------------------
-What:  CONFIG_SYS_ARM_WITHOUT_RELOC option
-When:  After Release 2011.03
-
-Why:   The implementation of U-Boot for the ARM architecture has
-       been reworked to support relocation. This allows to
-       efficiently use the same U-Boot binary image on systems with
-       different RAM sizes, and brings the implementation much more
-       in line with the code used for example on Power Architecture
-       systems (eventually allowing to merge into common code). This
-       seems especailly interesting now that ARM is getting Device
-       Tree support as well.
-
-       All ARM boards need to be adapted to this new code, which
-       requires testing on the actual hardware, so this is a task
-       for the respective board maintainers or other users.
-
-       Please see the commit message of commit f1d2b31 for details:
-
-       http://git.denx.de/?p=u-boot.git;a=commit;h=f1d2b31
-
-       Support for CONFIG_SYS_ARM_WITHOUT_RELOC will be removed
-       after release v2011.03; all boards that have not been
-       converted by then, i. e. that are still broken then, are
-       considered unmaintained and without interest for the
-       community and will be removed as well.
-
 ---------------------------
 
 What:  CONFIG_NET_MULTI option
index a0e782310241580edce899f13127a201b0a5036a..c3b2355f9418c840e8727190b8daabec77e99b65 100644 (file)
@@ -395,5 +395,3 @@ int lattice_info(Lattice_desc *desc)
 
        return ret_val;
 }
-
-
index 3febd1ff633f8558d19b483f5bb361d47558e8a8..fab49fd969eabb48487feb469c195612bedd2e1f 100644 (file)
@@ -27,7 +27,7 @@
 
 #include "omap24xx_i2c.h"
 
-#define I2C_TIMEOUT    10
+#define I2C_TIMEOUT    1000
 
 static void wait_for_bb (void);
 static u16 wait_for_pin (void);
@@ -159,58 +159,56 @@ static int i2c_read_byte (u8 devaddr, u8 regoffset, u8 * value)
        /* no stop bit needed here */
        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_base->data);
-               udelay (20000);
-               if (readw (&i2c_base->stat) & I2C_STAT_NACK) {
+       /* send register offset */
+       while (1) {
+               status = wait_for_pin();
+               if (status == 0 || status & I2C_STAT_NACK) {
                        i2c_error = 1;
+                       goto read_exit;
+               }
+               if (status & I2C_STAT_XRDY) {
+                       /* Important: have to use byte access */
+                       writeb(regoffset, &i2c_base->data);
+                       writew(I2C_STAT_XRDY, &i2c_base->stat);
+               }
+               if (status & I2C_STAT_ARDY) {
+                       writew(I2C_STAT_ARDY, &i2c_base->stat);
+                       break;
                }
-       } else {
-               i2c_error = 1;
        }
 
-       if (!i2c_error) {
-               writew (I2C_CON_EN, &i2c_base->con);
-               while (readw(&i2c_base->stat) &
-                       (I2C_STAT_XRDY | I2C_STAT_ARDY)) {
-                       udelay (10000);
-                       /* Have to clear pending interrupt to clear I2C_STAT */
-                       writew (0xFFFF, &i2c_base->stat);
+       /* set slave address */
+       writew(devaddr, &i2c_base->sa);
+       /* read one byte from slave */
+       writew(1, &i2c_base->cnt);
+       /* need stop bit here */
+       writew(I2C_CON_EN | I2C_CON_MST |
+               I2C_CON_STT | I2C_CON_STP,
+               &i2c_base->con);
+
+       /* receive data */
+       while (1) {
+               status = wait_for_pin();
+               if (status == 0 || status & I2C_STAT_NACK) {
+                       i2c_error = 1;
+                       goto read_exit;
                }
-
-               /* set slave address */
-               writew (devaddr, &i2c_base->sa);
-               /* read one byte from slave */
-               writew (1, &i2c_base->cnt);
-               /* need stop bit here */
-               writew (I2C_CON_EN | I2C_CON_MST | I2C_CON_STT | I2C_CON_STP,
-                       &i2c_base->con);
-
-               status = wait_for_pin ();
                if (status & I2C_STAT_RRDY) {
 #if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX) || \
     defined(CONFIG_OMAP44XX)
-                       *value = readb (&i2c_base->data);
+                       *value = readb(&i2c_base->data);
 #else
-                       *value = readw (&i2c_base->data);
+                       *value = readw(&i2c_base->data);
 #endif
-                       udelay (20000);
-               } else {
-                       i2c_error = 1;
+                       writew(I2C_STAT_RRDY, &i2c_base->stat);
                }
-
-               if (!i2c_error) {
-                       writew (I2C_CON_EN, &i2c_base->con);
-                       while (readw (&i2c_base->stat) &
-                               (I2C_STAT_RRDY | I2C_STAT_ARDY)) {
-                               udelay (10000);
-                               writew (0xFFFF, &i2c_base->stat);
-                       }
+               if (status & I2C_STAT_ARDY) {
+                       writew(I2C_STAT_ARDY, &i2c_base->stat);
+                       break;
                }
        }
+
+read_exit:
        flush_fifo();
        writew (0xFFFF, &i2c_base->stat);
        writew (0, &i2c_base->cnt);
@@ -220,7 +218,7 @@ static int i2c_read_byte (u8 devaddr, u8 regoffset, u8 * value)
 static int i2c_write_byte (u8 devaddr, u8 regoffset, u8 value)
 {
        int i2c_error = 0;
-       u16 status, stat;
+       u16 status;
 
        /* wait until bus not busy */
        wait_for_bb ();
@@ -233,49 +231,55 @@ static int i2c_write_byte (u8 devaddr, u8 regoffset, u8 value)
        writew (I2C_CON_EN | I2C_CON_MST | I2C_CON_STT | I2C_CON_TRX |
                I2C_CON_STP, &i2c_base->con);
 
-       /* wait until state change */
-       status = wait_for_pin ();
-
-       if (status & I2C_STAT_XRDY) {
-#if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX) || \
-    defined(CONFIG_OMAP44XX)
-               /* send out 1 byte */
-               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_base->data);
-                       writew (I2C_STAT_XRDY, &i2c_base->stat);
-               } else {
+       while (1) {
+               status = wait_for_pin();
+               if (status == 0 || status & I2C_STAT_NACK) {
                        i2c_error = 1;
+                       goto write_exit;
                }
+               if (status & I2C_STAT_XRDY) {
+#if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX) || \
+    defined(CONFIG_OMAP44XX)
+                       /* send register offset */
+                       writeb(regoffset, &i2c_base->data);
+                       writew(I2C_STAT_XRDY, &i2c_base->stat);
+
+                       while (1) {
+                               status = wait_for_pin();
+                               if (status == 0 || status & I2C_STAT_NACK) {
+                                       i2c_error = 1;
+                                       goto write_exit;
+                               }
+                               if (status & I2C_STAT_XRDY) {
+                                       /* send data */
+                                       writeb(value, &i2c_base->data);
+                                       writew(I2C_STAT_XRDY, &i2c_base->stat);
+                               }
+                               if (status & I2C_STAT_ARDY) {
+                                       writew(I2C_STAT_ARDY, &i2c_base->stat);
+                                       break;
+                               }
+                       }
+                       break;
 #else
-               /* send out two bytes */
-               writew ((value << 8) + regoffset, &i2c_base->data);
+                       /* send out two bytes */
+                       writew((value << 8) + regoffset, &i2c_base->data);
+                       writew(I2C_STAT_XRDY, &i2c_base->stat);
 #endif
-               /* must have enough delay to allow BB bit to go low */
-               udelay (50000);
-               if (readw (&i2c_base->stat) & I2C_STAT_NACK) {
-                       i2c_error = 1;
                }
-       } else {
-               i2c_error = 1;
+               if (status & I2C_STAT_ARDY) {
+                       writew(I2C_STAT_ARDY, &i2c_base->stat);
+                       break;
+               }
        }
 
-       if (!i2c_error) {
-               int eout = 200;
+       wait_for_bb();
 
-               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_base->stat);
-                       if(--eout == 0) /* better leave with error than hang */
-                               break;
-               }
-       }
+       status = readw(&i2c_base->stat);
+       if (status & I2C_STAT_NACK)
+               i2c_error = 1;
+
+write_exit:
        flush_fifo();
        writew (0xFFFF, &i2c_base->stat);
        writew (0, &i2c_base->cnt);
@@ -306,6 +310,7 @@ static void flush_fifo(void)
 
 int i2c_probe (uchar chip)
 {
+       u16 status;
        int res = 1; /* default = fail */
 
        if (chip == readw (&i2c_base->oa)) {
@@ -321,19 +326,37 @@ int i2c_probe (uchar chip)
        writew (chip, &i2c_base->sa);
        /* stop bit needed here */
        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_base->stat) & I2C_STAT_NACK)) {
-               res = 0;      /* success case */
-               flush_fifo();
-               writew(0xFFFF, &i2c_base->stat);
-       } else {
-               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 ();
+       while (1) {
+               status = wait_for_pin();
+               if (status == 0 || status & I2C_STAT_AL) {
+                       res = 1;
+                       goto probe_exit;
+               }
+               if (status & I2C_STAT_NACK) {
+                       res = 1;
+                       writew(0xff, &i2c_base->stat);
+                       writew (readw (&i2c_base->con) | I2C_CON_STP, &i2c_base->con);
+                       wait_for_bb ();
+                       break;
+               }
+               if (status & I2C_STAT_ARDY) {
+                       writew(I2C_STAT_ARDY, &i2c_base->stat);
+                       break;
+               }
+               if (status & I2C_STAT_RRDY) {
+                       res = 0;
+#if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX) || \
+    defined(CONFIG_OMAP44XX)
+                       readb(&i2c_base->data);
+#else
+                       readw(&i2c_base->data);
+#endif
+                       writew(I2C_STAT_RRDY, &i2c_base->stat);
+               }
        }
+
+probe_exit:
        flush_fifo();
        writew (0, &i2c_base->cnt); /* don't allow any more data in...we don't want it.*/
        writew(0xFFFF, &i2c_base->stat);
@@ -392,13 +415,13 @@ int i2c_write (uchar chip, uint addr, int alen, uchar * buffer, int len)
 
 static void wait_for_bb (void)
 {
-       int timeout = 10;
+       int timeout = I2C_TIMEOUT;
        u16 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);
+               udelay(1000);
        }
 
        if (timeout <= 0) {
@@ -411,7 +434,7 @@ static void wait_for_bb (void)
 static u16 wait_for_pin (void)
 {
        u16 status;
-       int timeout = 10;
+       int timeout = I2C_TIMEOUT;
 
        do {
                udelay (1000);
@@ -424,8 +447,10 @@ static u16 wait_for_pin (void)
        if (timeout <= 0) {
                printf ("timed out in wait_for_pin: I2C_STAT=%x\n",
                        readw (&i2c_base->stat));
-                       writew(0xFFFF, &i2c_base->stat);
-}
+               writew(0xFFFF, &i2c_base->stat);
+               status = 0;
+       }
+
        return status;
 }
 
index c543d837dc7e286dff1b28546e3ba7af7fd58dd0..eb7bfb39e925f45807e8d54eec9933c4f18f665a 100644 (file)
@@ -78,17 +78,11 @@ struct mmc *find_mmc_device(int dev_num)
 }
 
 static ulong
-mmc_bwrite(int dev_num, ulong start, lbaint_t blkcnt, const void*src)
+mmc_write_blocks(struct mmc *mmc, ulong start, lbaint_t blkcnt, const void*src)
 {
        struct mmc_cmd cmd;
        struct mmc_data data;
-       int err;
-       int stoperr = 0;
-       struct mmc *mmc = find_mmc_device(dev_num);
-       int blklen;
-
-       if (!mmc)
-               return -1;
+       int blklen, err;
 
        blklen = mmc->write_bl_len;
 
@@ -97,12 +91,6 @@ mmc_bwrite(int dev_num, ulong start, lbaint_t blkcnt, const void*src)
                        start + blkcnt, mmc->block_dev.lba);
                return 0;
        }
-       err = mmc_set_blocklen(mmc, mmc->write_bl_len);
-
-       if (err) {
-               printf("set write bl len failed\n\r");
-               return err;
-       }
 
        if (blkcnt > 1)
                cmd.cmdidx = MMC_CMD_WRITE_MULTIPLE_BLOCK;
@@ -134,9 +122,45 @@ mmc_bwrite(int dev_num, ulong start, lbaint_t blkcnt, const void*src)
                cmd.cmdarg = 0;
                cmd.resp_type = MMC_RSP_R1b;
                cmd.flags = 0;
-               stoperr = mmc_send_cmd(mmc, &cmd, NULL);
+               err = mmc_send_cmd(mmc, &cmd, NULL);
+               if (err) {
+                       printf("mmc fail to send stop cmd\n\r");
+                       return err;
+               }
+       }
+
+       return blkcnt;
+}
+
+static ulong
+mmc_bwrite(int dev_num, ulong start, lbaint_t blkcnt, const void*src)
+{
+       int err;
+       struct mmc *mmc = find_mmc_device(dev_num);
+       lbaint_t cur, blocks_todo = blkcnt;
+
+       if (!mmc)
+               return -1;
+
+       err = mmc_set_blocklen(mmc, mmc->write_bl_len);
+       if (err) {
+               printf("set write bl len failed\n\r");
+               return err;
        }
 
+       do {
+               /*
+                * The 65535 constraint comes from some hardware has
+                * only 16 bit width block number counter
+                */
+               cur = (blocks_todo > 65535) ? 65535 : blocks_todo;
+               if(mmc_write_blocks(mmc, start, cur, src) != cur)
+                       return -1;
+               blocks_todo -= cur;
+               start += cur;
+               src += cur * mmc->write_bl_len;
+       } while (blocks_todo > 0);
+
        return blkcnt;
 }
 
index 9271470e3681cff18ddf95d9287345d338fc325b..c7f76209f33cbe8a6ca23d490bf31958c121ec4c 100644 (file)
@@ -412,4 +412,3 @@ int omap_mmc_init(int dev_index)
 
        return 0;
 }
-
index 87769033bbcee9db4ea855fde11091da1dd3ee7f..48e21ef7a59546bf8f6c45b7431c32005fed22e9 100644 (file)
@@ -27,6 +27,7 @@
 #include <asm/errno.h>
 #include <asm/arch/hardware.h>
 #include <part.h>
+#include <asm/io.h>
 
 #include "pxa_mmc.h"
 
@@ -59,18 +60,20 @@ mmc_cmd(ushort cmd, ushort argh, ushort argl, ushort cmdat)
 
        debug("mmc_cmd %u 0x%04x 0x%04x 0x%04x\n", cmd, argh, argl,
              cmdat | wide);
-       MMC_STRPCL = MMC_STRPCL_STOP_CLK;
-       MMC_I_MASK = ~MMC_I_MASK_CLK_IS_OFF;
-       while (!(MMC_I_REG & MMC_I_REG_CLK_IS_OFF)) ;
-       MMC_CMD = cmd;
-       MMC_ARGH = argh;
-       MMC_ARGL = argl;
-       MMC_CMDAT = cmdat | wide;
-       MMC_I_MASK = ~MMC_I_MASK_END_CMD_RES;
-       MMC_STRPCL = MMC_STRPCL_START_CLK;
-       while (!(MMC_I_REG & MMC_I_REG_END_CMD_RES)) ;
-
-       status = MMC_STAT;
+       writel(MMC_STRPCL_STOP_CLK, MMC_STRPCL);
+       writel(~MMC_I_MASK_CLK_IS_OFF, MMC_I_MASK);
+       while (!(readl(MMC_I_REG) & MMC_I_REG_CLK_IS_OFF))
+               ;
+       writel(cmd, MMC_CMD);
+       writel(argh, MMC_ARGH);
+       writel(argl, MMC_ARGL);
+       writel(cmdat | wide, MMC_CMDAT);
+       writel(~MMC_I_MASK_END_CMD_RES, MMC_I_MASK);
+       writel(MMC_STRPCL_START_CLK, MMC_STRPCL);
+       while (!(readl(MMC_I_REG) & MMC_I_REG_END_CMD_RES))
+               ;
+
+       status = readl(MMC_STAT);
        debug("MMC status 0x%08x\n", status);
        if (status & MMC_STAT_TIME_OUT_RESPONSE) {
                return 0;
@@ -80,10 +83,10 @@ mmc_cmd(ushort cmd, ushort argh, ushort argl, ushort cmdat)
         * Did I mention this is Sick.  We always need to
         * discard the upper 8 bits of the first 16-bit word.
         */
-       a = (MMC_RES & 0xffff);
+       a = (readl(MMC_RES) & 0xffff);
        for (i = 0; i < 4; i++) {
-               b = (MMC_RES & 0xffff);
-               c = (MMC_RES & 0xffff);
+               b = (readl(MMC_RES) & 0xffff);
+               c = (readl(MMC_RES) & 0xffff);
                resp[i] = (a << 24) | (b << 8) | (c >> 8);
                a = c;
                debug("MMC resp[%d] = %#08x\n", i, resp[i]);
@@ -115,37 +118,38 @@ mmc_block_read(uchar * dst, ulong src, ulong len)
        /* send read command */
        argh = src >> 16;
        argl = src & 0xffff;
-       MMC_STRPCL = MMC_STRPCL_STOP_CLK;
-       MMC_RDTO = 0xffff;
-       MMC_NOB = 1;
-       MMC_BLKLEN = len;
+       writel(MMC_STRPCL_STOP_CLK, MMC_STRPCL);
+       writel(0xffff, MMC_RDTO);
+       writel(1, MMC_NOB);
+       writel(len, MMC_BLKLEN);
        mmc_cmd(MMC_CMD_READ_SINGLE_BLOCK, argh, argl,
                MMC_CMDAT_R1 | MMC_CMDAT_READ | MMC_CMDAT_BLOCK |
                MMC_CMDAT_DATA_EN);
 
-       MMC_I_MASK = ~MMC_I_MASK_RXFIFO_RD_REQ;
+       writel(~MMC_I_MASK_RXFIFO_RD_REQ, MMC_I_MASK);
        while (len) {
-               if (MMC_I_REG & MMC_I_REG_RXFIFO_RD_REQ) {
+               if (readl(MMC_I_REG) & MMC_I_REG_RXFIFO_RD_REQ) {
 #if defined(CONFIG_PXA27X) || defined(CONFIG_CPU_MONAHANS)
                        int i;
                        for (i = min(len, 32); i; i--) {
-                               *dst++ = *((volatile uchar *)&MMC_RXFIFO);
+                               *dst++ = readb(MMC_RXFIFO);
                                len--;
                        }
 #else
-                       *dst++ = MMC_RXFIFO;
+                       *dst++ = readb(MMC_RXFIFO);
                        len--;
 #endif
                }
-               status = MMC_STAT;
+               status = readl(MMC_STAT);
                if (status & MMC_STAT_ERRORS) {
                        printf("MMC_STAT error %lx\n", status);
                        return -1;
                }
        }
-       MMC_I_MASK = ~MMC_I_MASK_DATA_TRAN_DONE;
-       while (!(MMC_I_REG & MMC_I_REG_DATA_TRAN_DONE)) ;
-       status = MMC_STAT;
+       writel(~MMC_I_MASK_DATA_TRAN_DONE, MMC_I_MASK);
+       while (!(readl(MMC_I_REG) & MMC_I_REG_DATA_TRAN_DONE))
+               ;
+       status = readl(MMC_STAT);
        if (status & MMC_STAT_ERRORS) {
                printf("MMC_STAT error %lx\n", status);
                return -1;
@@ -176,37 +180,39 @@ mmc_block_write(ulong dst, uchar * src, int len)
        /* send write command */
        argh = dst >> 16;
        argl = dst & 0xffff;
-       MMC_STRPCL = MMC_STRPCL_STOP_CLK;
-       MMC_NOB = 1;
-       MMC_BLKLEN = len;
+       writel(MMC_STRPCL_STOP_CLK, MMC_STRPCL);
+       writel(1, MMC_NOB);
+       writel(len, MMC_BLKLEN);
        mmc_cmd(MMC_CMD_WRITE_SINGLE_BLOCK, argh, argl,
                MMC_CMDAT_R1 | MMC_CMDAT_WRITE | MMC_CMDAT_BLOCK |
                MMC_CMDAT_DATA_EN);
 
-       MMC_I_MASK = ~MMC_I_MASK_TXFIFO_WR_REQ;
+       writel(~MMC_I_MASK_TXFIFO_WR_REQ, MMC_I_MASK);
        while (len) {
-               if (MMC_I_REG & MMC_I_REG_TXFIFO_WR_REQ) {
+               if (readl(MMC_I_REG) & MMC_I_REG_TXFIFO_WR_REQ) {
                        int i, bytes = min(32, len);
 
                        for (i = 0; i < bytes; i++) {
-                               MMC_TXFIFO = *src++;
+                               writel(*src++, MMC_TXFIFO);
                        }
                        if (bytes < 32) {
-                               MMC_PRTBUF = MMC_PRTBUF_BUF_PART_FULL;
+                               writel(MMC_PRTBUF_BUF_PART_FULL, MMC_PRTBUF);
                        }
                        len -= bytes;
                }
-               status = MMC_STAT;
+               status = readl(MMC_STAT);
                if (status & MMC_STAT_ERRORS) {
                        printf("MMC_STAT error %lx\n", status);
                        return -1;
                }
        }
-       MMC_I_MASK = ~MMC_I_MASK_DATA_TRAN_DONE;
-       while (!(MMC_I_REG & MMC_I_REG_DATA_TRAN_DONE)) ;
-       MMC_I_MASK = ~MMC_I_MASK_PRG_DONE;
-       while (!(MMC_I_REG & MMC_I_REG_PRG_DONE)) ;
-       status = MMC_STAT;
+       writel(~MMC_I_MASK_DATA_TRAN_DONE, MMC_I_MASK);
+       while (!(readl(MMC_I_REG) & MMC_I_REG_DATA_TRAN_DONE))
+               ;
+       writel(~MMC_I_MASK_PRG_DONE, MMC_I_MASK);
+       while (!(readl(MMC_I_REG) & MMC_I_REG_PRG_DONE))
+               ;
+       status = readl(MMC_STAT);
        if (status & MMC_STAT_ERRORS) {
                printf("MMC_STAT error %lx\n", status);
                return -1;
@@ -559,13 +565,13 @@ mmc_legacy_init(int verbose)
        set_GPIO_mode(GPIO8_MMCCS0_MD);
 #endif
 #ifdef CONFIG_CPU_MONAHANS     /* pxa3xx */
-       CKENA |= CKENA_12_MMC0 | CKENA_13_MMC1;
+       writel(readl(CKENA) | CKENA_12_MMC0 | CKENA_13_MMC1, CKENA);
 #else  /* pxa2xx */
-       CKEN |= CKEN12_MMC;     /* enable MMC unit clock */
+       writel(readl(CKEN) | CKEN12_MMC, CKEN); /* enable MMC unit clock */
 #endif
-       MMC_CLKRT = MMC_CLKRT_0_3125MHZ;
-       MMC_RESTO = MMC_RES_TO_MAX;
-       MMC_SPI = MMC_SPI_DISABLE;
+       writel(MMC_CLKRT_0_3125MHZ, MMC_CLKRT);
+       writel(MMC_RES_TO_MAX, MMC_RESTO);
+       writel(MMC_SPI_DISABLE, MMC_SPI);
 
        /* reset */
        mmc_cmd(MMC_CMD_GO_IDLE_STATE, 0, 0, MMC_CMDAT_INIT | MMC_CMDAT_R0);
@@ -624,7 +630,7 @@ mmc_legacy_init(int verbose)
                mmc_decode_cid(cid_resp);
        }
 
-       MMC_CLKRT = 0;          /* 20 MHz */
+       writel(0, MMC_CLKRT);           /* 20 MHz */
        resp = mmc_cmd(MMC_CMD_SELECT_CARD, rca, 0, MMC_CMDAT_R1);
 
 #if defined(CONFIG_PXA27X) || defined(CONFIG_CPU_MONAHANS)
index 798902f337698d9e54dad633dcc134481fa2069e..c92c7a7a490cd8c7fa45fec2c7091ecbcdebb010 100644 (file)
@@ -85,6 +85,17 @@ static phys_addr_t __cfi_flash_bank_addr(int i)
 phys_addr_t cfi_flash_bank_addr(int i)
        __attribute__((weak, alias("__cfi_flash_bank_addr")));
 
+static unsigned long __cfi_flash_bank_size(int i)
+{
+#ifdef CONFIG_SYS_FLASH_BANKS_SIZES
+       return ((unsigned long [])CONFIG_SYS_FLASH_BANKS_SIZES)[i];
+#else
+       return 0;
+#endif
+}
+unsigned long cfi_flash_bank_size(int i)
+       __attribute__((weak, alias("__cfi_flash_bank_size")));
+
 static void __flash_write8(u8 value, void *addr)
 {
        __raw_writeb(value, addr);
@@ -1826,7 +1837,7 @@ static void flash_fixup_stm(flash_info_t *info, struct cfi_qry *qry)
  * The following code cannot be run from FLASH!
  *
  */
-ulong flash_get_size (phys_addr_t base, int banknum)
+ulong flash_get_size (phys_addr_t base, int banknum, unsigned long max_size)
 {
        flash_info_t *info = &flash_info[banknum];
        int i, j;
@@ -1915,6 +1926,13 @@ ulong flash_get_size (phys_addr_t base, int banknum)
                debug ("size_ratio %d port %d bits chip %d bits\n",
                       size_ratio, info->portwidth << CFI_FLASH_SHIFT_WIDTH,
                       info->chipwidth << CFI_FLASH_SHIFT_WIDTH);
+               info->size = 1 << qry.dev_size;
+               /* multiply the size by the number of chips */
+               info->size *= size_ratio;
+               if (max_size && (info->size > max_size)) {
+                       debug("[truncated from %ldMiB]", info->size >> 20);
+                       info->size = max_size;
+               }
                debug ("found %d erase regions\n", num_erase_regions);
                sect_cnt = 0;
                sector = base;
@@ -1935,6 +1953,8 @@ ulong flash_get_size (phys_addr_t base, int banknum)
                        debug ("erase_region_count = %d erase_region_size = %d\n",
                                erase_region_count, erase_region_size);
                        for (j = 0; j < erase_region_count; j++) {
+                               if (sector - base >= info->size)
+                                       break;
                                if (sect_cnt >= CONFIG_SYS_MAX_FLASH_SECT) {
                                        printf("ERROR: too many flash sectors\n");
                                        break;
@@ -1968,9 +1988,6 @@ ulong flash_get_size (phys_addr_t base, int banknum)
                }
 
                info->sector_count = sect_cnt;
-               info->size = 1 << qry.dev_size;
-               /* multiply the size by the number of chips */
-               info->size *= size_ratio;
                info->buffer_size = 1 << le16_to_cpu(qry.max_buf_write_size);
                tmp = 1 << qry.block_erase_timeout_typ;
                info->erase_blk_tout = tmp *
@@ -2026,7 +2043,8 @@ unsigned long flash_init (void)
                flash_info[i].flash_id = FLASH_UNKNOWN;
 
                if (!flash_detect_legacy(cfi_flash_bank_addr(i), i))
-                       flash_get_size(cfi_flash_bank_addr(i), i);
+                       flash_get_size(cfi_flash_bank_addr(i), i,
+                                       cfi_flash_bank_size(i));
                size += flash_info[i].size;
                if (flash_info[i].flash_id == FLASH_UNKNOWN) {
 #ifndef CONFIG_SYS_FLASH_QUIET_TEST
index 47d6872fd03cd1ce277c04d18d187e4ccfb5f34b..c0e068ab7d5f9c08973961055242a4bb581798cd 100644 (file)
@@ -54,7 +54,7 @@ static void nand_init_chip(struct mtd_info *mtd, struct nand_chip *nand,
                if (nand_scan(mtd, maxchips) == 0) {
                        if (!mtd->name)
                                mtd->name = (char *)default_nand_name;
-#ifndef CONFIG_RELOC_FIXUP_WORKS
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
                        else
                                mtd->name += gd->reloc_off;
 #endif
index 2d4ffed4fa67b246744073fd50aac70b656037f6..3f09c2b65263c324c5bc3d2cd14bd21ce45641e0 100644 (file)
@@ -414,6 +414,9 @@ static int fec_init(struct eth_device *dev, bd_t* bd)
        uint32_t base;
        struct fec_priv *fec = (struct fec_priv *)dev->priv;
 
+       /* Initialize MAC address */
+       fec_set_hwaddr(dev);
+
        /*
         * reserve memory for both buffer descriptor chains at once
         * Datasheet forces the startaddress of each chain is 16 byte
index 1045cf1ba980ae91d56bf4ddb35728e089e44a28..49a1f5fb49fd8269852ad8a6c138652b4549bc75 100644 (file)
@@ -127,7 +127,7 @@ void bb_miiphy_init(void)
        int i;
 
        for (i = 0; i < bb_miiphy_buses_num; i++) {
-#if !defined(CONFIG_RELOC_FIXUP_WORKS)
+#if defined(CONFIG_NEEDS_MANUAL_RELOC)
                /* Relocate the hook pointers*/
                BB_MII_RELOCATE(bb_miiphy_buses[i].init, gd->reloc_off);
                BB_MII_RELOCATE(bb_miiphy_buses[i].mdio_active, gd->reloc_off);
index 56eee7bee60551e4147f0f4a0c3557e0eeb6ef3b..d626d68cb097c278b403c772ffcd45213e9fdc1d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007 Freescale Semiconductor, Inc.
+ * Copyright 2007, 2010 Freescale Semiconductor, Inc.
  *
  * Author: Roy Zang <tie-fei.zang@freescale.com>, Sep, 2007
  *
@@ -311,7 +311,8 @@ static int uli526x_init_one(struct eth_device *dev, bd_t *bis)
                        i));
 
        /* Set Node address */
-       if (((u16 *) db->srom)[0] == 0xffff || ((u16 *) db->srom)[0] == 0)
+       if (((db->srom[0] == 0xff) && (db->srom[1] == 0xff)) ||
+           ((db->srom[0] == 0x00) && (db->srom[1] == 0x00)))
        /* SROM absent, so write MAC address to ID Table */
                set_mac_addr(dev);
        else {          /*Exist SROM*/
index 001e6eb900701185c46f981aa62c1426ff8e7116..1f021036e5f00040b0a2826664e890d2b92fb78b 100644 (file)
@@ -91,6 +91,9 @@ int fsl_setup_hose(struct pci_controller *hose, unsigned long addr)
 {
        volatile ccsr_fsl_pci_t *pci = (ccsr_fsl_pci_t *) addr;
 
+       /* Reset hose to make sure its in a clean state */
+       memset(hose, 0, sizeof(struct pci_controller));
+
        pci_setup_indirect(hose, (u32)&pci->cfg_addr, (u32)&pci->cfg_data);
 
        return fsl_is_pci_agent(hose);
index cd64a87fc6d9b200ed805ae1e6f5a7e014180435..848746f1ed2ea4b20a7c5ae012aebc2ed9f42a02 100644 (file)
@@ -139,7 +139,7 @@ void *pci_map_bar(pci_dev_t pdev, int bar, int flags)
  *
  */
 
-static struct pci_controller* hose_head = NULL;
+static struct pci_controller* hose_head;
 
 void pci_register_hose(struct pci_controller* hose)
 {
@@ -640,6 +640,8 @@ void pci_init(void)
        }
 #endif /* CONFIG_PCI_BOOTDELAY */
 
+       hose_head = NULL;
+
        /* now call board specific pci_init()... */
        pci_init_board();
 }
index 48033d750c3cee5eb649ee67889e37a0405220c0..282ab237516d89876d5b07a9526bcecd2f25b24a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006-2009 Freescale Semiconductor, Inc.
+ * Copyright (C) 2006-2010 Freescale Semiconductor, Inc.
  *
  * Dave Liu <daveliu@freescale.com>
  *
@@ -324,9 +324,9 @@ static int uec_set_mac_duplex(uec_private_t *uec, int duplex)
 }
 
 static int uec_set_mac_if_mode(uec_private_t *uec,
-               enet_interface_type_e if_mode, int speed)
+               enum fsl_phy_enet_if if_mode, int speed)
 {
-       enet_interface_type_e   enet_if_mode;
+       enum fsl_phy_enet_if    enet_if_mode;
        uec_info_t              *uec_info;
        uec_t                   *uec_regs;
        u32                     upsmr;
@@ -521,7 +521,7 @@ static void adjust_link(struct eth_device *dev)
        struct uec_mii_info     *mii_info = uec->mii_info;
 
        extern void change_phy_interface_mode(struct eth_device *dev,
-                                enet_interface_type_e mode, int speed);
+                                enum fsl_phy_enet_if mode, int speed);
        uec_regs = uec->uec_regs;
 
        if (mii_info->link) {
@@ -539,7 +539,7 @@ static void adjust_link(struct eth_device *dev)
                }
 
                if (mii_info->speed != uec->oldspeed) {
-                       enet_interface_type_e   mode = \
+                       enum fsl_phy_enet_if    mode = \
                                uec->uec_info->enet_interface_type;
                        if (uec->uec_info->uf_info.eth_type == GIGA_ETH) {
                                switch (mii_info->speed) {
index 2a9e2dcd9c2b6e806783b4a7bfd8e42d872146f3..94eb9a26d7f95d8c9cf2111f0119d4c19a6569d0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006-2009 Freescale Semiconductor, Inc.
+ * Copyright (C) 2006-2010 Freescale Semiconductor, Inc.
  *
  * Dave Liu <daveliu@freescale.com>
  * based on source code of Shlomi Gridish
@@ -25,6 +25,7 @@
 
 #include "qe.h"
 #include "uccf.h"
+#include <asm/fsl_enet.h>
 
 #define MAX_TX_THREADS                         8
 #define MAX_RX_THREADS                         8
@@ -660,21 +661,6 @@ typedef enum uec_num_of_threads {
        UEC_NUM_OF_THREADS_8  = 0x4   /* 8 */
 } uec_num_of_threads_e;
 
-/* UEC ethernet interface type
-*/
-typedef enum enet_interface_type {
-       MII,
-       RMII,
-       RGMII,
-       GMII,
-       RGMII_ID,
-       RGMII_RXID,
-       RGMII_TXID,
-       TBI,
-       RTBI,
-       SGMII
-} enet_interface_type_e;
-
 /* UEC initialization info struct
 */
 #define STD_UEC_INFO(num) \
@@ -705,7 +691,7 @@ typedef struct uec_info {
        u16                             rx_bd_ring_len;
        u16                             tx_bd_ring_len;
        u8                              phy_address;
-       enet_interface_type_e           enet_interface_type;
+       enum fsl_phy_enet_if            enet_interface_type;
        int                             speed;
 } uec_info_t;
 
index 9be784e6add8063ebf7fe72efa92e808fa4fadaa..35f2368a808a28f93c18ae3b2cc439b5b463db4f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005 Freescale Semiconductor, Inc.
+ * Copyright (C) 2005,2010 Freescale Semiconductor, Inc.
  *
  * Author: Shlomi Gridish
  *
@@ -485,7 +485,7 @@ static int marvell_init(struct uec_mii_info *mii_info)
 {
        struct eth_device *edev = mii_info->dev;
        uec_private_t *uec = edev->priv;
-       enum enet_interface_type iface = uec->uec_info->enet_interface_type;
+       enum fsl_phy_enet_if iface = uec->uec_info->enet_interface_type;
        int     speed = uec->uec_info->speed;
 
        if ((speed == 1000) &&
@@ -853,7 +853,7 @@ struct phy_info *uec_get_phy_info (struct uec_mii_info *mii_info)
 }
 
 void marvell_phy_interface_mode (struct eth_device *dev,
-                                enet_interface_type_e type,
+                                enum fsl_phy_enet_if type,
                                 int speed
                                )
 {
@@ -907,7 +907,7 @@ void marvell_phy_interface_mode (struct eth_device *dev,
 }
 
 void change_phy_interface_mode (struct eth_device *dev,
-                               enet_interface_type_e type, int speed)
+                               enum fsl_phy_enet_if type, int speed)
 {
 #ifdef CONFIG_PHY_MODE_NEED_CHANGE
        marvell_phy_interface_mode (dev, type, speed);
index 7738a7acaa0c79054d67a835945fdf30a5810cef..25e4a7bcdb8222cb58e457283296176533bb0f79 100644 (file)
@@ -34,6 +34,13 @@ struct ftrtc010 {
        unsigned int alarm_hour;        /* 0x18 */
        unsigned int record;            /* 0x1c */
        unsigned int cr;                /* 0x20 */
+       unsigned int wsec;              /* 0x24 */
+       unsigned int wmin;              /* 0x28 */
+       unsigned int whour;             /* 0x2c */
+       unsigned int wday;              /* 0x30 */
+       unsigned int intr;              /* 0x34 */
+       unsigned int div;               /* 0x38 */
+       unsigned int rev;               /* 0x3c */
 };
 
 /*
@@ -85,7 +92,11 @@ int rtc_get(struct rtc_time *tmp)
        debug("%s(): record register: %x\n",
              __func__, readl(&rtc->record));
 
+#ifdef CONFIG_FTRTC010_PCLK
+       now = (ftrtc010_time() + readl(&rtc->record)) / RTC_DIV_COUNT;
+#else /* CONFIG_FTRTC010_EXTCLK */
        now = ftrtc010_time() + readl(&rtc->record);
+#endif
 
        to_tm(now, tmp);
 
index 7cfc2d500cb938bef0043643d107e6b77ea7694f..7e4b2c9c69ed50dac3dc2692514a6a84cd7d6176 100644 (file)
@@ -42,7 +42,7 @@ typedef struct atmel_usart3 {
        u32     reserved1;
        u32     ifr;
        u32     man;
-       u32     reserved2[54]; // version and PDC not needed
+       u32     reserved2[54]; /* version and PDC not needed */
 } atmel_usart3_t;
 
 /* Bitfields in CR */
index b74e43957ff70d4024efc78d6b0618c437823664..e4579801f2dde5af9cc9e688a9c1078449f965f1 100644 (file)
@@ -32,6 +32,7 @@
 #include <watchdog.h>
 #include <serial.h>
 #include <asm/arch/pxa-regs.h>
+#include <asm/io.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -73,60 +74,60 @@ void pxa_setbrg_dev (unsigned int uart_index)
        switch (uart_index) {
                case FFUART_INDEX:
 #ifdef CONFIG_CPU_MONAHANS
-                       CKENA |= CKENA_22_FFUART;
+                       writel(readl(CKENA) | CKENA_22_FFUART, CKENA);
 #else
-                       CKEN |= CKEN6_FFUART;
+                       writel(readl(CKEN) | CKEN6_FFUART, CKEN);
 #endif /* CONFIG_CPU_MONAHANS */
 
-                       FFIER = 0;      /* Disable for now */
-                       FFFCR = 0;      /* No fifos enabled */
+                       writel(0, FFIER);       /* Disable for now */
+                       writel(0, FFFCR);       /* No fifos enabled */
 
                        /* set baud rate */
-                       FFLCR = LCR_WLS0 | LCR_WLS1 | LCR_DLAB;
-                       FFDLL = quot & 0xff;
-                       FFDLH = quot >> 8;
-                       FFLCR = LCR_WLS0 | LCR_WLS1;
+                       writel(LCR_WLS0 | LCR_WLS1 | LCR_DLAB, FFLCR);
+                       writel(quot & 0xff, FFDLL);
+                       writel(quot >> 8, FFDLH);
+                       writel(LCR_WLS0 | LCR_WLS1, FFLCR);
 
-                       FFIER = IER_UUE;        /* Enable FFUART */
+                       writel(IER_UUE, FFIER); /* Enable FFUART */
                break;
 
                case BTUART_INDEX:
 #ifdef CONFIG_CPU_MONAHANS
-                       CKENA |= CKENA_21_BTUART;
+                       writel(readl(CKENA) | CKENA_21_BTUART, CKENA);
 #else
-                       CKEN |= CKEN7_BTUART;
+                       writel(readl(CKEN) | CKEN7_BTUART, CKEN);
 #endif /*  CONFIG_CPU_MONAHANS */
 
-                       BTIER = 0;
-                       BTFCR = 0;
+                       writel(0, BTIER);
+                       writel(0, BTFCR);
 
                        /* set baud rate */
-                       BTLCR = LCR_DLAB;
-                       BTDLL = quot & 0xff;
-                       BTDLH = quot >> 8;
-                       BTLCR = LCR_WLS0 | LCR_WLS1;
+                       writel(LCR_DLAB, BTLCR);
+                       writel(quot & 0xff, BTDLL);
+                       writel(quot >> 8, BTDLH);
+                       writel(LCR_WLS0 | LCR_WLS1, BTLCR);
 
-                       BTIER = IER_UUE;        /* Enable BFUART */
+                       writel(IER_UUE, BTIER); /* Enable BFUART */
 
                break;
 
                case STUART_INDEX:
 #ifdef CONFIG_CPU_MONAHANS
-                       CKENA |= CKENA_23_STUART;
+                       writel(readl(CKENA) | CKENA_23_STUART, CKENA);
 #else
-                       CKEN |= CKEN5_STUART;
+                       writel(readl(CKEN) | CKEN5_STUART, CKEN);
 #endif /* CONFIG_CPU_MONAHANS */
 
-                       STIER = 0;
-                       STFCR = 0;
+                       writel(0, STIER);
+                       writel(0, STFCR);
 
                        /* set baud rate */
-                       STLCR = LCR_DLAB;
-                       STDLL = quot & 0xff;
-                       STDLH = quot >> 8;
-                       STLCR = LCR_WLS0 | LCR_WLS1;
+                       writel(LCR_DLAB, STLCR);
+                       writel(quot & 0xff, STDLL);
+                       writel(quot >> 8, STDLH);
+                       writel(LCR_WLS0 | LCR_WLS1, STLCR);
 
-                       STIER = IER_UUE;                        /* Enable STUART */
+                       writel(IER_UUE, STIER); /* Enable STUART */
                        break;
 
                default:
@@ -156,21 +157,21 @@ void pxa_putc_dev (unsigned int uart_index,const char c)
        switch (uart_index) {
                case FFUART_INDEX:
                /* wait for room in the tx FIFO on FFUART */
-                       while ((FFLSR & LSR_TEMT) == 0)
+                       while ((readl(FFLSR) & LSR_TEMT) == 0)
                                WATCHDOG_RESET ();      /* Reset HW Watchdog, if needed */
-                       FFTHR = c;
+                       writel(c, FFTHR);
                        break;
 
                case BTUART_INDEX:
-                       while ((BTLSR & LSR_TEMT ) == 0 )
+                       while ((readl(BTLSR) & LSR_TEMT) == 0)
                                WATCHDOG_RESET ();      /* Reset HW Watchdog, if needed */
-                       BTTHR = c;
+                       writel(c, BTTHR);
                        break;
 
                case STUART_INDEX:
-                       while ((STLSR & LSR_TEMT ) == 0 )
+                       while ((readl(STLSR) & LSR_TEMT) == 0)
                                WATCHDOG_RESET ();      /* Reset HW Watchdog, if needed */
-                       STTHR = c;
+                       writel(c, STTHR);
                        break;
        }
 
@@ -188,11 +189,11 @@ int pxa_tstc_dev (unsigned int uart_index)
 {
        switch (uart_index) {
                case FFUART_INDEX:
-                       return FFLSR & LSR_DR;
+                       return readl(FFLSR) & LSR_DR;
                case BTUART_INDEX:
-                       return BTLSR & LSR_DR;
+                       return readl(BTLSR) & LSR_DR;
                case STUART_INDEX:
-                       return STLSR & LSR_DR;
+                       return readl(STLSR) & LSR_DR;
        }
        return -1;
 }
@@ -206,18 +207,21 @@ int pxa_getc_dev (unsigned int uart_index)
 {
        switch (uart_index) {
                case FFUART_INDEX:
-                       while (!(FFLSR & LSR_DR))
-                       WATCHDOG_RESET ();      /* Reset HW Watchdog, if needed */
-                       return (char) FFRBR & 0xff;
+                       while (!(readl(FFLSR) & LSR_DR))
+                               /* Reset HW Watchdog, if needed */
+                               WATCHDOG_RESET();
+                       return (char) readl(FFRBR) & 0xff;
 
                case BTUART_INDEX:
-                       while (!(BTLSR & LSR_DR))
-                       WATCHDOG_RESET ();      /* Reset HW Watchdog, if needed */
-                       return (char) BTRBR & 0xff;
+                       while (!(readl(BTLSR) & LSR_DR))
+                               /* Reset HW Watchdog, if needed */
+                               WATCHDOG_RESET();
+                       return (char) readl(BTRBR) & 0xff;
                case STUART_INDEX:
-                       while (!(STLSR & LSR_DR))
-                       WATCHDOG_RESET ();      /* Reset HW Watchdog, if needed */
-                       return (char) STRBR & 0xff;
+                       while (!(readl(STLSR) & LSR_DR))
+                               /* Reset HW Watchdog, if needed */
+                               WATCHDOG_RESET();
+                       return (char) readl(STRBR) & 0xff;
        }
        return -1;
 }
index cf22629b971d95471fdf0480505f3c7105d0d038..f9163a80ed17cbcf912f0e4baf2a9b39fc6705e5 100644 (file)
@@ -116,4 +116,3 @@ int usb_gadget_config_buf(
        cp->bmAttributes |= USB_CONFIG_ATT_ONE;
        return len;
 }
-
index 7cf3c673ddd702641ce620205a0571a7df90bb94..18964894215f025063f66b69e6e8311ed19b7c34 100644 (file)
@@ -302,4 +302,3 @@ void usb_ep_autoconfig_reset(struct usb_gadget *gadget)
 #endif
        epnum = 0;
 }
-
index b22ca90fc6824b92e19c34cea1f69b10d2675777..5a18e035b6ef9f39d1c20becf9dea85e46931ebe 100644 (file)
@@ -1968,4 +1968,3 @@ fail:
        error("%s failed. error = %d", __func__, status);
        return status;
 }
-
index 6e9d1bf0f29b408c34df71834143d9a91cdb84ef..95555cf96b9c3a1f1b52482c54c5ae9830ae3a2a 100644 (file)
@@ -137,4 +137,3 @@ usb_gadget_get_string(struct usb_gadget_strings *table, int id, u8 *buf)
        buf[1] = USB_DT_STRING;
        return buf[0];
 }
-
index 37d056e005793c2bcd5607503ae72fd2abde4c8d..982f96e8b8ff242d7617389f5181abab4238b3fe 100644 (file)
@@ -205,12 +205,12 @@ static int handshake(uint32_t *ptr, uint32_t mask, uint32_t done, int usec)
        uint32_t result;
        do {
                result = ehci_readl(ptr);
+               udelay(5);
                if (result == ~(uint32_t)0)
                        return -1;
                result &= mask;
                if (result == done)
                        return 0;
-               udelay(1);
                usec--;
        } while (usec > 0);
        return -1;
@@ -288,6 +288,7 @@ static int ehci_td_buffer(struct qTD *td, void *buf, size_t sz)
        idx = 0;
        while (idx < 5) {
                td->qt_buffer[idx] = cpu_to_hc32(addr);
+               td->qt_buffer_hi[idx] = 0;
                next = (addr + 4096) & ~4095;
                delta = next - addr;
                if (delta >= sz)
index af8ee907e8e2c5ea903541a3573462adcc5b73c4..8d7b3804fab4d91d2c7bc864ba4d484bed9215bc 100644 (file)
@@ -117,6 +117,8 @@ int ehci_hcd_init(void)
 
        mxc_set_usbcontrol(CONFIG_MXC_USB_PORT, CONFIG_MXC_USB_FLAGS);
 
+       udelay(10000);
+
        return 0;
 }
 
index 047902a0c1c62fed41a3ba1827b95248cf865eee..cff34389295c5d13ce12d8988bdad47ab8c64c0a 100644 (file)
@@ -53,6 +53,10 @@ int ehci_hcd_init(void)
        hcor = (struct ehci_hcor *)((uint32_t) hccr +
                        HC_LENGTH(ehci_readl(&hccr->cr_capbase)));
 
+       debug("EHCI-PCI init hccr 0x%x and hcor 0x%x hc_length %d\n",
+                       (uint32_t)hccr, (uint32_t)hcor,
+                       (uint32_t)HC_LENGTH(ehci_readl(&hccr->cr_capbase)));
+
        return 0;
 }
 
index 6fae8baf9505972e4403dc7bba46e53f78ac6592..945ab64f95119fbf8790813f43a540af2d63d64b 100644 (file)
@@ -166,11 +166,15 @@ struct usb_linux_config_descriptor {
 
 /* Queue Element Transfer Descriptor (qTD). */
 struct qTD {
-       uint32_t qt_next;
+       /* this part defined by EHCI spec */
+       uint32_t qt_next;               /* see EHCI 3.5.1 */
 #define        QT_NEXT_TERMINATE       1
-       uint32_t qt_altnext;
-       uint32_t qt_token;
-       uint32_t qt_buffer[5];
+       uint32_t qt_altnext;            /* see EHCI 3.5.2 */
+       uint32_t qt_token;              /* see EHCI 3.5.3 */
+       uint32_t qt_buffer[5];          /* see EHCI 3.5.4 */
+       uint32_t qt_buffer_hi[5];       /* Appendix B */
+       /* pad struct for 32 byte alignment */
+       uint32_t unused[3];
 };
 
 /* Queue Head (QH). */
index 6fe2c39bce800cb6eac58008431f8c3a2fb36f10..545ebf4b502322cdecd71ddd2b5cc72ff24f209a 100644 (file)
@@ -76,7 +76,7 @@ void musb_start(void)
  * epinfo      - Pointer to EP configuration table
  * cnt         - Number of entries in the EP conf table.
  */
-void musb_configure_ep(struct musb_epinfo *epinfo, u8 cnt)
+void musb_configure_ep(const struct musb_epinfo *epinfo, u8 cnt)
 {
        u16 csr;
        u16 fifoaddr = 64; /* First 64 bytes of FIFO reserved for EP0 */
index 8f73876f8067ec1f7d8cdced275c6eaa141841a5..a8adcce00fa4ae558cd72944faa7dad4f956ebf1 100644 (file)
@@ -357,7 +357,7 @@ extern struct musb_regs             *musbr;
 
 /* exported functions */
 extern void musb_start(void);
-extern void musb_configure_ep(struct musb_epinfo *epinfo, u8 cnt);
+extern void musb_configure_ep(const struct musb_epinfo *epinfo, u8 cnt);
 extern void write_fifo(u8 ep, u32 length, void *fifo_data);
 extern void read_fifo(u8 ep, u32 length, void *fifo_data);
 
index f38b279096c31fbfaf5abb161526ffa82eca19c1..8b0c61d642662609057c1a87dbf98850e0ee0888 100644 (file)
@@ -29,7 +29,7 @@
 #define USB_MSC_BBB_GET_MAX_LUN        0xFE
 
 /* Endpoint configuration information */
-static struct musb_epinfo epinfo[3] = {
+static const struct musb_epinfo epinfo[3] = {
        {MUSB_BULK_EP, 1, 512}, /* EP1 - Bluk Out - 512 Bytes */
        {MUSB_BULK_EP, 0, 512}, /* EP1 - Bluk In  - 512 Bytes */
        {MUSB_INTR_EP, 0, 64}   /* EP2 - Interrupt IN - 64 Bytes */
@@ -41,7 +41,7 @@ static int rh_devnum;
 static u32 port_status;
 
 /* Device descriptor */
-static u8 root_hub_dev_des[] = {
+static const u8 root_hub_dev_des[] = {
        0x12,                   /*  __u8  bLength; */
        0x01,                   /*  __u8  bDescriptorType; Device */
        0x00,                   /*  __u16 bcdUSB; v1.1 */
@@ -63,7 +63,7 @@ static u8 root_hub_dev_des[] = {
 };
 
 /* Configuration descriptor */
-static u8 root_hub_config_des[] = {
+static const u8 root_hub_config_des[] = {
        0x09,                   /*  __u8  bLength; */
        0x02,                   /*  __u8  bDescriptorType; Configuration */
        0x19,                   /*  __u16 wTotalLength; */
@@ -96,14 +96,14 @@ static u8 root_hub_config_des[] = {
        0xff                    /*  __u8  ep_bInterval; 255 ms */
 };
 
-static unsigned char root_hub_str_index0[] = {
+static const unsigned char root_hub_str_index0[] = {
        0x04,                   /*  __u8  bLength; */
        0x03,                   /*  __u8  bDescriptorType; String-descriptor */
        0x09,                   /*  __u8  lang ID */
        0x04,                   /*  __u8  lang ID */
 };
 
-static unsigned char root_hub_str_index1[] = {
+static const unsigned char root_hub_str_index1[] = {
        0x1c,                   /*  __u8  bLength; */
        0x03,                   /*  __u8  bDescriptorType; String-descriptor */
        'M',                    /*  __u8  Unicode */
@@ -557,7 +557,7 @@ static int musb_submit_rh_msg(struct usb_device *dev, unsigned long pipe,
        int len = 0;
        int stat = 0;
        u32 datab[4];
-       u8 *data_buf = (u8 *) datab;
+       const u8 *data_buf = (u8 *) datab;
        u16 bmRType_bReq;
        u16 wValue;
        u16 wIndex;
@@ -778,25 +778,27 @@ static int musb_submit_rh_msg(struct usb_device *dev, unsigned long pipe,
 
                break;
 
-       case RH_GET_DESCRIPTOR | RH_CLASS:
+       case RH_GET_DESCRIPTOR | RH_CLASS: {
+               u8 *_data_buf = (u8 *) datab;
                debug("RH_GET_DESCRIPTOR | RH_CLASS\n");
 
-               data_buf[0] = 0x09;     /* min length; */
-               data_buf[1] = 0x29;
-               data_buf[2] = 0x1;      /* 1 port */
-               data_buf[3] = 0x01;     /* per-port power switching */
-               data_buf[3] |= 0x10;    /* no overcurrent reporting */
+               _data_buf[0] = 0x09;    /* min length; */
+               _data_buf[1] = 0x29;
+               _data_buf[2] = 0x1;     /* 1 port */
+               _data_buf[3] = 0x01;    /* per-port power switching */
+               _data_buf[3] |= 0x10;   /* no overcurrent reporting */
 
                /* Corresponds to data_buf[4-7] */
-               data_buf[4] = 0;
-               data_buf[5] = 5;
-               data_buf[6] = 0;
-               data_buf[7] = 0x02;
-               data_buf[8] = 0xff;
+               _data_buf[4] = 0;
+               _data_buf[5] = 5;
+               _data_buf[6] = 0;
+               _data_buf[7] = 0x02;
+               _data_buf[8] = 0xff;
 
                len = min_t(unsigned int, leni,
                            min_t(unsigned int, data_buf[0], wLength));
                break;
+       }
 
        case RH_GET_CONFIGURATION:
                debug("RH_GET_CONFIGURATION\n");
index 4be82e739603d87935b128a6cad7a349e9b6548e..5b7b2612686393eda7b3cc6bcdd2bbc19e90cccb 100644 (file)
@@ -34,6 +34,7 @@ COBJS-$(CONFIG_VIDEO_CT69000) += ct69000.o videomodes.o
 COBJS-$(CONFIG_VIDEO_MB862xx) += mb862xx.o videomodes.o
 COBJS-$(CONFIG_VIDEO_MB86R0xGDC) += mb86r0xgdc.o videomodes.o
 COBJS-$(CONFIG_VIDEO_MX3) += mx3fb.o
+COBJS-$(CONFIG_VIDEO_MX5) += mxc_ipuv3_fb.o ipu_common.o ipu_disp.o
 COBJS-$(CONFIG_VIDEO_SED13806) += sed13806.o
 COBJS-$(CONFIG_SED156X) += sed156x.o
 COBJS-$(CONFIG_VIDEO_SM501) += sm501.o
diff --git a/drivers/video/ipu.h b/drivers/video/ipu.h
new file mode 100644 (file)
index 0000000..d8bc287
--- /dev/null
@@ -0,0 +1,321 @@
+/*
+ * Porting to u-boot:
+ *
+ * (C) Copyright 2010
+ * Stefano Babic, DENX Software Engineering, sbabic@denx.de
+ *
+ * Linux IPU driver for MX51:
+ *
+ * (C) Copyright 2005-2010 Freescale Semiconductor, Inc.
+ *
+ * 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 __ASM_ARCH_IPU_H__
+#define __ASM_ARCH_IPU_H__
+
+#include <linux/types.h>
+
+#define IDMA_CHAN_INVALID      0xFF
+#define HIGH_RESOLUTION_WIDTH  1024
+
+struct clk {
+       const char *name;
+       int id;
+       /* Source clock this clk depends on */
+       struct clk *parent;
+       /* Secondary clock to enable/disable with this clock */
+       struct clk *secondary;
+       /* Current clock rate */
+       unsigned long rate;
+       /* Reference count of clock enable/disable */
+       __s8 usecount;
+       /* Register bit position for clock's enable/disable control. */
+       u8 enable_shift;
+       /* Register address for clock's enable/disable control. */
+       void *enable_reg;
+       u32 flags;
+       /*
+        * Function ptr to recalculate the clock's rate based on parent
+        * clock's rate
+        */
+       void (*recalc) (struct clk *);
+       /*
+        * Function ptr to set the clock to a new rate. The rate must match a
+        * supported rate returned from round_rate. Leave blank if clock is not
+       * programmable
+        */
+       int (*set_rate) (struct clk *, unsigned long);
+       /*
+        * Function ptr to round the requested clock rate to the nearest
+        * supported rate that is less than or equal to the requested rate.
+        */
+       unsigned long (*round_rate) (struct clk *, unsigned long);
+       /*
+        * Function ptr to enable the clock. Leave blank if clock can not
+        * be gated.
+        */
+       int (*enable) (struct clk *);
+       /*
+        * Function ptr to disable the clock. Leave blank if clock can not
+        * be gated.
+        */
+       void (*disable) (struct clk *);
+       /* Function ptr to set the parent clock of the clock. */
+       int (*set_parent) (struct clk *, struct clk *);
+};
+
+/*
+ * Enumeration of Synchronous (Memory-less) panel types
+ */
+typedef enum {
+       IPU_PANEL_SHARP_TFT,
+       IPU_PANEL_TFT,
+} ipu_panel_t;
+
+/*  IPU Pixel format definitions */
+#define fourcc(a, b, c, d)\
+       (((__u32)(a)<<0)|((__u32)(b)<<8)|((__u32)(c)<<16)|((__u32)(d)<<24))
+
+/*
+ * Pixel formats are defined with ASCII FOURCC code. The pixel format codes are
+ * the same used by V4L2 API.
+ */
+
+#define IPU_PIX_FMT_GENERIC fourcc('I', 'P', 'U', '0')
+#define IPU_PIX_FMT_GENERIC_32 fourcc('I', 'P', 'U', '1')
+#define IPU_PIX_FMT_LVDS666 fourcc('L', 'V', 'D', '6')
+#define IPU_PIX_FMT_LVDS888 fourcc('L', 'V', 'D', '8')
+
+#define IPU_PIX_FMT_RGB332  fourcc('R', 'G', 'B', '1') /*<  8  RGB-3-3-2    */
+#define IPU_PIX_FMT_RGB555  fourcc('R', 'G', 'B', 'O') /*< 16  RGB-5-5-5    */
+#define IPU_PIX_FMT_RGB565  fourcc('R', 'G', 'B', 'P') /*< 1 6  RGB-5-6-5   */
+#define IPU_PIX_FMT_RGB666  fourcc('R', 'G', 'B', '6') /*< 18  RGB-6-6-6    */
+#define IPU_PIX_FMT_BGR666  fourcc('B', 'G', 'R', '6') /*< 18  BGR-6-6-6    */
+#define IPU_PIX_FMT_BGR24   fourcc('B', 'G', 'R', '3') /*< 24  BGR-8-8-8    */
+#define IPU_PIX_FMT_RGB24   fourcc('R', 'G', 'B', '3') /*< 24  RGB-8-8-8    */
+#define IPU_PIX_FMT_BGR32   fourcc('B', 'G', 'R', '4') /*< 32  BGR-8-8-8-8  */
+#define IPU_PIX_FMT_BGRA32  fourcc('B', 'G', 'R', 'A') /*< 32  BGR-8-8-8-8  */
+#define IPU_PIX_FMT_RGB32   fourcc('R', 'G', 'B', '4') /*< 32  RGB-8-8-8-8  */
+#define IPU_PIX_FMT_RGBA32  fourcc('R', 'G', 'B', 'A') /*< 32  RGB-8-8-8-8  */
+#define IPU_PIX_FMT_ABGR32  fourcc('A', 'B', 'G', 'R') /*< 32  ABGR-8-8-8-8 */
+
+/* YUV Interleaved Formats */
+#define IPU_PIX_FMT_YUYV    fourcc('Y', 'U', 'Y', 'V') /*< 16 YUV 4:2:2 */
+#define IPU_PIX_FMT_UYVY    fourcc('U', 'Y', 'V', 'Y') /*< 16 YUV 4:2:2 */
+#define IPU_PIX_FMT_Y41P    fourcc('Y', '4', '1', 'P') /*< 12 YUV 4:1:1 */
+#define IPU_PIX_FMT_YUV444  fourcc('Y', '4', '4', '4') /*< 24 YUV 4:4:4 */
+
+/* two planes -- one Y, one Cb + Cr interleaved  */
+#define IPU_PIX_FMT_NV12    fourcc('N', 'V', '1', '2') /* 12  Y/CbCr 4:2:0  */
+
+#define IPU_PIX_FMT_GREY    fourcc('G', 'R', 'E', 'Y') /*< 8  Greyscale */
+#define IPU_PIX_FMT_YVU410P fourcc('Y', 'V', 'U', '9') /*< 9  YVU 4:1:0 */
+#define IPU_PIX_FMT_YUV410P fourcc('Y', 'U', 'V', '9') /*< 9  YUV 4:1:0 */
+#define IPU_PIX_FMT_YVU420P fourcc('Y', 'V', '1', '2') /*< 12 YVU 4:2:0 */
+#define IPU_PIX_FMT_YUV420P fourcc('I', '4', '2', '0') /*< 12 YUV 4:2:0 */
+#define IPU_PIX_FMT_YUV420P2 fourcc('Y', 'U', '1', '2')        /*< 12 YUV 4:2:0 */
+#define IPU_PIX_FMT_YVU422P fourcc('Y', 'V', '1', '6') /*< 16 YVU 4:2:2 */
+#define IPU_PIX_FMT_YUV422P fourcc('4', '2', '2', 'P') /*< 16 YUV 4:2:2 */
+
+/*
+ * IPU Driver channels definitions.
+ * Note these are different from IDMA channels
+ */
+#define IPU_MAX_CH     32
+#define _MAKE_CHAN(num, v_in, g_in, a_in, out) \
+       ((num << 24) | (v_in << 18) | (g_in << 12) | (a_in << 6) | out)
+#define _MAKE_ALT_CHAN(ch)             (ch | (IPU_MAX_CH << 24))
+#define IPU_CHAN_ID(ch)                        (ch >> 24)
+#define IPU_CHAN_ALT(ch)               (ch & 0x02000000)
+#define IPU_CHAN_ALPHA_IN_DMA(ch)      ((uint32_t) (ch >> 6) & 0x3F)
+#define IPU_CHAN_GRAPH_IN_DMA(ch)      ((uint32_t) (ch >> 12) & 0x3F)
+#define IPU_CHAN_VIDEO_IN_DMA(ch)      ((uint32_t) (ch >> 18) & 0x3F)
+#define IPU_CHAN_OUT_DMA(ch)           ((uint32_t) (ch & 0x3F))
+#define NO_DMA 0x3F
+#define ALT    1
+
+/*
+ * Enumeration of IPU logical channels. An IPU logical channel is defined as a
+ * combination of an input (memory to IPU), output (IPU to memory), and/or
+ * secondary input IDMA channels and in some cases an Image Converter task.
+ * Some channels consist of only an input or output.
+ */
+typedef enum {
+       CHAN_NONE = -1,
+
+       MEM_DC_SYNC = _MAKE_CHAN(7, 28, NO_DMA, NO_DMA, NO_DMA),
+       MEM_DC_ASYNC = _MAKE_CHAN(8, 41, NO_DMA, NO_DMA, NO_DMA),
+       MEM_BG_SYNC = _MAKE_CHAN(9, 23, NO_DMA, 51, NO_DMA),
+       MEM_FG_SYNC = _MAKE_CHAN(10, 27, NO_DMA, 31, NO_DMA),
+
+       MEM_BG_ASYNC0 = _MAKE_CHAN(11, 24, NO_DMA, 52, NO_DMA),
+       MEM_FG_ASYNC0 = _MAKE_CHAN(12, 29, NO_DMA, 33, NO_DMA),
+       MEM_BG_ASYNC1 = _MAKE_ALT_CHAN(MEM_BG_ASYNC0),
+       MEM_FG_ASYNC1 = _MAKE_ALT_CHAN(MEM_FG_ASYNC0),
+
+       DIRECT_ASYNC0 = _MAKE_CHAN(13, NO_DMA, NO_DMA, NO_DMA, NO_DMA),
+       DIRECT_ASYNC1 = _MAKE_CHAN(14, NO_DMA, NO_DMA, NO_DMA, NO_DMA),
+
+} ipu_channel_t;
+
+/*
+ * Enumeration of types of buffers for a logical channel.
+ */
+typedef enum {
+       IPU_OUTPUT_BUFFER = 0,  /*< Buffer for output from IPU */
+       IPU_ALPHA_IN_BUFFER = 1,        /*< Buffer for input to IPU */
+       IPU_GRAPH_IN_BUFFER = 2,        /*< Buffer for input to IPU */
+       IPU_VIDEO_IN_BUFFER = 3,        /*< Buffer for input to IPU */
+       IPU_INPUT_BUFFER = IPU_VIDEO_IN_BUFFER,
+       IPU_SEC_INPUT_BUFFER = IPU_GRAPH_IN_BUFFER,
+} ipu_buffer_t;
+
+#define IPU_PANEL_SERIAL               1
+#define IPU_PANEL_PARALLEL             2
+
+struct ipu_channel {
+       u8 video_in_dma;
+       u8 alpha_in_dma;
+       u8 graph_in_dma;
+       u8 out_dma;
+};
+
+enum ipu_dmfc_type {
+       DMFC_NORMAL = 0,
+       DMFC_HIGH_RESOLUTION_DC,
+       DMFC_HIGH_RESOLUTION_DP,
+       DMFC_HIGH_RESOLUTION_ONLY_DP,
+};
+
+
+/*
+ * Union of initialization parameters for a logical channel.
+ */
+typedef union {
+       struct {
+               uint32_t di;
+               unsigned char interlaced;
+       } mem_dc_sync;
+       struct {
+               uint32_t temp;
+       } mem_sdc_fg;
+       struct {
+               uint32_t di;
+               unsigned char interlaced;
+               uint32_t in_pixel_fmt;
+               uint32_t out_pixel_fmt;
+               unsigned char alpha_chan_en;
+       } mem_dp_bg_sync;
+       struct {
+               uint32_t temp;
+       } mem_sdc_bg;
+       struct {
+               uint32_t di;
+               unsigned char interlaced;
+               uint32_t in_pixel_fmt;
+               uint32_t out_pixel_fmt;
+               unsigned char alpha_chan_en;
+       } mem_dp_fg_sync;
+} ipu_channel_params_t;
+
+/*
+ * Bitfield of Display Interface signal polarities.
+ */
+typedef struct {
+       unsigned datamask_en:1;
+       unsigned ext_clk:1;
+       unsigned interlaced:1;
+       unsigned odd_field_first:1;
+       unsigned clksel_en:1;
+       unsigned clkidle_en:1;
+       unsigned data_pol:1;    /* true = inverted */
+       unsigned clk_pol:1;     /* true = rising edge */
+       unsigned enable_pol:1;
+       unsigned Hsync_pol:1;   /* true = active high */
+       unsigned Vsync_pol:1;
+} ipu_di_signal_cfg_t;
+
+typedef enum {
+       RGB,
+       YCbCr,
+       YUV
+} ipu_color_space_t;
+
+/* Common IPU API */
+int32_t ipu_init_channel(ipu_channel_t channel, ipu_channel_params_t *params);
+void ipu_uninit_channel(ipu_channel_t channel);
+
+int32_t ipu_init_channel_buffer(ipu_channel_t channel, ipu_buffer_t type,
+                               uint32_t pixel_fmt,
+                               uint16_t width, uint16_t height,
+                               uint32_t stride,
+                               dma_addr_t phyaddr_0, dma_addr_t phyaddr_1,
+                               uint32_t u_offset, uint32_t v_offset);
+
+int32_t ipu_update_channel_buffer(ipu_channel_t channel, ipu_buffer_t type,
+                                 uint32_t bufNum, dma_addr_t phyaddr);
+
+int32_t ipu_is_channel_busy(ipu_channel_t channel);
+void ipu_clear_buffer_ready(ipu_channel_t channel, ipu_buffer_t type,
+               uint32_t bufNum);
+int32_t ipu_enable_channel(ipu_channel_t channel);
+int32_t ipu_disable_channel(ipu_channel_t channel);
+
+int32_t ipu_init_sync_panel(int disp,
+                           uint32_t pixel_clk,
+                           uint16_t width, uint16_t height,
+                           uint32_t pixel_fmt,
+                           uint16_t h_start_width, uint16_t h_sync_width,
+                           uint16_t h_end_width, uint16_t v_start_width,
+                           uint16_t v_sync_width, uint16_t v_end_width,
+                           uint32_t v_to_h_sync, ipu_di_signal_cfg_t sig);
+
+int32_t ipu_disp_set_global_alpha(ipu_channel_t channel, unsigned char enable,
+                                 uint8_t alpha);
+int32_t ipu_disp_set_color_key(ipu_channel_t channel, unsigned char enable,
+                              uint32_t colorKey);
+
+uint32_t bytes_per_pixel(uint32_t fmt);
+
+void clk_enable(struct clk *clk);
+void clk_disable(struct clk *clk);
+u32 clk_get_rate(struct clk *clk);
+int clk_set_rate(struct clk *clk, unsigned long rate);
+long clk_round_rate(struct clk *clk, unsigned long rate);
+int clk_set_parent(struct clk *clk, struct clk *parent);
+int clk_get_usecount(struct clk *clk);
+struct clk *clk_get_parent(struct clk *clk);
+
+void ipu_dump_registers(void);
+int ipu_probe(void);
+
+void ipu_dmfc_init(int dmfc_type, int first);
+void ipu_init_dc_mappings(void);
+void ipu_dmfc_set_wait4eot(int dma_chan, int width);
+void ipu_dc_init(int dc_chan, int di, unsigned char interlaced);
+void ipu_dc_uninit(int dc_chan);
+void ipu_dp_dc_enable(ipu_channel_t channel);
+int ipu_dp_init(ipu_channel_t channel, uint32_t in_pixel_fmt,
+                uint32_t out_pixel_fmt);
+void ipu_dp_uninit(ipu_channel_t channel);
+void ipu_dp_dc_disable(ipu_channel_t channel, unsigned char swap);
+ipu_color_space_t format_to_colorspace(uint32_t fmt);
+
+#endif
diff --git a/drivers/video/ipu_common.c b/drivers/video/ipu_common.c
new file mode 100644 (file)
index 0000000..9d20c86
--- /dev/null
@@ -0,0 +1,1183 @@
+/*
+ * Porting to u-boot:
+ *
+ * (C) Copyright 2010
+ * Stefano Babic, DENX Software Engineering, sbabic@denx.de
+ *
+ * Linux IPU driver for MX51:
+ *
+ * (C) Copyright 2005-2010 Freescale Semiconductor, Inc.
+ *
+ * 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
+ */
+
+/* #define DEBUG */
+#include <common.h>
+#include <linux/types.h>
+#include <linux/err.h>
+#include <asm/io.h>
+#include <asm/errno.h>
+#include <asm/arch/imx-regs.h>
+#include <asm/arch/crm_regs.h>
+#include "ipu.h"
+#include "ipu_regs.h"
+
+extern struct mxc_ccm_reg *mxc_ccm;
+extern u32 *ipu_cpmem_base;
+
+struct ipu_ch_param_word {
+       uint32_t data[5];
+       uint32_t res[3];
+};
+
+struct ipu_ch_param {
+       struct ipu_ch_param_word word[2];
+};
+
+#define ipu_ch_param_addr(ch) (((struct ipu_ch_param *)ipu_cpmem_base) + (ch))
+
+#define _param_word(base, w) \
+       (((struct ipu_ch_param *)(base))->word[(w)].data)
+
+#define ipu_ch_param_set_field(base, w, bit, size, v) { \
+       int i = (bit) / 32; \
+       int off = (bit) % 32; \
+       _param_word(base, w)[i] |= (v) << off; \
+       if (((bit) + (size) - 1) / 32 > i) { \
+               _param_word(base, w)[i + 1] |= (v) >> (off ? (32 - off) : 0); \
+       } \
+}
+
+#define ipu_ch_param_mod_field(base, w, bit, size, v) { \
+       int i = (bit) / 32; \
+       int off = (bit) % 32; \
+       u32 mask = (1UL << size) - 1; \
+       u32 temp = _param_word(base, w)[i]; \
+       temp &= ~(mask << off); \
+       _param_word(base, w)[i] = temp | (v) << off; \
+       if (((bit) + (size) - 1) / 32 > i) { \
+               temp = _param_word(base, w)[i + 1]; \
+               temp &= ~(mask >> (32 - off)); \
+               _param_word(base, w)[i + 1] = \
+                       temp | ((v) >> (off ? (32 - off) : 0)); \
+       } \
+}
+
+#define ipu_ch_param_read_field(base, w, bit, size) ({ \
+       u32 temp2; \
+       int i = (bit) / 32; \
+       int off = (bit) % 32; \
+       u32 mask = (1UL << size) - 1; \
+       u32 temp1 = _param_word(base, w)[i]; \
+       temp1 = mask & (temp1 >> off); \
+       if (((bit)+(size) - 1) / 32 > i) { \
+               temp2 = _param_word(base, w)[i + 1]; \
+               temp2 &= mask >> (off ? (32 - off) : 0); \
+               temp1 |= temp2 << (off ? (32 - off) : 0); \
+       } \
+       temp1; \
+})
+
+
+void clk_enable(struct clk *clk)
+{
+       if (clk) {
+               if (clk->usecount++ == 0) {
+                       clk->enable(clk);
+               }
+       }
+}
+
+void clk_disable(struct clk *clk)
+{
+       if (clk) {
+               if (!(--clk->usecount)) {
+                       if (clk->disable)
+                               clk->disable(clk);
+               }
+       }
+}
+
+int clk_get_usecount(struct clk *clk)
+{
+       if (clk == NULL)
+               return 0;
+
+       return clk->usecount;
+}
+
+u32 clk_get_rate(struct clk *clk)
+{
+       if (!clk)
+               return 0;
+
+       return clk->rate;
+}
+
+struct clk *clk_get_parent(struct clk *clk)
+{
+       if (!clk)
+               return 0;
+
+       return clk->parent;
+}
+
+int clk_set_rate(struct clk *clk, unsigned long rate)
+{
+       if (clk && clk->set_rate)
+               clk->set_rate(clk, rate);
+       return clk->rate;
+}
+
+long clk_round_rate(struct clk *clk, unsigned long rate)
+{
+       if (clk == NULL || !clk->round_rate)
+               return 0;
+
+       return clk->round_rate(clk, rate);
+}
+
+int clk_set_parent(struct clk *clk, struct clk *parent)
+{
+       clk->parent = parent;
+       if (clk->set_parent)
+               return clk->set_parent(clk, parent);
+       return 0;
+}
+
+static int clk_ipu_enable(struct clk *clk)
+{
+       u32 reg;
+
+       reg = __raw_readl(clk->enable_reg);
+       reg |= MXC_CCM_CCGR_CG_MASK << clk->enable_shift;
+       __raw_writel(reg, clk->enable_reg);
+
+       /* Handshake with IPU when certain clock rates are changed. */
+       reg = __raw_readl(&mxc_ccm->ccdr);
+       reg &= ~MXC_CCM_CCDR_IPU_HS_MASK;
+       __raw_writel(reg, &mxc_ccm->ccdr);
+
+       /* Handshake with IPU when LPM is entered as its enabled. */
+       reg = __raw_readl(&mxc_ccm->clpcr);
+       reg &= ~MXC_CCM_CLPCR_BYPASS_IPU_LPM_HS;
+       __raw_writel(reg, &mxc_ccm->clpcr);
+
+       return 0;
+}
+
+static void clk_ipu_disable(struct clk *clk)
+{
+       u32 reg;
+
+       reg = __raw_readl(clk->enable_reg);
+       reg &= ~(MXC_CCM_CCGR_CG_MASK << clk->enable_shift);
+       __raw_writel(reg, clk->enable_reg);
+
+       /*
+        * No handshake with IPU whe dividers are changed
+        * as its not enabled.
+        */
+       reg = __raw_readl(&mxc_ccm->ccdr);
+       reg |= MXC_CCM_CCDR_IPU_HS_MASK;
+       __raw_writel(reg, &mxc_ccm->ccdr);
+
+       /* No handshake with IPU when LPM is entered as its not enabled. */
+       reg = __raw_readl(&mxc_ccm->clpcr);
+       reg |= MXC_CCM_CLPCR_BYPASS_IPU_LPM_HS;
+       __raw_writel(reg, &mxc_ccm->clpcr);
+}
+
+
+static struct clk ipu_clk = {
+       .name = "ipu_clk",
+       .rate = 133000000,
+       .enable_reg = (u32 *)(MXC_CCM_BASE +
+               offsetof(struct mxc_ccm_reg, CCGR5)),
+       .enable_shift = MXC_CCM_CCGR5_CG5_OFFSET,
+       .enable = clk_ipu_enable,
+       .disable = clk_ipu_disable,
+       .usecount = 0,
+};
+
+/* Globals */
+struct clk *g_ipu_clk;
+unsigned char g_ipu_clk_enabled;
+struct clk *g_di_clk[2];
+struct clk *g_pixel_clk[2];
+unsigned char g_dc_di_assignment[10];
+uint32_t g_channel_init_mask;
+uint32_t g_channel_enable_mask;
+
+static int ipu_dc_use_count;
+static int ipu_dp_use_count;
+static int ipu_dmfc_use_count;
+static int ipu_di_use_count[2];
+
+u32 *ipu_cpmem_base;
+u32 *ipu_dc_tmpl_reg;
+
+/* Static functions */
+
+static inline void ipu_ch_param_set_high_priority(uint32_t ch)
+{
+       ipu_ch_param_mod_field(ipu_ch_param_addr(ch), 1, 93, 2, 1);
+};
+
+static inline uint32_t channel_2_dma(ipu_channel_t ch, ipu_buffer_t type)
+{
+       return ((uint32_t) ch >> (6 * type)) & 0x3F;
+};
+
+/* Either DP BG or DP FG can be graphic window */
+static inline int ipu_is_dp_graphic_chan(uint32_t dma_chan)
+{
+       return (dma_chan == 23 || dma_chan == 27);
+}
+
+static inline int ipu_is_dmfc_chan(uint32_t dma_chan)
+{
+       return ((dma_chan >= 23) && (dma_chan <= 29));
+}
+
+
+static inline void ipu_ch_param_set_buffer(uint32_t ch, int bufNum,
+                                           dma_addr_t phyaddr)
+{
+       ipu_ch_param_mod_field(ipu_ch_param_addr(ch), 1, 29 * bufNum, 29,
+                              phyaddr / 8);
+};
+
+#define idma_is_valid(ch)      (ch != NO_DMA)
+#define idma_mask(ch)          (idma_is_valid(ch) ? (1UL << (ch & 0x1F)) : 0)
+#define idma_is_set(reg, dma)  (__raw_readl(reg(dma)) & idma_mask(dma))
+
+static void ipu_pixel_clk_recalc(struct clk *clk)
+{
+       u32 div = __raw_readl(DI_BS_CLKGEN0(clk->id));
+       if (div == 0)
+               clk->rate = 0;
+       else
+               clk->rate = (clk->parent->rate * 16) / div;
+}
+
+static unsigned long ipu_pixel_clk_round_rate(struct clk *clk,
+       unsigned long rate)
+{
+       u32 div, div1;
+       u32 tmp;
+       /*
+        * Calculate divider
+        * Fractional part is 4 bits,
+        * so simply multiply by 2^4 to get fractional part.
+        */
+       tmp = (clk->parent->rate * 16);
+       div = tmp / rate;
+
+       if (div < 0x10)            /* Min DI disp clock divider is 1 */
+               div = 0x10;
+       if (div & ~0xFEF)
+               div &= 0xFF8;
+       else {
+               div1 = div & 0xFE0;
+               if ((tmp/div1 - tmp/div) < rate / 4)
+                       div = div1;
+               else
+                       div &= 0xFF8;
+       }
+       return (clk->parent->rate * 16) / div;
+}
+
+static int ipu_pixel_clk_set_rate(struct clk *clk, unsigned long rate)
+{
+       u32 div = (clk->parent->rate * 16) / rate;
+
+       __raw_writel(div, DI_BS_CLKGEN0(clk->id));
+
+       /* Setup pixel clock timing */
+       __raw_writel((div / 16) << 16, DI_BS_CLKGEN1(clk->id));
+
+       clk->rate = (clk->parent->rate * 16) / div;
+       return 0;
+}
+
+static int ipu_pixel_clk_enable(struct clk *clk)
+{
+       u32 disp_gen = __raw_readl(IPU_DISP_GEN);
+       disp_gen |= clk->id ? DI1_COUNTER_RELEASE : DI0_COUNTER_RELEASE;
+       __raw_writel(disp_gen, IPU_DISP_GEN);
+
+       return 0;
+}
+
+static void ipu_pixel_clk_disable(struct clk *clk)
+{
+       u32 disp_gen = __raw_readl(IPU_DISP_GEN);
+       disp_gen &= clk->id ? ~DI1_COUNTER_RELEASE : ~DI0_COUNTER_RELEASE;
+       __raw_writel(disp_gen, IPU_DISP_GEN);
+
+}
+
+static int ipu_pixel_clk_set_parent(struct clk *clk, struct clk *parent)
+{
+       u32 di_gen = __raw_readl(DI_GENERAL(clk->id));
+
+       if (parent == g_ipu_clk)
+               di_gen &= ~DI_GEN_DI_CLK_EXT;
+       else if (!IS_ERR(g_di_clk[clk->id]) && parent == g_di_clk[clk->id])
+               di_gen |= DI_GEN_DI_CLK_EXT;
+       else
+               return -EINVAL;
+
+       __raw_writel(di_gen, DI_GENERAL(clk->id));
+       ipu_pixel_clk_recalc(clk);
+       return 0;
+}
+
+static struct clk pixel_clk[] = {
+       {
+       .name = "pixel_clk",
+       .id = 0,
+       .recalc = ipu_pixel_clk_recalc,
+       .set_rate = ipu_pixel_clk_set_rate,
+       .round_rate = ipu_pixel_clk_round_rate,
+       .set_parent = ipu_pixel_clk_set_parent,
+       .enable = ipu_pixel_clk_enable,
+       .disable = ipu_pixel_clk_disable,
+       .usecount = 0,
+       },
+       {
+       .name = "pixel_clk",
+       .id = 1,
+       .recalc = ipu_pixel_clk_recalc,
+       .set_rate = ipu_pixel_clk_set_rate,
+       .round_rate = ipu_pixel_clk_round_rate,
+       .set_parent = ipu_pixel_clk_set_parent,
+       .enable = ipu_pixel_clk_enable,
+       .disable = ipu_pixel_clk_disable,
+       .usecount = 0,
+       },
+};
+
+/*
+ * This function resets IPU
+ */
+void ipu_reset(void)
+{
+       u32 *reg;
+       u32 value;
+
+       reg = (u32 *)SRC_BASE_ADDR;
+       value = __raw_readl(reg);
+       value = value | SW_IPU_RST;
+       __raw_writel(value, reg);
+}
+
+/*
+ * This function is called by the driver framework to initialize the IPU
+ * hardware.
+ *
+ * @param      dev     The device structure for the IPU passed in by the
+ *                     driver framework.
+ *
+ * @return      Returns 0 on success or negative error code on error
+ */
+int ipu_probe(void)
+{
+       unsigned long ipu_base;
+       u32 temp;
+
+       u32 *reg_hsc_mcd = (u32 *)MIPI_HSC_BASE_ADDR;
+       u32 *reg_hsc_mxt_conf = (u32 *)(MIPI_HSC_BASE_ADDR + 0x800);
+
+        __raw_writel(0xF00, reg_hsc_mcd);
+
+       /* CSI mode reserved*/
+       temp = __raw_readl(reg_hsc_mxt_conf);
+        __raw_writel(temp | 0x0FF, reg_hsc_mxt_conf);
+
+       temp = __raw_readl(reg_hsc_mxt_conf);
+       __raw_writel(temp | 0x10000, reg_hsc_mxt_conf);
+
+       ipu_base = IPU_CTRL_BASE_ADDR;
+       ipu_cpmem_base = (u32 *)(ipu_base + IPU_CPMEM_REG_BASE);
+       ipu_dc_tmpl_reg = (u32 *)(ipu_base + IPU_DC_TMPL_REG_BASE);
+
+       g_pixel_clk[0] = &pixel_clk[0];
+       g_pixel_clk[1] = &pixel_clk[1];
+
+       g_ipu_clk = &ipu_clk;
+       debug("ipu_clk = %u\n", clk_get_rate(g_ipu_clk));
+
+       ipu_reset();
+
+       clk_set_parent(g_pixel_clk[0], g_ipu_clk);
+       clk_set_parent(g_pixel_clk[1], g_ipu_clk);
+       clk_enable(g_ipu_clk);
+
+       g_di_clk[0] = NULL;
+       g_di_clk[1] = NULL;
+
+       __raw_writel(0x807FFFFF, IPU_MEM_RST);
+       while (__raw_readl(IPU_MEM_RST) & 0x80000000)
+               ;
+
+       ipu_init_dc_mappings();
+
+       __raw_writel(0, IPU_INT_CTRL(5));
+       __raw_writel(0, IPU_INT_CTRL(6));
+       __raw_writel(0, IPU_INT_CTRL(9));
+       __raw_writel(0, IPU_INT_CTRL(10));
+
+       /* DMFC Init */
+       ipu_dmfc_init(DMFC_NORMAL, 1);
+
+       /* Set sync refresh channels as high priority */
+       __raw_writel(0x18800000L, IDMAC_CHA_PRI(0));
+
+       /* Set MCU_T to divide MCU access window into 2 */
+       __raw_writel(0x00400000L | (IPU_MCU_T_DEFAULT << 18), IPU_DISP_GEN);
+
+       clk_disable(g_ipu_clk);
+
+       return 0;
+}
+
+void ipu_dump_registers(void)
+{
+       debug("IPU_CONF = \t0x%08X\n", __raw_readl(IPU_CONF));
+       debug("IDMAC_CONF = \t0x%08X\n", __raw_readl(IDMAC_CONF));
+       debug("IDMAC_CHA_EN1 = \t0x%08X\n",
+              __raw_readl(IDMAC_CHA_EN(0)));
+       debug("IDMAC_CHA_EN2 = \t0x%08X\n",
+              __raw_readl(IDMAC_CHA_EN(32)));
+       debug("IDMAC_CHA_PRI1 = \t0x%08X\n",
+              __raw_readl(IDMAC_CHA_PRI(0)));
+       debug("IDMAC_CHA_PRI2 = \t0x%08X\n",
+              __raw_readl(IDMAC_CHA_PRI(32)));
+       debug("IPU_CHA_DB_MODE_SEL0 = \t0x%08X\n",
+              __raw_readl(IPU_CHA_DB_MODE_SEL(0)));
+       debug("IPU_CHA_DB_MODE_SEL1 = \t0x%08X\n",
+              __raw_readl(IPU_CHA_DB_MODE_SEL(32)));
+       debug("DMFC_WR_CHAN = \t0x%08X\n",
+              __raw_readl(DMFC_WR_CHAN));
+       debug("DMFC_WR_CHAN_DEF = \t0x%08X\n",
+              __raw_readl(DMFC_WR_CHAN_DEF));
+       debug("DMFC_DP_CHAN = \t0x%08X\n",
+              __raw_readl(DMFC_DP_CHAN));
+       debug("DMFC_DP_CHAN_DEF = \t0x%08X\n",
+              __raw_readl(DMFC_DP_CHAN_DEF));
+       debug("DMFC_IC_CTRL = \t0x%08X\n",
+              __raw_readl(DMFC_IC_CTRL));
+       debug("IPU_FS_PROC_FLOW1 = \t0x%08X\n",
+              __raw_readl(IPU_FS_PROC_FLOW1));
+       debug("IPU_FS_PROC_FLOW2 = \t0x%08X\n",
+              __raw_readl(IPU_FS_PROC_FLOW2));
+       debug("IPU_FS_PROC_FLOW3 = \t0x%08X\n",
+              __raw_readl(IPU_FS_PROC_FLOW3));
+       debug("IPU_FS_DISP_FLOW1 = \t0x%08X\n",
+              __raw_readl(IPU_FS_DISP_FLOW1));
+}
+
+/*
+ * This function is called to initialize a logical IPU channel.
+ *
+ * @param       channel Input parameter for the logical channel ID to init.
+ *
+ * @param       params  Input parameter containing union of channel
+ *                      initialization parameters.
+ *
+ * @return      Returns 0 on success or negative error code on fail
+ */
+int32_t ipu_init_channel(ipu_channel_t channel, ipu_channel_params_t *params)
+{
+       int ret = 0;
+       uint32_t ipu_conf;
+
+       debug("init channel = %d\n", IPU_CHAN_ID(channel));
+
+       if (g_ipu_clk_enabled == 0) {
+               g_ipu_clk_enabled = 1;
+               clk_enable(g_ipu_clk);
+       }
+
+
+       if (g_channel_init_mask & (1L << IPU_CHAN_ID(channel))) {
+               printf("Warning: channel already initialized %d\n",
+                       IPU_CHAN_ID(channel));
+       }
+
+       ipu_conf = __raw_readl(IPU_CONF);
+
+       switch (channel) {
+       case MEM_DC_SYNC:
+               if (params->mem_dc_sync.di > 1) {
+                       ret = -EINVAL;
+                       goto err;
+               }
+
+               g_dc_di_assignment[1] = params->mem_dc_sync.di;
+               ipu_dc_init(1, params->mem_dc_sync.di,
+                            params->mem_dc_sync.interlaced);
+               ipu_di_use_count[params->mem_dc_sync.di]++;
+               ipu_dc_use_count++;
+               ipu_dmfc_use_count++;
+               break;
+       case MEM_BG_SYNC:
+               if (params->mem_dp_bg_sync.di > 1) {
+                       ret = -EINVAL;
+                       goto err;
+               }
+
+               g_dc_di_assignment[5] = params->mem_dp_bg_sync.di;
+               ipu_dp_init(channel, params->mem_dp_bg_sync.in_pixel_fmt,
+                            params->mem_dp_bg_sync.out_pixel_fmt);
+               ipu_dc_init(5, params->mem_dp_bg_sync.di,
+                            params->mem_dp_bg_sync.interlaced);
+               ipu_di_use_count[params->mem_dp_bg_sync.di]++;
+               ipu_dc_use_count++;
+               ipu_dp_use_count++;
+               ipu_dmfc_use_count++;
+               break;
+       case MEM_FG_SYNC:
+               ipu_dp_init(channel, params->mem_dp_fg_sync.in_pixel_fmt,
+                            params->mem_dp_fg_sync.out_pixel_fmt);
+
+               ipu_dc_use_count++;
+               ipu_dp_use_count++;
+               ipu_dmfc_use_count++;
+               break;
+       default:
+               printf("Missing channel initialization\n");
+               break;
+       }
+
+       /* Enable IPU sub module */
+       g_channel_init_mask |= 1L << IPU_CHAN_ID(channel);
+       if (ipu_dc_use_count == 1)
+               ipu_conf |= IPU_CONF_DC_EN;
+       if (ipu_dp_use_count == 1)
+               ipu_conf |= IPU_CONF_DP_EN;
+       if (ipu_dmfc_use_count == 1)
+               ipu_conf |= IPU_CONF_DMFC_EN;
+       if (ipu_di_use_count[0] == 1) {
+               ipu_conf |= IPU_CONF_DI0_EN;
+       }
+       if (ipu_di_use_count[1] == 1) {
+               ipu_conf |= IPU_CONF_DI1_EN;
+       }
+
+       __raw_writel(ipu_conf, IPU_CONF);
+
+err:
+       return ret;
+}
+
+/*
+ * This function is called to uninitialize a logical IPU channel.
+ *
+ * @param       channel Input parameter for the logical channel ID to uninit.
+ */
+void ipu_uninit_channel(ipu_channel_t channel)
+{
+       uint32_t reg;
+       uint32_t in_dma, out_dma = 0;
+       uint32_t ipu_conf;
+
+       if ((g_channel_init_mask & (1L << IPU_CHAN_ID(channel))) == 0) {
+               debug("Channel already uninitialized %d\n",
+                       IPU_CHAN_ID(channel));
+               return;
+       }
+
+       /*
+        * Make sure channel is disabled
+        * Get input and output dma channels
+        */
+       in_dma = channel_2_dma(channel, IPU_OUTPUT_BUFFER);
+       out_dma = channel_2_dma(channel, IPU_VIDEO_IN_BUFFER);
+
+       if (idma_is_set(IDMAC_CHA_EN, in_dma) ||
+           idma_is_set(IDMAC_CHA_EN, out_dma)) {
+               printf(
+                       "Channel %d is not disabled, disable first\n",
+                       IPU_CHAN_ID(channel));
+               return;
+       }
+
+       ipu_conf = __raw_readl(IPU_CONF);
+
+       /* Reset the double buffer */
+       reg = __raw_readl(IPU_CHA_DB_MODE_SEL(in_dma));
+       __raw_writel(reg & ~idma_mask(in_dma), IPU_CHA_DB_MODE_SEL(in_dma));
+       reg = __raw_readl(IPU_CHA_DB_MODE_SEL(out_dma));
+       __raw_writel(reg & ~idma_mask(out_dma), IPU_CHA_DB_MODE_SEL(out_dma));
+
+       switch (channel) {
+       case MEM_DC_SYNC:
+               ipu_dc_uninit(1);
+               ipu_di_use_count[g_dc_di_assignment[1]]--;
+               ipu_dc_use_count--;
+               ipu_dmfc_use_count--;
+               break;
+       case MEM_BG_SYNC:
+               ipu_dp_uninit(channel);
+               ipu_dc_uninit(5);
+               ipu_di_use_count[g_dc_di_assignment[5]]--;
+               ipu_dc_use_count--;
+               ipu_dp_use_count--;
+               ipu_dmfc_use_count--;
+               break;
+       case MEM_FG_SYNC:
+               ipu_dp_uninit(channel);
+               ipu_dc_use_count--;
+               ipu_dp_use_count--;
+               ipu_dmfc_use_count--;
+               break;
+       default:
+               break;
+       }
+
+       g_channel_init_mask &= ~(1L << IPU_CHAN_ID(channel));
+
+       if (ipu_dc_use_count == 0)
+               ipu_conf &= ~IPU_CONF_DC_EN;
+       if (ipu_dp_use_count == 0)
+               ipu_conf &= ~IPU_CONF_DP_EN;
+       if (ipu_dmfc_use_count == 0)
+               ipu_conf &= ~IPU_CONF_DMFC_EN;
+       if (ipu_di_use_count[0] == 0) {
+               ipu_conf &= ~IPU_CONF_DI0_EN;
+       }
+       if (ipu_di_use_count[1] == 0) {
+               ipu_conf &= ~IPU_CONF_DI1_EN;
+       }
+
+       __raw_writel(ipu_conf, IPU_CONF);
+
+       if (ipu_conf == 0) {
+               clk_disable(g_ipu_clk);
+               g_ipu_clk_enabled = 0;
+       }
+
+}
+
+static inline void ipu_ch_param_dump(int ch)
+{
+#ifdef DEBUG
+       struct ipu_ch_param *p = ipu_ch_param_addr(ch);
+       debug("ch %d word 0 - %08X %08X %08X %08X %08X\n", ch,
+                p->word[0].data[0], p->word[0].data[1], p->word[0].data[2],
+                p->word[0].data[3], p->word[0].data[4]);
+       debug("ch %d word 1 - %08X %08X %08X %08X %08X\n", ch,
+                p->word[1].data[0], p->word[1].data[1], p->word[1].data[2],
+                p->word[1].data[3], p->word[1].data[4]);
+       debug("PFS 0x%x, ",
+                ipu_ch_param_read_field(ipu_ch_param_addr(ch), 1, 85, 4));
+       debug("BPP 0x%x, ",
+                ipu_ch_param_read_field(ipu_ch_param_addr(ch), 0, 107, 3));
+       debug("NPB 0x%x\n",
+                ipu_ch_param_read_field(ipu_ch_param_addr(ch), 1, 78, 7));
+
+       debug("FW %d, ",
+                ipu_ch_param_read_field(ipu_ch_param_addr(ch), 0, 125, 13));
+       debug("FH %d, ",
+                ipu_ch_param_read_field(ipu_ch_param_addr(ch), 0, 138, 12));
+       debug("Stride %d\n",
+                ipu_ch_param_read_field(ipu_ch_param_addr(ch), 1, 102, 14));
+
+       debug("Width0 %d+1, ",
+                ipu_ch_param_read_field(ipu_ch_param_addr(ch), 1, 116, 3));
+       debug("Width1 %d+1, ",
+                ipu_ch_param_read_field(ipu_ch_param_addr(ch), 1, 119, 3));
+       debug("Width2 %d+1, ",
+                ipu_ch_param_read_field(ipu_ch_param_addr(ch), 1, 122, 3));
+       debug("Width3 %d+1, ",
+                ipu_ch_param_read_field(ipu_ch_param_addr(ch), 1, 125, 3));
+       debug("Offset0 %d, ",
+                ipu_ch_param_read_field(ipu_ch_param_addr(ch), 1, 128, 5));
+       debug("Offset1 %d, ",
+                ipu_ch_param_read_field(ipu_ch_param_addr(ch), 1, 133, 5));
+       debug("Offset2 %d, ",
+                ipu_ch_param_read_field(ipu_ch_param_addr(ch), 1, 138, 5));
+       debug("Offset3 %d\n",
+                ipu_ch_param_read_field(ipu_ch_param_addr(ch), 1, 143, 5));
+#endif
+}
+
+static inline void ipu_ch_params_set_packing(struct ipu_ch_param *p,
+                                             int red_width, int red_offset,
+                                             int green_width, int green_offset,
+                                             int blue_width, int blue_offset,
+                                             int alpha_width, int alpha_offset)
+{
+       /* Setup red width and offset */
+       ipu_ch_param_set_field(p, 1, 116, 3, red_width - 1);
+       ipu_ch_param_set_field(p, 1, 128, 5, red_offset);
+       /* Setup green width and offset */
+       ipu_ch_param_set_field(p, 1, 119, 3, green_width - 1);
+       ipu_ch_param_set_field(p, 1, 133, 5, green_offset);
+       /* Setup blue width and offset */
+       ipu_ch_param_set_field(p, 1, 122, 3, blue_width - 1);
+       ipu_ch_param_set_field(p, 1, 138, 5, blue_offset);
+       /* Setup alpha width and offset */
+       ipu_ch_param_set_field(p, 1, 125, 3, alpha_width - 1);
+       ipu_ch_param_set_field(p, 1, 143, 5, alpha_offset);
+}
+
+static void ipu_ch_param_init(int ch,
+                             uint32_t pixel_fmt, uint32_t width,
+                             uint32_t height, uint32_t stride,
+                             uint32_t u, uint32_t v,
+                             uint32_t uv_stride, dma_addr_t addr0,
+                             dma_addr_t addr1)
+{
+       uint32_t u_offset = 0;
+       uint32_t v_offset = 0;
+       struct ipu_ch_param params;
+
+       memset(&params, 0, sizeof(params));
+
+       ipu_ch_param_set_field(&params, 0, 125, 13, width - 1);
+
+       if ((ch == 8) || (ch == 9) || (ch == 10)) {
+               ipu_ch_param_set_field(&params, 0, 138, 12, (height / 2) - 1);
+               ipu_ch_param_set_field(&params, 1, 102, 14, (stride * 2) - 1);
+       } else {
+               ipu_ch_param_set_field(&params, 0, 138, 12, height - 1);
+               ipu_ch_param_set_field(&params, 1, 102, 14, stride - 1);
+       }
+
+       ipu_ch_param_set_field(&params, 1, 0, 29, addr0 >> 3);
+       ipu_ch_param_set_field(&params, 1, 29, 29, addr1 >> 3);
+
+       switch (pixel_fmt) {
+       case IPU_PIX_FMT_GENERIC:
+               /*Represents 8-bit Generic data */
+               ipu_ch_param_set_field(&params, 0, 107, 3, 5);  /* bits/pixel */
+               ipu_ch_param_set_field(&params, 1, 85, 4, 6);   /* pix format */
+               ipu_ch_param_set_field(&params, 1, 78, 7, 63);  /* burst size */
+
+               break;
+       case IPU_PIX_FMT_GENERIC_32:
+               /*Represents 32-bit Generic data */
+               break;
+       case IPU_PIX_FMT_RGB565:
+               ipu_ch_param_set_field(&params, 0, 107, 3, 3);  /* bits/pixel */
+               ipu_ch_param_set_field(&params, 1, 85, 4, 7);   /* pix format */
+               ipu_ch_param_set_field(&params, 1, 78, 7, 15);  /* burst size */
+
+               ipu_ch_params_set_packing(&params, 5, 0, 6, 5, 5, 11, 8, 16);
+               break;
+       case IPU_PIX_FMT_BGR24:
+               ipu_ch_param_set_field(&params, 0, 107, 3, 1);  /* bits/pixel */
+               ipu_ch_param_set_field(&params, 1, 85, 4, 7);   /* pix format */
+               ipu_ch_param_set_field(&params, 1, 78, 7, 19);  /* burst size */
+
+               ipu_ch_params_set_packing(&params, 8, 0, 8, 8, 8, 16, 8, 24);
+               break;
+       case IPU_PIX_FMT_RGB24:
+       case IPU_PIX_FMT_YUV444:
+               ipu_ch_param_set_field(&params, 0, 107, 3, 1);  /* bits/pixel */
+               ipu_ch_param_set_field(&params, 1, 85, 4, 7);   /* pix format */
+               ipu_ch_param_set_field(&params, 1, 78, 7, 19);  /* burst size */
+
+               ipu_ch_params_set_packing(&params, 8, 16, 8, 8, 8, 0, 8, 24);
+               break;
+       case IPU_PIX_FMT_BGRA32:
+       case IPU_PIX_FMT_BGR32:
+               ipu_ch_param_set_field(&params, 0, 107, 3, 0);  /* bits/pixel */
+               ipu_ch_param_set_field(&params, 1, 85, 4, 7);   /* pix format */
+               ipu_ch_param_set_field(&params, 1, 78, 7, 15);  /* burst size */
+
+               ipu_ch_params_set_packing(&params, 8, 8, 8, 16, 8, 24, 8, 0);
+               break;
+       case IPU_PIX_FMT_RGBA32:
+       case IPU_PIX_FMT_RGB32:
+               ipu_ch_param_set_field(&params, 0, 107, 3, 0);  /* bits/pixel */
+               ipu_ch_param_set_field(&params, 1, 85, 4, 7);   /* pix format */
+               ipu_ch_param_set_field(&params, 1, 78, 7, 15);  /* burst size */
+
+               ipu_ch_params_set_packing(&params, 8, 24, 8, 16, 8, 8, 8, 0);
+               break;
+       case IPU_PIX_FMT_ABGR32:
+               ipu_ch_param_set_field(&params, 0, 107, 3, 0);  /* bits/pixel */
+               ipu_ch_param_set_field(&params, 1, 85, 4, 7);   /* pix format */
+
+               ipu_ch_params_set_packing(&params, 8, 0, 8, 8, 8, 16, 8, 24);
+               break;
+       case IPU_PIX_FMT_UYVY:
+               ipu_ch_param_set_field(&params, 0, 107, 3, 3);  /* bits/pixel */
+               ipu_ch_param_set_field(&params, 1, 85, 4, 0xA); /* pix format */
+               ipu_ch_param_set_field(&params, 1, 78, 7, 15);  /* burst size */
+               break;
+       case IPU_PIX_FMT_YUYV:
+               ipu_ch_param_set_field(&params, 0, 107, 3, 3);  /* bits/pixel */
+               ipu_ch_param_set_field(&params, 1, 85, 4, 0x8); /* pix format */
+               ipu_ch_param_set_field(&params, 1, 78, 7, 31);  /* burst size */
+               break;
+       case IPU_PIX_FMT_YUV420P2:
+       case IPU_PIX_FMT_YUV420P:
+               ipu_ch_param_set_field(&params, 1, 85, 4, 2);   /* pix format */
+
+               if (uv_stride < stride / 2)
+                       uv_stride = stride / 2;
+
+               u_offset = stride * height;
+               v_offset = u_offset + (uv_stride * height / 2);
+               /* burst size */
+               if ((ch == 8) || (ch == 9) || (ch == 10)) {
+                       ipu_ch_param_set_field(&params, 1, 78, 7, 15);
+                       uv_stride = uv_stride*2;
+               } else {
+                       ipu_ch_param_set_field(&params, 1, 78, 7, 31);
+               }
+               break;
+       case IPU_PIX_FMT_YVU422P:
+               /* BPP & pixel format */
+               ipu_ch_param_set_field(&params, 1, 85, 4, 1);   /* pix format */
+               ipu_ch_param_set_field(&params, 1, 78, 7, 31);  /* burst size */
+
+               if (uv_stride < stride / 2)
+                       uv_stride = stride / 2;
+
+               v_offset = (v == 0) ? stride * height : v;
+               u_offset = (u == 0) ? v_offset + v_offset / 2 : u;
+               break;
+       case IPU_PIX_FMT_YUV422P:
+               /* BPP & pixel format */
+               ipu_ch_param_set_field(&params, 1, 85, 4, 1);   /* pix format */
+               ipu_ch_param_set_field(&params, 1, 78, 7, 31);  /* burst size */
+
+               if (uv_stride < stride / 2)
+                       uv_stride = stride / 2;
+
+               u_offset = (u == 0) ? stride * height : u;
+               v_offset = (v == 0) ? u_offset + u_offset / 2 : v;
+               break;
+       case IPU_PIX_FMT_NV12:
+               /* BPP & pixel format */
+               ipu_ch_param_set_field(&params, 1, 85, 4, 4);   /* pix format */
+               ipu_ch_param_set_field(&params, 1, 78, 7, 31);  /* burst size */
+               uv_stride = stride;
+               u_offset = (u == 0) ? stride * height : u;
+               break;
+       default:
+               puts("mxc ipu: unimplemented pixel format\n");
+               break;
+       }
+
+
+       if (uv_stride)
+               ipu_ch_param_set_field(&params, 1, 128, 14, uv_stride - 1);
+
+       /* Get the uv offset from user when need cropping */
+       if (u || v) {
+               u_offset = u;
+               v_offset = v;
+       }
+
+       /* UBO and VBO are 22-bit */
+       if (u_offset/8 > 0x3fffff)
+               puts("The value of U offset exceeds IPU limitation\n");
+       if (v_offset/8 > 0x3fffff)
+               puts("The value of V offset exceeds IPU limitation\n");
+
+       ipu_ch_param_set_field(&params, 0, 46, 22, u_offset / 8);
+       ipu_ch_param_set_field(&params, 0, 68, 22, v_offset / 8);
+
+       debug("initializing idma ch %d @ %p\n", ch, ipu_ch_param_addr(ch));
+       memcpy(ipu_ch_param_addr(ch), &params, sizeof(params));
+};
+
+/*
+ * This function is called to initialize a buffer for logical IPU channel.
+ *
+ * @param       channel         Input parameter for the logical channel ID.
+ *
+ * @param       type            Input parameter which buffer to initialize.
+ *
+ * @param       pixel_fmt       Input parameter for pixel format of buffer.
+ *                              Pixel format is a FOURCC ASCII code.
+ *
+ * @param       width           Input parameter for width of buffer in pixels.
+ *
+ * @param       height          Input parameter for height of buffer in pixels.
+ *
+ * @param       stride          Input parameter for stride length of buffer
+ *                              in pixels.
+ *
+ * @param       phyaddr_0       Input parameter buffer 0 physical address.
+ *
+ * @param       phyaddr_1       Input parameter buffer 1 physical address.
+ *                              Setting this to a value other than NULL enables
+ *                              double buffering mode.
+ *
+ * @param       u              private u offset for additional cropping,
+ *                             zero if not used.
+ *
+ * @param       v              private v offset for additional cropping,
+ *                             zero if not used.
+ *
+ * @return      Returns 0 on success or negative error code on fail
+ */
+int32_t ipu_init_channel_buffer(ipu_channel_t channel, ipu_buffer_t type,
+                               uint32_t pixel_fmt,
+                               uint16_t width, uint16_t height,
+                               uint32_t stride,
+                               dma_addr_t phyaddr_0, dma_addr_t phyaddr_1,
+                               uint32_t u, uint32_t v)
+{
+       uint32_t reg;
+       uint32_t dma_chan;
+
+       dma_chan = channel_2_dma(channel, type);
+       if (!idma_is_valid(dma_chan))
+               return -EINVAL;
+
+       if (stride < width * bytes_per_pixel(pixel_fmt))
+               stride = width * bytes_per_pixel(pixel_fmt);
+
+       if (stride % 4) {
+               printf(
+                       "Stride not 32-bit aligned, stride = %d\n", stride);
+               return -EINVAL;
+       }
+       /* Build parameter memory data for DMA channel */
+       ipu_ch_param_init(dma_chan, pixel_fmt, width, height, stride, u, v, 0,
+                          phyaddr_0, phyaddr_1);
+
+       if (ipu_is_dmfc_chan(dma_chan)) {
+               ipu_dmfc_set_wait4eot(dma_chan, width);
+       }
+
+       if (idma_is_set(IDMAC_CHA_PRI, dma_chan))
+               ipu_ch_param_set_high_priority(dma_chan);
+
+       ipu_ch_param_dump(dma_chan);
+
+       reg = __raw_readl(IPU_CHA_DB_MODE_SEL(dma_chan));
+       if (phyaddr_1)
+               reg |= idma_mask(dma_chan);
+       else
+               reg &= ~idma_mask(dma_chan);
+       __raw_writel(reg, IPU_CHA_DB_MODE_SEL(dma_chan));
+
+       /* Reset to buffer 0 */
+       __raw_writel(idma_mask(dma_chan), IPU_CHA_CUR_BUF(dma_chan));
+
+       return 0;
+}
+
+/*
+ * This function enables a logical channel.
+ *
+ * @param       channel         Input parameter for the logical channel ID.
+ *
+ * @return      This function returns 0 on success or negative error code on
+ *              fail.
+ */
+int32_t ipu_enable_channel(ipu_channel_t channel)
+{
+       uint32_t reg;
+       uint32_t in_dma;
+       uint32_t out_dma;
+
+       if (g_channel_enable_mask & (1L << IPU_CHAN_ID(channel))) {
+               printf("Warning: channel already enabled %d\n",
+                       IPU_CHAN_ID(channel));
+       }
+
+       /* Get input and output dma channels */
+       out_dma = channel_2_dma(channel, IPU_OUTPUT_BUFFER);
+       in_dma = channel_2_dma(channel, IPU_VIDEO_IN_BUFFER);
+
+       if (idma_is_valid(in_dma)) {
+               reg = __raw_readl(IDMAC_CHA_EN(in_dma));
+               __raw_writel(reg | idma_mask(in_dma), IDMAC_CHA_EN(in_dma));
+       }
+       if (idma_is_valid(out_dma)) {
+               reg = __raw_readl(IDMAC_CHA_EN(out_dma));
+               __raw_writel(reg | idma_mask(out_dma), IDMAC_CHA_EN(out_dma));
+       }
+
+       if ((channel == MEM_DC_SYNC) || (channel == MEM_BG_SYNC) ||
+           (channel == MEM_FG_SYNC))
+               ipu_dp_dc_enable(channel);
+
+       g_channel_enable_mask |= 1L << IPU_CHAN_ID(channel);
+
+       return 0;
+}
+
+/*
+ * This function clear buffer ready for a logical channel.
+ *
+ * @param       channel         Input parameter for the logical channel ID.
+ *
+ * @param       type            Input parameter which buffer to clear.
+ *
+ * @param       bufNum          Input parameter for which buffer number clear
+ *                             ready state.
+ *
+ */
+void ipu_clear_buffer_ready(ipu_channel_t channel, ipu_buffer_t type,
+               uint32_t bufNum)
+{
+       uint32_t dma_ch = channel_2_dma(channel, type);
+
+       if (!idma_is_valid(dma_ch))
+               return;
+
+       __raw_writel(0xF0000000, IPU_GPR); /* write one to clear */
+       if (bufNum == 0) {
+               if (idma_is_set(IPU_CHA_BUF0_RDY, dma_ch)) {
+                       __raw_writel(idma_mask(dma_ch),
+                                       IPU_CHA_BUF0_RDY(dma_ch));
+               }
+       } else {
+               if (idma_is_set(IPU_CHA_BUF1_RDY, dma_ch)) {
+                       __raw_writel(idma_mask(dma_ch),
+                                       IPU_CHA_BUF1_RDY(dma_ch));
+               }
+       }
+       __raw_writel(0x0, IPU_GPR); /* write one to set */
+}
+
+/*
+ * This function disables a logical channel.
+ *
+ * @param       channel         Input parameter for the logical channel ID.
+ *
+ * @param       wait_for_stop   Flag to set whether to wait for channel end
+ *                              of frame or return immediately.
+ *
+ * @return      This function returns 0 on success or negative error code on
+ *              fail.
+ */
+int32_t ipu_disable_channel(ipu_channel_t channel)
+{
+       uint32_t reg;
+       uint32_t in_dma;
+       uint32_t out_dma;
+
+       if ((g_channel_enable_mask & (1L << IPU_CHAN_ID(channel))) == 0) {
+               debug("Channel already disabled %d\n",
+                       IPU_CHAN_ID(channel));
+               return 0;
+       }
+
+       /* Get input and output dma channels */
+       out_dma = channel_2_dma(channel, IPU_OUTPUT_BUFFER);
+       in_dma = channel_2_dma(channel, IPU_VIDEO_IN_BUFFER);
+
+       if ((idma_is_valid(in_dma) &&
+               !idma_is_set(IDMAC_CHA_EN, in_dma))
+               && (idma_is_valid(out_dma) &&
+               !idma_is_set(IDMAC_CHA_EN, out_dma)))
+               return -EINVAL;
+
+       if ((channel == MEM_BG_SYNC) || (channel == MEM_FG_SYNC) ||
+           (channel == MEM_DC_SYNC)) {
+               ipu_dp_dc_disable(channel, 0);
+       }
+
+       /* Disable DMA channel(s) */
+       if (idma_is_valid(in_dma)) {
+               reg = __raw_readl(IDMAC_CHA_EN(in_dma));
+               __raw_writel(reg & ~idma_mask(in_dma), IDMAC_CHA_EN(in_dma));
+               __raw_writel(idma_mask(in_dma), IPU_CHA_CUR_BUF(in_dma));
+       }
+       if (idma_is_valid(out_dma)) {
+               reg = __raw_readl(IDMAC_CHA_EN(out_dma));
+               __raw_writel(reg & ~idma_mask(out_dma), IDMAC_CHA_EN(out_dma));
+               __raw_writel(idma_mask(out_dma), IPU_CHA_CUR_BUF(out_dma));
+       }
+
+       g_channel_enable_mask &= ~(1L << IPU_CHAN_ID(channel));
+
+       /* Set channel buffers NOT to be ready */
+       if (idma_is_valid(in_dma)) {
+               ipu_clear_buffer_ready(channel, IPU_VIDEO_IN_BUFFER, 0);
+               ipu_clear_buffer_ready(channel, IPU_VIDEO_IN_BUFFER, 1);
+       }
+       if (idma_is_valid(out_dma)) {
+               ipu_clear_buffer_ready(channel, IPU_OUTPUT_BUFFER, 0);
+               ipu_clear_buffer_ready(channel, IPU_OUTPUT_BUFFER, 1);
+       }
+
+       return 0;
+}
+
+uint32_t bytes_per_pixel(uint32_t fmt)
+{
+       switch (fmt) {
+       case IPU_PIX_FMT_GENERIC:       /*generic data */
+       case IPU_PIX_FMT_RGB332:
+       case IPU_PIX_FMT_YUV420P:
+       case IPU_PIX_FMT_YUV422P:
+               return 1;
+               break;
+       case IPU_PIX_FMT_RGB565:
+       case IPU_PIX_FMT_YUYV:
+       case IPU_PIX_FMT_UYVY:
+               return 2;
+               break;
+       case IPU_PIX_FMT_BGR24:
+       case IPU_PIX_FMT_RGB24:
+               return 3;
+               break;
+       case IPU_PIX_FMT_GENERIC_32:    /*generic data */
+       case IPU_PIX_FMT_BGR32:
+       case IPU_PIX_FMT_BGRA32:
+       case IPU_PIX_FMT_RGB32:
+       case IPU_PIX_FMT_RGBA32:
+       case IPU_PIX_FMT_ABGR32:
+               return 4;
+               break;
+       default:
+               return 1;
+               break;
+       }
+       return 0;
+}
+
+ipu_color_space_t format_to_colorspace(uint32_t fmt)
+{
+       switch (fmt) {
+       case IPU_PIX_FMT_RGB666:
+       case IPU_PIX_FMT_RGB565:
+       case IPU_PIX_FMT_BGR24:
+       case IPU_PIX_FMT_RGB24:
+       case IPU_PIX_FMT_BGR32:
+       case IPU_PIX_FMT_BGRA32:
+       case IPU_PIX_FMT_RGB32:
+       case IPU_PIX_FMT_RGBA32:
+       case IPU_PIX_FMT_ABGR32:
+       case IPU_PIX_FMT_LVDS666:
+       case IPU_PIX_FMT_LVDS888:
+               return RGB;
+               break;
+
+       default:
+               return YCbCr;
+               break;
+       }
+       return RGB;
+}
diff --git a/drivers/video/ipu_disp.c b/drivers/video/ipu_disp.c
new file mode 100644 (file)
index 0000000..11cf98d
--- /dev/null
@@ -0,0 +1,1359 @@
+/*
+ * Porting to u-boot:
+ *
+ * (C) Copyright 2010
+ * Stefano Babic, DENX Software Engineering, sbabic@denx.de
+ *
+ * Linux IPU driver for MX51:
+ *
+ * (C) Copyright 2005-2010 Freescale Semiconductor, Inc.
+ *
+ * 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
+ */
+
+/* #define DEBUG */
+
+#include <common.h>
+#include <linux/types.h>
+#include <asm/errno.h>
+#include <asm/io.h>
+#include <asm/arch/imx-regs.h>
+#include <asm/arch/sys_proto.h>
+#include "ipu.h"
+#include "ipu_regs.h"
+
+enum csc_type_t {
+       RGB2YUV = 0,
+       YUV2RGB,
+       RGB2RGB,
+       YUV2YUV,
+       CSC_NONE,
+       CSC_NUM
+};
+
+struct dp_csc_param_t {
+       int mode;
+       void *coeff;
+};
+
+#define SYNC_WAVE 0
+
+/* DC display ID assignments */
+#define DC_DISP_ID_SYNC(di)    (di)
+#define DC_DISP_ID_SERIAL      2
+#define DC_DISP_ID_ASYNC       3
+
+int dmfc_type_setup;
+static int dmfc_size_28, dmfc_size_29, dmfc_size_24, dmfc_size_27, dmfc_size_23;
+int g_di1_tvout;
+
+extern struct clk *g_ipu_clk;
+extern struct clk *g_di_clk[2];
+extern struct clk *g_pixel_clk[2];
+
+extern unsigned char g_ipu_clk_enabled;
+extern unsigned char g_dc_di_assignment[];
+
+void ipu_dmfc_init(int dmfc_type, int first)
+{
+       u32 dmfc_wr_chan, dmfc_dp_chan;
+
+       if (first) {
+               if (dmfc_type_setup > dmfc_type)
+                       dmfc_type = dmfc_type_setup;
+               else
+                       dmfc_type_setup = dmfc_type;
+
+               /* disable DMFC-IC channel*/
+               __raw_writel(0x2, DMFC_IC_CTRL);
+       } else if (dmfc_type_setup >= DMFC_HIGH_RESOLUTION_DC) {
+               printf("DMFC high resolution has set, will not change\n");
+               return;
+       } else
+               dmfc_type_setup = dmfc_type;
+
+       if (dmfc_type == DMFC_HIGH_RESOLUTION_DC) {
+               /* 1 - segment 0~3;
+                * 5B - segement 4, 5;
+                * 5F - segement 6, 7;
+                * 1C, 2C and 6B, 6F unused;
+                */
+               debug("IPU DMFC DC HIGH RES: 1(0~3), 5B(4,5), 5F(6,7)\n");
+               dmfc_wr_chan = 0x00000088;
+               dmfc_dp_chan = 0x00009694;
+               dmfc_size_28 = 256 * 4;
+               dmfc_size_29 = 0;
+               dmfc_size_24 = 0;
+               dmfc_size_27 = 128 * 4;
+               dmfc_size_23 = 128 * 4;
+       } else if (dmfc_type == DMFC_HIGH_RESOLUTION_DP) {
+               /* 1 - segment 0, 1;
+                * 5B - segement 2~5;
+                * 5F - segement 6,7;
+                * 1C, 2C and 6B, 6F unused;
+                */
+               debug("IPU DMFC DP HIGH RES: 1(0,1), 5B(2~5), 5F(6,7)\n");
+               dmfc_wr_chan = 0x00000090;
+               dmfc_dp_chan = 0x0000968a;
+               dmfc_size_28 = 128 * 4;
+               dmfc_size_29 = 0;
+               dmfc_size_24 = 0;
+               dmfc_size_27 = 128 * 4;
+               dmfc_size_23 = 256 * 4;
+       } else if (dmfc_type == DMFC_HIGH_RESOLUTION_ONLY_DP) {
+               /* 5B - segement 0~3;
+                * 5F - segement 4~7;
+                * 1, 1C, 2C and 6B, 6F unused;
+                */
+               debug("IPU DMFC ONLY-DP HIGH RES: 5B(0~3), 5F(4~7)\n");
+               dmfc_wr_chan = 0x00000000;
+               dmfc_dp_chan = 0x00008c88;
+               dmfc_size_28 = 0;
+               dmfc_size_29 = 0;
+               dmfc_size_24 = 0;
+               dmfc_size_27 = 256 * 4;
+               dmfc_size_23 = 256 * 4;
+       } else {
+               /* 1 - segment 0, 1;
+                * 5B - segement 4, 5;
+                * 5F - segement 6, 7;
+                * 1C, 2C and 6B, 6F unused;
+                */
+               debug("IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)\n");
+               dmfc_wr_chan = 0x00000090;
+               dmfc_dp_chan = 0x00009694;
+               dmfc_size_28 = 128 * 4;
+               dmfc_size_29 = 0;
+               dmfc_size_24 = 0;
+               dmfc_size_27 = 128 * 4;
+               dmfc_size_23 = 128 * 4;
+       }
+       __raw_writel(dmfc_wr_chan, DMFC_WR_CHAN);
+       __raw_writel(0x202020F6, DMFC_WR_CHAN_DEF);
+       __raw_writel(dmfc_dp_chan, DMFC_DP_CHAN);
+       /* Enable chan 5 watermark set at 5 bursts and clear at 7 bursts */
+       __raw_writel(0x2020F6F6, DMFC_DP_CHAN_DEF);
+}
+
+void ipu_dmfc_set_wait4eot(int dma_chan, int width)
+{
+       u32 dmfc_gen1 = __raw_readl(DMFC_GENERAL1);
+
+       if (width >= HIGH_RESOLUTION_WIDTH) {
+               if (dma_chan == 23)
+                       ipu_dmfc_init(DMFC_HIGH_RESOLUTION_DP, 0);
+               else if (dma_chan == 28)
+                       ipu_dmfc_init(DMFC_HIGH_RESOLUTION_DC, 0);
+       }
+
+       if (dma_chan == 23) { /*5B*/
+               if (dmfc_size_23 / width > 3)
+                       dmfc_gen1 |= 1UL << 20;
+               else
+                       dmfc_gen1 &= ~(1UL << 20);
+       } else if (dma_chan == 24) { /*6B*/
+               if (dmfc_size_24 / width > 1)
+                       dmfc_gen1 |= 1UL << 22;
+               else
+                       dmfc_gen1 &= ~(1UL << 22);
+       } else if (dma_chan == 27) { /*5F*/
+               if (dmfc_size_27 / width > 2)
+                       dmfc_gen1 |= 1UL << 21;
+               else
+                       dmfc_gen1 &= ~(1UL << 21);
+       } else if (dma_chan == 28) { /*1*/
+               if (dmfc_size_28 / width > 2)
+                       dmfc_gen1 |= 1UL << 16;
+               else
+                       dmfc_gen1 &= ~(1UL << 16);
+       } else if (dma_chan == 29) { /*6F*/
+               if (dmfc_size_29 / width > 1)
+                       dmfc_gen1 |= 1UL << 23;
+               else
+                       dmfc_gen1 &= ~(1UL << 23);
+       }
+
+       __raw_writel(dmfc_gen1, DMFC_GENERAL1);
+}
+
+static void ipu_di_data_wave_config(int di,
+                                    int wave_gen,
+                                    int access_size, int component_size)
+{
+       u32 reg;
+       reg = (access_size << DI_DW_GEN_ACCESS_SIZE_OFFSET) |
+           (component_size << DI_DW_GEN_COMPONENT_SIZE_OFFSET);
+       __raw_writel(reg, DI_DW_GEN(di, wave_gen));
+}
+
+static void ipu_di_data_pin_config(int di, int wave_gen, int di_pin, int set,
+                                   int up, int down)
+{
+       u32 reg;
+
+       reg = __raw_readl(DI_DW_GEN(di, wave_gen));
+       reg &= ~(0x3 << (di_pin * 2));
+       reg |= set << (di_pin * 2);
+       __raw_writel(reg, DI_DW_GEN(di, wave_gen));
+
+       __raw_writel((down << 16) | up, DI_DW_SET(di, wave_gen, set));
+}
+
+static void ipu_di_sync_config(int di, int wave_gen,
+                               int run_count, int run_src,
+                               int offset_count, int offset_src,
+                               int repeat_count, int cnt_clr_src,
+                               int cnt_polarity_gen_en,
+                               int cnt_polarity_clr_src,
+                               int cnt_polarity_trigger_src,
+                               int cnt_up, int cnt_down)
+{
+       u32 reg;
+
+       if ((run_count >= 0x1000) || (offset_count >= 0x1000) ||
+               (repeat_count >= 0x1000) ||
+               (cnt_up >= 0x400) || (cnt_down >= 0x400)) {
+               printf("DI%d counters out of range.\n", di);
+               return;
+       }
+
+       reg = (run_count << 19) | (++run_src << 16) |
+           (offset_count << 3) | ++offset_src;
+       __raw_writel(reg, DI_SW_GEN0(di, wave_gen));
+       reg = (cnt_polarity_gen_en << 29) | (++cnt_clr_src << 25) |
+           (++cnt_polarity_trigger_src << 12) | (++cnt_polarity_clr_src << 9);
+       reg |= (cnt_down << 16) | cnt_up;
+       if (repeat_count == 0) {
+               /* Enable auto reload */
+               reg |= 0x10000000;
+       }
+       __raw_writel(reg, DI_SW_GEN1(di, wave_gen));
+       reg = __raw_readl(DI_STP_REP(di, wave_gen));
+       reg &= ~(0xFFFF << (16 * ((wave_gen - 1) & 0x1)));
+       reg |= repeat_count << (16 * ((wave_gen - 1) & 0x1));
+       __raw_writel(reg, DI_STP_REP(di, wave_gen));
+}
+
+static void ipu_dc_map_config(int map, int byte_num, int offset, int mask)
+{
+       int ptr = map * 3 + byte_num;
+       u32 reg;
+
+       reg = __raw_readl(DC_MAP_CONF_VAL(ptr));
+       reg &= ~(0xFFFF << (16 * (ptr & 0x1)));
+       reg |= ((offset << 8) | mask) << (16 * (ptr & 0x1));
+       __raw_writel(reg, DC_MAP_CONF_VAL(ptr));
+
+       reg = __raw_readl(DC_MAP_CONF_PTR(map));
+       reg &= ~(0x1F << ((16 * (map & 0x1)) + (5 * byte_num)));
+       reg |= ptr << ((16 * (map & 0x1)) + (5 * byte_num));
+       __raw_writel(reg, DC_MAP_CONF_PTR(map));
+}
+
+static void ipu_dc_map_clear(int map)
+{
+       u32 reg = __raw_readl(DC_MAP_CONF_PTR(map));
+       __raw_writel(reg & ~(0xFFFF << (16 * (map & 0x1))),
+                    DC_MAP_CONF_PTR(map));
+}
+
+static void ipu_dc_write_tmpl(int word, u32 opcode, u32 operand, int map,
+                              int wave, int glue, int sync)
+{
+       u32 reg;
+       int stop = 1;
+
+       reg = sync;
+       reg |= (glue << 4);
+       reg |= (++wave << 11);
+       reg |= (++map << 15);
+       reg |= (operand << 20) & 0xFFF00000;
+       __raw_writel(reg, ipu_dc_tmpl_reg + word * 2);
+
+       reg = (operand >> 12);
+       reg |= opcode << 4;
+       reg |= (stop << 9);
+       __raw_writel(reg, ipu_dc_tmpl_reg + word * 2 + 1);
+}
+
+static void ipu_dc_link_event(int chan, int event, int addr, int priority)
+{
+       u32 reg;
+
+       reg = __raw_readl(DC_RL_CH(chan, event));
+       reg &= ~(0xFFFF << (16 * (event & 0x1)));
+       reg |= ((addr << 8) | priority) << (16 * (event & 0x1));
+       __raw_writel(reg, DC_RL_CH(chan, event));
+}
+
+/* Y = R *  1.200 + G *  2.343 + B *  .453 + 0.250;
+ * U = R * -.672 + G * -1.328 + B *  2.000 + 512.250.;
+ * V = R *  2.000 + G * -1.672 + B * -.328 + 512.250.;
+ */
+static const int rgb2ycbcr_coeff[5][3] = {
+       {0x4D, 0x96, 0x1D},
+       {0x3D5, 0x3AB, 0x80},
+       {0x80, 0x395, 0x3EB},
+       {0x0000, 0x0200, 0x0200},       /* B0, B1, B2 */
+       {0x2, 0x2, 0x2},        /* S0, S1, S2 */
+};
+
+/* R = (1.164 * (Y - 16)) + (1.596 * (Cr - 128));
+ * G = (1.164 * (Y - 16)) - (0.392 * (Cb - 128)) - (0.813 * (Cr - 128));
+ * B = (1.164 * (Y - 16)) + (2.017 * (Cb - 128);
+ */
+static const int ycbcr2rgb_coeff[5][3] = {
+       {0x095, 0x000, 0x0CC},
+       {0x095, 0x3CE, 0x398},
+       {0x095, 0x0FF, 0x000},
+       {0x3E42, 0x010A, 0x3DD6},       /*B0,B1,B2 */
+       {0x1, 0x1, 0x1},        /*S0,S1,S2 */
+};
+
+#define mask_a(a) ((u32)(a) & 0x3FF)
+#define mask_b(b) ((u32)(b) & 0x3FFF)
+
+/* Pls keep S0, S1 and S2 as 0x2 by using this convertion */
+static int rgb_to_yuv(int n, int red, int green, int blue)
+{
+       int c;
+       c = red * rgb2ycbcr_coeff[n][0];
+       c += green * rgb2ycbcr_coeff[n][1];
+       c += blue * rgb2ycbcr_coeff[n][2];
+       c /= 16;
+       c += rgb2ycbcr_coeff[3][n] * 4;
+       c += 8;
+       c /= 16;
+       if (c < 0)
+               c = 0;
+       if (c > 255)
+               c = 255;
+       return c;
+}
+
+/*
+ * Row is for BG:      RGB2YUV YUV2RGB RGB2RGB YUV2YUV CSC_NONE
+ * Column is for FG:   RGB2YUV YUV2RGB RGB2RGB YUV2YUV CSC_NONE
+ */
+static struct dp_csc_param_t dp_csc_array[CSC_NUM][CSC_NUM] = {
+       {
+               {DP_COM_CONF_CSC_DEF_BOTH, &rgb2ycbcr_coeff},
+               {0, 0},
+               {0, 0},
+               {DP_COM_CONF_CSC_DEF_BG, &rgb2ycbcr_coeff},
+               {DP_COM_CONF_CSC_DEF_BG, &rgb2ycbcr_coeff}
+       },
+       {
+               {0, 0},
+               {DP_COM_CONF_CSC_DEF_BOTH, &ycbcr2rgb_coeff},
+               {DP_COM_CONF_CSC_DEF_BG, &ycbcr2rgb_coeff},
+               {0, 0},
+               {DP_COM_CONF_CSC_DEF_BG, &ycbcr2rgb_coeff}
+       },
+       {
+               {0, 0},
+               {DP_COM_CONF_CSC_DEF_FG, &ycbcr2rgb_coeff},
+               {0, 0},
+               {0, 0},
+               {0, 0}
+       },
+       {
+               {DP_COM_CONF_CSC_DEF_FG, &rgb2ycbcr_coeff},
+               {0, 0},
+               {0, 0},
+               {0, 0},
+               {0, 0}
+       },
+       {
+               {DP_COM_CONF_CSC_DEF_FG, &rgb2ycbcr_coeff},
+               {DP_COM_CONF_CSC_DEF_FG, &ycbcr2rgb_coeff},
+               {0, 0},
+               {0, 0},
+               {0, 0}
+       }
+};
+
+static enum csc_type_t fg_csc_type = CSC_NONE, bg_csc_type = CSC_NONE;
+static int color_key_4rgb = 1;
+
+void ipu_dp_csc_setup(int dp, struct dp_csc_param_t dp_csc_param,
+                       unsigned char srm_mode_update)
+{
+       u32 reg;
+       const int (*coeff)[5][3];
+
+       if (dp_csc_param.mode >= 0) {
+               reg = __raw_readl(DP_COM_CONF(dp));
+               reg &= ~DP_COM_CONF_CSC_DEF_MASK;
+               reg |= dp_csc_param.mode;
+               __raw_writel(reg, DP_COM_CONF(dp));
+       }
+
+       coeff = dp_csc_param.coeff;
+
+       if (coeff) {
+               __raw_writel(mask_a((*coeff)[0][0]) |
+                               (mask_a((*coeff)[0][1]) << 16), DP_CSC_A_0(dp));
+               __raw_writel(mask_a((*coeff)[0][2]) |
+                               (mask_a((*coeff)[1][0]) << 16), DP_CSC_A_1(dp));
+               __raw_writel(mask_a((*coeff)[1][1]) |
+                               (mask_a((*coeff)[1][2]) << 16), DP_CSC_A_2(dp));
+               __raw_writel(mask_a((*coeff)[2][0]) |
+                               (mask_a((*coeff)[2][1]) << 16), DP_CSC_A_3(dp));
+               __raw_writel(mask_a((*coeff)[2][2]) |
+                               (mask_b((*coeff)[3][0]) << 16) |
+                               ((*coeff)[4][0] << 30), DP_CSC_0(dp));
+               __raw_writel(mask_b((*coeff)[3][1]) | ((*coeff)[4][1] << 14) |
+                               (mask_b((*coeff)[3][2]) << 16) |
+                               ((*coeff)[4][2] << 30), DP_CSC_1(dp));
+       }
+
+       if (srm_mode_update) {
+               reg = __raw_readl(IPU_SRM_PRI2) | 0x8;
+               __raw_writel(reg, IPU_SRM_PRI2);
+       }
+}
+
+int ipu_dp_init(ipu_channel_t channel, uint32_t in_pixel_fmt,
+                uint32_t out_pixel_fmt)
+{
+       int in_fmt, out_fmt;
+       int dp;
+       int partial = 0;
+       uint32_t reg;
+
+       if (channel == MEM_FG_SYNC) {
+               dp = DP_SYNC;
+               partial = 1;
+       } else if (channel == MEM_BG_SYNC) {
+               dp = DP_SYNC;
+               partial = 0;
+       } else if (channel == MEM_BG_ASYNC0) {
+               dp = DP_ASYNC0;
+               partial = 0;
+       } else {
+               return -EINVAL;
+       }
+
+       in_fmt = format_to_colorspace(in_pixel_fmt);
+       out_fmt = format_to_colorspace(out_pixel_fmt);
+
+       if (partial) {
+               if (in_fmt == RGB) {
+                       if (out_fmt == RGB)
+                               fg_csc_type = RGB2RGB;
+                       else
+                               fg_csc_type = RGB2YUV;
+               } else {
+                       if (out_fmt == RGB)
+                               fg_csc_type = YUV2RGB;
+                       else
+                               fg_csc_type = YUV2YUV;
+               }
+       } else {
+               if (in_fmt == RGB) {
+                       if (out_fmt == RGB)
+                               bg_csc_type = RGB2RGB;
+                       else
+                               bg_csc_type = RGB2YUV;
+               } else {
+                       if (out_fmt == RGB)
+                               bg_csc_type = YUV2RGB;
+                       else
+                               bg_csc_type = YUV2YUV;
+               }
+       }
+
+       /* Transform color key from rgb to yuv if CSC is enabled */
+       reg = __raw_readl(DP_COM_CONF(dp));
+       if (color_key_4rgb && (reg & DP_COM_CONF_GWCKE) &&
+               (((fg_csc_type == RGB2YUV) && (bg_csc_type == YUV2YUV)) ||
+               ((fg_csc_type == YUV2YUV) && (bg_csc_type == RGB2YUV)) ||
+               ((fg_csc_type == YUV2YUV) && (bg_csc_type == YUV2YUV)) ||
+               ((fg_csc_type == YUV2RGB) && (bg_csc_type == YUV2RGB)))) {
+               int red, green, blue;
+               int y, u, v;
+               uint32_t color_key = __raw_readl(DP_GRAPH_WIND_CTRL(dp)) &
+                       0xFFFFFFL;
+
+               debug("_ipu_dp_init color key 0x%x need change to yuv fmt!\n",
+                       color_key);
+
+               red = (color_key >> 16) & 0xFF;
+               green = (color_key >> 8) & 0xFF;
+               blue = color_key & 0xFF;
+
+               y = rgb_to_yuv(0, red, green, blue);
+               u = rgb_to_yuv(1, red, green, blue);
+               v = rgb_to_yuv(2, red, green, blue);
+               color_key = (y << 16) | (u << 8) | v;
+
+               reg = __raw_readl(DP_GRAPH_WIND_CTRL(dp)) & 0xFF000000L;
+               __raw_writel(reg | color_key, DP_GRAPH_WIND_CTRL(dp));
+               color_key_4rgb = 0;
+
+               debug("_ipu_dp_init color key change to yuv fmt 0x%x!\n",
+                       color_key);
+       }
+
+       ipu_dp_csc_setup(dp, dp_csc_array[bg_csc_type][fg_csc_type], 1);
+
+       return 0;
+}
+
+void ipu_dp_uninit(ipu_channel_t channel)
+{
+       int dp;
+       int partial = 0;
+
+       if (channel == MEM_FG_SYNC) {
+               dp = DP_SYNC;
+               partial = 1;
+       } else if (channel == MEM_BG_SYNC) {
+               dp = DP_SYNC;
+               partial = 0;
+       } else if (channel == MEM_BG_ASYNC0) {
+               dp = DP_ASYNC0;
+               partial = 0;
+       } else {
+               return;
+       }
+
+       if (partial)
+               fg_csc_type = CSC_NONE;
+       else
+               bg_csc_type = CSC_NONE;
+
+       ipu_dp_csc_setup(dp, dp_csc_array[bg_csc_type][fg_csc_type], 0);
+}
+
+void ipu_dc_init(int dc_chan, int di, unsigned char interlaced)
+{
+       u32 reg = 0;
+
+       if ((dc_chan == 1) || (dc_chan == 5)) {
+               if (interlaced) {
+                       ipu_dc_link_event(dc_chan, DC_EVT_NL, 0, 3);
+                       ipu_dc_link_event(dc_chan, DC_EVT_EOL, 0, 2);
+                       ipu_dc_link_event(dc_chan, DC_EVT_NEW_DATA, 0, 1);
+               } else {
+                       if (di) {
+                               ipu_dc_link_event(dc_chan, DC_EVT_NL, 2, 3);
+                               ipu_dc_link_event(dc_chan, DC_EVT_EOL, 3, 2);
+                               ipu_dc_link_event(dc_chan, DC_EVT_NEW_DATA,
+                                       4, 1);
+                       } else {
+                               ipu_dc_link_event(dc_chan, DC_EVT_NL, 5, 3);
+                               ipu_dc_link_event(dc_chan, DC_EVT_EOL, 6, 2);
+                               ipu_dc_link_event(dc_chan, DC_EVT_NEW_DATA,
+                                       7, 1);
+                       }
+               }
+               ipu_dc_link_event(dc_chan, DC_EVT_NF, 0, 0);
+               ipu_dc_link_event(dc_chan, DC_EVT_NFIELD, 0, 0);
+               ipu_dc_link_event(dc_chan, DC_EVT_EOF, 0, 0);
+               ipu_dc_link_event(dc_chan, DC_EVT_EOFIELD, 0, 0);
+               ipu_dc_link_event(dc_chan, DC_EVT_NEW_CHAN, 0, 0);
+               ipu_dc_link_event(dc_chan, DC_EVT_NEW_ADDR, 0, 0);
+
+               reg = 0x2;
+               reg |= DC_DISP_ID_SYNC(di) << DC_WR_CH_CONF_PROG_DISP_ID_OFFSET;
+               reg |= di << 2;
+               if (interlaced)
+                       reg |= DC_WR_CH_CONF_FIELD_MODE;
+       } else if ((dc_chan == 8) || (dc_chan == 9)) {
+               /* async channels */
+               ipu_dc_link_event(dc_chan, DC_EVT_NEW_DATA_W_0, 0x64, 1);
+               ipu_dc_link_event(dc_chan, DC_EVT_NEW_DATA_W_1, 0x64, 1);
+
+               reg = 0x3;
+               reg |= DC_DISP_ID_SERIAL << DC_WR_CH_CONF_PROG_DISP_ID_OFFSET;
+       }
+       __raw_writel(reg, DC_WR_CH_CONF(dc_chan));
+
+       __raw_writel(0x00000000, DC_WR_CH_ADDR(dc_chan));
+
+       __raw_writel(0x00000084, DC_GEN);
+}
+
+void ipu_dc_uninit(int dc_chan)
+{
+       if ((dc_chan == 1) || (dc_chan == 5)) {
+               ipu_dc_link_event(dc_chan, DC_EVT_NL, 0, 0);
+               ipu_dc_link_event(dc_chan, DC_EVT_EOL, 0, 0);
+               ipu_dc_link_event(dc_chan, DC_EVT_NEW_DATA, 0, 0);
+               ipu_dc_link_event(dc_chan, DC_EVT_NF, 0, 0);
+               ipu_dc_link_event(dc_chan, DC_EVT_NFIELD, 0, 0);
+               ipu_dc_link_event(dc_chan, DC_EVT_EOF, 0, 0);
+               ipu_dc_link_event(dc_chan, DC_EVT_EOFIELD, 0, 0);
+               ipu_dc_link_event(dc_chan, DC_EVT_NEW_CHAN, 0, 0);
+               ipu_dc_link_event(dc_chan, DC_EVT_NEW_ADDR, 0, 0);
+       } else if ((dc_chan == 8) || (dc_chan == 9)) {
+               ipu_dc_link_event(dc_chan, DC_EVT_NEW_ADDR_W_0, 0, 0);
+               ipu_dc_link_event(dc_chan, DC_EVT_NEW_ADDR_W_1, 0, 0);
+               ipu_dc_link_event(dc_chan, DC_EVT_NEW_CHAN_W_0, 0, 0);
+               ipu_dc_link_event(dc_chan, DC_EVT_NEW_CHAN_W_1, 0, 0);
+               ipu_dc_link_event(dc_chan, DC_EVT_NEW_DATA_W_0, 0, 0);
+               ipu_dc_link_event(dc_chan, DC_EVT_NEW_DATA_W_1, 0, 0);
+               ipu_dc_link_event(dc_chan, DC_EVT_NEW_ADDR_R_0, 0, 0);
+               ipu_dc_link_event(dc_chan, DC_EVT_NEW_ADDR_R_1, 0, 0);
+               ipu_dc_link_event(dc_chan, DC_EVT_NEW_CHAN_R_0, 0, 0);
+               ipu_dc_link_event(dc_chan, DC_EVT_NEW_CHAN_R_1, 0, 0);
+               ipu_dc_link_event(dc_chan, DC_EVT_NEW_DATA_R_0, 0, 0);
+               ipu_dc_link_event(dc_chan, DC_EVT_NEW_DATA_R_1, 0, 0);
+       }
+}
+
+int ipu_chan_is_interlaced(ipu_channel_t channel)
+{
+       if (channel == MEM_DC_SYNC)
+               return !!(__raw_readl(DC_WR_CH_CONF_1) &
+                         DC_WR_CH_CONF_FIELD_MODE);
+       else if ((channel == MEM_BG_SYNC) || (channel == MEM_FG_SYNC))
+               return !!(__raw_readl(DC_WR_CH_CONF_5) &
+                         DC_WR_CH_CONF_FIELD_MODE);
+       return 0;
+}
+
+void ipu_dp_dc_enable(ipu_channel_t channel)
+{
+       int di;
+       uint32_t reg;
+       uint32_t dc_chan;
+
+       if (channel == MEM_FG_SYNC)
+               dc_chan = 5;
+       if (channel == MEM_DC_SYNC)
+               dc_chan = 1;
+       else if (channel == MEM_BG_SYNC)
+               dc_chan = 5;
+       else
+               return;
+
+       if (channel == MEM_FG_SYNC) {
+               /* Enable FG channel */
+               reg = __raw_readl(DP_COM_CONF(DP_SYNC));
+               __raw_writel(reg | DP_COM_CONF_FG_EN, DP_COM_CONF(DP_SYNC));
+
+               reg = __raw_readl(IPU_SRM_PRI2) | 0x8;
+               __raw_writel(reg, IPU_SRM_PRI2);
+               return;
+       }
+
+       di = g_dc_di_assignment[dc_chan];
+
+       /* Make sure other DC sync channel is not assigned same DI */
+       reg = __raw_readl(DC_WR_CH_CONF(6 - dc_chan));
+       if ((di << 2) == (reg & DC_WR_CH_CONF_PROG_DI_ID)) {
+               reg &= ~DC_WR_CH_CONF_PROG_DI_ID;
+               reg |= di ? 0 : DC_WR_CH_CONF_PROG_DI_ID;
+               __raw_writel(reg, DC_WR_CH_CONF(6 - dc_chan));
+       }
+
+       reg = __raw_readl(DC_WR_CH_CONF(dc_chan));
+       reg |= 4 << DC_WR_CH_CONF_PROG_TYPE_OFFSET;
+       __raw_writel(reg, DC_WR_CH_CONF(dc_chan));
+
+       clk_enable(g_pixel_clk[di]);
+}
+
+static unsigned char dc_swap;
+
+void ipu_dp_dc_disable(ipu_channel_t channel, unsigned char swap)
+{
+       uint32_t reg;
+       uint32_t csc;
+       uint32_t dc_chan = 0;
+       int timeout = 50;
+
+       dc_swap = swap;
+
+       if (channel == MEM_DC_SYNC) {
+               dc_chan = 1;
+       } else if (channel == MEM_BG_SYNC) {
+               dc_chan = 5;
+       } else if (channel == MEM_FG_SYNC) {
+               /* Disable FG channel */
+               dc_chan = 5;
+
+               reg = __raw_readl(DP_COM_CONF(DP_SYNC));
+               csc = reg & DP_COM_CONF_CSC_DEF_MASK;
+               if (csc == DP_COM_CONF_CSC_DEF_FG)
+                       reg &= ~DP_COM_CONF_CSC_DEF_MASK;
+
+               reg &= ~DP_COM_CONF_FG_EN;
+               __raw_writel(reg, DP_COM_CONF(DP_SYNC));
+
+               reg = __raw_readl(IPU_SRM_PRI2) | 0x8;
+               __raw_writel(reg, IPU_SRM_PRI2);
+
+               timeout = 50;
+
+               /*
+                * Wait for DC triple buffer to empty,
+                * this check is useful for tv overlay.
+                */
+               if (g_dc_di_assignment[dc_chan] == 0)
+                       while ((__raw_readl(DC_STAT) & 0x00000002)
+                              != 0x00000002) {
+                               udelay(2000);
+                               timeout -= 2;
+                               if (timeout <= 0)
+                                       break;
+                       }
+               else if (g_dc_di_assignment[dc_chan] == 1)
+                       while ((__raw_readl(DC_STAT) & 0x00000020)
+                              != 0x00000020) {
+                               udelay(2000);
+                               timeout -= 2;
+                               if (timeout <= 0)
+                                       break;
+                       }
+               return;
+       } else {
+               return;
+       }
+
+       if (dc_swap) {
+               /* Swap DC channel 1 and 5 settings, and disable old dc chan */
+               reg = __raw_readl(DC_WR_CH_CONF(dc_chan));
+               __raw_writel(reg, DC_WR_CH_CONF(6 - dc_chan));
+               reg &= ~DC_WR_CH_CONF_PROG_TYPE_MASK;
+               reg ^= DC_WR_CH_CONF_PROG_DI_ID;
+               __raw_writel(reg, DC_WR_CH_CONF(dc_chan));
+       } else {
+               timeout = 50;
+
+               /* Wait for DC triple buffer to empty */
+               if (g_dc_di_assignment[dc_chan] == 0)
+                       while ((__raw_readl(DC_STAT) & 0x00000002)
+                               != 0x00000002) {
+                               udelay(2000);
+                               timeout -= 2;
+                               if (timeout <= 0)
+                                       break;
+                       }
+               else if (g_dc_di_assignment[dc_chan] == 1)
+                       while ((__raw_readl(DC_STAT) & 0x00000020)
+                               != 0x00000020) {
+                               udelay(2000);
+                               timeout -= 2;
+                               if (timeout <= 0)
+                                       break;
+                       }
+
+               reg = __raw_readl(DC_WR_CH_CONF(dc_chan));
+               reg &= ~DC_WR_CH_CONF_PROG_TYPE_MASK;
+               __raw_writel(reg, DC_WR_CH_CONF(dc_chan));
+
+               reg = __raw_readl(IPU_DISP_GEN);
+               if (g_dc_di_assignment[dc_chan])
+                       reg &= ~DI1_COUNTER_RELEASE;
+               else
+                       reg &= ~DI0_COUNTER_RELEASE;
+               __raw_writel(reg, IPU_DISP_GEN);
+
+               /* Clock is already off because it must be done quickly, but
+                  we need to fix the ref count */
+               clk_disable(g_pixel_clk[g_dc_di_assignment[dc_chan]]);
+       }
+}
+
+void ipu_init_dc_mappings(void)
+{
+       /* IPU_PIX_FMT_RGB24 */
+       ipu_dc_map_clear(0);
+       ipu_dc_map_config(0, 0, 7, 0xFF);
+       ipu_dc_map_config(0, 1, 15, 0xFF);
+       ipu_dc_map_config(0, 2, 23, 0xFF);
+
+       /* IPU_PIX_FMT_RGB666 */
+       ipu_dc_map_clear(1);
+       ipu_dc_map_config(1, 0, 5, 0xFC);
+       ipu_dc_map_config(1, 1, 11, 0xFC);
+       ipu_dc_map_config(1, 2, 17, 0xFC);
+
+       /* IPU_PIX_FMT_YUV444 */
+       ipu_dc_map_clear(2);
+       ipu_dc_map_config(2, 0, 15, 0xFF);
+       ipu_dc_map_config(2, 1, 23, 0xFF);
+       ipu_dc_map_config(2, 2, 7, 0xFF);
+
+       /* IPU_PIX_FMT_RGB565 */
+       ipu_dc_map_clear(3);
+       ipu_dc_map_config(3, 0, 4, 0xF8);
+       ipu_dc_map_config(3, 1, 10, 0xFC);
+       ipu_dc_map_config(3, 2, 15, 0xF8);
+
+       /* IPU_PIX_FMT_LVDS666 */
+       ipu_dc_map_clear(4);
+       ipu_dc_map_config(4, 0, 5, 0xFC);
+       ipu_dc_map_config(4, 1, 13, 0xFC);
+       ipu_dc_map_config(4, 2, 21, 0xFC);
+}
+
+int ipu_pixfmt_to_map(uint32_t fmt)
+{
+       switch (fmt) {
+       case IPU_PIX_FMT_GENERIC:
+       case IPU_PIX_FMT_RGB24:
+               return 0;
+       case IPU_PIX_FMT_RGB666:
+               return 1;
+       case IPU_PIX_FMT_YUV444:
+               return 2;
+       case IPU_PIX_FMT_RGB565:
+               return 3;
+       case IPU_PIX_FMT_LVDS666:
+               return 4;
+       }
+
+       return -1;
+}
+
+/*
+ * This function is called to adapt synchronous LCD panel to IPU restriction.
+ */
+void adapt_panel_to_ipu_restricitions(uint32_t *pixel_clk,
+                                     uint16_t width, uint16_t height,
+                                     uint16_t h_start_width,
+                                     uint16_t h_end_width,
+                                     uint16_t v_start_width,
+                                     uint16_t *v_end_width)
+{
+       if (*v_end_width < 2) {
+               uint16_t total_width = width + h_start_width + h_end_width;
+               uint16_t total_height_old = height + v_start_width +
+                       (*v_end_width);
+               uint16_t total_height_new = height + v_start_width + 2;
+               *v_end_width = 2;
+               *pixel_clk = (*pixel_clk) * total_width * total_height_new /
+                       (total_width * total_height_old);
+               printf("WARNING: adapt panel end blank lines\n");
+       }
+}
+
+/*
+ * This function is called to initialize a synchronous LCD panel.
+ *
+ * @param       disp            The DI the panel is attached to.
+ *
+ * @param       pixel_clk       Desired pixel clock frequency in Hz.
+ *
+ * @param       pixel_fmt       Input parameter for pixel format of buffer.
+ *                              Pixel format is a FOURCC ASCII code.
+ *
+ * @param       width           The width of panel in pixels.
+ *
+ * @param       height          The height of panel in pixels.
+ *
+ * @param       hStartWidth     The number of pixel clocks between the HSYNC
+ *                              signal pulse and the start of valid data.
+ *
+ * @param       hSyncWidth      The width of the HSYNC signal in units of pixel
+ *                              clocks.
+ *
+ * @param       hEndWidth       The number of pixel clocks between the end of
+ *                              valid data and the HSYNC signal for next line.
+ *
+ * @param       vStartWidth     The number of lines between the VSYNC
+ *                              signal pulse and the start of valid data.
+ *
+ * @param       vSyncWidth      The width of the VSYNC signal in units of lines
+ *
+ * @param       vEndWidth       The number of lines between the end of valid
+ *                              data and the VSYNC signal for next frame.
+ *
+ * @param       sig             Bitfield of signal polarities for LCD interface.
+ *
+ * @return      This function returns 0 on success or negative error code on
+ *              fail.
+ */
+
+int32_t ipu_init_sync_panel(int disp, uint32_t pixel_clk,
+                           uint16_t width, uint16_t height,
+                           uint32_t pixel_fmt,
+                           uint16_t h_start_width, uint16_t h_sync_width,
+                           uint16_t h_end_width, uint16_t v_start_width,
+                           uint16_t v_sync_width, uint16_t v_end_width,
+                           uint32_t v_to_h_sync, ipu_di_signal_cfg_t sig)
+{
+       uint32_t reg;
+       uint32_t di_gen, vsync_cnt;
+       uint32_t div, rounded_pixel_clk;
+       uint32_t h_total, v_total;
+       int map;
+       struct clk *di_parent;
+
+       debug("panel size = %d x %d\n", width, height);
+
+       if ((v_sync_width == 0) || (h_sync_width == 0))
+               return EINVAL;
+
+       adapt_panel_to_ipu_restricitions(&pixel_clk, width, height,
+                                        h_start_width, h_end_width,
+                                        v_start_width, &v_end_width);
+       h_total = width + h_sync_width + h_start_width + h_end_width;
+       v_total = height + v_sync_width + v_start_width + v_end_width;
+
+       /* Init clocking */
+       debug("pixel clk = %d\n", pixel_clk);
+
+       if (sig.ext_clk) {
+               if (!(g_di1_tvout && (disp == 1))) { /*not round div for tvout*/
+                       /*
+                        * Set the  PLL to be an even multiple
+                        * of the pixel clock.
+                        */
+                       if ((clk_get_usecount(g_pixel_clk[0]) == 0) &&
+                               (clk_get_usecount(g_pixel_clk[1]) == 0)) {
+                               di_parent = clk_get_parent(g_di_clk[disp]);
+                               rounded_pixel_clk =
+                                       clk_round_rate(g_pixel_clk[disp],
+                                               pixel_clk);
+                               div  = clk_get_rate(di_parent) /
+                                       rounded_pixel_clk;
+                               if (div % 2)
+                                       div++;
+                               if (clk_get_rate(di_parent) != div *
+                                       rounded_pixel_clk)
+                                       clk_set_rate(di_parent,
+                                               div * rounded_pixel_clk);
+                               udelay(10000);
+                               clk_set_rate(g_di_clk[disp],
+                                       2 * rounded_pixel_clk);
+                               udelay(10000);
+                       }
+               }
+               clk_set_parent(g_pixel_clk[disp], g_di_clk[disp]);
+       } else {
+               if (clk_get_usecount(g_pixel_clk[disp]) != 0)
+                       clk_set_parent(g_pixel_clk[disp], g_ipu_clk);
+       }
+       rounded_pixel_clk = clk_round_rate(g_pixel_clk[disp], pixel_clk);
+       clk_set_rate(g_pixel_clk[disp], rounded_pixel_clk);
+       udelay(5000);
+       /* Get integer portion of divider */
+       div = clk_get_rate(clk_get_parent(g_pixel_clk[disp])) /
+               rounded_pixel_clk;
+
+       ipu_di_data_wave_config(disp, SYNC_WAVE, div - 1, div - 1);
+       ipu_di_data_pin_config(disp, SYNC_WAVE, DI_PIN15, 3, 0, div * 2);
+
+       map = ipu_pixfmt_to_map(pixel_fmt);
+       if (map < 0) {
+               debug("IPU_DISP: No MAP\n");
+               return -EINVAL;
+       }
+
+       di_gen = __raw_readl(DI_GENERAL(disp));
+
+       if (sig.interlaced) {
+               /* Setup internal HSYNC waveform */
+               ipu_di_sync_config(
+                               disp,           /* display */
+                               1,              /* counter */
+                               h_total / 2 - 1,/* run count */
+                               DI_SYNC_CLK,    /* run_resolution */
+                               0,              /* offset */
+                               DI_SYNC_NONE,   /* offset resolution */
+                               0,              /* repeat count */
+                               DI_SYNC_NONE,   /* CNT_CLR_SEL */
+                               0,              /* CNT_POLARITY_GEN_EN */
+                               DI_SYNC_NONE,   /* CNT_POLARITY_CLR_SEL */
+                               DI_SYNC_NONE,   /* CNT_POLARITY_TRIGGER_SEL */
+                               0,              /* COUNT UP */
+                               0               /* COUNT DOWN */
+                               );
+
+               /* Field 1 VSYNC waveform */
+               ipu_di_sync_config(
+                               disp,           /* display */
+                               2,              /* counter */
+                               h_total - 1,    /* run count */
+                               DI_SYNC_CLK,    /* run_resolution */
+                               0,              /* offset */
+                               DI_SYNC_NONE,   /* offset resolution */
+                               0,              /* repeat count */
+                               DI_SYNC_NONE,   /* CNT_CLR_SEL */
+                               0,              /* CNT_POLARITY_GEN_EN */
+                               DI_SYNC_NONE,   /* CNT_POLARITY_CLR_SEL */
+                               DI_SYNC_NONE,   /* CNT_POLARITY_TRIGGER_SEL */
+                               0,              /* COUNT UP */
+                               4               /* COUNT DOWN */
+                               );
+
+               /* Setup internal HSYNC waveform */
+               ipu_di_sync_config(
+                               disp,           /* display */
+                               3,              /* counter */
+                               v_total * 2 - 1,/* run count */
+                               DI_SYNC_INT_HSYNC,      /* run_resolution */
+                               1,              /* offset */
+                               DI_SYNC_INT_HSYNC,      /* offset resolution */
+                               0,              /* repeat count */
+                               DI_SYNC_NONE,   /* CNT_CLR_SEL */
+                               0,              /* CNT_POLARITY_GEN_EN */
+                               DI_SYNC_NONE,   /* CNT_POLARITY_CLR_SEL */
+                               DI_SYNC_NONE,   /* CNT_POLARITY_TRIGGER_SEL */
+                               0,              /* COUNT UP */
+                               4               /* COUNT DOWN */
+                               );
+
+               /* Active Field ? */
+               ipu_di_sync_config(
+                               disp,           /* display */
+                               4,              /* counter */
+                               v_total / 2 - 1,/* run count */
+                               DI_SYNC_HSYNC,  /* run_resolution */
+                               v_start_width,  /*  offset */
+                               DI_SYNC_HSYNC,  /* offset resolution */
+                               2,              /* repeat count */
+                               DI_SYNC_VSYNC,  /* CNT_CLR_SEL */
+                               0,              /* CNT_POLARITY_GEN_EN */
+                               DI_SYNC_NONE,   /* CNT_POLARITY_CLR_SEL */
+                               DI_SYNC_NONE,   /* CNT_POLARITY_TRIGGER_SEL */
+                               0,              /* COUNT UP */
+                               0               /* COUNT DOWN */
+                               );
+
+               /* Active Line */
+               ipu_di_sync_config(
+                               disp,           /* display */
+                               5,              /* counter */
+                               0,              /* run count */
+                               DI_SYNC_HSYNC,  /* run_resolution */
+                               0,              /*  offset */
+                               DI_SYNC_NONE,   /* offset resolution */
+                               height / 2,     /* repeat count */
+                               4,              /* CNT_CLR_SEL */
+                               0,              /* CNT_POLARITY_GEN_EN */
+                               DI_SYNC_NONE,   /* CNT_POLARITY_CLR_SEL */
+                               DI_SYNC_NONE,   /* CNT_POLARITY_TRIGGER_SEL */
+                               0,              /* COUNT UP */
+                               0               /* COUNT DOWN */
+                               );
+
+               /* Field 0 VSYNC waveform */
+               ipu_di_sync_config(
+                               disp,           /* display */
+                               6,              /* counter */
+                               v_total - 1,    /* run count */
+                               DI_SYNC_HSYNC,  /* run_resolution */
+                               0,              /* offset */
+                               DI_SYNC_NONE,   /* offset resolution */
+                               0,              /* repeat count */
+                               DI_SYNC_NONE,   /* CNT_CLR_SEL  */
+                               0,              /* CNT_POLARITY_GEN_EN */
+                               DI_SYNC_NONE,   /* CNT_POLARITY_CLR_SEL */
+                               DI_SYNC_NONE,   /* CNT_POLARITY_TRIGGER_SEL */
+                               0,              /* COUNT UP */
+                               0               /* COUNT DOWN */
+                               );
+
+               /* DC VSYNC waveform */
+               vsync_cnt = 7;
+               ipu_di_sync_config(
+                               disp,           /* display */
+                               7,              /* counter */
+                               v_total / 2 - 1,/* run count */
+                               DI_SYNC_HSYNC,  /* run_resolution  */
+                               9,              /* offset  */
+                               DI_SYNC_HSYNC,  /* offset resolution */
+                               2,              /* repeat count */
+                               DI_SYNC_VSYNC,  /* CNT_CLR_SEL */
+                               0,              /* CNT_POLARITY_GEN_EN */
+                               DI_SYNC_NONE,   /* CNT_POLARITY_CLR_SEL */
+                               DI_SYNC_NONE,   /* CNT_POLARITY_TRIGGER_SEL */
+                               0,              /* COUNT UP */
+                               0               /* COUNT DOWN */
+                               );
+
+               /* active pixel waveform */
+               ipu_di_sync_config(
+                               disp,           /* display */
+                               8,              /* counter */
+                               0,              /* run count  */
+                               DI_SYNC_CLK,    /* run_resolution */
+                               h_start_width,  /* offset  */
+                               DI_SYNC_CLK,    /* offset resolution */
+                               width,          /* repeat count  */
+                               5,              /* CNT_CLR_SEL  */
+                               0,              /* CNT_POLARITY_GEN_EN  */
+                               DI_SYNC_NONE,   /* CNT_POLARITY_CLR_SEL */
+                               DI_SYNC_NONE,   /* CNT_POLARITY_TRIGGER_SEL  */
+                               0,              /* COUNT UP  */
+                               0               /* COUNT DOWN */
+                               );
+
+               ipu_di_sync_config(
+                               disp,           /* display */
+                               9,              /* counter */
+                               v_total - 1,    /* run count */
+                               DI_SYNC_INT_HSYNC,/* run_resolution */
+                               v_total / 2,    /* offset  */
+                               DI_SYNC_INT_HSYNC,/* offset resolution  */
+                               0,              /* repeat count */
+                               DI_SYNC_HSYNC,  /* CNT_CLR_SEL */
+                               0,              /* CNT_POLARITY_GEN_EN  */
+                               DI_SYNC_NONE,   /* CNT_POLARITY_CLR_SEL  */
+                               DI_SYNC_NONE,   /* CNT_POLARITY_TRIGGER_SEL */
+                               0,              /* COUNT UP */
+                               4               /* COUNT DOWN */
+                               );
+
+               /* set gentime select and tag sel */
+               reg = __raw_readl(DI_SW_GEN1(disp, 9));
+               reg &= 0x1FFFFFFF;
+               reg |= (3 - 1)<<29 | 0x00008000;
+               __raw_writel(reg, DI_SW_GEN1(disp, 9));
+
+               __raw_writel(v_total / 2 - 1, DI_SCR_CONF(disp));
+
+               /* set y_sel = 1 */
+               di_gen |= 0x10000000;
+               di_gen |= DI_GEN_POLARITY_5;
+               di_gen |= DI_GEN_POLARITY_8;
+       } else {
+               /* Setup internal HSYNC waveform */
+               ipu_di_sync_config(disp, 1, h_total - 1, DI_SYNC_CLK,
+                               0, DI_SYNC_NONE, 0, DI_SYNC_NONE,
+                               0, DI_SYNC_NONE,
+                               DI_SYNC_NONE, 0, 0);
+
+               /* Setup external (delayed) HSYNC waveform */
+               ipu_di_sync_config(disp, DI_SYNC_HSYNC, h_total - 1,
+                               DI_SYNC_CLK, div * v_to_h_sync, DI_SYNC_CLK,
+                               0, DI_SYNC_NONE, 1, DI_SYNC_NONE,
+                               DI_SYNC_CLK, 0, h_sync_width * 2);
+               /* Setup VSYNC waveform */
+               vsync_cnt = DI_SYNC_VSYNC;
+               ipu_di_sync_config(disp, DI_SYNC_VSYNC, v_total - 1,
+                               DI_SYNC_INT_HSYNC, 0, DI_SYNC_NONE, 0,
+                               DI_SYNC_NONE, 1, DI_SYNC_NONE,
+                               DI_SYNC_INT_HSYNC, 0, v_sync_width * 2);
+               __raw_writel(v_total - 1, DI_SCR_CONF(disp));
+
+               /* Setup active data waveform to sync with DC */
+               ipu_di_sync_config(disp, 4, 0, DI_SYNC_HSYNC,
+                               v_sync_width + v_start_width, DI_SYNC_HSYNC,
+                               height,
+                               DI_SYNC_VSYNC, 0, DI_SYNC_NONE,
+                               DI_SYNC_NONE, 0, 0);
+               ipu_di_sync_config(disp, 5, 0, DI_SYNC_CLK,
+                               h_sync_width + h_start_width, DI_SYNC_CLK,
+                               width, 4, 0, DI_SYNC_NONE, DI_SYNC_NONE, 0,
+                               0);
+
+               /* reset all unused counters */
+               __raw_writel(0, DI_SW_GEN0(disp, 6));
+               __raw_writel(0, DI_SW_GEN1(disp, 6));
+               __raw_writel(0, DI_SW_GEN0(disp, 7));
+               __raw_writel(0, DI_SW_GEN1(disp, 7));
+               __raw_writel(0, DI_SW_GEN0(disp, 8));
+               __raw_writel(0, DI_SW_GEN1(disp, 8));
+               __raw_writel(0, DI_SW_GEN0(disp, 9));
+               __raw_writel(0, DI_SW_GEN1(disp, 9));
+
+               reg = __raw_readl(DI_STP_REP(disp, 6));
+               reg &= 0x0000FFFF;
+               __raw_writel(reg, DI_STP_REP(disp, 6));
+               __raw_writel(0, DI_STP_REP(disp, 7));
+               __raw_writel(0, DI_STP_REP(disp, 9));
+
+               /* Init template microcode */
+               if (disp) {
+                  ipu_dc_write_tmpl(2, WROD(0), 0, map, SYNC_WAVE, 8, 5);
+                  ipu_dc_write_tmpl(3, WROD(0), 0, map, SYNC_WAVE, 4, 5);
+                  ipu_dc_write_tmpl(4, WROD(0), 0, map, SYNC_WAVE, 0, 5);
+               } else {
+                  ipu_dc_write_tmpl(5, WROD(0), 0, map, SYNC_WAVE, 8, 5);
+                  ipu_dc_write_tmpl(6, WROD(0), 0, map, SYNC_WAVE, 4, 5);
+                  ipu_dc_write_tmpl(7, WROD(0), 0, map, SYNC_WAVE, 0, 5);
+               }
+
+               if (sig.Hsync_pol)
+                       di_gen |= DI_GEN_POLARITY_2;
+               if (sig.Vsync_pol)
+                       di_gen |= DI_GEN_POLARITY_3;
+
+               if (sig.clk_pol)
+                       di_gen |= DI_GEN_POL_CLK;
+
+       }
+
+       __raw_writel(di_gen, DI_GENERAL(disp));
+
+       __raw_writel((--vsync_cnt << DI_VSYNC_SEL_OFFSET) |
+                       0x00000002, DI_SYNC_AS_GEN(disp));
+
+       reg = __raw_readl(DI_POL(disp));
+       reg &= ~(DI_POL_DRDY_DATA_POLARITY | DI_POL_DRDY_POLARITY_15);
+       if (sig.enable_pol)
+               reg |= DI_POL_DRDY_POLARITY_15;
+       if (sig.data_pol)
+               reg |= DI_POL_DRDY_DATA_POLARITY;
+       __raw_writel(reg, DI_POL(disp));
+
+       __raw_writel(width, DC_DISP_CONF2(DC_DISP_ID_SYNC(disp)));
+
+       return 0;
+}
+
+/*
+ * This function sets the foreground and background plane global alpha blending
+ * modes. This function also sets the DP graphic plane according to the
+ * parameter of IPUv3 DP channel.
+ *
+ * @param      channel         IPUv3 DP channel
+ *
+ * @param       enable          Boolean to enable or disable global alpha
+ *                              blending. If disabled, local blending is used.
+ *
+ * @param       alpha           Global alpha value.
+ *
+ * @return      Returns 0 on success or negative error code on fail
+ */
+int32_t ipu_disp_set_global_alpha(ipu_channel_t channel, unsigned char enable,
+                                 uint8_t alpha)
+{
+       uint32_t reg;
+       uint32_t flow;
+
+       unsigned char bg_chan;
+
+       if (channel == MEM_BG_SYNC || channel == MEM_FG_SYNC)
+               flow = DP_SYNC;
+       else if (channel == MEM_BG_ASYNC0 || channel == MEM_FG_ASYNC0)
+               flow = DP_ASYNC0;
+       else if (channel == MEM_BG_ASYNC1 || channel == MEM_FG_ASYNC1)
+               flow = DP_ASYNC1;
+       else
+               return -EINVAL;
+
+       if (channel == MEM_BG_SYNC || channel == MEM_BG_ASYNC0 ||
+           channel == MEM_BG_ASYNC1)
+               bg_chan = 1;
+       else
+               bg_chan = 0;
+
+       if (!g_ipu_clk_enabled)
+               clk_enable(g_ipu_clk);
+
+       if (bg_chan) {
+               reg = __raw_readl(DP_COM_CONF(flow));
+               __raw_writel(reg & ~DP_COM_CONF_GWSEL, DP_COM_CONF(flow));
+       } else {
+               reg = __raw_readl(DP_COM_CONF(flow));
+               __raw_writel(reg | DP_COM_CONF_GWSEL, DP_COM_CONF(flow));
+       }
+
+       if (enable) {
+               reg = __raw_readl(DP_GRAPH_WIND_CTRL(flow)) & 0x00FFFFFFL;
+               __raw_writel(reg | ((uint32_t) alpha << 24),
+                            DP_GRAPH_WIND_CTRL(flow));
+
+               reg = __raw_readl(DP_COM_CONF(flow));
+               __raw_writel(reg | DP_COM_CONF_GWAM, DP_COM_CONF(flow));
+       } else {
+               reg = __raw_readl(DP_COM_CONF(flow));
+               __raw_writel(reg & ~DP_COM_CONF_GWAM, DP_COM_CONF(flow));
+       }
+
+       reg = __raw_readl(IPU_SRM_PRI2) | 0x8;
+       __raw_writel(reg, IPU_SRM_PRI2);
+
+       if (!g_ipu_clk_enabled)
+               clk_disable(g_ipu_clk);
+
+       return 0;
+}
+
+/*
+ * This function sets the transparent color key for SDC graphic plane.
+ *
+ * @param       channel         Input parameter for the logical channel ID.
+ *
+ * @param       enable          Boolean to enable or disable color key
+ *
+ * @param       colorKey        24-bit RGB color for transparent color key.
+ *
+ * @return      Returns 0 on success or negative error code on fail
+ */
+int32_t ipu_disp_set_color_key(ipu_channel_t channel, unsigned char enable,
+                              uint32_t color_key)
+{
+       uint32_t reg, flow;
+       int y, u, v;
+       int red, green, blue;
+
+       if (channel == MEM_BG_SYNC || channel == MEM_FG_SYNC)
+               flow = DP_SYNC;
+       else if (channel == MEM_BG_ASYNC0 || channel == MEM_FG_ASYNC0)
+               flow = DP_ASYNC0;
+       else if (channel == MEM_BG_ASYNC1 || channel == MEM_FG_ASYNC1)
+               flow = DP_ASYNC1;
+       else
+               return -EINVAL;
+
+       if (!g_ipu_clk_enabled)
+               clk_enable(g_ipu_clk);
+
+       color_key_4rgb = 1;
+       /* Transform color key from rgb to yuv if CSC is enabled */
+       if (((fg_csc_type == RGB2YUV) && (bg_csc_type == YUV2YUV)) ||
+               ((fg_csc_type == YUV2YUV) && (bg_csc_type == RGB2YUV)) ||
+               ((fg_csc_type == YUV2YUV) && (bg_csc_type == YUV2YUV)) ||
+               ((fg_csc_type == YUV2RGB) && (bg_csc_type == YUV2RGB))) {
+
+               debug("color key 0x%x need change to yuv fmt\n", color_key);
+
+               red = (color_key >> 16) & 0xFF;
+               green = (color_key >> 8) & 0xFF;
+               blue = color_key & 0xFF;
+
+               y = rgb_to_yuv(0, red, green, blue);
+               u = rgb_to_yuv(1, red, green, blue);
+               v = rgb_to_yuv(2, red, green, blue);
+               color_key = (y << 16) | (u << 8) | v;
+
+               color_key_4rgb = 0;
+
+               debug("color key change to yuv fmt 0x%x\n", color_key);
+       }
+
+       if (enable) {
+               reg = __raw_readl(DP_GRAPH_WIND_CTRL(flow)) & 0xFF000000L;
+               __raw_writel(reg | color_key, DP_GRAPH_WIND_CTRL(flow));
+
+               reg = __raw_readl(DP_COM_CONF(flow));
+               __raw_writel(reg | DP_COM_CONF_GWCKE, DP_COM_CONF(flow));
+       } else {
+               reg = __raw_readl(DP_COM_CONF(flow));
+               __raw_writel(reg & ~DP_COM_CONF_GWCKE, DP_COM_CONF(flow));
+       }
+
+       reg = __raw_readl(IPU_SRM_PRI2) | 0x8;
+       __raw_writel(reg, IPU_SRM_PRI2);
+
+       if (!g_ipu_clk_enabled)
+               clk_disable(g_ipu_clk);
+
+       return 0;
+}
diff --git a/drivers/video/ipu_regs.h b/drivers/video/ipu_regs.h
new file mode 100644 (file)
index 0000000..36f07bb
--- /dev/null
@@ -0,0 +1,418 @@
+/*
+ * Porting to u-boot:
+ *
+ * (C) Copyright 2010
+ * Stefano Babic, DENX Software Engineering, sbabic@denx.de
+ *
+ * Linux IPU driver for MX51:
+ *
+ * (C) Copyright 2005-2009 Freescale Semiconductor, Inc.
+ *
+ * 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 __IPU_REGS_INCLUDED__
+#define __IPU_REGS_INCLUDED__
+
+#define IPU_DISP0_BASE         0x00000000
+#define IPU_MCU_T_DEFAULT      8
+#define IPU_DISP1_BASE         (IPU_MCU_T_DEFAULT << 25)
+#define IPU_CM_REG_BASE                0x1E000000
+#define IPU_STAT_REG_BASE      0x1E000200
+#define IPU_IDMAC_REG_BASE     0x1E008000
+#define IPU_ISP_REG_BASE       0x1E010000
+#define IPU_DP_REG_BASE                0x1E018000
+#define IPU_IC_REG_BASE                0x1E020000
+#define IPU_IRT_REG_BASE       0x1E028000
+#define IPU_CSI0_REG_BASE      0x1E030000
+#define IPU_CSI1_REG_BASE      0x1E038000
+#define IPU_DI0_REG_BASE       0x1E040000
+#define IPU_DI1_REG_BASE       0x1E048000
+#define IPU_SMFC_REG_BASE      0x1E050000
+#define IPU_DC_REG_BASE                0x1E058000
+#define IPU_DMFC_REG_BASE      0x1E060000
+#define IPU_CPMEM_REG_BASE     0x1F000000
+#define IPU_LUT_REG_BASE       0x1F020000
+#define IPU_SRM_REG_BASE       0x1F040000
+#define IPU_TPM_REG_BASE       0x1F060000
+#define IPU_DC_TMPL_REG_BASE   0x1F080000
+#define IPU_ISP_TBPR_REG_BASE  0x1F0C0000
+#define IPU_VDI_REG_BASE       0x1E068000
+
+
+extern u32 *ipu_dc_tmpl_reg;
+
+#define DC_EVT_NF              0
+#define DC_EVT_NL              1
+#define DC_EVT_EOF             2
+#define DC_EVT_NFIELD          3
+#define DC_EVT_EOL             4
+#define DC_EVT_EOFIELD         5
+#define DC_EVT_NEW_ADDR                6
+#define DC_EVT_NEW_CHAN                7
+#define DC_EVT_NEW_DATA                8
+
+#define DC_EVT_NEW_ADDR_W_0    0
+#define DC_EVT_NEW_ADDR_W_1    1
+#define DC_EVT_NEW_CHAN_W_0    2
+#define DC_EVT_NEW_CHAN_W_1    3
+#define DC_EVT_NEW_DATA_W_0    4
+#define DC_EVT_NEW_DATA_W_1    5
+#define DC_EVT_NEW_ADDR_R_0    6
+#define DC_EVT_NEW_ADDR_R_1    7
+#define DC_EVT_NEW_CHAN_R_0    8
+#define DC_EVT_NEW_CHAN_R_1    9
+#define DC_EVT_NEW_DATA_R_0    10
+#define DC_EVT_NEW_DATA_R_1    11
+
+/* Software reset for ipu */
+#define SW_IPU_RST     8
+
+enum {
+       IPU_CONF_DP_EN = 0x00000020,
+       IPU_CONF_DI0_EN = 0x00000040,
+       IPU_CONF_DI1_EN = 0x00000080,
+       IPU_CONF_DMFC_EN = 0x00000400,
+       IPU_CONF_DC_EN = 0x00000200,
+
+       DI0_COUNTER_RELEASE = 0x01000000,
+       DI1_COUNTER_RELEASE = 0x02000000,
+
+       DI_DW_GEN_ACCESS_SIZE_OFFSET = 24,
+       DI_DW_GEN_COMPONENT_SIZE_OFFSET = 16,
+
+       DI_GEN_DI_CLK_EXT = 0x100000,
+       DI_GEN_POLARITY_1 = 0x00000001,
+       DI_GEN_POLARITY_2 = 0x00000002,
+       DI_GEN_POLARITY_3 = 0x00000004,
+       DI_GEN_POLARITY_4 = 0x00000008,
+       DI_GEN_POLARITY_5 = 0x00000010,
+       DI_GEN_POLARITY_6 = 0x00000020,
+       DI_GEN_POLARITY_7 = 0x00000040,
+       DI_GEN_POLARITY_8 = 0x00000080,
+       DI_GEN_POL_CLK = 0x20000,
+
+       DI_POL_DRDY_DATA_POLARITY = 0x00000080,
+       DI_POL_DRDY_POLARITY_15 = 0x00000010,
+       DI_VSYNC_SEL_OFFSET = 13,
+
+       DC_WR_CH_CONF_FIELD_MODE = 0x00000200,
+       DC_WR_CH_CONF_PROG_TYPE_OFFSET = 5,
+       DC_WR_CH_CONF_PROG_TYPE_MASK = 0x000000E0,
+       DC_WR_CH_CONF_PROG_DI_ID = 0x00000004,
+       DC_WR_CH_CONF_PROG_DISP_ID_OFFSET = 3,
+       DC_WR_CH_CONF_PROG_DISP_ID_MASK = 0x00000018,
+
+       DP_COM_CONF_FG_EN = 0x00000001,
+       DP_COM_CONF_GWSEL = 0x00000002,
+       DP_COM_CONF_GWAM = 0x00000004,
+       DP_COM_CONF_GWCKE = 0x00000008,
+       DP_COM_CONF_CSC_DEF_MASK = 0x00000300,
+       DP_COM_CONF_CSC_DEF_OFFSET = 8,
+       DP_COM_CONF_CSC_DEF_FG = 0x00000300,
+       DP_COM_CONF_CSC_DEF_BG = 0x00000200,
+       DP_COM_CONF_CSC_DEF_BOTH = 0x00000100,
+       DP_COM_CONF_GAMMA_EN = 0x00001000,
+       DP_COM_CONF_GAMMA_YUV_EN = 0x00002000,
+};
+
+enum di_pins {
+       DI_PIN11 = 0,
+       DI_PIN12 = 1,
+       DI_PIN13 = 2,
+       DI_PIN14 = 3,
+       DI_PIN15 = 4,
+       DI_PIN16 = 5,
+       DI_PIN17 = 6,
+       DI_PIN_CS = 7,
+
+       DI_PIN_SER_CLK = 0,
+       DI_PIN_SER_RS = 1,
+};
+
+enum di_sync_wave {
+       DI_SYNC_NONE = -1,
+       DI_SYNC_CLK = 0,
+       DI_SYNC_INT_HSYNC = 1,
+       DI_SYNC_HSYNC = 2,
+       DI_SYNC_VSYNC = 3,
+       DI_SYNC_DE = 5,
+};
+
+struct ipu_cm {
+       u32 conf;
+       u32 sisg_ctrl0;
+       u32 sisg_ctrl1;
+       u32 sisg_set[6];
+       u32 sisg_clear[6];
+       u32 int_ctrl[15];
+       u32 sdma_event[10];
+       u32 srm_pri1;
+       u32 srm_pri2;
+       u32 fs_proc_flow[3];
+       u32 fs_disp_flow[2];
+       u32 skip;
+       u32 disp_alt_conf;
+       u32 disp_gen;
+       u32 disp_alt[4];
+       u32 snoop;
+       u32 mem_rst;
+       u32 pm;
+       u32 gpr;
+       u32 reserved0[26];
+       u32 ch_db_mode_sel[2];
+       u32 reserved1[16];
+       u32 alt_ch_db_mode_sel[2];
+       u32 reserved2[2];
+       u32 ch_trb_mode_sel[2];
+};
+
+struct ipu_idmac {
+       u32 conf;
+       u32 ch_en[2];
+       u32 sep_alpha;
+       u32 alt_sep_alpha;
+       u32 ch_pri[2];
+       u32 wm_en[2];
+       u32 lock_en[2];
+       u32 sub_addr[5];
+       u32 bndm_en[2];
+       u32 sc_cord[2];
+       u32 reserved[45];
+       u32 ch_busy[2];
+};
+
+struct ipu_com_async {
+       u32 com_conf_async;
+       u32 graph_wind_ctrl_async;
+       u32 fg_pos_async;
+       u32 cur_pos_async;
+       u32 cur_map_async;
+       u32 gamma_c_async[8];
+       u32 gamma_s_async[4];
+       u32 dp_csca_async[4];
+       u32 dp_csc_async[2];
+};
+
+struct ipu_dp {
+       u32 com_conf_sync;
+       u32 graph_wind_ctrl_sync;
+       u32 fg_pos_sync;
+       u32 cur_pos_sync;
+       u32 cur_map_sync;
+       u32 gamma_c_sync[8];
+       u32 gamma_s_sync[4];
+       u32 csca_sync[4];
+       u32 csc_sync[2];
+       u32 cur_pos_alt;
+       struct ipu_com_async async[2];
+};
+
+struct ipu_di {
+       u32 general;
+       u32 bs_clkgen0;
+       u32 bs_clkgen1;
+       u32 sw_gen0[9];
+       u32 sw_gen1[9];
+       u32 sync_as;
+       u32 dw_gen[12];
+       u32 dw_set[48];
+       u32 stp_rep[4];
+       u32 stp_rep9;
+       u32 ser_conf;
+       u32 ssc;
+       u32 pol;
+       u32 aw0;
+       u32 aw1;
+       u32 scr_conf;
+       u32 stat;
+};
+
+struct ipu_stat {
+       u32 int_stat[15];
+       u32 cur_buf[2];
+       u32 alt_cur_buf_0;
+       u32 alt_cur_buf_1;
+       u32 srm_stat;
+       u32 proc_task_stat;
+       u32 disp_task_stat;
+       u32 triple_cur_buf[4];
+       u32 ch_buf0_rdy[2];
+       u32 ch_buf1_rdy[2];
+       u32 alt_ch_buf0_rdy[2];
+       u32 alt_ch_buf1_rdy[2];
+       u32 ch_buf2_rdy[2];
+};
+
+struct ipu_dc_ch {
+       u32 wr_ch_conf;
+       u32 wr_ch_addr;
+       u32 rl[5];
+};
+
+struct ipu_dc {
+       struct ipu_dc_ch dc_ch0_1_2[3];
+       u32 cmd_ch_conf_3;
+       u32 cmd_ch_conf_4;
+       struct ipu_dc_ch dc_ch5_6[2];
+       struct ipu_dc_ch dc_ch8;
+       u32 rl6_ch_8;
+       struct ipu_dc_ch dc_ch9;
+       u32 rl6_ch_9;
+       u32 gen;
+       u32 disp_conf1[4];
+       u32 disp_conf2[4];
+       u32 di0_conf[2];
+       u32 di1_conf[2];
+       u32 dc_map_ptr[15];
+       u32 dc_map_val[12];
+       u32 udge[16];
+       u32 lla[2];
+       u32 r_lla[2];
+       u32 wr_ch_addr_5_alt;
+       u32 stat;
+};
+
+struct ipu_dmfc {
+       u32 rd_chan;
+       u32 wr_chan;
+       u32 wr_chan_def;
+       u32 dp_chan;
+       u32 dp_chan_def;
+       u32 general[2];
+       u32 ic_ctrl;
+       u32 wr_chan_alt;
+       u32 wr_chan_def_alt;
+       u32 general1_alt;
+       u32 stat;
+};
+
+#define IPU_CM_REG             ((struct ipu_cm *)(IPU_CTRL_BASE_ADDR + \
+                               IPU_CM_REG_BASE))
+#define IPU_CONF               (&IPU_CM_REG->conf)
+#define IPU_SRM_PRI1           (&IPU_CM_REG->srm_pri1)
+#define IPU_SRM_PRI2           (&IPU_CM_REG->srm_pri2)
+#define IPU_FS_PROC_FLOW1      (&IPU_CM_REG->fs_proc_flow[0])
+#define IPU_FS_PROC_FLOW2      (&IPU_CM_REG->fs_proc_flow[1])
+#define IPU_FS_PROC_FLOW3      (&IPU_CM_REG->fs_proc_flow[2])
+#define IPU_FS_DISP_FLOW1      (&IPU_CM_REG->fs_disp_flow[0])
+#define IPU_DISP_GEN           (&IPU_CM_REG->disp_gen)
+#define IPU_MEM_RST            (&IPU_CM_REG->mem_rst)
+#define IPU_GPR                        (&IPU_CM_REG->gpr)
+#define IPU_CHA_DB_MODE_SEL(ch)        (&IPU_CM_REG->ch_db_mode_sel[ch / 32])
+
+#define IPU_STAT               ((struct ipu_stat *)(IPU_CTRL_BASE_ADDR + \
+                               IPU_STAT_REG_BASE))
+#define IPU_CHA_CUR_BUF(ch)    (&IPU_STAT->cur_buf[ch / 32])
+#define IPU_CHA_BUF0_RDY(ch)   (&IPU_STAT->ch_buf0_rdy[ch / 32])
+#define IPU_CHA_BUF1_RDY(ch)   (&IPU_STAT->ch_buf1_rdy[ch / 32])
+
+#define IPU_INT_CTRL(n)                (&IPU_CM_REG->int_ctrl[(n) - 1])
+
+#define IDMAC_REG              ((struct ipu_idmac *)(IPU_CTRL_BASE_ADDR + \
+                               IPU_IDMAC_REG_BASE))
+#define IDMAC_CONF             (&IDMAC_REG->conf)
+#define IDMAC_CHA_EN(ch)       (&IDMAC_REG->ch_en[ch / 32])
+#define IDMAC_CHA_PRI(ch)      (&IDMAC_REG->ch_pri[ch / 32])
+
+#define DI_REG(di)             ((struct ipu_di *)(IPU_CTRL_BASE_ADDR + \
+                               ((di == 1) ? IPU_DI1_REG_BASE : \
+                               IPU_DI0_REG_BASE)))
+#define DI_GENERAL(di)         (&DI_REG(di)->general)
+#define DI_BS_CLKGEN0(di)      (&DI_REG(di)->bs_clkgen0)
+#define DI_BS_CLKGEN1(di)      (&DI_REG(di)->bs_clkgen1)
+
+#define DI_SW_GEN0(di, gen)    (&DI_REG(di)->sw_gen0[gen - 1])
+#define DI_SW_GEN1(di, gen)    (&DI_REG(di)->sw_gen1[gen - 1])
+#define DI_STP_REP(di, gen)    (&DI_REG(di)->stp_rep[(gen - 1) / 2])
+#define DI_SYNC_AS_GEN(di)     (&DI_REG(di)->sync_as)
+#define DI_DW_GEN(di, gen)     (&DI_REG(di)->dw_gen[gen])
+#define DI_DW_SET(di, gen, set)        (&DI_REG(di)->dw_set[gen + 12 * set])
+#define DI_POL(di)             (&DI_REG(di)->pol)
+#define DI_SCR_CONF(di)                (&DI_REG(di)->scr_conf)
+
+#define DMFC_REG               ((struct ipu_dmfc *)(IPU_CTRL_BASE_ADDR + \
+                               IPU_DMFC_REG_BASE))
+#define DMFC_WR_CHAN           (&DMFC_REG->wr_chan)
+#define DMFC_WR_CHAN_DEF       (&DMFC_REG->wr_chan_def)
+#define DMFC_DP_CHAN           (&DMFC_REG->dp_chan)
+#define DMFC_DP_CHAN_DEF       (&DMFC_REG->dp_chan_def)
+#define DMFC_GENERAL1          (&DMFC_REG->general[0])
+#define DMFC_IC_CTRL           (&DMFC_REG->ic_ctrl)
+
+
+#define DC_REG                 ((struct ipu_dc *)(IPU_CTRL_BASE_ADDR + \
+                               IPU_DC_REG_BASE))
+#define DC_MAP_CONF_PTR(n)     (&DC_REG->dc_map_ptr[n / 2])
+#define DC_MAP_CONF_VAL(n)     (&DC_REG->dc_map_val[n / 2])
+
+
+static inline struct ipu_dc_ch *dc_ch_offset(int ch)
+{
+       switch (ch) {
+       case 0:
+       case 1:
+       case 2:
+               return &DC_REG->dc_ch0_1_2[ch];
+       case 5:
+       case 6:
+               return &DC_REG->dc_ch5_6[ch - 5];
+       case 8:
+               return &DC_REG->dc_ch8;
+       case 9:
+               return &DC_REG->dc_ch9;
+       default:
+               printf("%s: invalid channel %d\n", __func__, ch);
+               return NULL;
+       }
+
+}
+
+#define DC_RL_CH(ch, evt)      (&dc_ch_offset(ch)->rl[evt / 2])
+
+#define DC_WR_CH_CONF(ch)      (&dc_ch_offset(ch)->wr_ch_conf)
+#define DC_WR_CH_ADDR(ch)      (&dc_ch_offset(ch)->wr_ch_addr)
+
+#define DC_WR_CH_CONF_1                DC_WR_CH_CONF(1)
+#define DC_WR_CH_CONF_5                DC_WR_CH_CONF(5)
+
+#define DC_GEN                 (&DC_REG->gen)
+#define DC_DISP_CONF2(disp)    (&DC_REG->disp_conf2[disp])
+#define DC_STAT                        (&DC_REG->stat)
+
+#define DP_SYNC 0
+#define DP_ASYNC0 0x60
+#define DP_ASYNC1 0xBC
+
+#define DP_REG                 ((struct ipu_dp *)(IPU_CTRL_BASE_ADDR + \
+                               IPU_DP_REG_BASE))
+#define DP_COM_CONF(flow)      (&DP_REG->com_conf_sync)
+#define DP_GRAPH_WIND_CTRL(flow) (&DP_REG->graph_wind_ctrl_sync)
+#define DP_CSC_A_0(flow)       (&DP_REG->csca_sync[0])
+#define DP_CSC_A_1(flow)       (&DP_REG->csca_sync[1])
+#define DP_CSC_A_2(flow)       (&DP_REG->csca_sync[2])
+#define DP_CSC_A_3(flow)       (&DP_REG->csca_sync[3])
+
+#define DP_CSC_0(flow)         (&DP_REG->csc_sync[0])
+#define DP_CSC_1(flow)         (&DP_REG->csc_sync[1])
+
+/* DC template opcodes */
+#define WROD(lf)               (0x18 | (lf << 1))
+
+#endif
diff --git a/drivers/video/mxc_ipuv3_fb.c b/drivers/video/mxc_ipuv3_fb.c
new file mode 100644 (file)
index 0000000..a66981c
--- /dev/null
@@ -0,0 +1,642 @@
+/*
+ * Porting to u-boot:
+ *
+ * (C) Copyright 2010
+ * Stefano Babic, DENX Software Engineering, sbabic@denx.de
+ *
+ * MX51 Linux framebuffer:
+ *
+ * (C) Copyright 2004-2010 Freescale Semiconductor, Inc.
+ *
+ * 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
+ */
+
+/* #define DEBUG */
+#include <common.h>
+#include <asm/errno.h>
+#include <linux/string.h>
+#include <linux/list.h>
+#include <linux/fb.h>
+#include <asm/io.h>
+#include <malloc.h>
+#include <lcd.h>
+#include "videomodes.h"
+#include "ipu.h"
+#include "mxcfb.h"
+
+DECLARE_GLOBAL_DATA_PTR;
+
+void *lcd_base;                        /* Start of framebuffer memory  */
+void *lcd_console_address;     /* Start of console buffer      */
+
+int lcd_line_length;
+int lcd_color_fg;
+int lcd_color_bg;
+
+short console_col;
+short console_row;
+
+vidinfo_t panel_info;
+
+static int mxcfb_map_video_memory(struct fb_info *fbi);
+static int mxcfb_unmap_video_memory(struct fb_info *fbi);
+
+void lcd_initcolregs(void)
+{
+}
+
+void lcd_setcolreg(ushort regno, ushort red, ushort green, ushort blue)
+{
+}
+
+void lcd_disable(void)
+{
+}
+
+void lcd_panel_disable(void)
+{
+}
+
+void fb_videomode_to_var(struct fb_var_screeninfo *var,
+                        const struct fb_videomode *mode)
+{
+       var->xres = mode->xres;
+       var->yres = mode->yres;
+       var->xres_virtual = mode->xres;
+       var->yres_virtual = mode->yres;
+       var->xoffset = 0;
+       var->yoffset = 0;
+       var->pixclock = mode->pixclock;
+       var->left_margin = mode->left_margin;
+       var->right_margin = mode->right_margin;
+       var->upper_margin = mode->upper_margin;
+       var->lower_margin = mode->lower_margin;
+       var->hsync_len = mode->hsync_len;
+       var->vsync_len = mode->vsync_len;
+       var->sync = mode->sync;
+       var->vmode = mode->vmode & FB_VMODE_MASK;
+}
+
+/*
+ * Structure containing the MXC specific framebuffer information.
+ */
+struct mxcfb_info {
+       int blank;
+       ipu_channel_t ipu_ch;
+       int ipu_di;
+       u32 ipu_di_pix_fmt;
+       unsigned char overlay;
+       unsigned char alpha_chan_en;
+       dma_addr_t alpha_phy_addr0;
+       dma_addr_t alpha_phy_addr1;
+       void *alpha_virt_addr0;
+       void *alpha_virt_addr1;
+       uint32_t alpha_mem_len;
+       uint32_t cur_ipu_buf;
+       uint32_t cur_ipu_alpha_buf;
+
+       u32 pseudo_palette[16];
+};
+
+enum {
+       BOTH_ON,
+       SRC_ON,
+       TGT_ON,
+       BOTH_OFF
+};
+
+static unsigned long default_bpp = 16;
+static unsigned char g_dp_in_use;
+static struct fb_info *mxcfb_info[3];
+static int ext_clk_used;
+
+static uint32_t bpp_to_pixfmt(struct fb_info *fbi)
+{
+       uint32_t pixfmt = 0;
+
+       debug("bpp_to_pixfmt: %d\n", fbi->var.bits_per_pixel);
+
+       if (fbi->var.nonstd)
+               return fbi->var.nonstd;
+
+       switch (fbi->var.bits_per_pixel) {
+       case 24:
+               pixfmt = IPU_PIX_FMT_BGR24;
+               break;
+       case 32:
+               pixfmt = IPU_PIX_FMT_BGR32;
+               break;
+       case 16:
+               pixfmt = IPU_PIX_FMT_RGB565;
+               break;
+       }
+       return pixfmt;
+}
+
+/*
+ * Set fixed framebuffer parameters based on variable settings.
+ *
+ * @param       info     framebuffer information pointer
+ */
+static int mxcfb_set_fix(struct fb_info *info)
+{
+       struct fb_fix_screeninfo *fix = &info->fix;
+       struct fb_var_screeninfo *var = &info->var;
+
+       fix->line_length = var->xres_virtual * var->bits_per_pixel / 8;
+
+       fix->type = FB_TYPE_PACKED_PIXELS;
+       fix->accel = FB_ACCEL_NONE;
+       fix->visual = FB_VISUAL_TRUECOLOR;
+       fix->xpanstep = 1;
+       fix->ypanstep = 1;
+
+       return 0;
+}
+
+static int setup_disp_channel1(struct fb_info *fbi)
+{
+       ipu_channel_params_t params;
+       struct mxcfb_info *mxc_fbi = (struct mxcfb_info *)fbi->par;
+
+       memset(&params, 0, sizeof(params));
+       params.mem_dp_bg_sync.di = mxc_fbi->ipu_di;
+
+       debug("%s called\n", __func__);
+       /*
+        * Assuming interlaced means yuv output, below setting also
+        * valid for mem_dc_sync. FG should have the same vmode as BG.
+        */
+       if (fbi->var.vmode & FB_VMODE_INTERLACED) {
+               params.mem_dp_bg_sync.interlaced = 1;
+               params.mem_dp_bg_sync.out_pixel_fmt =
+                       IPU_PIX_FMT_YUV444;
+       } else {
+               if (mxc_fbi->ipu_di_pix_fmt) {
+                       params.mem_dp_bg_sync.out_pixel_fmt =
+                               mxc_fbi->ipu_di_pix_fmt;
+               } else {
+                       params.mem_dp_bg_sync.out_pixel_fmt =
+                               IPU_PIX_FMT_RGB666;
+               }
+       }
+       params.mem_dp_bg_sync.in_pixel_fmt = bpp_to_pixfmt(fbi);
+       if (mxc_fbi->alpha_chan_en)
+               params.mem_dp_bg_sync.alpha_chan_en = 1;
+
+       ipu_init_channel(mxc_fbi->ipu_ch, &params);
+
+       return 0;
+}
+
+static int setup_disp_channel2(struct fb_info *fbi)
+{
+       int retval = 0;
+       struct mxcfb_info *mxc_fbi = (struct mxcfb_info *)fbi->par;
+
+       mxc_fbi->cur_ipu_buf = 1;
+       if (mxc_fbi->alpha_chan_en)
+               mxc_fbi->cur_ipu_alpha_buf = 1;
+
+       fbi->var.xoffset = fbi->var.yoffset = 0;
+
+       debug("%s: %x %d %d %d %lx %lx\n",
+               __func__,
+               mxc_fbi->ipu_ch,
+               fbi->var.xres,
+               fbi->var.yres,
+               fbi->fix.line_length,
+               fbi->fix.smem_start,
+               fbi->fix.smem_start +
+               (fbi->fix.line_length * fbi->var.yres));
+
+       retval = ipu_init_channel_buffer(mxc_fbi->ipu_ch, IPU_INPUT_BUFFER,
+                                        bpp_to_pixfmt(fbi),
+                                        fbi->var.xres, fbi->var.yres,
+                                        fbi->fix.line_length,
+                                        fbi->fix.smem_start +
+                                        (fbi->fix.line_length * fbi->var.yres),
+                                        fbi->fix.smem_start,
+                                        0, 0);
+       if (retval)
+               printf("ipu_init_channel_buffer error %d\n", retval);
+
+       return retval;
+}
+
+/*
+ * Set framebuffer parameters and change the operating mode.
+ *
+ * @param       info     framebuffer information pointer
+ */
+static int mxcfb_set_par(struct fb_info *fbi)
+{
+       int retval = 0;
+       u32 mem_len;
+       ipu_di_signal_cfg_t sig_cfg;
+       struct mxcfb_info *mxc_fbi = (struct mxcfb_info *)fbi->par;
+       uint32_t out_pixel_fmt;
+
+       ipu_disable_channel(mxc_fbi->ipu_ch);
+       ipu_uninit_channel(mxc_fbi->ipu_ch);
+       mxcfb_set_fix(fbi);
+
+       mem_len = fbi->var.yres_virtual * fbi->fix.line_length;
+       if (!fbi->fix.smem_start || (mem_len > fbi->fix.smem_len)) {
+               if (fbi->fix.smem_start)
+                       mxcfb_unmap_video_memory(fbi);
+
+               if (mxcfb_map_video_memory(fbi) < 0)
+                       return -ENOMEM;
+       }
+
+       setup_disp_channel1(fbi);
+
+       memset(&sig_cfg, 0, sizeof(sig_cfg));
+       if (fbi->var.vmode & FB_VMODE_INTERLACED) {
+               sig_cfg.interlaced = 1;
+               out_pixel_fmt = IPU_PIX_FMT_YUV444;
+       } else {
+               if (mxc_fbi->ipu_di_pix_fmt)
+                       out_pixel_fmt = mxc_fbi->ipu_di_pix_fmt;
+               else
+                       out_pixel_fmt = IPU_PIX_FMT_RGB666;
+       }
+       if (fbi->var.vmode & FB_VMODE_ODD_FLD_FIRST) /* PAL */
+               sig_cfg.odd_field_first = 1;
+       if ((fbi->var.sync & FB_SYNC_EXT) || ext_clk_used)
+               sig_cfg.ext_clk = 1;
+       if (fbi->var.sync & FB_SYNC_HOR_HIGH_ACT)
+               sig_cfg.Hsync_pol = 1;
+       if (fbi->var.sync & FB_SYNC_VERT_HIGH_ACT)
+               sig_cfg.Vsync_pol = 1;
+       if (!(fbi->var.sync & FB_SYNC_CLK_LAT_FALL))
+               sig_cfg.clk_pol = 1;
+       if (fbi->var.sync & FB_SYNC_DATA_INVERT)
+               sig_cfg.data_pol = 1;
+       if (!(fbi->var.sync & FB_SYNC_OE_LOW_ACT))
+               sig_cfg.enable_pol = 1;
+       if (fbi->var.sync & FB_SYNC_CLK_IDLE_EN)
+               sig_cfg.clkidle_en = 1;
+
+       debug("pixclock = %ul Hz\n",
+               (u32) (PICOS2KHZ(fbi->var.pixclock) * 1000UL));
+
+       if (ipu_init_sync_panel(mxc_fbi->ipu_di,
+                               (PICOS2KHZ(fbi->var.pixclock)) * 1000UL,
+                               fbi->var.xres, fbi->var.yres,
+                               out_pixel_fmt,
+                               fbi->var.left_margin,
+                               fbi->var.hsync_len,
+                               fbi->var.right_margin,
+                               fbi->var.upper_margin,
+                               fbi->var.vsync_len,
+                               fbi->var.lower_margin,
+                               0, sig_cfg) != 0) {
+               puts("mxcfb: Error initializing panel.\n");
+               return -EINVAL;
+       }
+
+       retval = setup_disp_channel2(fbi);
+       if (retval)
+               return retval;
+
+       if (mxc_fbi->blank == FB_BLANK_UNBLANK)
+               ipu_enable_channel(mxc_fbi->ipu_ch);
+
+       return retval;
+}
+
+/*
+ * Check framebuffer variable parameters and adjust to valid values.
+ *
+ * @param       var      framebuffer variable parameters
+ *
+ * @param       info     framebuffer information pointer
+ */
+static int mxcfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
+{
+       u32 vtotal;
+       u32 htotal;
+
+       if (var->xres_virtual < var->xres)
+               var->xres_virtual = var->xres;
+       if (var->yres_virtual < var->yres)
+               var->yres_virtual = var->yres;
+
+       if ((var->bits_per_pixel != 32) && (var->bits_per_pixel != 24) &&
+           (var->bits_per_pixel != 16) && (var->bits_per_pixel != 8))
+               var->bits_per_pixel = default_bpp;
+
+       switch (var->bits_per_pixel) {
+       case 8:
+               var->red.length = 3;
+               var->red.offset = 5;
+               var->red.msb_right = 0;
+
+               var->green.length = 3;
+               var->green.offset = 2;
+               var->green.msb_right = 0;
+
+               var->blue.length = 2;
+               var->blue.offset = 0;
+               var->blue.msb_right = 0;
+
+               var->transp.length = 0;
+               var->transp.offset = 0;
+               var->transp.msb_right = 0;
+               break;
+       case 16:
+               var->red.length = 5;
+               var->red.offset = 11;
+               var->red.msb_right = 0;
+
+               var->green.length = 6;
+               var->green.offset = 5;
+               var->green.msb_right = 0;
+
+               var->blue.length = 5;
+               var->blue.offset = 0;
+               var->blue.msb_right = 0;
+
+               var->transp.length = 0;
+               var->transp.offset = 0;
+               var->transp.msb_right = 0;
+               break;
+       case 24:
+               var->red.length = 8;
+               var->red.offset = 16;
+               var->red.msb_right = 0;
+
+               var->green.length = 8;
+               var->green.offset = 8;
+               var->green.msb_right = 0;
+
+               var->blue.length = 8;
+               var->blue.offset = 0;
+               var->blue.msb_right = 0;
+
+               var->transp.length = 0;
+               var->transp.offset = 0;
+               var->transp.msb_right = 0;
+               break;
+       case 32:
+               var->red.length = 8;
+               var->red.offset = 16;
+               var->red.msb_right = 0;
+
+               var->green.length = 8;
+               var->green.offset = 8;
+               var->green.msb_right = 0;
+
+               var->blue.length = 8;
+               var->blue.offset = 0;
+               var->blue.msb_right = 0;
+
+               var->transp.length = 8;
+               var->transp.offset = 24;
+               var->transp.msb_right = 0;
+               break;
+       }
+
+       if (var->pixclock < 1000) {
+               htotal = var->xres + var->right_margin + var->hsync_len +
+                   var->left_margin;
+               vtotal = var->yres + var->lower_margin + var->vsync_len +
+                   var->upper_margin;
+               var->pixclock = (vtotal * htotal * 6UL) / 100UL;
+               var->pixclock = KHZ2PICOS(var->pixclock);
+               printf("pixclock set for 60Hz refresh = %u ps\n",
+                       var->pixclock);
+       }
+
+       var->height = -1;
+       var->width = -1;
+       var->grayscale = 0;
+
+       return 0;
+}
+
+static int mxcfb_map_video_memory(struct fb_info *fbi)
+{
+       if (fbi->fix.smem_len < fbi->var.yres_virtual * fbi->fix.line_length) {
+               fbi->fix.smem_len = fbi->var.yres_virtual *
+                                   fbi->fix.line_length;
+       }
+
+       fbi->screen_base = (char *)lcd_base;
+       fbi->fix.smem_start = (unsigned long)lcd_base;
+       if (fbi->screen_base == 0) {
+               puts("Unable to allocate framebuffer memory\n");
+               fbi->fix.smem_len = 0;
+               fbi->fix.smem_start = 0;
+               return -EBUSY;
+       }
+
+       debug("allocated fb @ paddr=0x%08X, size=%d.\n",
+               (uint32_t) fbi->fix.smem_start, fbi->fix.smem_len);
+
+       fbi->screen_size = fbi->fix.smem_len;
+
+       /* Clear the screen */
+       memset((char *)fbi->screen_base, 0, fbi->fix.smem_len);
+
+       return 0;
+}
+
+static int mxcfb_unmap_video_memory(struct fb_info *fbi)
+{
+       fbi->screen_base = 0;
+       fbi->fix.smem_start = 0;
+       fbi->fix.smem_len = 0;
+       return 0;
+}
+
+/*
+ * Initializes the framebuffer information pointer. After allocating
+ * sufficient memory for the framebuffer structure, the fields are
+ * filled with custom information passed in from the configurable
+ * structures.  This includes information such as bits per pixel,
+ * color maps, screen width/height and RGBA offsets.
+ *
+ * @return      Framebuffer structure initialized with our information
+ */
+static struct fb_info *mxcfb_init_fbinfo(void)
+{
+#define BYTES_PER_LONG 4
+#define PADDING (BYTES_PER_LONG - (sizeof(struct fb_info) % BYTES_PER_LONG))
+       struct fb_info *fbi;
+       struct mxcfb_info *mxcfbi;
+       char *p;
+       int size = sizeof(struct mxcfb_info) + PADDING +
+               sizeof(struct fb_info);
+
+       debug("%s: %d %d %d %d\n",
+               __func__,
+               PADDING,
+               size,
+               sizeof(struct mxcfb_info),
+               sizeof(struct fb_info));
+       /*
+        * Allocate sufficient memory for the fb structure
+        */
+
+       p = malloc(size);
+       if (!p)
+               return NULL;
+
+       memset(p, 0, size);
+
+       fbi = (struct fb_info *)p;
+       fbi->par = p + sizeof(struct fb_info) + PADDING;
+
+       mxcfbi = (struct mxcfb_info *)fbi->par;
+       debug("Framebuffer structures at: fbi=0x%x mxcfbi=0x%x\n",
+               (unsigned int)fbi, (unsigned int)mxcfbi);
+
+       fbi->var.activate = FB_ACTIVATE_NOW;
+
+       fbi->flags = FBINFO_FLAG_DEFAULT;
+       fbi->pseudo_palette = mxcfbi->pseudo_palette;
+
+       return fbi;
+}
+
+/*
+ * Probe routine for the framebuffer driver. It is called during the
+ * driver binding process.      The following functions are performed in
+ * this routine: Framebuffer initialization, Memory allocation and
+ * mapping, Framebuffer registration, IPU initialization.
+ *
+ * @return      Appropriate error code to the kernel common code
+ */
+static int mxcfb_probe(u32 interface_pix_fmt, struct fb_videomode *mode)
+{
+       struct fb_info *fbi;
+       struct mxcfb_info *mxcfbi;
+       int ret = 0;
+
+       /*
+        * Initialize FB structures
+        */
+       fbi = mxcfb_init_fbinfo();
+       if (!fbi) {
+               ret = -ENOMEM;
+               goto err0;
+       }
+       mxcfbi = (struct mxcfb_info *)fbi->par;
+
+       if (!g_dp_in_use) {
+               mxcfbi->ipu_ch = MEM_BG_SYNC;
+               mxcfbi->blank = FB_BLANK_UNBLANK;
+       } else {
+               mxcfbi->ipu_ch = MEM_DC_SYNC;
+               mxcfbi->blank = FB_BLANK_POWERDOWN;
+       }
+
+       mxcfbi->ipu_di = 0;
+
+       ipu_disp_set_global_alpha(mxcfbi->ipu_ch, 1, 0x80);
+       ipu_disp_set_color_key(mxcfbi->ipu_ch, 0, 0);
+       strcpy(fbi->fix.id, "DISP3 BG");
+
+       g_dp_in_use = 1;
+
+       mxcfb_info[mxcfbi->ipu_di] = fbi;
+
+       /* Need dummy values until real panel is configured */
+       fbi->var.xres = 640;
+       fbi->var.yres = 480;
+       fbi->var.bits_per_pixel = 16;
+
+       mxcfbi->ipu_di_pix_fmt = interface_pix_fmt;
+       fb_videomode_to_var(&fbi->var, mode);
+
+       mxcfb_check_var(&fbi->var, fbi);
+
+       /* Default Y virtual size is 2x panel size */
+       fbi->var.yres_virtual = fbi->var.yres * 2;
+
+       mxcfb_set_fix(fbi);
+
+       /* alocate fb first */
+       if (mxcfb_map_video_memory(fbi) < 0)
+               return -ENOMEM;
+
+       mxcfb_set_par(fbi);
+
+       /* Setting panel_info for lcd */
+       panel_info.cmap = NULL;
+       panel_info.vl_col = fbi->var.xres;
+       panel_info.vl_row = fbi->var.yres;
+       panel_info.vl_bpix = LCD_BPP;
+
+       lcd_line_length = (panel_info.vl_col * NBITS(panel_info.vl_bpix)) / 8;
+
+       debug("MXC IPUV3 configured\n"
+               "XRES = %d YRES = %d BitsXpixel = %d\n",
+               panel_info.vl_col,
+               panel_info.vl_row,
+               panel_info.vl_bpix);
+
+       ipu_dump_registers();
+
+       return 0;
+
+err0:
+       return ret;
+}
+
+int overwrite_console(void)
+{
+       /* Keep stdout / stderr on serial, our LCD is for splashscreen only */
+       return 1;
+}
+
+void lcd_ctrl_init(void *lcdbase)
+{
+       u32 mem_len = panel_info.vl_col *
+               panel_info.vl_row *
+               NBITS(panel_info.vl_bpix) / 8;
+
+       /*
+        * We rely on lcdbase being a physical address, i.e., either MMU off,
+        * or 1-to-1 mapping. Might want to add some virt2phys here.
+        */
+       if (!lcdbase)
+               return;
+
+       memset(lcdbase, 0, mem_len);
+}
+
+int mx51_fb_init(struct fb_videomode *mode)
+{
+       int ret;
+
+       ret = ipu_probe();
+       if (ret)
+               puts("Error initializing IPU\n");
+
+       lcd_base += 56;
+
+       debug("Framebuffer at 0x%x\n", (unsigned int)lcd_base);
+       ret = mxcfb_probe(IPU_PIX_FMT_RGB666, mode);
+
+       return ret;
+}
diff --git a/drivers/video/mxcfb.h b/drivers/video/mxcfb.h
new file mode 100644 (file)
index 0000000..d508196
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * Porting to u-boot:
+ *
+ * (C) Copyright 2010
+ * Stefano Babic, DENX Software Engineering, sbabic@denx.de
+ *
+ * Linux IPU driver for MX51:
+ *
+ * (C) Copyright 2004-2009 Freescale Semiconductor, Inc.
+ *
+ * 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 __ASM_ARCH_MXCFB_H__
+#define __ASM_ARCH_MXCFB_H__
+
+#define FB_SYNC_OE_LOW_ACT     0x80000000
+#define FB_SYNC_CLK_LAT_FALL   0x40000000
+#define FB_SYNC_DATA_INVERT    0x20000000
+#define FB_SYNC_CLK_IDLE_EN    0x10000000
+#define FB_SYNC_SHARP_MODE     0x08000000
+#define FB_SYNC_SWAP_RGB       0x04000000
+
+struct mxcfb_gbl_alpha {
+       int enable;
+       int alpha;
+};
+
+struct mxcfb_loc_alpha {
+       int enable;
+       int alpha_in_pixel;
+       unsigned long alpha_phy_addr0;
+       unsigned long alpha_phy_addr1;
+};
+
+struct mxcfb_color_key {
+       int enable;
+       __u32 color_key;
+};
+
+struct mxcfb_pos {
+       __u16 x;
+       __u16 y;
+};
+
+struct mxcfb_gamma {
+       int enable;
+       int constk[16];
+       int slopek[16];
+};
+
+#endif
index 744e961847263f17da8058bb06736daf967178c0..a75e4f258aa1ec768f28d3fe3f8ac2a1bcc9a87d 100644 (file)
@@ -858,7 +858,7 @@ do_fat_read (const char *filename, void *buffer, unsigned long maxsize,
                if (disk_read(cursect,
                                (mydata->fatsize == 32) ?
                                (mydata->clust_size) :
-                               LINEAR_PREFETCH_SIZE,
+                               LINEAR_PREFETCH_SIZE / SECTOR_SIZE,
                                do_fat_read_block) < 0) {
                        debug("Error: reading rootdir block\n");
                        return -1;
index 3fc79909eaadfea2ebd6b140e8e8a9e3299b35d7..1cc31a968dd92b40d737e465c0b5113942020962 100644 (file)
@@ -121,7 +121,7 @@ static int __init compr_init(struct ubifs_compressor *compr)
 {
        ubifs_compressors[compr->compr_type] = compr;
 
-#ifndef CONFIG_RELOC_FIXUP_WORKS
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
        ubifs_compressors[compr->compr_type]->name += gd->reloc_off;
        ubifs_compressors[compr->compr_type]->capi_name += gd->reloc_off;
        ubifs_compressors[compr->compr_type]->decompress += gd->reloc_off;
diff --git a/include/asm-offsets.h b/include/asm-offsets.h
new file mode 100644 (file)
index 0000000..ad3bf1f
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef        DO_DEPS_ONLY
+
+#include <generated/generic-asm-offsets.h>
+/* #include <generated/asm-offsets.h> */
+
+#endif
index 5c146162337c9ef08161167639cde0868c6f5cf3..46a9ec4c4cac859c7c261cb39f15eceae4d5b01d 100644 (file)
@@ -125,7 +125,7 @@ cmd_tbl_t __u_boot_cmd_##name Struct_Section = {#name, maxargs, rep, cmd, usage}
 
 #endif /* CONFIG_SYS_LONGHELP */
 
-#if !defined(CONFIG_RELOC_FIXUP_WORKS)
+#if defined(CONFIG_NEEDS_MANUAL_RELOC)
 void fixup_cmdtable(cmd_tbl_t *cmdtp, int size);
 #endif
 #endif /* __COMMAND_H */
index 0686a173d52bc5120a2a281dd3d31c682b94f78c..189ad8122b6445797a55bb597a0f581694057925 100644 (file)
@@ -35,6 +35,7 @@ typedef volatile unsigned short vu_short;
 typedef volatile unsigned char vu_char;
 
 #include <config.h>
+#include <asm-offsets.h>
 #include <linux/bitops.h>
 #include <linux/types.h>
 #include <linux/string.h>
index 26d4d8a31cdf103098714eed99ed884470b7be23..3d6014176c0597bfede7a9c917eb048be85356cd 100644 (file)
  */
 
 /* #define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE */
-/*#define CONFIG_SYS_GBL_DATA_SIZE    256*/
-#define CONFIG_SYS_GBL_DATA_SIZE      128
 #define CONFIG_SYS_INIT_RAM_ADDR     0x40000000
-#define CONFIG_SYS_INIT_RAM_END      0x1000
-#define CONFIG_SYS_GBL_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE      0x1000
+#define CONFIG_SYS_GBL_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 
 
 /*
index 56109148cfe855ecedc2f47ab109b349e9f68f55..6f12c8ddc01363a1593630f99ee2aa8a4505ab09 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x00df0000 /* inside of SDRAM                   */
-#define CONFIG_SYS_INIT_RAM_END        0x0f00  /* End of used area in RAM             */
-#define CONFIG_SYS_GBL_DATA_SIZE       64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x0f00  /* Size of used area in RAM            */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index aa35cbca963059ba22ab0abd95db7c847bad266a..e7c6f968368598942af3dc302621a5a12aa9c52d 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index f1ae16c436a2153875d6fdb9caaf75cd9b336f2e..9e5490d1df436c9cb60131bff995bd672b1577b0 100644 (file)
  */
 
 #define CONFIG_SYS_INIT_RAM_ADDR       0x400000  /* inside of SDRAM                     */
-#define CONFIG_SYS_INIT_RAM_END        0x2000  /* End of used area in RAM             */
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2000  /* Size of used area in RAM            */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index b846afcc0b517d9427be8fb1b87cfbb940886d62..0adf3ed2a0237a31939411f498afa2ffdfd4060d 100644 (file)
 #define CONFIG_SYS_OCM_DATA_SIZE       0x1000
 
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR /* inside of SDRAM */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE /* End of used area in RAM */
-#define CONFIG_SYS_GBL_DATA_SIZE       128 /* reserved bytes for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE /* Size of used area in RAM */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 /* reserve some memory for BOOT limit info */
 #define CONFIG_SYS_INIT_SP_OFFSET      (CONFIG_SYS_GBL_DATA_OFFSET - 16)
 
index b4ff7188de538bfc192a7e33829b28d54d3a55ce..4963e9f688ec915563b77f421f1746b6ef799a1c 100644 (file)
 #define CONFIG_SYS_INIT_DCACHE_CS      7       /* use cs # 7 for data cache memory    */
 
 #define CONFIG_SYS_INIT_RAM_ADDR       0x40000000  /* use data cache                  */
-#define CONFIG_SYS_INIT_RAM_END        0x2000  /* End of used area in RAM             */
-#define CONFIG_SYS_GBL_DATA_SIZE      128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2000  /* Size of used area in RAM            */
+#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #endif /* __CONFIG_H */
index 480051b16bde2c033fed15e1a5b183870816456e..ee80d9d8f23c06146f6869ad081253ad662d339b 100644 (file)
 #define CONFIG_SYS_OCM_DATA_ADDR       0xF8000000
 #define CONFIG_SYS_OCM_DATA_SIZE       0x1000
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR /* inside of SDRAM             */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE /* End of used area in RAM     */
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE /* Size of used area in RAM    */
 
-#define CONFIG_SYS_GBL_DATA_SIZE      128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index dda6baa7ff6a9d7a12579cb616c60cb4c2c6b1d5..78757ecced285027d2d0a8e54bdc7d838318b0b9 100644 (file)
 /* Memory */
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0xe4010000      /* Initial RAM address */
-#define CONFIG_SYS_INIT_RAM_END        0x4000          /* End of used area in RAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000          /* Size of used area in RAM */
 
 #define CONFIG_SYS_INIT_L2_ADDR        0xf8f80000      /* relocate boot L2SRAM */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_LEN         (256 * 1024) /* Reserve 256 kB for Mon */
index a1c530b71b4ad4bbdced4d740ce90b4e8ba5930c..48e6df5c279168d312ffcb00fba1626f3f46ffc3 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x2F00          /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       128  /* Size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2F00          /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index b5c904987b85812a7c891f8f6ab336c42d329d69..e05099281728fb24b792ce8a5099de65f4edb122 100644 (file)
 
 /* Use SRAM until RAM will be available */
 #define CONFIG_SYS_INIT_RAM_ADDR       (CONFIG_SYS_MBAR + 0x20000)
-#define CONFIG_SYS_INIT_RAM_END        0x8000  /* End of used area in DPRAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x8000  /* Size of used area in DPRAM */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE
index ca7350dc40dcc6d2885bcbee6cb9176ef9b5a277..7846a925c8649d5fa5f84f32b97d3eeaaa842add 100644 (file)
@@ -53,7 +53,6 @@
 #define CONFIG_SYS_MONITOR_LEN         (256 * 1024)    /* Reserve 256 kB for Monitor   */
 #define CONFIG_ENV_SIZE                1024            /* 1024 bytes may be used for env vars*/
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128*1024 )
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
index 9250ef3d4cdf7c8b88a084054226e73aebaf1aaa..1497cae095422ecb11cea4ef4c35e9626becbc4e 100644 (file)
  * Definitions for initial stack pointer and data area
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x00fd0000  /* above the memtest region */
-#define CONFIG_SYS_INIT_RAM_END        0x4000
-#define CONFIG_SYS_GBL_DATA_SIZE       64          /* size in bytes reserved for init data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE        0x4000
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*
index d0517043cb0d554aac87bf6d3c6f08ae519bbcce..a833893728180b9622ebaea6c0107d79d6fbc877 100644 (file)
 #define CONFIG_SYS_INIT_RAM_ADDR       MPC5XXX_SRAM
 #ifdef CONFIG_POST
 /* preserve space for the post_word at end of on-chip SRAM */
-# define CONFIG_SYS_INIT_RAM_END       MPC5XXX_SRAM_POST_SIZE
+# define CONFIG_SYS_INIT_RAM_SIZE      MPC5XXX_SRAM_POST_SIZE
 #else
-# define CONFIG_SYS_INIT_RAM_END       MPC5XXX_SRAM_SIZE
+# define CONFIG_SYS_INIT_RAM_SIZE      MPC5XXX_SRAM_SIZE
 #endif /*CONFIG_POST*/
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* Bytes reserved for initial data  */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE
index 7d928eb6d5f469418e47872d7dd5c97fb4ce11cd..8398b290bf28c88f718b18ad581a113af84cbc68 100644 (file)
  * Definitions for initial stack pointer and data area
  */
 #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_MONITOR_LEN
-#define CONFIG_SYS_INIT_RAM_END   0x2F00  /* End of used area in DPRAM  */
-#define CONFIG_SYS_GBL_DATA_SIZE  128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE   0x2F00  /* Size of used area in DPRAM  */
+#define CONFIG_SYS_GBL_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET  CONFIG_SYS_GBL_DATA_OFFSET
 
 /*
index 9c55805f1353624795215be53ba8d47ac7c17377..b27ef64fbe4cc3db19b0da03f9347a521d269f18 100644 (file)
  * Definitions for initial stack pointer and data area (in RAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x00ef0000 /* inside of SDRAM                   */
-#define CONFIG_SYS_INIT_RAM_END        0x0f00  /* End of used area in RAM             */
-#define CONFIG_SYS_GBL_DATA_SIZE       64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x0f00  /* Size of used area in RAM            */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #endif /* __CONFIG_H */
index ad36a14c6d0ef44bac980aba772fc7ea9d2cb1ce..ac70d158e7eb4a03887b639138ec279803e68ede 100644 (file)
 #define CONFIG_SYS_OCM_DATA_ADDR       0xF8000000
 #define CONFIG_SYS_OCM_DATA_SIZE       0x1000
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR /* inside of SDRAM             */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE /* End of used area in RAM     */
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE /* Size of used area in RAM    */
 
-#define CONFIG_SYS_GBL_DATA_SIZE      128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 3e973f2cc0273216f204f88ca7ddf527b6763cea..daaf62440c5b1a43f51a2e151835937594db6a54 100644 (file)
 #define CONFIG_SYS_OCM_DATA_ADDR       0xF8000000
 #define CONFIG_SYS_OCM_DATA_SIZE       0x1000
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR /* inside of SDRAM             */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE /* End of used area in RAM     */
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE /* Size of used area in RAM    */
 
-#define CONFIG_SYS_GBL_DATA_SIZE      128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 486a4e0535c7bb2f18c927bae67c46e029b46f43..6a88d26511d67f3d45d966741f4ede66e0310f74 100644 (file)
 
 /* Size in bytes reserved for initial data
  */
-#define CONFIG_SYS_GBL_DATA_SIZE       128
 
 #define CONFIG_SYS_INIT_RAM_ADDR       0x40000000
-#define CONFIG_SYS_INIT_RAM_END        0x1000
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x1000
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 
 /*
  * NS16550 Configuration
index e4d8f9c5f9ad5ddaf8438561d528acb1bee04d80..99ace67a2f3fa07957aa462f6efbee435c3abc1e 100644 (file)
 #define CONFIG_SYS_INIT_DCACHE_CS      7       /* use cs # 7 for data cache memory    */
 
 #define CONFIG_SYS_INIT_RAM_ADDR       0x40000000  /* use data cache                  */
-#define CONFIG_SYS_INIT_RAM_END        0x2000  /* End of used area in RAM             */
-#define CONFIG_SYS_GBL_DATA_SIZE       128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2000  /* Size of used area in RAM            */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 6b2986de896c68c9a76259f523a13949358de86b..426fc57a650017101da5df6f4f887e86afaa7e7a 100644 (file)
 #else
 #define CONFIG_SYS_INIT_RAM_ADDR       0x00df0000 /* inside of SDRAM                   */
 #endif
-#define CONFIG_SYS_INIT_RAM_END        0x2000  /* End of used area in RAM             */
-#define CONFIG_SYS_GBL_DATA_SIZE      128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2000  /* Size of used area in RAM            */
+#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #endif /* __CONFIG_H */
index 908b872e60ba46e1400e559538460b9883ecfa14..8f48ded2385e32c0c72e88cd316736f5e37ef74e 100644 (file)
 #define CONFIG_SYS_INIT_DCACHE_CS      7       /* use cs # 7 for data cache memory    */
 
 #define CONFIG_SYS_INIT_RAM_ADDR       0x40000000  /* use data cache                  */
-#define CONFIG_SYS_INIT_RAM_END        0x2000  /* End of used area in RAM             */
-#define CONFIG_SYS_GBL_DATA_SIZE      128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2000  /* Size of used area in RAM            */
+#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #endif /* __CONFIG_H */
index a2b8d7235e57da6e8176d55fe62c753aceb5e379..a042abf1574da90a6914d6814dd4bcec968f2166 100644 (file)
 #define CONFIG_SYS_INIT_DCACHE_CS      7       /* use cs # 7 for data cache memory    */
 
 #define CONFIG_SYS_INIT_RAM_ADDR       0x40000000  /* use data cache                  */
-#define CONFIG_SYS_INIT_RAM_END        0x2000  /* End of used area in RAM             */
-#define CONFIG_SYS_GBL_DATA_SIZE      128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2000  /* Size of used area in RAM            */
+#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #endif /* __CONFIG_H */
index 7fea5e315e6cc5d8016be8e4be66aee5e65533f7..9b99ba8664f3ed241e900b30b46dcdb179fe731b 100644 (file)
 #define CONFIG_SYS_INIT_DCACHE_CS      7       /* use cs # 7 for data cache memory    */
 
 #define CONFIG_SYS_INIT_RAM_ADDR       0x40000000  /* use data cache                  */
-#define CONFIG_SYS_INIT_RAM_END        0x2000  /* End of used area in RAM             */
-#define CONFIG_SYS_GBL_DATA_SIZE      128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2000  /* Size of used area in RAM            */
+#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #endif /* __CONFIG_H */
index 37341cbb990f1a93f770690bd0291e74913f388a..92ffaaaf19e6a19b3d860c1382ccd8863f556ee1 100644 (file)
 /* #define CONFIG_SYS_INIT_RAM_ADDR    0x40000000*/ /* unused memory region */
 /* #define CONFIG_SYS_INIT_RAM_ADDR    0xfba00000*/ /* unused memory region */
 #define CONFIG_SYS_INIT_RAM_ADDR       0xf1080000 /* unused memory region */
-#define CONFIG_SYS_INIT_RAM_END        0x1000
-#define CONFIG_SYS_GBL_DATA_SIZE       128  /* size in bytes reserved for init data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x1000
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 
 #define RELOCATE_INTERNAL_RAM_ADDR
 #ifdef RELOCATE_INTERNAL_RAM_ADDR
index 5aff74c9d09855eac5a16aeed252b731ec77b9a3..b2ee87329544083a6fb3519cf6820012febd81a5 100644 (file)
  */
 #define CONFIG_SYS_INIT_DCACHE_CS      7       /* use cs # 7 for data cache memory    */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x40000000  /* use data cache                  */
-#define CONFIG_SYS_INIT_RAM_END        0x2000  /* End of used area in RAM             */
-#define CONFIG_SYS_GBL_DATA_SIZE      128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2000  /* Size of used area in RAM            */
+#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #endif /* __CONFIG_H */
index 233d36b6d6797c002580d7c43e7999ddd8fff471..ab64adae0e995ab4edb5763806259ba5eaef20b5 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x4000  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       128 /* size in bytes reserved for initial data*/
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000  /* Size of used area in DPRAM    */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 560e4491ab1bce20ecaa20ef219c32986eaf9c96..2b1716afeefd64f7b54f492c62b8f94703cdb339 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x4000  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       128 /* size in bytes reserved for initial data*/
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 6ababa1c50017fc5460f81fecc96edb386717e93..885d42b337ef2c0c50e114de6636cd90c232985a 100644 (file)
 #define CONFIG_SYS_OCM_DATA_SIZE       0x1000
 
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR /* inside of SDRAM             */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE /* End of used area in RAM     */
-#define CONFIG_SYS_GBL_DATA_SIZE      256  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE /* Size of used area in RAM    */
+#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 #else
 #define CONFIG_SYS_OCM_DATA_ADDR       0xF0000000
 #define CONFIG_SYS_OCM_DATA_SIZE       0x1000
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR        /* inside of On Chip SRAM    */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE        /* End of On Chip SRAM       */
-#define CONFIG_SYS_GBL_DATA_SIZE       64      /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE        /* Size of On Chip SRAM      */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 #endif
 
index 8e19aeb35cbe03a2d42bce4cb2a0fc9010e73341..a5c2ce5e87931f7793483035f2bd305770609fce 100644 (file)
 
        /* Size in bytes reserved for initial data
         */
-#define CONFIG_SYS_GBL_DATA_SIZE    128
 
 #define CONFIG_SYS_INIT_RAM_ADDR     0x40000000
-#define CONFIG_SYS_INIT_RAM_END      0x1000
-#define CONFIG_SYS_GBL_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE      0x1000
+#define CONFIG_SYS_GBL_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 
 /*
  * NS16550 Configuration
index fc2727ef4731102c5f1915a283ba005cb487c9b3..3706071c996131274a85be34910c8ffc68101bf2 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x00df0000 /* inside of SDRAM                   */
-#define CONFIG_SYS_INIT_RAM_END        0x0f00  /* End of used area in RAM             */
-#define CONFIG_SYS_GBL_DATA_SIZE       64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x0f00  /* Size of used area in RAM            */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 26bb6490a608504adb470ab3511f83bb6c07ae08..dbd224cc2c6354f843912a79a9c7bd46dde2801d 100644 (file)
@@ -352,9 +352,8 @@ ip=${ipaddr}:${serverip}${bootargs_end}; bootm 0x400000;\0"
 */
 #define CONFIG_SYS_INIT_RAM_LOCK
 #define CONFIG_SYS_INIT_RAM_ADDR       0x40000000 /* unused memory region */
-#define CONFIG_SYS_INIT_RAM_END        0x1000
-#define CONFIG_SYS_GBL_DATA_SIZE       128  /* size in bytes reserved for init data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x1000
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 
 #define RELOCATE_INTERNAL_RAM_ADDR
 #ifdef RELOCATE_INTERNAL_RAM_ADDR
index 74312cd9550db41600b768aff2f817bed9d7e058..321692bc5095a76928bc9ac86606481fdb13ddcf 100644 (file)
@@ -290,9 +290,8 @@ ip=${ipaddr}:${serverip}${bootargs_end}; bootm 0x400000;\0"
 */
 #define CONFIG_SYS_INIT_RAM_LOCK
 #define CONFIG_SYS_INIT_RAM_ADDR       0x40000000 /* unused memory region */
-#define CONFIG_SYS_INIT_RAM_END        0x1000
-#define CONFIG_SYS_GBL_DATA_SIZE       128  /* size in bytes reserved for init data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x1000
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 
 #define RELOCATE_INTERNAL_RAM_ADDR
 #ifdef RELOCATE_INTERNAL_RAM_ADDR
index cb110e35ae7d62b482073eca7c9fa730ae5a3f85..ecdf93ffc0742d2d411f403ccdcdedb4bc300f4a 100644 (file)
 #define CONFIG_SYS_OCM_DATA_ADDR       0xF8000000
 #define CONFIG_SYS_OCM_DATA_SIZE       0x1000
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR /* inside of SDRAM             */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE /* End of used area in RAM     */
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE /* Size of used area in RAM    */
 
-#define CONFIG_SYS_GBL_DATA_SIZE      128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index d99b8409375a2aef9efaba199971c74bade4e013..1493f750db579ccaa06a02c4b5aa92038d43d5e9 100644 (file)
 #define CONFIG_SYS_OCM_DATA_SIZE       0x1000
 
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR /* inside of SDRAM             */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE /* End of used area in RAM     */
-#define CONFIG_SYS_GBL_DATA_SIZE      128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE /* Size of used area in RAM    */
+#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #endif /* __CONFIG_H */
index e6e2b300caaef922954efa233c0b848a14e649ef..ceab60485885af1d1f6df7a4b3097710da533085 100644 (file)
@@ -79,9 +79,8 @@
 #define CONFIG_SYS_INIT_RAM_OCM        1               /* OCM as init ram      */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_BASE     /* OCM                  */
 
-#define CONFIG_SYS_INIT_RAM_END        (4 << 10)
-#define CONFIG_SYS_GBL_DATA_SIZE       256             /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       (4 << 10)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*
index af57fb9662cd737c589b91870d161ba63c848399..0333925792a6836bc40bc6dc3c130a151208f064 100644 (file)
  *-----------------------------------------------------------------------*/
 
 #define CONFIG_SYS_INIT_RAM_ADDR       0x20000000
-#define CONFIG_SYS_INIT_RAM_END                0x10000
-#define CONFIG_SYS_GBL_DATA_SIZE       64
+#define CONFIG_SYS_INIT_RAM_SIZE               0x10000
 #define CONFIG_SYS_GBL_DATA_OFFSET     \
-       (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+       (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
 #define CONFIG_SYS_CACHELINE_SIZE      16
 
 #define ICACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 8)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 8)
 #define DCACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 4)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 4)
 #define CONFIG_SYS_ICACHE_INV          (CF_CACR_CINV + CF_CACR_DCM)
 #define CONFIG_SYS_CACHE_ACR0          (CONFIG_SYS_SDRAM_BASE | \
                                         CF_ADDRMASK(CONFIG_SYS_SDRAM_SIZE) | \
index 7e940b8db4bdbb9f4677922d43bf9901df4beb90..8cce70c11b86ec903e25d33f573d1e6d35665087 100644 (file)
  * Definitions for initial stack pointer and data area
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x00fd0000  /* above the memtest region */
-#define CONFIG_SYS_INIT_RAM_END        0x4000
-#define CONFIG_SYS_GBL_DATA_SIZE       64          /* size in bytes reserved for init data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE        0x4000
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*
index f38160a2ba9c75342a7c9484a6f4b729774a9d9a..c6a17b039baa8f0b9dcda879d67de19798a8cc74 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x2F00  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index ec1cc4eb117c1ae0f39ec52f8ce12177f5c37de6..a0acfd2697ee3d1c573eeec3b23127abd3e43292 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x2F00          /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       128  /* Size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2F00          /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 42465da9b249bc209a71d0be63726fbf5ee33c20..8a0f850b7a87221811a7541c305d81ef9724d02e 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x00df0000  /* inside of SDRAM                 */
-#define CONFIG_SYS_INIT_RAM_END        0x0f00  /* End of used area in RAM             */
-#define CONFIG_SYS_GBL_DATA_SIZE       64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x0f00  /* Size of used area in RAM            */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index d5a3cd3d76d00353daa4e9b4aabb5c83a4928338..841bf11cfc73d492454b1983b70d0ca6df8f8bbd 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 
index e890a9733285e2cb782089c772463447e50b3eac..c4270936a6e2be32a7f0913b8541407d7ecf83aa 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index d312811efd69b271e990cf80d0088729c751b814..3fda551a0bd9ed35c43f8572f250612150116982 100644 (file)
  * Definitions for initial stack pointer and data area
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x40000000
-#define        CONFIG_SYS_INIT_RAM_END 0x1000
-#define        CONFIG_SYS_GBL_DATA_SIZE        128  /* size in bytes reserved for init data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x1000
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_RAM_LOCK
 
 
index 1489d3001ba863cb5694ce5e1332dcfa7295b6ab..f7b5bc9605af29496295191d75d08fce116df811 100644 (file)
 
 /* Global info and initial stack */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR /* inside of on-chip SRAM      */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE /* End of used area in RAM     */
-#define CONFIG_SYS_GBL_DATA_SIZE       128 /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE /* Size of used area in RAM    */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #if defined(CONFIG_CMD_KGDB)
index 97958342bbba7738f42abe0732552d04b0469cfa..57336f9fc80178a0e0281945ff3d8afc1f5b35c3 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64      /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 9e2b1a45485a898010064d5e979762e04b9e2fac..438d19ecf420373ac68986c7b8b4137e14c71060 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 12144cdb1a01938b1fb35332af2c028149339246..339bb59e7973e44152a997119096107bdd0e08f7 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x2F00  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 1a3d2f8f22d81aa9c8b32112474ad6e5456870f2..38d905ad458381473d48c94ca72c1d75157e3742 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 20e618fa4f5b6b5345e789d592979338842c1808..ca0b1ccd458e78b49c2a4099b4f7256eb75bb5f3 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 00f27ccfb9f6700e52031ad6123d9c937655bc51..af602ffeaab5983e3b73e2db09a1afc2ec99caaf 100644 (file)
 #define CONFIG_SYS_OCM_DATA_ADDR       0xF8000000
 #define CONFIG_SYS_OCM_DATA_SIZE       0x1000
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR /* inside of SDRAM             */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE /* End of used area in RAM     */
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE /* Size of used area in RAM    */
 
-#define CONFIG_SYS_GBL_DATA_SIZE      128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 915aff3f1f90b680c6bdf2b3e9b77a47b569301e..68a0cfdf7f266afc847d6be6dbbf83a3da2686fe 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR               CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END         0x2F00  /* End of used area in DPRAM            */
+#define        CONFIG_SYS_INIT_RAM_SIZE                0x2F00  /* Size of used area in DPRAM           */
 #define        CONFIG_SYS_INIT_DATA_SIZE               64      /* # bytes reserved for initial data*/
-#define CONFIG_SYS_GBL_DATA_OFFSET             (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_INIT_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET             (CONFIG_SYS_INIT_RAM_SIZE - CONFIG_SYS_INIT_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET               CONFIG_SYS_GBL_DATA_OFFSET
 
 /*
index dc925af6d5d3e304ae1e466149fd17acb547214b..c5ca279d7d6771e681d0ceeb4bf7ef0d2e458b04 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 8a313240e2060b209d8073b2b8aae7b6608bd6f3..a15e686d28fafa324d66cb3cc791ce97b8b48aa2 100644 (file)
 #define CONFIG_SYS_OCM_DATA_ADDR       0xF8000000
 #define CONFIG_SYS_OCM_DATA_SIZE       0x1000
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR /* inside of SDRAM             */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE /* End of used area in RAM     */
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE /* Size of used area in RAM    */
 
-#define CONFIG_SYS_GBL_DATA_SIZE      128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 6cb19c5f70c7783b8d40c6bf87f32345ab9e7efc..c684cb847886f6736a76a36a2f85310459c53895 100644 (file)
 #define CONFIG_SYS_MONITOR_BASE        0x00090000
 #define CONFIG_SYS_RAMBOOT             1
 #define CONFIG_SYS_INIT_RAM_ADDR       (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
-#define CONFIG_SYS_INIT_RAM_END        0x10000
-#define CONFIG_SYS_GBL_DATA_SIZE       256  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x10000
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 #else
 #undef CONFIG_SYS_RAMBOOT
 #define CONFIG_SYS_MONITOR_LEN         0x00030000
 #define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128
 
 #define CONFIG_SYS_INIT_RAM_ADDR     0x40000000
-#define CONFIG_SYS_INIT_RAM_END      0x1000
-#define CONFIG_SYS_GBL_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE      0x1000
+#define CONFIG_SYS_GBL_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 
 #endif
 
index 863204e426d1ed6b27bd60dac33cb73481a039c9..827ecf26e447944d18322777f89fa1654e975700 100644 (file)
 #define CONFIG_SYS_OCM_DATA_ADDR       0xF8000000
 #define CONFIG_SYS_OCM_DATA_SIZE       0x1000
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR /* inside of SDRAM             */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE /* End of used area in RAM     */
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE /* Size of used area in RAM    */
 
-#define CONFIG_SYS_GBL_DATA_SIZE      128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 56331770890c5fa8a412036531edc078915ec450..27bd146e39e0bd22f53f77525ed3136545a36b0a 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 3fa6130c02dce3221b899a1067ec49808902f38f..b011d50efe2d977f9bc2a35df855831602f1219e 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 1b90a6bf00c136c9184b91de1f4b8682607798ca..85522504129c29710eb2e701d2b5a22de1c75c0d 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x2000  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       128 /* size in bytes reserved for initial data*/
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2000  /* Size of used area in DPRAM    */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index df7ea9ac2e8d9ba7e526fc5ec5e229d7f7e66d03..ba8d6337500a15c59ab11f6c993706bf443c1db2 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 281d0bd3078e39497017e8e1b3e9f662756939f7..0af43b667d25e365f1a9b1bb07c10612cb356846 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x4000  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index e651658f324026af7b72293f41c24b5f690e9b7c..49c65107032cc65bf68ee8dd9b66a895ed3c505e 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x4000          /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       128  /* Size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000          /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 6444bd1915413e494d92c80f2a201a80439e3fe0..b82795479ac18c41295346c0adb17f34daae3377 100644 (file)
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
 
 #if defined (CONFIG_IVML24_16M)
-# define       CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
+# define       CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
 #elif defined (CONFIG_IVML24_32M)
-# define       CONFIG_SYS_INIT_RAM_END 0x3000  /* End of used area in DPRAM    */
+# define       CONFIG_SYS_INIT_RAM_SIZE        0x3000  /* Size of used area in DPRAM   */
 #elif defined (CONFIG_IVML24_64M)
-# define       CONFIG_SYS_INIT_RAM_END 0x3000  /* End of used area in DPRAM    */
+# define       CONFIG_SYS_INIT_RAM_SIZE        0x3000  /* Size of used area in DPRAM   */
 #endif
 
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 1ebbc4521c05549c8129fda60c5740bad5dc4040..9b0c32ab713d2f96d4a5215120eb24f273cdecce 100644 (file)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
 #if defined (CONFIG_IVMS8_16M)
-# define       CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
+# define       CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
 #elif defined (CONFIG_IVMS8_32M)
-# define       CONFIG_SYS_INIT_RAM_END 0x3000  /* End of used area in DPRAM    */
+# define       CONFIG_SYS_INIT_RAM_SIZE        0x3000  /* Size of used area in DPRAM   */
 #elif defined (CONFIG_IVMS8_64M)
-# define       CONFIG_SYS_INIT_RAM_END 0x3000  /* End of used area in DPRAM    */
+# define       CONFIG_SYS_INIT_RAM_SIZE        0x3000  /* Size of used area in DPRAM   */
 #endif
 
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index f54a3937a0f034b314e0ac875c32f4cb885e42f4..bc5d761f8abc4468ef1acafdad851812009ca0a7 100644 (file)
 
 /* Use SRAM until RAM will be available */
 #define CONFIG_SYS_INIT_RAM_ADDR       MPC5XXX_SRAM
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_SIZE       /* End of used area in DPRAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_SIZE       /* Size of used area in DPRAM */
 
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_BASE    CONFIG_SYS_TEXT_BASE
index 2a1cc5838fe303e454653164dddac0d5d08cb18b..c38e0d26dcd24722d8375fc4c42069415fe8ddb8 100644 (file)
   /* ... place INIT RAM in the OCM address */
 # define CONFIG_SYS_INIT_RAM_ADDR      CONFIG_SYS_OCM_DATA_ADDR
   /* ... give it the whole init ram */
-# define CONFIG_SYS_INIT_RAM_END       CONFIG_SYS_OCM_DATA_SIZE
+# define CONFIG_SYS_INIT_RAM_SIZE      CONFIG_SYS_OCM_DATA_SIZE
   /* ... Shave a bit off the end for global 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_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
   /* ... and place the stack pointer at the top of what's left. */
 # define CONFIG_SYS_INIT_SP_OFFSET     CONFIG_SYS_GBL_DATA_OFFSET
 
index 46b91754849b36800ea5a8104651355b53ab1e29..fcf66b7bc7a13acad742279cc3aa7e9bd2c9ec7f 100644 (file)
 #define CONFIG_SYS_TEMP_STACK_OCM    1
 #define CONFIG_SYS_OCM_DATA_ADDR     CONFIG_SYS_ISRAM_BASE
 #define CONFIG_SYS_INIT_RAM_ADDR     CONFIG_SYS_ISRAM_BASE /* Initial RAM address      */
-#define CONFIG_SYS_INIT_RAM_END      0x2000         /* End of used area in RAM */
-#define CONFIG_SYS_GBL_DATA_SIZE     128            /* num bytes initial data  */
+#define CONFIG_SYS_INIT_RAM_SIZE      0x2000        /* Size of used area in RAM */
 
-#define CONFIG_SYS_GBL_DATA_OFFSET   (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET   (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET    (CONFIG_SYS_GBL_DATA_OFFSET - 0x4)
 
 #define CONFIG_SYS_MONITOR_LEN       (256 * 1024)   /* Rsrv 256kB for Mon      */
index 9702d63eb8114ea4dd09e9b1137069c2a0d81af0..c0035e65deeb7e650a786693b9a98d6495c4d1b5 100644 (file)
 
 /* List of I2C addresses to be verified by POST */
 
-#define I2C_ADDR_LIST  {CONFIG_SYS_I2C_PICIO_ADDR,     \
-                       CONFIG_SYS_I2C_RTC_ADDR,        \
-                       }
+#define CONFIG_SYS_POST_I2C_ADDRS      {CONFIG_SYS_I2C_PICIO_ADDR,     \
+                                        CONFIG_SYS_I2C_RTC_ADDR,       \
+                                       }
 
 #define CONFIG_RTC_PCF8563             /* use Philips PCF8563 RTC      */
 
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x2F00  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 9613ed9a824f757ffb43e4f01267b09cd8eec021..5084cccad81f915381c5923dbc3073e0ce8c45c7 100644 (file)
 
 /* List of I2C addresses to be verified by POST */
 
-#define I2C_ADDR_LIST  {CONFIG_SYS_I2C_PICIO_ADDR,     \
-                       CONFIG_SYS_I2C_RTC_ADDR,        \
-                       }
+#define CONFIG_SYS_POST_I2C_ADDRS      {CONFIG_SYS_I2C_PICIO_ADDR,     \
+                                        CONFIG_SYS_I2C_RTC_ADDR,       \
+                                       }
 
 
 #define CONFIG_RTC_PCF8563             /* use Philips PCF8563 RTC      */
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x2F00  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       64      /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 7c58f684b8a3529a2ee36fb17a571fed2f83d68d..0f4ea418a71151fe1f7285d8dfca451b9a5a5362 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index e6632acbe797a5cf6f7934bfa25f8d11b5cb2d36..a45cdc1bb96eb513fdfbedc3902afe4d835d1983 100644 (file)
  */
 /* Definitions for initial stack pointer and data area (in DPRAM) */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x80000000
-#define CONFIG_SYS_INIT_RAM_END                0x4000  /* End of used area in internal SRAM */
+#define CONFIG_SYS_INIT_RAM_SIZE               0x4000  /* Size of used area in internal SRAM */
 #define CONFIG_SYS_INIT_RAM_CTRL       0x221
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     ((CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) - 0x10)
+#define CONFIG_SYS_GBL_DATA_OFFSET     ((CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) - 0x10)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*
 #define CONFIG_SYS_CACHELINE_SIZE      16
 
 #define ICACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 8)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 8)
 #define DCACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 4)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 4)
 #define CONFIG_SYS_ICACHE_INV          (CF_CACR_CINV | CF_CACR_INVI)
 #define CONFIG_SYS_CACHE_ACR0          (CONFIG_SYS_SDRAM_BASE | \
                                         CF_ADDRMASK(CONFIG_SYS_SDRAM_SIZE) | \
index 887bd635d6ad958b770aceaa25daaa5c3dfc872d..bb3b474bd8c1f3a27265c36eb043f638b42cae43 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x80000000
-#define CONFIG_SYS_INIT_RAM_END                0x8000  /* End of used area in internal SRAM */
+#define CONFIG_SYS_INIT_RAM_SIZE               0x8000  /* Size of used area in internal SRAM */
 #define CONFIG_SYS_INIT_RAM_CTRL       0x221
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     ((CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) - 32)
+#define CONFIG_SYS_GBL_DATA_OFFSET     ((CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) - 32)
 #define CONFIG_SYS_INIT_SP_OFFSET      (CONFIG_SYS_GBL_DATA_OFFSET - 32)
-#define CONFIG_SYS_SBFHDR_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_END - 32)
+#define CONFIG_SYS_SBFHDR_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_SIZE - 32)
 
 /*
  * Start addresses for the final memory configuration
 #define CONFIG_SYS_CACHELINE_SIZE      16
 
 #define ICACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 8)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 8)
 #define DCACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 4)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 4)
 #define CONFIG_SYS_ICACHE_INV          (CF_CACR_CINV | CF_CACR_INVI)
 #define CONFIG_SYS_CACHE_ACR0          (CONFIG_SYS_SDRAM_BASE | \
                                         CF_ADDRMASK(CONFIG_SYS_SDRAM_SIZE) | \
index 5c0dc842aadacfb96cc422e1e70865ba8ebff5a2..cd12d2b7a4f3c1755e5158b6a79dfd21ffd55e60 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x20000000
-#define CONFIG_SYS_INIT_RAM_END        0x10000 /* End of used area in internal SRAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x10000 /* Size of used area in internal SRAM */
 #define CONFIG_SYS_INIT_RAM_CTRL       0x21
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE - 0x10)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE - 0x10)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
 #define CONFIG_SYS_CACHELINE_SIZE      16
 
 #define ICACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 8)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 8)
 #define DCACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 4)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 4)
 #define CONFIG_SYS_ICACHE_INV          (CF_CACR_CINV)
 #define CONFIG_SYS_CACHE_ACR0          (CONFIG_SYS_SDRAM_BASE | \
                                         CF_ADDRMASK(CONFIG_SYS_SDRAM_SIZE) | \
index 33ac2859dfb17afb20377b5230150c5757444b60..104fcdeb8d71ffa7b3de87944c3f5bde03649779 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x20000000
-#define CONFIG_SYS_INIT_RAM_END        0x1000  /* End of used area in internal SRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       64      /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x1000  /* Size of used area in internal SRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_ENV_IS_IN_FLASH 1
 #define CONFIG_SYS_CACHELINE_SIZE      16
 
 #define ICACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 8)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 8)
 #define DCACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 4)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 4)
 #define CONFIG_SYS_ICACHE_INV          (CF_CACR_DCM)
 #define CONFIG_SYS_CACHE_ACR0          (CONFIG_SYS_FLASH_BASE | \
                                         CF_ADDRMASK(2) | \
index b5af493b804ee755c4b94966b7c48186d63708f4..f2f315940cdcca8f80e1d22eabc15bf469766a09 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x20000000
-#define CONFIG_SYS_INIT_RAM_END        0x10000 /* End of used area in internal SRAM */
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x10000 /* Size of used area in internal SRAM */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*
 #define CONFIG_SYS_CACHELINE_SIZE      16
 
 #define ICACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 8)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 8)
 #define DCACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 4)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 4)
 #define CONFIG_SYS_ICACHE_INV          (CF_CACR_DCM)
 #define CONFIG_SYS_CACHE_ACR0          (CONFIG_SYS_FLASH_BASE | \
                                         CF_ADDRMASK(8) | \
index 206d1152ee47f0d16b0b9712e022f82cded231a6..dd8a56011f78876f8199cf0f1e66b1d18b9ca898 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x20000000
-#define CONFIG_SYS_INIT_RAM_END        0x10000 /* End of used area in internal SRAM */
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x10000 /* Size of used area in internal SRAM */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*
 #define CONFIG_SYS_CACHELINE_SIZE      16
 
 #define ICACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 8)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 8)
 #define DCACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 4)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 4)
 #define CONFIG_SYS_ICACHE_INV          (CF_CACR_DCM)
 #define CONFIG_SYS_CACHE_ACR0          (CONFIG_SYS_FLASH_BASE | \
                                         CF_ADDRMASK(2) | \
index 798949cc5608cb3838860e04d93838be199a8647..992d738cbd4dd672c414e1125d178a741feb89d6 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x20000000
-#define CONFIG_SYS_INIT_RAM_END        0x1000  /* End of used area in internal SRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       64      /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x1000  /* Size of used area in internal SRAM    */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*
 #define CONFIG_SYS_CACHELINE_SIZE      16
 
 #define ICACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 8)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 8)
 #define DCACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 4)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 4)
 #define CONFIG_SYS_ICACHE_INV          (CF_CACR_CINV | CF_CACR_INVI)
 #define CONFIG_SYS_CACHE_ACR0          (CONFIG_SYS_SDRAM_BASE | \
                                         CF_ADDRMASK(CONFIG_SYS_SDRAM_SIZE) | \
index f704bb3ff7c6ba8f82ef36160f47f31aca5f85fc..b3c774f9c74757bdd0ad0b5195de1bb3ca3203cd 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x20000000
-#define CONFIG_SYS_INIT_RAM_END        0x1000  /* End of used area in internal SRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       64      /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x1000  /* Size of used area in internal SRAM    */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
 #define CONFIG_SYS_CACHELINE_SIZE      16
 
 #define ICACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 8)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 8)
 #define DCACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 4)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 4)
 #define CONFIG_SYS_ICACHE_INV          (CF_CACR_CINV | CF_CACR_INVI)
 #define CONFIG_SYS_CACHE_ACR0          (CONFIG_SYS_SDRAM_BASE | \
                                         CF_ADDRMASK(CONFIG_SYS_SDRAM_SIZE) | \
index 981670ac069bde2084da8670c2eb7b494a408a52..56a760fc8f0701fac0717574bb0ebbb26cf7673c 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x20000000
-#define CONFIG_SYS_INIT_RAM_END        0x10000 /* End of used area in internal SRAM */
-#define CONFIG_SYS_GBL_DATA_SIZE       1000    /* bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x10000 /* Size of used area in internal SRAM */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
 #define CONFIG_SYS_CACHELINE_SIZE      16
 
 #define ICACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 8)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 8)
 #define DCACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 4)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 4)
 #define CONFIG_SYS_ICACHE_INV          (CF_CACR_CINV | CF_CACR_INVI)
 #define CONFIG_SYS_CACHE_ACR0          (CONFIG_SYS_SDRAM_BASE | \
                                         CF_ADDRMASK(CONFIG_SYS_SDRAM_SIZE) | \
index 46f60bf517a3a92681a3ebd223c292a9574ce397..0c104805d749764e763439373c21615c47faf335 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x20000000
-#define CONFIG_SYS_INIT_RAM_END        0x10000 /* End of used area in internal SRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       64      /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x10000 /* Size of used area in internal SRAM    */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
 #define CONFIG_SYS_CACHELINE_SIZE      16
 
 #define ICACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 8)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 8)
 #define DCACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 4)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 4)
 #define CONFIG_SYS_ICACHE_INV          (CF_CACR_CINV + CF_CACR_DCM)
 #define CONFIG_SYS_CACHE_ACR0          (CONFIG_SYS_SDRAM_BASE | \
                                         CF_ADDRMASK(CONFIG_SYS_SDRAM_SIZE) | \
index d983a8fedb7060b8d75a6502996f232931023f62..d205e7c1749ee868bb3255619ddd7ca0c03ed583 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x80000000
-#define CONFIG_SYS_INIT_RAM_END                0x20000 /* End of used area in internal SRAM */
+#define CONFIG_SYS_INIT_RAM_SIZE               0x20000 /* Size of used area in internal SRAM */
 #define CONFIG_SYS_INIT_RAM_CTRL       0x221
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     ((CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) - 0x10)
+#define CONFIG_SYS_GBL_DATA_OFFSET     ((CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) - 0x10)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*
 #define CONFIG_SYS_CACHELINE_SIZE      16
 
 #define ICACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 8)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 8)
 #define DCACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 4)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 4)
 #define CONFIG_SYS_ICACHE_INV          (CF_CACR_CINVA)
 #define CONFIG_SYS_CACHE_ACR0          (CONFIG_SYS_SDRAM_BASE | \
                                         CF_ADDRMASK(CONFIG_SYS_SDRAM_SIZE) | \
index 159b178f401757e3104912d951ee69a1a5c09918..7ae0faddac03d9f540b844884d8f16caa8202d8e 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x80000000
-#define CONFIG_SYS_INIT_RAM_END        0x8000  /* End of used area in internal SRAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x8000  /* Size of used area in internal SRAM */
 #define CONFIG_SYS_INIT_RAM_CTRL       0x221
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     ((CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) - 0x10)
+#define CONFIG_SYS_GBL_DATA_OFFSET     ((CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) - 0x10)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
 #define CONFIG_SYS_CACHELINE_SIZE      16
 
 #define ICACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 8)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 8)
 #define DCACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 4)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 4)
 #define CONFIG_SYS_ICACHE_INV          (CF_CACR_CINVA)
 #define CONFIG_SYS_CACHE_ACR0          (CONFIG_SYS_SDRAM_BASE | \
                                         CF_ADDRMASK(CONFIG_SYS_SDRAM_SIZE) | \
index af1988ce0a45745eba35bf3b7c3b94aa4325f3d9..7086a1bdb712eb485877719742304a1045ebe01d 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x80000000
-#define CONFIG_SYS_INIT_RAM_END        0x8000  /* End of used area in internal SRAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x8000  /* Size of used area in internal SRAM */
 #define CONFIG_SYS_INIT_RAM_CTRL       0x221
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     ((CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) - 0x10)
+#define CONFIG_SYS_GBL_DATA_OFFSET     ((CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) - 0x10)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
 #define CONFIG_SYS_CACHELINE_SIZE      16
 
 #define ICACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 8)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 8)
 #define DCACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 4)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 4)
 #define CONFIG_SYS_ICACHE_INV          (CF_CACR_CINVA)
 #define CONFIG_SYS_CACHE_ACR0          (CONFIG_SYS_SDRAM_BASE | \
                                         CF_ADDRMASK(CONFIG_SYS_SDRAM_SIZE) | \
index 1ff80ee0d679eb6f68e874e754a3f19c834ad099..37715c50c2492f9923a8dad97b6532cf43256e16 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x80000000
-#define CONFIG_SYS_INIT_RAM_END        0x8000  /* End of used area in internal SRAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x8000  /* Size of used area in internal SRAM */
 #define CONFIG_SYS_INIT_RAM_CTRL       0x221
-#define CONFIG_SYS_GBL_DATA_SIZE       256     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     ((CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) - 32)
+#define CONFIG_SYS_GBL_DATA_OFFSET     ((CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) - 32)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
-#define CONFIG_SYS_SBFHDR_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_END - 32)
+#define CONFIG_SYS_SBFHDR_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_SIZE - 32)
 
 /*-----------------------------------------------------------------------
  * Start addresses for the final memory configuration
 #define CONFIG_SYS_CACHELINE_SIZE              16
 
 #define ICACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 8)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 8)
 #define DCACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 4)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 4)
 #define CONFIG_SYS_ICACHE_INV          (CF_CACR_BCINVA + CF_CACR_ICINVA)
 #define CONFIG_SYS_DCACHE_INV          (CF_CACR_DCINVA)
 #define CONFIG_SYS_CACHE_ACR2          (CONFIG_SYS_SDRAM_BASE | \
index 1cdc37350b5af04cd47d8230d67c1690bf6eca54..86faa3df8f4da23ba3d8b7413eba0b17cf1a76e1 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x80000000
-#define CONFIG_SYS_INIT_RAM_END                0x8000  /* End of used area in internal SRAM */
+#define CONFIG_SYS_INIT_RAM_SIZE               0x8000  /* Size of used area in internal SRAM */
 #define CONFIG_SYS_INIT_RAM_CTRL       0x221
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     ((CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) - 32)
+#define CONFIG_SYS_GBL_DATA_OFFSET     ((CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) - 32)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
-#define CONFIG_SYS_SBFHDR_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_END - 32)
+#define CONFIG_SYS_SBFHDR_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_SIZE - 32)
 
 /*-----------------------------------------------------------------------
  * Start addresses for the final memory configuration
 #define CONFIG_SYS_CACHELINE_SIZE              16
 
 #define ICACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 8)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 8)
 #define DCACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 4)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 4)
 #define CONFIG_SYS_ICACHE_INV          (CF_CACR_BCINVA + CF_CACR_ICINVA)
 #define CONFIG_SYS_DCACHE_INV          (CF_CACR_DCINVA)
 #define CONFIG_SYS_CACHE_ACR2          (CONFIG_SYS_SDRAM_BASE | \
index d0077667f3ac1b996284bf577628bf15b6a20a60..5f6eb553ebe936c1152c92ed88ecc7b201aaf944 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0xF2000000
-#define CONFIG_SYS_INIT_RAM_END        0x1000  /* End of used area in internal SRAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x1000  /* Size of used area in internal SRAM */
 #define CONFIG_SYS_INIT_RAM_CTRL       0x21
-#define CONFIG_SYS_INIT_RAM1_ADDR      (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_END)
+#define CONFIG_SYS_INIT_RAM1_ADDR      (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_SIZE)
 #define CONFIG_SYS_INIT_RAM1_END       0x1000  /* End of used area in internal SRAM */
 #define CONFIG_SYS_INIT_RAM1_CTRL      0x21
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     ((CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) - 0x10)
+#define CONFIG_SYS_GBL_DATA_OFFSET     ((CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) - 0x10)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
 #define CONFIG_SYS_CACHELINE_SIZE      16
 
 #define ICACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 8)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 8)
 #define DCACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 4)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 4)
 #define CONFIG_SYS_ICACHE_INV          (CF_CACR_BCINVA + CF_CACR_ICINVA + \
                                         CF_CACR_IDCM)
 #define CONFIG_SYS_DCACHE_INV          (CF_CACR_DCINVA)
index f23b8b0efaeeca48394fc3df3403e0ebf70637db..e178e3509726f3f7e86ed10e4844b3631f4fb885 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0xF2000000
-#define CONFIG_SYS_INIT_RAM_END        0x1000  /* End of used area in internal SRAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x1000  /* Size of used area in internal SRAM */
 #define CONFIG_SYS_INIT_RAM_CTRL       0x21
-#define CONFIG_SYS_INIT_RAM1_ADDR      (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_END)
+#define CONFIG_SYS_INIT_RAM1_ADDR      (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_SIZE)
 #define CONFIG_SYS_INIT_RAM1_END       0x1000  /* End of used area in internal SRAM */
 #define CONFIG_SYS_INIT_RAM1_CTRL      0x21
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     ((CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) - 0x10)
+#define CONFIG_SYS_GBL_DATA_OFFSET     ((CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) - 0x10)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
 #define CONFIG_SYS_CACHELINE_SIZE      16
 
 #define ICACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 8)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 8)
 #define DCACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 4)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 4)
 #define CONFIG_SYS_ICACHE_INV          (CF_CACR_BCINVA + CF_CACR_ICINVA + \
                                         CF_CACR_IDCM)
 #define CONFIG_SYS_DCACHE_INV          (CF_CACR_DCINVA)
index 3b4d60c45086a72019816bae1d9df04c862d064a..cb5b023b58fed55c7255c3e540ba8842e78a335a 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x2f00  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2f00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_VPD_SIZE       256 /* size in bytes reserved for vpd buffer */
 #define CONFIG_SYS_INIT_VPD_OFFSET     (CONFIG_SYS_GBL_DATA_OFFSET - CONFIG_SYS_INIT_VPD_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      (CONFIG_SYS_INIT_VPD_OFFSET-8)
index 6964bec1be9ea6e68dd3e0482bb31ea208b18097..969ba7e245f00ea6f557a19acc97eeae470efcbf 100644 (file)
@@ -98,9 +98,8 @@
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2f00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2f00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_VPD_SIZE        256 /* size in bytes reserved for vpd buffer */
 #define CONFIG_SYS_INIT_VPD_OFFSET     (CONFIG_SYS_GBL_DATA_OFFSET - CONFIG_SYS_INIT_VPD_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       (CONFIG_SYS_INIT_VPD_OFFSET-8)
index d79b7029a2de9cebf444fd335c9f12460033a6fd..9b83e21a1f70e5956154aadeed740cbb91d4d4c9 100644 (file)
 #define CONFIG_SYS_TEMP_STACK_OCM    1
 #define CONFIG_SYS_OCM_DATA_ADDR     CONFIG_SYS_ISRAM_BASE
 #define CONFIG_SYS_INIT_RAM_ADDR     CONFIG_SYS_ISRAM_BASE /* Initial RAM address      */
-#define CONFIG_SYS_INIT_RAM_END      0x2000         /* End of used area in RAM */
-#define CONFIG_SYS_GBL_DATA_SIZE     128            /* num bytes initial data  */
+#define CONFIG_SYS_INIT_RAM_SIZE      0x2000        /* Size of used area in RAM */
 
-#define CONFIG_SYS_GBL_DATA_OFFSET   (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET   (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET    (CONFIG_SYS_GBL_DATA_OFFSET - 0x4)
 
 #define CONFIG_SYS_MONITOR_LEN       (256 * 1024)   /* Rsrv 256kB for Mon      */
index 6ad0658cdac25640f5859fab575ca08eca8e8a4e..b9c163856bbb2caa0c46f065036b6a03c1928fe7 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x2F00  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 58764d0dfbd2b63c7342f9dfec1829ca2accdc7c..ce9273b6f7d06cb3299759dcc7a71f39739d2814 100644 (file)
 #define CONFIG_SYS_OCM_DATA_ADDR       0xF0000000
 #define CONFIG_SYS_OCM_DATA_SIZE       0x1000
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR        /* inside of On Chip SRAM    */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE        /* End of On Chip SRAM         */
-#define CONFIG_SYS_GBL_DATA_SIZE       64              /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE        /* Size of On Chip SRAM        */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 /* reserve some memory for POST and BOOT limit info */
 #define CONFIG_SYS_INIT_SP_OFFSET      (CONFIG_SYS_GBL_DATA_OFFSET - 32)
 
index 8579f96d286208c59725701d70f0e9fa0230e659..ed783876efbbefc6fed17a1815475222634cbf86 100644 (file)
  */
 
 #define CONFIG_SYS_INIT_RAM_ADDR       0x800000  /* inside of SDRAM                     */
-#define CONFIG_SYS_INIT_RAM_END        0x2000  /* End of used area in RAM             */
-#define CONFIG_SYS_GBL_DATA_SIZE      128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE        0x2000  /* Size of used area in RAM             */
+#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 69c0cab1869edbb9f1392cf57e462e223e4178b8..9529c8750386b62782a51da345ed64c60023cf80 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_MONITOR_LEN
-#define CONFIG_SYS_INIT_RAM_END   0x2F00  /* End of used area in DPRAM  */
-#define CONFIG_SYS_GBL_DATA_SIZE  64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE   0x2F00  /* Size of used area in DPRAM  */
+#define CONFIG_SYS_GBL_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET  CONFIG_SYS_GBL_DATA_OFFSET
 
 /*
index 05caf21644d723b1fc07363ac52639c76d0c0607..2225b46b281eb05250e320f8806dbf791f7524d9 100644 (file)
 #define BCSR_PCI_MODE          0x01000000
 
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x2000  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2000  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #ifdef CONFIG_SYS_LOWBOOT
index 97202df1602cabb2b500b4b0c71e90f7f87a270e..579447336868c3541754de43745128b809d37b48 100644 (file)
 #define FETH_RST               0x04000004
 
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x4000  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /* Use this HRCW for booting from address 0xfe00000 (JP3 in setting 1-2)  */
index 2eab1c4db7e0675173d3c6374244b1b1a9a6d2dd..3ff175c6ded81cd372025096afd54e3cd3ed5b2d 100644 (file)
  */
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0xE6000000 /* Initial RAM address */
-#define CONFIG_SYS_INIT_RAM_END                0x1000 /* End of used area in RAM */
-#define CONFIG_SYS_GBL_DATA_SIZE       0x100 /* num bytes initial data */
+#define CONFIG_SYS_INIT_RAM_SIZE               0x1000 /* Size of used area in RAM */
 #define CONFIG_SYS_GBL_DATA_OFFSET     \
-       (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+       (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 
 /*
  * Local Bus Configuration & Clock Setup
index 1b2bebb1cc441aca4a55e718368e8ece979af392..1201133e2b0bf06a8c03d5702799c739d7a406d4 100644 (file)
 
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0xFD000000      /* Initial RAM address */
-#define CONFIG_SYS_INIT_RAM_END        0x1000          /* End of used area in RAM*/
+#define CONFIG_SYS_INIT_RAM_SIZE       0x1000          /* Size of used area in RAM*/
 
-#define CONFIG_SYS_GBL_DATA_SIZE       0x100           /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /* CONFIG_SYS_MONITOR_LEN must be a multiple of CONFIG_ENV_SECT_SIZE */
index 17ce3bc58467bf2f8a514b7bb53c05c66062fcdf..6476c4c430459a9b6980751be2024d2481415d6c 100644 (file)
  */
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0xE6000000 /* Initial RAM address */
-#define CONFIG_SYS_INIT_RAM_END        0x1000 /* End of used area in RAM */
-#define CONFIG_SYS_GBL_DATA_SIZE       0x100 /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x1000 /* Size of used area in RAM */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 
 /*
  * Local Bus Configuration & Clock Setup
index abbb92a71e9214f65ad10c92e51493238036baec..1191eea106c00dcfd66a6db22060ae0e948b6a00 100644 (file)
  */
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0xE6000000      /* Initial RAM address */
-#define CONFIG_SYS_INIT_RAM_END        0x1000          /* End of used area in RAM */
-#define CONFIG_SYS_GBL_DATA_SIZE       0x100           /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x1000          /* Size of used area in RAM */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 
 /*
  * Local Bus Configuration & Clock Setup
index 6009d44be0630062e459fda1c811de84b8057f80..affa3a9cf8dacf3e5dc00ccfd6104f7c42e669e0 100644 (file)
  */
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0xE6000000      /* Initial RAM address */
-#define CONFIG_SYS_INIT_RAM_END        0x1000          /* End of used area in RAM */
-#define CONFIG_SYS_GBL_DATA_SIZE       0x100           /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x1000          /* Size of used area in RAM */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 
 /*
  * Local Bus Configuration & Clock Setup
index 5682787c8b950ca46627ba6683c008dcf534510e..45b6b5f8545885cdba8cbd9a2c466405482acbf9 100644 (file)
 
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0xFD000000              /* Initial RAM address */
-#define CONFIG_SYS_INIT_RAM_END        0x1000                  /* End of used area in RAM*/
+#define CONFIG_SYS_INIT_RAM_SIZE       0x1000                  /* Size of used area in RAM*/
 
-#define CONFIG_SYS_GBL_DATA_SIZE       0x100                   /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_LEN         (384 * 1024)            /* Reserve 384 kB for Mon */
index 5d10a5e060f04807cf9fc3833fa97d33f39af7bf..de233ffe627a3ed8243f7133ae98e72367c478c2 100644 (file)
@@ -306,10 +306,9 @@ boards, we say we have two, but don't display a message if we find only one. */
 
 #define CONFIG_SYS_INIT_RAM_LOCK
 #define CONFIG_SYS_INIT_RAM_ADDR       0xFD000000      /* Initial RAM address */
-#define CONFIG_SYS_INIT_RAM_END        0x1000          /* End of used area in RAM*/
+#define CONFIG_SYS_INIT_RAM_SIZE       0x1000          /* Size of used area in RAM*/
 
-#define CONFIG_SYS_GBL_DATA_SIZE       0x100           /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /* CONFIG_SYS_MONITOR_LEN must be a multiple of CONFIG_ENV_SECT_SIZE */
index bc644bab05f90e0670b1c311ac9aac7a6abc56cf..7b82c43dd287eb0ca91a6ac0bd93840b55c019e9 100644 (file)
  */
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0xE6000000 /* Initial RAM address */
-#define CONFIG_SYS_INIT_RAM_END        0x1000 /* End of used area in RAM */
-#define CONFIG_SYS_GBL_DATA_SIZE       0x100 /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x1000 /* Size of used area in RAM */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 
 /*
  * Local Bus Configuration & Clock Setup
index e9a64004e8d449ddfc1c3469d30461e392336280..b0cdc02c1dea4f344dd4f081cdc0c75ad6541af0 100644 (file)
  */
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0xE6000000 /* Initial RAM address */
-#define CONFIG_SYS_INIT_RAM_END        0x1000 /* End of used area in RAM */
-#define CONFIG_SYS_GBL_DATA_SIZE       0x100 /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x1000 /* Size of used area in RAM */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 
 /*
  * Local Bus Configuration & Clock Setup
index fa0da48c258ab8435ec26c9e0e977a4d8bf91204..c237991adc55b666959d13f7b4b0c099eb8ffc7f 100644 (file)
  */
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0xE6000000 /* Initial RAM address */
-#define CONFIG_SYS_INIT_RAM_END        0x1000 /* End of used area in RAM */
-#define CONFIG_SYS_GBL_DATA_SIZE       0x100 /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x1000 /* Size of used area in RAM */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 
 /*
  * Local Bus Configuration & Clock Setup
index 9d99a9360bf6b16e470d249ef318499d14bd6ce1..385c7c321b06af129fd567edad3b8a65c52be1a3 100644 (file)
  */
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0xE6000000 /* Initial RAM address */
-#define CONFIG_SYS_INIT_RAM_END        0x1000 /* End of used area in RAM */
-#define CONFIG_SYS_GBL_DATA_SIZE       0x100 /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x1000 /* Size of used area in RAM */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 
 /*
  * Local Bus Configuration & Clock Setup
index 8b8f4674cd3b52380abeaf77c871c8e4e6e9fa21..8410bb77ebcf58e9042c7581e44d700e0ce0f8cf 100644 (file)
 
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0xffd00000      /* Initial L1 address */
-#define CONFIG_SYS_INIT_RAM_END        0x00004000      /* End of used area in RAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x00004000      /* Size of used area in RAM */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* num bytes initial data */
 #define CONFIG_SYS_GBL_DATA_OFFSET \
-               (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+               (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon */
index b1ee07bfc2c78ab51c9ca0acccc55d5e8c83980b..9386f648859075f162f87f2013bab6882033b96f 100644 (file)
 
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0xe4010000      /* Initial RAM address */
-#define CONFIG_SYS_INIT_RAM_END        0x4000          /* End of used area in RAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000          /* Size of used area in RAM */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_LEN         (256 * 1024)    /* Reserve 256 kB for Mon */
index cc52a67cec22cc0271b4c288b086966948c60c87..a968949814945660e9e471092d94512634eb2289 100644 (file)
 
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0x40000000      /* Initial RAM address  */
-#define CONFIG_SYS_INIT_RAM_END        0x4000          /* End of used area in RAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000          /* Size of used area in RAM */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_LEN         (256 * 1024)    /* Reserve 256 kB for Mon */
index 037aae75e92270aa9e933102474519f5e3e7fe4e..12ce6f7e66b9953546f32b3fbc614b42ce57ab3a 100644 (file)
@@ -254,10 +254,9 @@ extern unsigned long get_clock_freq(void);
 
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0xe4010000      /* Initial RAM address */
-#define CONFIG_SYS_INIT_RAM_END        0x4000      /* End of used area in RAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000      /* Size of used area in RAM */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128         /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_LEN         (256 * 1024) /* Reserve 256 kB for Mon */
index 0b69885fcc31c592eda8430e2e3561137b15f42c..e94822e5b83e120766cbcbc16d8d9b6992ec4787 100644 (file)
@@ -203,11 +203,10 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 
 #define CONFIG_SYS_INIT_RAM_LOCK      1
 #define CONFIG_SYS_INIT_RAM_ADDR      0xf4010000      /* Initial L1 address */
-#define CONFIG_SYS_INIT_RAM_END       0x00004000      /* End of used area in RAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x00004000      /* Size of used area in RAM */
 
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_LEN         (256 * 1024) /* Reserve 256 kB for Mon */
index 5d21d116f99f0128be09e7b87e53667d1a267835..b221a5cc9a9ec5f2139386f0a4f5e84a71d3f909 100644 (file)
@@ -273,12 +273,11 @@ extern unsigned long get_clock_freq(void);
 
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0xe4010000      /* Initial RAM address */
-#define CONFIG_SYS_INIT_RAM_END        0x4000          /* End of used area in RAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000          /* Size of used area in RAM */
 
 #define CONFIG_SYS_INIT_L2_ADDR        0xf8f80000      /* relocate boot L2SRAM */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_LEN         (256 * 1024) /* Reserve 256 kB for Mon */
index 006868421752ecfbb9b20bcfa8b5900cdede3a4c..334a4106d2d337abfbfeff84ae95f1e580f0b3fd 100644 (file)
@@ -252,10 +252,9 @@ extern unsigned long get_clock_freq(void);
 
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0xe4010000      /* Initial RAM address */
-#define CONFIG_SYS_INIT_RAM_END        0x4000      /* End of used area in RAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000      /* Size of used area in RAM */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128         /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_LEN         (256 * 1024) /* Reserve 256 kB for Mon */
index 96f7383060c487c4a618b34228979b46e2f62c81..744e4a395f889afa69880827e76ee9bfed833229 100644 (file)
 
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0xe4010000      /* Initial RAM address */
-#define CONFIG_SYS_INIT_RAM_END        0x4000          /* End of used area in RAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000          /* Size of used area in RAM */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_LEN         (256 * 1024)    /* Reserve 256 kB for Mon */
index d6171b4683c05726b20044b8957ddcb850bea655..281918bdc9ec7c1e6061bf2a90380f05f3d79230 100644 (file)
@@ -235,10 +235,9 @@ extern unsigned long get_clock_freq(void);
 
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0xe4010000      /* Initial RAM address */
-#define CONFIG_SYS_INIT_RAM_END        0x4000      /* End of used area in RAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000      /* Size of used area in RAM */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128         /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_LEN         (256 * 1024) /* Reserve 256 kB for Mon */
index e3a997e87a21367463e34e978c07d64112e66eb3..6a15da50c8254e690833cc8ba502eb8faf0e3bf9 100644 (file)
@@ -268,11 +268,10 @@ extern unsigned long get_clock_freq(void);
 
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0xe4010000  /* Initial RAM address */
-#define CONFIG_SYS_INIT_RAM_END        0x4000      /* End of used area in RAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000      /* Size of used area in RAM */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* num bytes initial data */
 #define CONFIG_SYS_GBL_DATA_OFFSET     \
-                       (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+                       (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_LEN (256 * 1024)    /* Reserve 256 kB for Mon */
index e8206ea8e6e64001096ba94fca2e56b15772d0ca..f949cc2b6f43f011782a8aaf5a99911e5360c81d 100644 (file)
 
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0xffd00000      /* Initial L1 address */
-#define CONFIG_SYS_INIT_RAM_END        0x00004000      /* End of used area in RAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x00004000      /* Size of used area in RAM */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_LEN         (256 * 1024) /* Reserve 256 kB for Mon */
index c876e989498852535c0b43669a80a26c5aeeac0f..17dac6c74f02d3212dd1822a8bcebd7782868ad8 100644 (file)
 #else
 #define CONFIG_SYS_INIT_RAM_ADDR       0xe4000000      /* Initial RAM address */
 #endif
-#define CONFIG_SYS_INIT_RAM_END        0x4000          /* End of used area in RAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000          /* Size of used area in RAM */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_LEN         (512 * 1024)    /* Reserve 512 KB for Mon */
index 9009e3c48733811230fd7a9c4637915f389ffc46..ab3ae5b2e3837388cbc1bb5f64dd3f913015ff6f 100644 (file)
@@ -271,10 +271,9 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 #else
 #define CONFIG_SYS_INIT_RAM_ADDR       0xf8400000      /* Initial RAM address */
 #endif
-#define CONFIG_SYS_INIT_RAM_END        0x4000          /* End of used area in RAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000          /* Size of used area in RAM */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_LEN         (256 * 1024)    /* Reserve 256 kB for Mon */
index e0bfd0881c5fe7894a5c3991d27675acaf8b58ba..27ebceb01f249743be26a7e2ff1162c3408f72cf 100644 (file)
  */
 
 /* #define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE */
-/*#define CONFIG_SYS_GBL_DATA_SIZE    256*/
-#define CONFIG_SYS_GBL_DATA_SIZE      128
 #define CONFIG_SYS_INIT_RAM_ADDR     0x40000000
-#define CONFIG_SYS_INIT_RAM_END      0x1000
-#define CONFIG_SYS_GBL_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE      0x1000
+#define CONFIG_SYS_GBL_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 
 
 /*
index acc7187b22c33632a0504d16097ad87ea7d7706c..6f4d187595b1b08a3e15cf8e1d17150b6f01d61b 100644 (file)
 #define CONFIG_SYS_DEFAULT_MBAR        0x80000000
 
 #define CONFIG_SYS_INIT_RAM_ADDR       MPC5XXX_SRAM
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_SIZE
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_SIZE
 
-#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_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE
index 04d97cd1dcdd406600605559bdae5ba9a6fd3c64..c201310f268179c8e8595f27df73806656082ac6 100644 (file)
 
 #define CONFIG_SYS_INIT_RAM_LOCK
 #define CONFIG_SYS_INIT_RAM_ADDR       0xFD000000      /* Initial RAM address */
-#define CONFIG_SYS_INIT_RAM_END        0x1000          /* End of used area in RAM*/
+#define CONFIG_SYS_INIT_RAM_SIZE       0x1000          /* Size of used area in RAM*/
 
-#define CONFIG_SYS_GBL_DATA_SIZE       0x100           /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /* CONFIG_SYS_MONITOR_LEN must be a multiple of CONFIG_ENV_SECT_SIZE */
 #define CONFIG_SYS_SCCR_TSEC1CM        1
 #define CONFIG_SYS_SCCR_TSEC2CM        1
 
-#define CONFIG_SYS_SICRH       0x1fff8003
+#define CONFIG_SYS_SICRH       0x1fef0003
 #define CONFIG_SYS_SICRL       (SICRL_LDP_A | SICRL_USB1 | SICRL_USB0)
 
 #define CONFIG_SYS_HID0_INIT   0x000000000
index dd392d0c0d0afe03737bd91b27574db379473d1e..3aed447e17aa10c13527efddd5d073cae5fd73a9 100644 (file)
  * Definitions for initial stack pointer and data area
  */
 #define CONFIG_SYS_INIT_RAM_ADDR     0x40000000
-#define CONFIG_SYS_INIT_RAM_END      0x1000
-#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_RAM_SIZE      0x1000
+#define CONFIG_SYS_GBL_DATA_OFFSET   (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 
 /*
  * Low Level Configuration Settings
index 9bf7fcbf8e32744f5375d70098f3a5c1520190a3..46151daf967b436ed5b9f74cc32b7eac836c7059 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index c125157449c631a7ab2a45f69d63e266f3f476dc..f7fd9b2eb039d3e7e58c0b03e7eedc231d897ad4 100644 (file)
 #define CONFIG_SYS_DEFAULT_MBAR        0x80000000
 
 #define CONFIG_SYS_INIT_RAM_ADDR       MPC5XXX_SRAM
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_SIZE
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_SIZE
 
-#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_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - \
+                                               GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE
index 60838925d4ca2e8741dbdc9a7c693b0070d6a4ab..8a6b8d06b4bb465539d3fcc74fa361d578da3d25 100644 (file)
@@ -99,7 +99,6 @@
 /* Size of DRAM reserved for malloc() use */
 #define CONFIG_SYS_MALLOC_LEN  (256 * 1024)
 /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_SIZE       (256)
 #define CONFIG_SYS_BOOTMAPSZ   (8 * 1024 * 1024)
 
 /* FLASH */
diff --git a/include/configs/NC650.h b/include/configs/NC650.h
deleted file mode 100644 (file)
index df1c1ca..0000000
+++ /dev/null
@@ -1,451 +0,0 @@
-/*
- * (C) Copyright 2006, 2007 Detlev Zundel, dzu@denx.de
- * (C) Copyright 2005
- * 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
- */
-
-/*
- * board/config.h - configuration options, board specific
- */
-
-#ifndef __CONFIG_H
-#define __CONFIG_H
-
-/*
- * High Level Configuration Options
- * (easy to change)
- */
-#define CONFIG_MPC852T         1
-#define CONFIG_NC650           1
-
-#define        CONFIG_SYS_TEXT_BASE    0x40700000
-
-#define        CONFIG_8xx_CONS_SMC1    1       /* Console is on SMC1           */
-#undef CONFIG_8xx_CONS_SMC2
-#undef CONFIG_8xx_CONS_NONE
-#define CONFIG_BAUDRATE                115200
-#define CONFIG_LOADS_ECHO      1       /* echo on for serial download  */
-
-/*
- * 10 MHz - PLL input clock
- */
-#define CONFIG_8xx_OSCLK               10000000
-
-/*
- * 50 MHz - default CPU clock
- */
-#define CONFIG_8xx_CPUCLK_DEFAULT      50000000
-
-/*
- * 15 MHz - CPU minimum clock
- */
-#define CONFIG_SYS_8xx_CPUCLK_MIN              15000000
-
-/*
- * 133 MHz - CPU maximum clock
- */
-#define CONFIG_SYS_8xx_CPUCLK_MAX              133000000
-
-#define CONFIG_SYS_MEASURE_CPUCLK
-#define CONFIG_SYS_8XX_XIN                     CONFIG_8xx_OSCLK
-
-#define CONFIG_BOOTDELAY               5       /* autoboot after 5 seconds     */
-#define CONFIG_AUTOBOOT_KEYED
-#define CONFIG_AUTOBOOT_PROMPT         \
-       "\nEnter password - autoboot in %d seconds...\n", bootdelay
-#define CONFIG_AUTOBOOT_DELAY_STR      "ids"
-#define CONFIG_BOOT_RETRY_TIME         900
-#define CONFIG_BOOT_RETRY_MIN          30
-
-#define CONFIG_PREBOOT "echo;echo Type \\\"run flash_nfs\\\" to mount root filesystem over NFS;echo"
-
-#undef CONFIG_BOOTARGS
-#define CONFIG_BOOTCOMMAND                                                     \
-       "bootp;"                                                                \
-       "setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} "     \
-       "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off;"    \
-       "bootm"
-
-#define CONFIG_WATCHDOG                        /* watchdog enabled             */
-
-#undef CONFIG_STATUS_LED               /* Status LED disabled          */
-
-/*
- * BOOTP options
- */
-#define CONFIG_BOOTP_SUBNETMASK
-#define CONFIG_BOOTP_GATEWAY
-#define CONFIG_BOOTP_HOSTNAME
-#define CONFIG_BOOTP_BOOTPATH
-#define CONFIG_BOOTP_BOOTFILESIZE
-
-
-#define        CONFIG_FEC_ENET         1       /* use FEC ethernet  */
-#define FEC_ENET
-#define CONFIG_MII
-#define CONFIG_SYS_DISCOVER_PHY        1
-
-
-/* enable I2C and select the hardware/software driver */
-#undef  CONFIG_HARD_I2C                        /* I2C with hardware support    */
-#define CONFIG_SOFT_I2C                1       /* I2C bit-banged               */
-#define CONFIG_SYS_I2C_SPEED           100000  /* 100 kHz                      */
-#define CONFIG_SYS_I2C_SLAVE           0x7f
-
-/*
- * Software (bit-bang) I2C driver configuration
- */
-#if defined(CONFIG_IDS852_REV1)
-
-#define SCL            0x1000          /* PA 3 */
-#define SDA            0x2000          /* PA 2 */
-
-#define __I2C_DIR      immr->im_ioport.iop_padir
-#define __I2C_DAT      immr->im_ioport.iop_padat
-#define __I2C_PAR      immr->im_ioport.iop_papar
-
-#elif defined(CONFIG_IDS852_REV2)
-
-#define SCL            0x0002          /* PB 30 */
-#define SDA            0x0001          /* PB 31 */
-
-#define __I2C_PAR      immr->im_cpm.cp_pbpar
-#define __I2C_DIR      immr->im_cpm.cp_pbdir
-#define __I2C_DAT      immr->im_cpm.cp_pbdat
-
-#endif
-
-#define        I2C_INIT        { __I2C_PAR &= ~(SDA|SCL);      \
-                         __I2C_DIR |= (SDA|SCL);       }
-#define        I2C_READ        ((__I2C_DAT & SDA) ? 1 : 0)
-#define        I2C_SDA(x)      { if (x) __I2C_DAT |= SDA; else __I2C_DAT &= ~SDA; }
-#define        I2C_SCL(x)      { if (x) __I2C_DAT |= SCL; else __I2C_DAT &= ~SCL; }
-#define        I2C_DELAY       { udelay(5); }
-#define        I2C_ACTIVE      { __I2C_DIR |= SDA; }
-#define        I2C_TRISTATE    { __I2C_DIR &= ~SDA; }
-
-#define CONFIG_RTC_PCF8563
-#define CONFIG_SYS_I2C_RTC_ADDR                0x51
-
-
-/*
- * Command line configuration.
- */
-#include <config_cmd_default.h>
-
-#define CONFIG_CMD_ASKENV
-#define CONFIG_CMD_DATE
-#define CONFIG_CMD_DHCP
-#define CONFIG_CMD_I2C
-#define CONFIG_CMD_NAND
-#define CONFIG_CMD_JFFS2
-#define CONFIG_CMD_NFS
-#define CONFIG_CMD_SNTP
-
-
-/*
- * Miscellaneous configurable options
- */
-#define        CONFIG_SYS_LONGHELP                     /* undef to save memory         */
-#define        CONFIG_SYS_PROMPT       "=> "           /* Monitor Command Prompt       */
-#if defined(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
-#define        CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
-#define        CONFIG_SYS_MAXARGS      16              /* max number of command args   */
-#define CONFIG_SYS_BARGSIZE    CONFIG_SYS_CBSIZE       /* Boot Argument Buffer Size    */
-
-#define CONFIG_SYS_MEMTEST_START       0x0100000       /* memtest works on     */
-#define CONFIG_SYS_MEMTEST_END         0x0400000       /* 1 ... 4 MB in DRAM   */
-
-#define CONFIG_SYS_LOAD_ADDR           0x00100000
-
-#define        CONFIG_SYS_HZ           1000            /* decrementer freq: 1 ms ticks */
-
-#define CONFIG_SYS_BAUDRATE_TABLE      { 9600, 19200, 38400, 57600, 115200 }
-
-/*
- * Low Level Configuration Settings
- * (address mappings, register initial values, etc.)
- * You should know what you are doing if you make changes here.
- */
-/*-----------------------------------------------------------------------
- * Internal Memory Mapped Register
- */
-#define CONFIG_SYS_IMMR                0xF0000000
-#define CONFIG_SYS_IMMR_SIZE           ((uint)(64 * 1024))
-
-/*-----------------------------------------------------------------------
- * Definitions for initial stack pointer and data area (in DPRAM)
- */
-#define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#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
-
-/*-----------------------------------------------------------------------
- * Start addresses for the final memory configuration
- * (Set up by the startup code)
- * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0
- */
-#define        CONFIG_SYS_SDRAM_BASE           0x00000000
-#define CONFIG_SYS_FLASH_BASE          0x40000000
-
-#define CONFIG_SYS_RESET_ADDRESS       0xFFF00100
-
-#define CONFIG_SYS_MONITOR_LEN         (256 << 10)     /* Reserve 256 kB for Monitor */
-#define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE
-#define        CONFIG_SYS_MALLOC_LEN           (256 << 10)     /* Reserve 256 kB for malloc()  */
-
-/*
- * For booting Linux, the board info and command line data
- * have to be in the first 8 MB of memory, since this is
- * the maximum mapped by the Linux kernel during initialization.
- */
-#define        CONFIG_SYS_BOOTMAPSZ            (8 << 20)       /* Initial Memory map for Linux */
-/*-----------------------------------------------------------------------
- * FLASH organization
- */
-#define CONFIG_SYS_MAX_FLASH_BANKS     1       /* max number of memory banks           */
-#define CONFIG_SYS_MAX_FLASH_SECT      64      /* max number of sectors on one chip    */
-
-#define CONFIG_SYS_FLASH_ERASE_TOUT    120000  /* Timeout for Flash Erase (in ms)      */
-#define CONFIG_SYS_FLASH_WRITE_TOUT    500     /* Timeout for Flash Write (in ms)      */
-
-
-#define        CONFIG_ENV_IS_IN_FLASH  1
-#define CONFIG_ENV_OFFSET              0x00740000
-
-#define CONFIG_ENV_SECT_SIZE   0x20000 /* Total Size of Environment sector     */
-#define        CONFIG_ENV_SIZE         0x4000  /* Used Size of Environment Sector      */
-
-/*-----------------------------------------------------------------------
- * Cache Configuration
- */
-#define CONFIG_SYS_CACHELINE_SIZE      16      /* For all MPC8xx CPUs                  */
-#if defined(CONFIG_CMD_KGDB)
-#define CONFIG_SYS_CACHELINE_SHIFT     4       /* log base 2 of the above value        */
-#endif
-
-/*
- * NAND flash support
- */
-#define CONFIG_SYS_MAX_NAND_DEVICE     1
-
-/*-----------------------------------------------------------------------
- * SYPCR - System Protection Control                                   11-9
- * SYPCR can only be written once after reset!
- *-----------------------------------------------------------------------
- * Software & Bus Monitor Timer max, Bus Monitor enable, SW Watchdog freeze
- */
-#if defined(CONFIG_WATCHDOG)
-#define CONFIG_SYS_SYPCR       (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | \
-                        SYPCR_SWE  | SYPCR_SWRI| SYPCR_SWP)
-#else
-#define CONFIG_SYS_SYPCR       (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | SYPCR_SWP)
-#endif
-
-/*-----------------------------------------------------------------------
- * SIUMCR - SIU Module Configuration                                   11-6
- *-----------------------------------------------------------------------
- */
-#define CONFIG_SYS_SIUMCR      (SIUMCR_DBGC11 | SIUMCR_DBPC00 | SIUMCR_MLRC01)
-
-/*-----------------------------------------------------------------------
- * TBSCR - Time Base Status and Control                                        11-26
- *-----------------------------------------------------------------------
- * Clear Reference Interrupt Status, Timebase freezing enabled
- */
-#define CONFIG_SYS_TBSCR       (TBSCR_REFA | TBSCR_REFB | TBSCR_TBE)
-
-/*-----------------------------------------------------------------------
- * PISCR - Periodic Interrupt Status and Control               11-31
- *-----------------------------------------------------------------------
- * Clear Periodic Interrupt Status, Interrupt Timer freezing enabled
- */
-#define CONFIG_SYS_PISCR       (PISCR_PS | PISCR_PITF)
-
-/*-----------------------------------------------------------------------
- * SCCR - System Clock and reset Control Register              15-27
- *-----------------------------------------------------------------------
- * Set clock output, timebase and RTC source and divider,
- * power management and some other internal clocks
- */
-#define SCCR_MASK      SCCR_EBDF11
-#define CONFIG_SYS_SCCR        (SCCR_COM00     | SCCR_DFSYNC00 | \
-                        SCCR_DFBRG00   | SCCR_DFNL000  | SCCR_DFNH000  | \
-                        SCCR_DFLCD000  | SCCR_DFALCD00)
-
- /*-----------------------------------------------------------------------
- *
- *-----------------------------------------------------------------------
- *
- */
-#define CONFIG_SYS_DER         0
-
-/*
- * Init Memory Controller:
- *
- * BR0 and OR0 (FLASH)
- */
-
-#define FLASH_BASE0_PRELIM     0x40000000      /* FLASH bank #0        */
-
-#define CONFIG_SYS_REMAP_OR_AM         0x80000000      /* OR addr mask */
-#define CONFIG_SYS_PRELIM_OR_AM        0xE0000000      /* OR addr mask */
-
-/* FLASH timing: Default value of OR0 after reset */
-#define CONFIG_SYS_OR_TIMING_FLASH     (OR_CSNT_SAM  | OR_ACS_MSK | OR_BI | \
-                                OR_SCY_15_CLK | OR_TRLX)
-
-#define CONFIG_SYS_OR0_REMAP   (CONFIG_SYS_REMAP_OR_AM  | CONFIG_SYS_OR_TIMING_FLASH)
-#define CONFIG_SYS_OR0_PRELIM  (CONFIG_SYS_PRELIM_OR_AM | CONFIG_SYS_OR_TIMING_FLASH)
-#define CONFIG_SYS_BR0_PRELIM  ((FLASH_BASE0_PRELIM & BR_BA_MSK) | BR_PS_8 | BR_V)
-
-/*
- * BR2 and OR2 (NAND Flash) - addressed through UPMB on rev 1
- * rev2 only uses the chipselect
- */
-#define CONFIG_SYS_NAND_BASE           0x50000000
-#define CONFIG_SYS_NAND_SIZE           0x04000000
-
-#define CONFIG_SYS_OR_TIMING_NAND      (OR_CSNT_SAM | OR_ACS_DIV1 | OR_BI | \
-                                OR_SCY_15_CLK | OR_EHTR | OR_TRLX)
-
-#define CONFIG_SYS_BR2_PRELIM  ((CONFIG_SYS_NAND_BASE & BR_BA_MSK) | BR_PS_8 | BR_MS_UPMB | BR_V  )
-#define CONFIG_SYS_OR2_PRELIM  (((-CONFIG_SYS_NAND_SIZE) & OR_AM_MSK) | OR_BI )
-
-/*
- * BR3 and OR3 (SDRAM)
- */
-#define SDRAM_BASE3_PRELIM     0x00000000      /* SDRAM bank           */
-#define SDRAM_MAX_SIZE         0x04000000      /* max 64 MB per bank   */
-
- /*
-  * SDRAM timing: Multiplexed addresses, GPL5 output to GPL5_A (don't care)
-  */
-#define CONFIG_SYS_OR_TIMING_SDRAM     0x00000A00
-
-#define CONFIG_SYS_OR3_PRELIM  (CONFIG_SYS_PRELIM_OR_AM | CONFIG_SYS_OR_TIMING_SDRAM)
-#define CONFIG_SYS_BR3_PRELIM  ((SDRAM_BASE3_PRELIM & BR_BA_MSK) | BR_MS_UPMA | BR_V)
-
-/*
- * BR4 and OR4 (CPLD)
- */
-#define CONFIG_SYS_CPLD_BASE           0x80000000      /* CPLD                 */
-#define CONFIG_SYS_CPLD_SIZE           0x10000         /* only 16 used         */
-
-#define CONFIG_SYS_OR_TIMING_CPLD      (OR_CSNT_SAM | OR_ACS_DIV1 | OR_BI | \
-                                OR_SCY_1_CLK)
-
-#define CONFIG_SYS_BR4_PRELIM  ((CONFIG_SYS_CPLD_BASE & BR_BA_MSK) | BR_PS_8 | BR_V )
-#define CONFIG_SYS_OR4_PRELIM  (((-CONFIG_SYS_CPLD_SIZE) & OR_AM_MSK) | CONFIG_SYS_OR_TIMING_CPLD)
-
-/*
- * BR5 and OR5 (SRAM)
- */
-#define CONFIG_SYS_SRAM_BASE           0x60000000
-#define CONFIG_SYS_SRAM_SIZE           0x00080000
-
-#define CONFIG_SYS_OR_TIMING_SRAM      (OR_CSNT_SAM | OR_ACS_DIV1 | OR_BI | \
-                                OR_SCY_15_CLK | OR_EHTR | OR_TRLX)
-
-#define CONFIG_SYS_BR5_PRELIM  ((CONFIG_SYS_SRAM_BASE & BR_BA_MSK) | BR_PS_8 | BR_V )
-#define CONFIG_SYS_OR5_PRELIM  (((-CONFIG_SYS_SRAM_SIZE) & OR_AM_MSK) | CONFIG_SYS_OR_TIMING_SRAM)
-
-#if defined(CONFIG_CP850)
-/*
- *  BR6 and OR6 (DPRAM) - only on CP850
- */
-#define CONFIG_SYS_OR6_PRELIM          0xffff8170
-#define CONFIG_SYS_BR6_PRELIM          0xa0000401
-#define DPRAM_BASE_ADDR         0xa0000000
-
-#define CONFIG_MISC_INIT_R      1
-#endif
-
-/*
- * 4096 Rows from SDRAM example configuration
- * 1000 factor s -> ms
- * 64   PTP (pre-divider from MPTPR) from SDRAM example configuration
- * 4    Number of refresh cycles per period
- * 64   Refresh cycle in ms per number of rows
- */
-#define CONFIG_SYS_PTA_PER_CLK         ((4096 * 64 * 1000) / (4 * 64))
-
-/*
- * Memory Periodic Timer Prescaler
- */
-
-/* periodic timer for refresh */
-#define CONFIG_SYS_MAMR_PTA            39
-
-/* refresh rate 15.6 us (= 64 ms / 4K = 62.4 / quad bursts) for <= 128 MBit    */
-#define CONFIG_SYS_MPTPR_2BK_4K        MPTPR_PTP_DIV16         /* setting for 2 banks  */
-#define CONFIG_SYS_MPTPR_1BK_4K        MPTPR_PTP_DIV32         /* setting for 1 bank   */
-
-/* refresh rate 7.8 us (= 64 ms / 8K = 31.2 / quad bursts) for 256 MBit                */
-#define CONFIG_SYS_MPTPR_2BK_8K        MPTPR_PTP_DIV8          /* setting for 2 banks  */
-#define CONFIG_SYS_MPTPR_1BK_8K        MPTPR_PTP_DIV16         /* setting for 1 bank   */
-
-/*
- * MAMR settings for SDRAM
- */
-
-#define CONFIG_SYS_MAMR_8COL   ((CONFIG_SYS_MAMR_PTA << MAMR_PTA_SHIFT)  | MAMR_PTAE | \
-                        MAMR_AMA_TYPE_0 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A11 | \
-                        MAMR_RLFA_1X    | MAMR_WLFA_1X    | MAMR_TLFA_4X)
-#define CONFIG_SYS_MAMR_9COL   ((CONFIG_SYS_MAMR_PTA << MAMR_PTA_SHIFT)  | MAMR_PTAE | \
-                        MAMR_AMA_TYPE_1 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A10 | \
-                        MAMR_RLFA_1X    | MAMR_WLFA_1X    | MAMR_TLFA_4X)
-
-/*
- * MBMR settings for NAND flash
- */
-
-#define CONFIG_SYS_MBMR_NAND ( MBMR_WLFB_5X )
-
-#define CONFIG_JFFS2_NAND 1                    /* jffs2 on nand support */
-#define NAND_CACHE_PAGES 16                    /* size of nand cache in 512 bytes pages */
-
-/*
- * JFFS2 partitions
- */
-
-/* No command line, one static partition */
-#undef CONFIG_CMD_MTDPARTS
-#define CONFIG_JFFS2_DEV               "nand0"
-#define CONFIG_JFFS2_PART_SIZE         0x00400000
-#define CONFIG_JFFS2_PART_OFFSET       0x00000000
-
-/* mtdparts command line support */
-#define CONFIG_CMD_MTDPARTS
-#define MTDIDS_DEFAULT         "nor0=nc650-0,nand0=nc650-nand"
-
-#define MTDPARTS_DEFAULT       "mtdparts=nc650-0:1m(kernel1),1m(kernel2)," \
-                                       "4m(cramfs1),1m(cramfs2)," \
-                                       "256k(u-boot),128k(env);" \
-                               "nc650-nand:4m(jffs1),28m(jffs2)"
-
-#endif /* __CONFIG_H */
index 62eef4631d356239e261cf952e16add5661f9707..04f0f0bc53e4b43ef7fbf234b4aff5cd15235d64 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x3000  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x3000  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index db22ba3f2d9109d282c172ab4c9ca275ecc49f09..795c0f61fe6dadf95eabbc728b588f2d93d5d879 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x3000  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x3000  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 87000e6ddb0488d640625fd413d4fb5e27671a51..d02dca98fdb3df289da33d229ce15867fcbc3d48 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x3000  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x3000  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index b7119fd3988b91de6f85ae6c86e1cfe0f302c726..a92e3a6261ad091b06ffc7dbb4f02e7278edb6c4 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x3000  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x3000  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 4f76ca1b1a61e33ee75fa1c2568781f69c16991c..7e3ba2a1110b631897cd3f4698d03767b18b4ee0 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index e588ea3c0ae681222e7946af78ba26a4115260e7..bb0d3a3022e07d00ac95341954e04d836c7cf57a 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x2F00  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       64      /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 03430439cff9f535e252e60f5ce4db8b3889c0bf..65a366ab041869a292f06d11aa8f6ab9b7bd0ba6 100644 (file)
 #define CONFIG_SYS_OCM_DATA_SIZE       0x1000
 
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR /* inside of SDRAM             */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE /* End of used area in RAM     */
-#define CONFIG_SYS_GBL_DATA_SIZE      128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE /* Size of used area in RAM    */
+#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #endif /* __CONFIG_H */
index cef1117578ec74b4cda9dff123bfb6cf63e8c55c..c2e3b2bcc1e272650e83324dc8d1e0417baef04b 100644 (file)
 #define CONFIG_SYS_OCM_DATA_SIZE       0x1000
 
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR /* inside of SDRAM             */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE /* End of used area in RAM     */
-#define CONFIG_SYS_GBL_DATA_SIZE      128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE /* Size of used area in RAM    */
+#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #endif /* __CONFIG_H */
index 9a0c558ecefc224a2064d9164ec02ce6ae43c1a0..bc8e718f17f7e189cde7d6716ac21a7fb33687cc 100644 (file)
 #endif
 
 #define CONFIG_SYS_INIT_RAM_ADDR       0x40000000
-#define CONFIG_SYS_INIT_RAM_END        0x1000
+#define CONFIG_SYS_INIT_RAM_SIZE       0x1000
 
-#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_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MALLOC_LEN          (512 << 10)     /* Reserve 512 kB for malloc()  */
index 1a4632fc8f1f5d3a29af35006996ece5123a7282..6c8579f9ec1b2361350bb758075baba9ba6e662c 100644 (file)
 
 #define CONFIG_SYS_INIT_RAM_LOCK
 #define CONFIG_SYS_INIT_RAM_ADDR       0xffd00000 /* Initial L1 address */
-#define CONFIG_SYS_INIT_RAM_END                0x00004000 /* End of used area in RAM */
+#define CONFIG_SYS_INIT_RAM_SIZE               0x00004000 /* Size of used area in RAM */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* num bytes initial data */
 #define CONFIG_SYS_GBL_DATA_OFFSET     \
-       (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+       (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_LEN         (512 * 1024)
index cff0ed341c88b92161884382cfa12e69395bef10..b99f383ec1e58681986b6a9cc9171ded16281f9f 100644 (file)
@@ -211,11 +211,10 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR      0xffd00000       /* stack in RAM */
-#define CONFIG_SYS_INIT_RAM_END        0x00004000      /* End of used area in RAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x00004000      /* Size of used area in RAM */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END \
-                                               - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE \
+                                               - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_LEN         (256 * 1024) /* Reserve 256 kB for Mon*/
index e7cdb92fb055f6c0522bb248c547ba9887145be5..0af21528d9a82345bc132825cd85e1108dc1f445 100644 (file)
@@ -77,8 +77,9 @@
 #define CONFIG_SYS_NUM_ADDR_MAP                16      /* number of TLB1 entries */
 #endif
 
-#define CONFIG_SYS_MEMTEST_START       0x00000000      /* memtest works on */
-#define CONFIG_SYS_MEMTEST_END         0x7fffffff
+#define CONFIG_POST CONFIG_SYS_POST_MEMORY     /* test POST memory test */
+#define CONFIG_SYS_MEMTEST_START       0x00200000      /* memtest works on */
+#define CONFIG_SYS_MEMTEST_END         0x00400000
 #define CONFIG_PANIC_HANG      /* do not reset board on panic */
 
 /*
 #define CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH 0
 #define CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW CONFIG_SYS_INIT_RAM_ADDR_PHYS
 #endif
-#define CONFIG_SYS_INIT_RAM_END        0x00004000      /* End of used area in RAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x00004000      /* Size of used area in RAM */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_LEN         (256 * 1024) /* Reserve 256 kB for Mon */
index 47b75580ddaf9b544a56978eabbc8e9451e57b25..eb641f556f132526d990e1e500d0d73a437b0150 100644 (file)
  * Definitions for initial stack pointer and data area
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x40000000
-#define        CONFIG_SYS_INIT_RAM_END 0x1000
-#define        CONFIG_SYS_GBL_DATA_SIZE        128  /* size in bytes reserved for init data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x1000
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_RAM_LOCK
 
 
index b07cac11f4249ae717a374f686a92a3b4362145a..da2d60250660d6fbbd23cc4e0dc826870ed5d9c3 100644 (file)
  * Definitions for initial stack pointer and data area
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       (CONFIG_SYS_IMMR + 0x003f9800)  /* Physical start adress of internal MPC555 writable RAM */
-#define        CONFIG_SYS_INIT_RAM_END (CONFIG_SYS_IMMR + 0x003fffff)  /* Physical end adress of internal MPC555 used RAM area */
-#define        CONFIG_SYS_GBL_DATA_SIZE        128                     /* Size in bytes reserved for initial global data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     ((CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_INIT_RAM_ADDR) - CONFIG_SYS_GBL_DATA_SIZE) /* Offset from the beginning of ram */
+#define        CONFIG_SYS_INIT_RAM_SIZE        (CONFIG_SYS_IMMR + 0x003fffff)  /* Physical end adress of internal MPC555 used RAM area */
+#define CONFIG_SYS_GBL_DATA_OFFSET     ((CONFIG_SYS_INIT_RAM_SIZE - CONFIG_SYS_INIT_RAM_ADDR) - GENERATED_GBL_DATA_SIZE) /* Offset from the beginning of ram */
 #define        CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_IMMR + 0x03fa000)   /* Physical start adress of inital stack */
 /*
  * Start addresses for the final memory configuration
index 28769b3abcc0e28a85b0d6e435ae6e43f18d01aa..6be5c2570a0204d7d680b72ed14253091ec5c6f5 100644 (file)
 #define CONFIG_SYS_OCM_DATA_ADDR       0xF8000000
 #define CONFIG_SYS_OCM_DATA_SIZE       0x1000
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR /* inside of SDRAM             */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE /* End of used area in RAM     */
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE /* Size of used area in RAM    */
 
-#define CONFIG_SYS_GBL_DATA_SIZE      128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #endif /* __CONFIG_H */
index 3e7e74bcf4fc99a37d1348be47dbec22a49c1bfe..70775e75fbbd632971f14c817c32fa83d68fa055 100644 (file)
  *     -The stack is placed below global data (&grows down).
  *----------------------------------------------------------------------*/
 #define CONFIG_SYS_MONITOR_LEN         (128 * 1024)    /* Reserve 128k         */
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* Global data size rsvd*/
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128*1024)
 
 #define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_MALLOC_BASE         (CONFIG_SYS_MONITOR_BASE - CONFIG_SYS_MALLOC_LEN)
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_MALLOC_BASE - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_MALLOC_BASE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP             CONFIG_SYS_GBL_DATA_OFFSET
 
 /*------------------------------------------------------------------------
index d0ce92487ef39ac5ddfe7946e2e5350218feeae5..e778c5956635778023b2eac9a7f92c274a017b6f 100644 (file)
 
 /* Size in bytes reserved for initial data
  */
-#define CONFIG_SYS_GBL_DATA_SIZE    128
 
 #define CONFIG_SYS_INIT_RAM_ADDR     0x40000000
-#define CONFIG_SYS_INIT_RAM_END      0x8000
-#define CONFIG_SYS_GBL_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE      0x8000
+#define CONFIG_SYS_GBL_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET    CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_INIT_RAM_LOCK
index 8f7ec023d3c9eaf8d076dce053e2973fc68a949c..48911b7be44917c57ed4a980a079c07016be989b 100644 (file)
 
 /* Size in bytes reserved for initial data
  */
-#define CONFIG_SYS_GBL_DATA_SIZE    128
 
 #define CONFIG_SYS_INIT_RAM_ADDR     0x40000000
-#define CONFIG_SYS_INIT_RAM_END      0x8000
-#define CONFIG_SYS_GBL_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE      0x8000
+#define CONFIG_SYS_GBL_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET    CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_INIT_RAM_LOCK
index e3cf94376c06194ba1ede59fa1b2797a2267ac8b..2dc6057f80a960c0c4ec4af3bfa1a602126c2f57 100644 (file)
 #define CONFIG_SYS_OCM_DATA_ADDR       0xF0000000
 #define CONFIG_SYS_OCM_DATA_SIZE       0x1000
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR        /* inside of On Chip SRAM    */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE        /* End of On Chip SRAM         */
-#define CONFIG_SYS_GBL_DATA_SIZE       64              /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE        /* Size of On Chip SRAM        */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /***********************************************************************
index 8e8c0491eecc97a045d6e3e99a3b25207f17f7ee..b466c4b05a28b01deef2eabe7b2f0b9a589c387b 100644 (file)
  *     -The stack is placed below global data (&grows down).
  *----------------------------------------------------------------------*/
 #define CONFIG_SYS_MONITOR_LEN         (256 * 1024)    /* Reserve 128k         */
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* Global data size rsvd*/
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128*1024)
 
 #define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_MALLOC_BASE         (CONFIG_SYS_MONITOR_BASE - CONFIG_SYS_MALLOC_LEN)
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_MALLOC_BASE - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_MALLOC_BASE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP             CONFIG_SYS_GBL_DATA_OFFSET
 
 /*------------------------------------------------------------------------
index 3844e48c485268cb1c433674d4f8e1488b9f12da..dcf62934045b7515ff89f0ebe9ac136c15a1f89d 100644 (file)
 #define CONFIG_SYS_OCM_DATA_ADDR       0xF8000000
 #define CONFIG_SYS_OCM_DATA_SIZE       0x1000
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR /* inside of SDRAM */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE /* End of used area in RAM  */
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE /* Size of used area in RAM  */
 
-#define CONFIG_SYS_GBL_DATA_SIZE      128 /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*
index 5832307f6da6b980bcd847f3f6829fd48666c1d3..8354e70fd0706b55b4d5779ceb36ffe034effd37 100644 (file)
 
 /* Use SRAM until RAM will be available */
 #define CONFIG_SYS_INIT_RAM_ADDR       MPC5XXX_SRAM
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_SIZE       /* End of used area in DPRAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_SIZE       /* Size of used area in DPRAM */
 
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_BASE    CONFIG_SYS_TEXT_BASE
index d26254f04baa1b5bde5b312b19d999af6a288712..501f691ea523c2ec0f0ab18e4412ffeafdb13c23 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x4000  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       128 /* size in bytes reserved for initial data*/
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000  /* Size of used area in DPRAM    */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 3053ad4745c12d5bf06e1c787d4ea5e77b17052a..1af043df332fc92389546b33d63d7ac3ba206bf6 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x4000  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       128 /* size in bytes reserved for initial data*/
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 59633348996febabda2ffdcc5fe8b9ae1945df45..1e2089fb5a9eabff9d2af155e90e180dfce0032a 100644 (file)
 
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0xe4010000      /* Initial RAM address */
-#define CONFIG_SYS_INIT_RAM_END        0x4000          /* End of used area in RAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000          /* Size of used area in RAM */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_LEN         (512 * 1024)    /* Reserve 512 kB for Mon */
index 1559fd660c45b660bcc72a4ed5f9a27707d7c77a..d3e8f412e21356b88956de5d9998bb233933785a 100644 (file)
 
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0xe4010000      /* Initial RAM address */
-#define CONFIG_SYS_INIT_RAM_END        0x4000          /* End of used area in RAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000          /* Size of used area in RAM */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_LEN         (512 * 1024)    /* Reserve 512 kB for Mon */
index b1d0ea5c729571695469bd0d670dfa8ea602a9c7..c2db5ea5ddaebd846bdb10b04bf59c1b546994b9 100644 (file)
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR
 
 /* End of used area in RAM */
-#define CONFIG_SYS_INIT_RAM_END                CONFIG_SYS_OCM_DATA_SIZE
+#define CONFIG_SYS_INIT_RAM_SIZE               CONFIG_SYS_OCM_DATA_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_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - \
+                                        GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_OF_LIBFDT
index 74b656c7613536ef132e418983fe6af6824cf8f3..83cee9654939fbd05095b9618efbfbbcc053d2c4 100644 (file)
 /* inside SDRAM */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR
 /* End of used area in RAM */
-#define CONFIG_SYS_INIT_RAM_END                CONFIG_SYS_OCM_DATA_SIZE
+#define CONFIG_SYS_INIT_RAM_SIZE               CONFIG_SYS_OCM_DATA_SIZE
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128 /* bytes res. for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - \
-                                        CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - \
+                                        GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*
index 7585e6ec15945d0b4fffc07004fee085ac92489c..4eb0735fcffe5462b2ca07cf52d6b73397b61f77 100644 (file)
@@ -88,9 +88,8 @@
  *----------------------------------------------------------------------*/
 /* 440EPx/440GRx have 16KB of internal SRAM, so no need for D-Cache    */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_BASE     /* OCM                  */
-#define CONFIG_SYS_INIT_RAM_END        (4 << 10)
-#define CONFIG_SYS_GBL_DATA_SIZE       256     /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       (4 << 10)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      (CONFIG_SYS_GBL_DATA_OFFSET - 0x4)
 
 /*-----------------------------------------------------------------------
index 01878abe8bab8248d13e248ee34020545bb2e16a..7f2f1131b0acb386600e0b68caead17017eec4a3 100644 (file)
 #define CONFIG_SYS_MONITOR_LEN         0x00030000
 #define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE
 
-/*#define CONFIG_SYS_GBL_DATA_SIZE    256*/
-#define CONFIG_SYS_GBL_DATA_SIZE       128
 
 #define CONFIG_SYS_INIT_RAM_ADDR       0x40000000
-#define CONFIG_SYS_INIT_RAM_END        0x1000
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x1000
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 
 
 #define CONFIG_SYS_NO_FLASH            1               /* There is no FLASH memory     */
index 3bc3d70bdcb1a3bafe78d7f3d60ed94a365954bc..a14bd0e65d322296c035e4889aa4cef22dd7007e 100644 (file)
 #define CONFIG_SYS_OCM_DATA_ADDR       0xF8000000
 #define CONFIG_SYS_OCM_DATA_SIZE       0x1000
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR /* inside of SDRAM             */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE /* End of used area in RAM     */
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE /* Size of used area in RAM    */
 
-#define CONFIG_SYS_GBL_DATA_SIZE      128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index ec2e0c938e9ab5a72ea1c472027643ff930eaca0..36efbf2e0d58fbf03cfd86e5c8247091f7c6bd15 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x2F00          /* End of used area in DPRAM */
-#define CONFIG_SYS_GBL_DATA_SIZE       64              /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2F00          /* Size of used area in DPRAM */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 3d455c4b0f7547e294f638eb74977aa478762772..5c6ed07ba66edbdc227a4dbd7b9601abb296e140 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x2F00          /* End of used area in DPRAM */
-#define CONFIG_SYS_GBL_DATA_SIZE       64              /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2F00          /* Size of used area in DPRAM */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 99ccf08b405bc9ec9ec8856415a20f53cd79127a..b0bee82dff7dfd496b1b914dcc7141197ef05015 100644 (file)
@@ -181,9 +181,8 @@ CONFIG_SPI
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x2F00          /* End of used area in DPRAM */
-#define CONFIG_SYS_GBL_DATA_SIZE       64              /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2F00          /* Size of used area in DPRAM */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index a0355f10564240c383c1574a430acf39d726545e..a8e9a4a31a57132ee28e24ac547bc2ffd0055535 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 5a23e56dec51525663cb8884bdd7eeab24498dcf..40980fe5026ab4fdf1a7995b0be36f7dd3ab74b9 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index e8e8a5d94390697ff5f200878b35fc7b922aabfb..267ece16c900de566bde1e9642376e1435c2fc17 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x3000  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x3000  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index a7609cae69d19f2d036d16b42cd1bb61d488699b..74926d8d2a79528c143bfa3a168692f2e0846bea 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index b895f05aa40359ef4dc7dbace197a048a271013c..7b561cbd1493b8692a12f521bcaea0553beea1eb 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x2F00          /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       64              /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2F00          /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 2ac764dd268a09535ef1f32769c67100ebdda3cd..5c19bd36e4ff2b52b9357c9f67633f1fd651e448 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x4000  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE      128     /* bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE        0x4000  /* Size of used area in DPRAM    */
+#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 9530381f5a05b4e346b2d5e2b38da35096f2ebe8..7dcc14c82080c0dc2ca6eb622d4104775c99e863 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index cdfce6aec6af901fdbce8952e3c9106b3b54af3f..4844fba885fa5ea70bed24aeb2dc51324867a112 100644 (file)
 #define CONFIG_SYS_IMMR                0xF0000000
 
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x2000  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2000  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_SDRAM_BASE          0x00000000
index b91dc4bd26d5688a50edb45b020c521335b254ae..fd9bacc499445a67e1e95f5cdab946d78b421a42 100644 (file)
 
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0x70000000      /* Initial RAM address  */
-#define CONFIG_SYS_INIT_RAM_END        0x4000          /* End of used area in RAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000          /* Size of used area in RAM */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_LEN         (256 * 1024)    /* Reserve 256 kB for Mon */
index edad4595ccbdb353dd12322509c1161235259040..ec26290be0e4e098e23e44cc6ec8fa55fdaafee1 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x4000  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       128 /* size in bytes reserved for initial data*/
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000  /* Size of used area in DPRAM    */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 15d99f99875fe26ee1d1df60596a9c7e226edce7..30a8e41e62a1ba539c1e9fa77cdd0dca497afd4e 100644 (file)
 
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0xFD000000      /* Initial RAM address */
-#define CONFIG_SYS_INIT_RAM_END                0x1000          /* End of used area in RAM*/
+#define CONFIG_SYS_INIT_RAM_SIZE               0x1000          /* Size of used area in RAM*/
 
-#define CONFIG_SYS_GBL_DATA_SIZE       0x100           /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /* CONFIG_SYS_MONITOR_LEN must be a multiple of CONFIG_ENV_SECT_SIZE */
index 259f8ab5e16482c2ebd16103ea9a06310e920182..833b18a8fdd75eb5b4fa602410d1ee5f2d4229f0 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index ba3ada13a5a5a868257c260f2d1812cc173aa48d..4a8acabf72c6261024f801496c0e36bd9186d315 100644 (file)
@@ -31,7 +31,6 @@
  * so we MUST NOT initialize critical regs like mem-timing ...
  */
 #undef CONFIG_SKIP_LOWLEVEL_INIT
-#undef CONFIG_SKIP_RELOCATE_UBOOT
 
 /*
  * High Level Configuration Options
@@ -48,7 +47,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
index b132a780735b1420d07222d5939fa912600132b7..fba5b5e2aaa60c4bdb182f3a74bdab0ade8dc911 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x2F00  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 61492766f638e4147905796505d6531dd3b6518d..01c2b3d50ce5f6720500dabfe181b412d333962e 100644 (file)
@@ -47,7 +47,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
index 7c3f8745cc012b168698717e955743178cd18e9a..774c98faec0f6e728dc90bb70b8357a629bcf3b6 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index f6107cec13e0f7b18c43b385748c38be925dec76..f98414160db5e2a483538a83e9916dada74b17ea 100644 (file)
 #define CONFIG_SYS_MONITOR_BASE        0x00090000
 #define CONFIG_SYS_RAMBOOT             1
 #define CONFIG_SYS_INIT_RAM_ADDR       (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
-#define CONFIG_SYS_INIT_RAM_END        0x10000
-#define CONFIG_SYS_GBL_DATA_SIZE       256  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x10000
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 #else
 #undef CONFIG_SYS_RAMBOOT
 #define CONFIG_SYS_MONITOR_LEN         0x00030000
 #define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE
 
-/*#define CONFIG_SYS_GBL_DATA_SIZE    256*/
-#define CONFIG_SYS_GBL_DATA_SIZE       128
 
 #define CONFIG_SYS_INIT_RAM_ADDR     0x40000000
-#define CONFIG_SYS_INIT_RAM_END      0x1000
-#define CONFIG_SYS_GBL_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE      0x1000
+#define CONFIG_SYS_GBL_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 
 #endif
 
index 66a98c19c6a906bb13a5ef0b210603e40a37b43c..b47adcc3a9d54968787248403d5c9918b3d0a970 100644 (file)
 #define CONFIG_SYS_MONITOR_BASE        0x00090000
 #define CONFIG_SYS_RAMBOOT             1
 #define CONFIG_SYS_INIT_RAM_ADDR       (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
-#define CONFIG_SYS_INIT_RAM_END        0x10000
-#define CONFIG_SYS_GBL_DATA_SIZE       256  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x10000
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 #else
 #undef CONFIG_SYS_RAMBOOT
 #define CONFIG_SYS_MONITOR_LEN         0x00030000
 #define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE
 
-/*#define CONFIG_SYS_GBL_DATA_SIZE    256*/
-#define CONFIG_SYS_GBL_DATA_SIZE       128
 
 #define CONFIG_SYS_INIT_RAM_ADDR     0x40000000
-#define CONFIG_SYS_INIT_RAM_END      0x1000
-#define CONFIG_SYS_GBL_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE      0x1000
+#define CONFIG_SYS_GBL_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 
 #endif
 
index b69f015c7cd2c02e795c13d1bd794ec1e518c39f..c93b12ebf1c46f2191a72891f4f31b29700e265e 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x20000000
-#define CONFIG_SYS_INIT_RAM_END        0x1000  /* End of used area in internal SRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       64      /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x1000  /* Size of used area in internal SRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_ENV_IS_IN_FLASH 1
 #define CONFIG_SYS_CACHELINE_SIZE      16
 
 #define ICACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 8)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 8)
 #define DCACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 4)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 4)
 #define CONFIG_SYS_ICACHE_INV          (CF_CACR_DCM)
 #define CONFIG_SYS_CACHE_ACR1          (CONFIG_SYS_SDRAM_BASE | \
                                         CF_ADDRMASK(CONFIG_SYS_SDRAM_SIZE) | \
index ad86e2e23a3f01ed7a93a26c6dfa49c74c724a1f..feaadf3649b929b6de7e5e8645d3f63d0e6cdbe7 100644 (file)
 #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS  20
 
 /* List of I2C addresses to be verified by POST */
-#undef I2C_ADDR_LIST
-#define I2C_ADDR_LIST  {       CONFIG_SYS_I2C_EEPROM_ADDR,     \
-                               CONFIG_SYS_I2C_RTC_ADDR,        \
-                               CONFIG_SYS_I2C_SLAVE }
+#undef CONFIG_SYS_POST_I2C_ADDRS
+#define CONFIG_SYS_POST_I2C_ADDRS      {CONFIG_SYS_I2C_EEPROM_ADDR,    \
+                                        CONFIG_SYS_I2C_RTC_ADDR,       \
+                                        CONFIG_SYS_I2C_SLAVE}
 
 /*
  * Flash configuration
 #define CONFIG_SYS_INIT_RAM_ADDR       MPC5XXX_SRAM
 #ifdef CONFIG_POST
 /* preserve space for the post_word at end of on-chip SRAM */
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_POST_SIZE
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_POST_SIZE
 #else
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_SIZE
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_SIZE
 #endif
 
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE
index d849dbc2b9fc066b645555197a6de26f6ed11f94..72c652347f2a54882b4a63782aff9b58f814a794 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x2F00  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index ab1773c3659eb6acd96310a6efe3a8c4f5ed27f6..2267d59d750000596defa8695b0fce49ae25df35 100644 (file)
 
 /* Use SRAM until RAM will be available */
 #define CONFIG_SYS_INIT_RAM_ADDR       MPC5XXX_SRAM
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_SIZE       /* End of used area in DPRAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_SIZE       /* Size of used area in DPRAM */
 
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_BASE    CONFIG_SYS_TEXT_BASE
index a9d9bed1d316826249da1f93b30750e8f189bd1d..d6ea22d746495f0a0d9b90d52503ab0f2aa02981 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x2f00  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2f00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_VPD_SIZE       256 /* size in bytes reserved for vpd buffer */
 #define CONFIG_SYS_INIT_VPD_OFFSET     (CONFIG_SYS_GBL_DATA_OFFSET - CONFIG_SYS_INIT_VPD_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      (CONFIG_SYS_INIT_VPD_OFFSET-8)
index 2612c7a50ba28f9415a9b1ac7b23adec50152d4a..c11fe8a3557658d3216fbd728c6aa95b1b39bc8e 100644 (file)
 
 /* List of I2C addresses to be verified by POST */
 #if defined (CONFIG_MINIFAP)
-#undef I2C_ADDR_LIST
-#define I2C_ADDR_LIST  {       CONFIG_SYS_I2C_EEPROM_ADDR,     \
-                               CONFIG_SYS_I2C_HWMON_ADDR,      \
-                               CONFIG_SYS_I2C_SLAVE }
+#undef CONFIG_SYS_POST_I2C_ADDRS
+#define CONFIG_SYS_POST_I2C_ADDRS      {CONFIG_SYS_I2C_EEPROM_ADDR,    \
+                                        CONFIG_SYS_I2C_HWMON_ADDR,     \
+                                        CONFIG_SYS_I2C_SLAVE}
 #endif
 
 /*
 #define CONFIG_SYS_INIT_RAM_ADDR       MPC5XXX_SRAM
 #ifdef CONFIG_POST
 /* preserve space for the post_word at end of on-chip SRAM */
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_POST_SIZE
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_POST_SIZE
 #else
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_SIZE
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_SIZE
 #endif
 
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE
index b68d7a7bc112bf07280d7ccd033347fe13bf789c..f2a2e33664b2fee6becc49c172339f6e55b59f43 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 374300b1f69f09e5e34e9760e006e20a1184e930..f6b856c4b97945a084b02cfcd5c02a56ff8ca324 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 2104e03c22b90b40c991f93e2332edc058d0a262..36ecbd8b5227c1074f93497765cbdec452173c63 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x4000  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       128 /* size in bytes reserved for initial data*/
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000  /* Size of used area in DPRAM    */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 063ca230dba8a391153a26e5f68007c2317e5e37..d1d9e8e68d3fe2700bc51c5406de6596be35e91f 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x2000  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       128 /* size in bytes reserved for initial data*/
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2000  /* Size of used area in DPRAM    */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 36399caac5604dd42c4cd534f72a5a057c55915c..7c9dd79e3d2163d803f940cab137bdd522e83bfd 100644 (file)
 
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0x20000000      /* Initial RAM address */
-#define CONFIG_SYS_INIT_RAM_END        0x1000          /* End of used area in RAM*/
+#define CONFIG_SYS_INIT_RAM_SIZE       0x1000          /* Size of used area in RAM*/
 
-#define CONFIG_SYS_GBL_DATA_SIZE       0x100           /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_LEN         (384 * 1024) /* Reserve 384 kB = 3 sect. for Mon */
index c97bf66c9b298ab63c4ccb756c786bb7cfb6fd8c..6114bb0104822956c91d227aa25482c6a9217d4d 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 3e13f61ea598aa1e2b3e10289e91e060d5463428..3b520254a035e6f9daed6627b8217f700a820d71 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 1bc286148cd6aed90c1c00234fa87b34ff699743..fd90501e36a05128413c7855e4096edc2729475a 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 197ffdebeaa2c6f45fed2c7e61df011b971e2b13..3e3f6de20888d2c52ab0fab1c1472eb41195a3ad 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 59655b1c6fe0583a76c20453c3a687bcdb40fcad..890d6d9d4ccf6f0e0b67aa2c0981d5fddecbe12c 100644 (file)
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       (CONFIG_SYS_CCSRBAR \
                                 + 0x04010000)  /* Initial RAM address  */
-#define CONFIG_SYS_INIT_RAM_END        0x4000          /* End used area in RAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000          /* Size used area in RAM        */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* num bytes initial data       */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_LEN         (~CONFIG_SYS_TEXT_BASE + 1)/* Reserved for Monitor      */
  * General PCI
  * Addresses are mapped 1-1.
  */
-#define CONFIG_SYS_PCI1_MEM_BASE       0x80000000
-#define CONFIG_SYS_PCI1_MEM_PHYS       CONFIG_SYS_PCI1_MEM_BASE
+#define CONFIG_SYS_PCI1_MEM_BUS                0x80000000
+#define CONFIG_SYS_PCI1_MEM_PHYS       CONFIG_SYS_PCI1_MEM_BUS
 #define CONFIG_SYS_PCI1_MEM_SIZE       0x20000000      /* 512M                 */
-#define CONFIG_SYS_PCI1_IO_BASE        (CONFIG_SYS_CCSRBAR + 0x02000000)
-#define CONFIG_SYS_PCI1_IO_PHYS        CONFIG_SYS_PCI1_IO_BASE
+#define CONFIG_SYS_PCI1_IO_BUS (CONFIG_SYS_CCSRBAR + 0x02000000)
+#define CONFIG_SYS_PCI1_IO_PHYS        CONFIG_SYS_PCI1_IO_BUS
 #define CONFIG_SYS_PCI1_IO_SIZE        0x1000000       /*  16M                 */
 
 #ifdef CONFIG_PCIE1
  * Addresses are mapped 1-1.
  */
 #ifdef CONFIG_TQM_BIGFLASH
-#define CONFIG_SYS_PCIE1_MEM_BASE      0xb0000000
+#define CONFIG_SYS_PCIE1_MEM_BUS       0xb0000000
 #define CONFIG_SYS_PCIE1_MEM_SIZE      0x10000000      /* 512M                 */
-#define CONFIG_SYS_PCIE1_IO_BASE       0xaf000000
+#define CONFIG_SYS_PCIE1_IO_BUS                0xaf000000
 #else /* !CONFIG_TQM_BIGFLASH */
-#define CONFIG_SYS_PCIE1_MEM_BASE      0xc0000000
+#define CONFIG_SYS_PCIE1_MEM_BUS       0xc0000000
 #define CONFIG_SYS_PCIE1_MEM_SIZE      0x20000000      /* 512M                 */
-#define CONFIG_SYS_PCIE1_IO_BASE       0xef000000
+#define CONFIG_SYS_PCIE1_IO_BUS                0xef000000
 #endif /* CONFIG_TQM_BIGFLASH */
-#define CONFIG_SYS_PCIE1_MEM_PHYS      CONFIG_SYS_PCIE1_MEM_BASE
-#define CONFIG_SYS_PCIE1_IO_PHYS       CONFIG_SYS_PCIE1_IO_BASE
+#define CONFIG_SYS_PCIE1_MEM_PHYS      CONFIG_SYS_PCIE1_MEM_BUS
+#define CONFIG_SYS_PCIE1_IO_PHYS       CONFIG_SYS_PCIE1_IO_BUS
 #define CONFIG_SYS_PCIE1_IO_SIZE       0x1000000       /* 16M                  */
 #endif /* CONFIG_PCIE1 */
 
index d3d0db4f176c5d4a8d0e977e01ea18a3d7bf336d..cdf4885b8c99e94ae25987d1f48a6e78eee68cb5 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 0854d9544bf296e727223872feec7d4ef3aaefad..7ccc61470645df6ddec0f318cbc2e17fde6fe996 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index c247737d62e35a374fa3ee39c06fee2da42739fa..0082e71e3a2d94900fc709769ea04327f2c60d06 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 1b6d9cb73a5e39bd39a8236110c6849c287b97b3..6e891e7f1252d60bb75dca26982cbfa816eaabde 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index a5018d5836dfefef4b6bdcf5a320fcebde40655e..8636ff4c19e66c2f435e8335ee8352d1c4556d82 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x2F00  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 507fb2ffa746ec9726a9dae7a5f5e4551f414337..5204771e00335ccb40bc468e8aa1422b2d058b4f 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x2F00  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index c518d6e747d9da4197014fbc48406dfafff8cca2..717b5cdd804ade55dfd129d738f2c2da5d6f08dc 100644 (file)
 
 /* Use SRAM until RAM will be available */
 #define CONFIG_SYS_INIT_RAM_ADDR       MPC5XXX_SRAM
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_SIZE       /* End of used area in DPRAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_SIZE       /* Size of used area in DPRAM */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_BASE    CONFIG_SYS_TEXT_BASE
index ebc81c40034f5ff798cc08e349c34aa79520dc31..ebe9e424c329ff25419dc6fd21f899e7b50d3019 100644 (file)
  * Size of malloc() pool
  */
 /*#define CONFIG_MALLOC_SIZE   (CONFIG_ENV_SIZE + 128*1024)*/
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* size in bytes reserved for initial data */
 
 #define CONFIG_SYS_MONITOR_LEN         (256 * 1024)
 #define CONFIG_SYS_MALLOC_LEN          (1024 * 1024)   /* BUNZIP2 needs a lot of RAM */
index 026d2a4316700a56f28d71115764bd7051503860..f0c0bd9662c78917670059a1ef967ee05e3cb8da 100644 (file)
 #define CONFIG_SYS_OCM_DATA_ADDR       0xF8000000
 #define CONFIG_SYS_OCM_DATA_SIZE       0x1000
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR /* inside of SDRAM             */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE /* End of used area in RAM     */
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE /* Size of used area in RAM    */
 
-#define CONFIG_SYS_GBL_DATA_SIZE      128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index fddefb29ff86355dfa29d19b0ba11265550409a5..fec9df0da5ec390d82acaea5f8790d535cc214d1 100644 (file)
 #define CONFIG_SYS_OCM_DATA_ADDR       0xF8000000
 #define CONFIG_SYS_OCM_DATA_SIZE       0x1000
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR /* inside of SDRAM             */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE /* End of used area in RAM     */
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE /* Size of used area in RAM    */
 
-#define CONFIG_SYS_GBL_DATA_SIZE      128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*
index 6243afee0a919abf4cc1619fef4d1e1b0c5e0a19..c06909fccd7bae5900d517ec5028236a3e0e212b 100644 (file)
 
 /* definitions for initial stack pointer and data area (in DPRAM) */
 #define CONFIG_SYS_INIT_RAM_ADDR               CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END                0x2000
-#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_RAM_SIZE               0x2000
+#define CONFIG_SYS_GBL_DATA_OFFSET             (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET              CONFIG_SYS_GBL_DATA_OFFSET
 
 /*
index 9eacd82323afd2ac745be6bdf69642683a4e64d1..5d1c188499c3fd68e2b6457b426f6b06456f21e0 100644 (file)
  * Definitions for initial stack pointer and data area (in RAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR /* inside of SDRAM             */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE /* End of used area in RAM     */
-#define CONFIG_SYS_GBL_DATA_SIZE       64              /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE /* Size of used area in RAM    */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #if defined(CONFIG_CMD_KGDB)
index 6591d02bd26f45138f1f5d3819bd2e3a87737765..422a781a5cabb23a3c066f1e4461d64e653c4ec4 100644 (file)
  * Definitions for initial stack pointer and data area (in RAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR /* inside of SDRAM             */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE /* End of used area in RAM     */
-#define CONFIG_SYS_GBL_DATA_SIZE       64              /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE /* Size of used area in RAM    */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #if defined(CONFIG_CMD_KGDB)
index e23ad4170af01cc1737246d92d50ea8aeb992e00..027a904ee22d10b299a319d0ad44c77f4f988de7 100644 (file)
 #define CONFIG_SYS_OCM_DATA_ADDR       0xF8000000
 #define CONFIG_SYS_OCM_DATA_SIZE       0x1000
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR /* inside of SDRAM             */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE /* End of used area in RAM     */
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE /* Size of used area in RAM    */
 
-#define CONFIG_SYS_GBL_DATA_SIZE      128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
diff --git a/include/configs/XPEDITE1000.h b/include/configs/XPEDITE1000.h
deleted file mode 100644 (file)
index 5605849..0000000
+++ /dev/null
@@ -1,357 +0,0 @@
-/*
- * (C) Copyright 2002 Scott McNutt <smcnutt@artesyncp.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
- */
-
-/*
- * config for XPedite1000 from XES Inc.
- * Ported from EBONY config by Travis B. Sawyer <tsawyer@sandburst.com>
- * (C) Copyright 2003 Sandburst Corporation
- * board/config_EBONY.h - configuration for AMCC 440GP Ref (Ebony)
- */
-
-#ifndef __CONFIG_H
-#define __CONFIG_H
-
-/* High Level Configuration Options */
-#define CONFIG_XPEDITE1000     1
-#define CONFIG_SYS_BOARD_NAME  "XPedite1000"
-#define CONFIG_4xx             1               /* ... PPC4xx family */
-#define CONFIG_440             1
-#define CONFIG_440GX           1               /* 440 GX */
-#define CONFIG_BOARD_EARLY_INIT_F 1            /* Call board_pre_init  */
-#define CONFIG_SYS_CLK_FREQ    33333333        /* external freq to pll */
-
-#define        CONFIG_SYS_TEXT_BASE    0xFFF80000
-
-/*
- * DDR config
- */
-#define CONFIG_SPD_EEPROM              /* Use SPD EEPROM for setup */
-#define SPD_EEPROM_ADDRESS     {0x54}  /* SPD i2c spd addresses */
-#define CONFIG_VERY_BIG_RAM    1
-
-/*
- * Base addresses -- Note these are effective addresses where the
- * actual resources get mapped (not physical addresses)
- */
-#define CONFIG_SYS_SDRAM_BASE          0x00000000
-#define CONFIG_SYS_FLASH_BASE          0xff000000      /* start of FLASH */
-#define CONFIG_SYS_MONITOR_BASE                CONFIG_SYS_TEXT_BASE    /* start of monitor */
-#define CONFIG_SYS_PCI_MEMBASE         0x80000000      /* mapped pci memory */
-#define CONFIG_SYS_ISRAM_BASE          0xc0000000      /* internal SRAM */
-#define CONFIG_SYS_PCI_BASE            0xd0000000      /* internal PCI regs */
-#define CONFIG_SYS_NVRAM_BASE_ADDR     (CONFIG_SYS_PERIPHERAL_BASE + 0x08000000)
-#define CONFIG_SYS_GPIO_BASE           (CONFIG_SYS_PERIPHERAL_BASE + 0x00000700)
-
-/*
- * Diagnostics
- */
-#define CONFIG_SYS_ALT_MEMTEST
-#define CONFIG_SYS_MEMTEST_START       0x0400000
-#define CONFIG_SYS_MEMTEST_END         0x0C00000
-
-/* POST support */
-#define CONFIG_POST            (CONFIG_SYS_POST_RTC    | \
-                                CONFIG_SYS_POST_I2C)
-
-/*
- * LED support
- */
-#define USR_LED0       0x00000080
-#define USR_LED1       0x00000100
-#define USR_LED2       0x00000200
-#define USR_LED3       0x00000400
-
-#ifndef __ASSEMBLY__
-extern unsigned long in32(unsigned int);
-extern void out32(unsigned int, unsigned long);
-
-#define LED0_ON() out32(CONFIG_SYS_GPIO_BASE, (in32(CONFIG_SYS_GPIO_BASE) & ~USR_LED0))
-#define LED1_ON() out32(CONFIG_SYS_GPIO_BASE, (in32(CONFIG_SYS_GPIO_BASE) & ~USR_LED1))
-#define LED2_ON() out32(CONFIG_SYS_GPIO_BASE, (in32(CONFIG_SYS_GPIO_BASE) & ~USR_LED2))
-#define LED3_ON() out32(CONFIG_SYS_GPIO_BASE, (in32(CONFIG_SYS_GPIO_BASE) & ~USR_LED3))
-
-#define LED0_OFF() out32(CONFIG_SYS_GPIO_BASE, (in32(CONFIG_SYS_GPIO_BASE) | USR_LED0))
-#define LED1_OFF() out32(CONFIG_SYS_GPIO_BASE, (in32(CONFIG_SYS_GPIO_BASE) | USR_LED1))
-#define LED2_OFF() out32(CONFIG_SYS_GPIO_BASE, (in32(CONFIG_SYS_GPIO_BASE) | USR_LED2))
-#define LED3_OFF() out32(CONFIG_SYS_GPIO_BASE, (in32(CONFIG_SYS_GPIO_BASE) | USR_LED3))
-#endif
-
-/*
- * Use internal SRAM for initial stack
- */
-#define CONFIG_SYS_TEMP_STACK_OCM      1
-#define CONFIG_SYS_OCM_DATA_ADDR       CONFIG_SYS_ISRAM_BASE
-#define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_ISRAM_BASE   /* Initial RAM address */
-#define CONFIG_SYS_INIT_RAM_END                0x2000  /* End of used area in RAM */
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* num bytes initial data */
-#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 - 0x4)
-
-#define CONFIG_SYS_MONITOR_LEN (512 * 1024)    /* Reserve 512 KB for Mon */
-#define CONFIG_SYS_MALLOC_LEN  (1024 * 1024)   /* Reserved for malloc */
-
-/*
- * Serial Port
- */
-#define CONFIG_CONS_INDEX      1       /* Use UART0                    */
-#define CONFIG_SYS_NS16550
-#define CONFIG_SYS_NS16550_SERIAL
-#define CONFIG_SYS_NS16550_REG_SIZE    1
-#define CONFIG_SYS_NS16550_CLK         get_serial_clock()
-
-#define CONFIG_SYS_BAUDRATE_TABLE \
-       {300, 600, 1200, 2400, 4800, 9600, 19200, 38400}
-#define CONFIG_BAUDRATE                        115200
-#define CONFIG_LOADS_ECHO              1       /* echo on for serial download */
-#define CONFIG_SYS_LOADS_BAUD_CHANGE   1       /* allow baudrate change */
-
-/*
- * Use the HUSH parser
- */
-#define CONFIG_SYS_HUSH_PARSER
-#define CONFIG_SYS_PROMPT_HUSH_PS2     "> "
-
-/*
- * NOR flash configuration
- */
-#define CONFIG_SYS_MAX_FLASH_BANKS     3
-#define CONFIG_SYS_FLASH_BANKS_LIST    {CONFIG_SYS_FLASH_BASE, 0xf0000000, 0xf4000000 }
-#define CONFIG_SYS_MAX_FLASH_SECT      512     /* sectors per device */
-#define CONFIG_FLASH_CFI_DRIVER
-#define CONFIG_SYS_FLASH_CFI
-#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
-#define CONFIG_SYS_FLASH_QUIET_TEST            /* MirrorBit flashes are optional */
-#define CONFIG_SYS_FLASH_ERASE_TOUT    120000  /* Timeout for Flash Erase (in ms) */
-#define CONFIG_SYS_FLASH_WRITE_TOUT    500     /* Timeout for Flash Write (in ms) */
-
-/*
- * I2C
- */
-#define CONFIG_HARD_I2C                        1       /* I2C with hardware support */
-#define CONFIG_PPC4XX_I2C              /* use PPC4xx driver            */
-#define CONFIG_SYS_I2C_SPEED           400000  /* I2C speed and slave address */
-#define CONFIG_SYS_I2C_SLAVE           0x7f
-#define CONFIG_I2C_MULTI_BUS
-
-/* I2C EEPROM */
-#define CONFIG_SYS_I2C_EEPROM_ADDR             0x50
-#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN         1
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS      3
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS  10
-
-/* I2C RTC: STMicro M41T00 */
-#define CONFIG_RTC_M41T11              1
-#define CONFIG_SYS_I2C_RTC_ADDR                0x68
-#define CONFIG_SYS_M41T11_BASE_YEAR    2000
-
-/*
- * PCI
- */
-/* General PCI */
-#define CONFIG_PCI                             /* include pci support */
-#define CONFIG_PCI_PNP                         /* do pci plug-and-play */
-#define CONFIG_PCI_SCAN_SHOW                   /* show pci devices on startup */
-#define CONFIG_SYS_PCI_TARGBASE        0x80000000      /* PCIaddr mapped to CONFIG_SYS_PCI_MEMBASE */
-
-/* Board-specific PCI */
-#define CONFIG_SYS_PCI_TARGET_INIT             /* let board init pci target */
-#define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1014  /* IBM */
-#define CONFIG_SYS_PCI_SUBSYS_DEVICEID 0xcafe  /* Whatever */
-#define CONFIG_SYS_PCI_FORCE_PCI_CONV          /* Force PCI Conventional Mode */
-
-/*
- * Networking options
- */
-#define CONFIG_PPC4xx_EMAC
-#define CONFIG_PHY_GIGE                1       /* Include GbE speed/duplex detection */
-#define CONFIG_NET_MULTI       1
-#define CONFIG_MII             1       /* MII PHY management */
-#define CONFIG_PHY_RESET       1       /* reset phy upon startup */
-#define CONFIG_SYS_RX_ETH_BUFFER 32    /* Number of ethernet rx buffers & descriptors */
-#define CONFIG_ETHPRIME                "ppc_4xx_eth2"
-#define CONFIG_PHY_ADDR                4       /* PHY address phy0 not populated */
-#define CONFIG_PHY2_ADDR       4       /* PHY address phy2 */
-#define CONFIG_HAS_ETH2                1       /* add support for "eth2addr" */
-#define CONFIG_PHY3_ADDR       8       /* PHY address phy3 */
-#define CONFIG_HAS_ETH3                1       /* add support for "eth3addr" */
-
-/* BOOTP options */
-#define CONFIG_BOOTP_BOOTFILESIZE
-#define CONFIG_BOOTP_BOOTPATH
-#define CONFIG_BOOTP_GATEWAY
-#define CONFIG_BOOTP_HOSTNAME
-
-/*
- * Command configuration
- */
-#include <config_cmd_default.h>
-
-#define CONFIG_CMD_ASKENV
-#define CONFIG_CMD_DATE
-#define CONFIG_CMD_DHCP
-#define CONFIG_CMD_EEPROM
-#define CONFIG_CMD_ELF
-#define CONFIG_CMD_FLASH
-#define CONFIG_CMD_I2C
-#define CONFIG_CMD_IRQ
-#define CONFIG_CMD_JFFS2
-#define CONFIG_CMD_MII
-#define CONFIG_CMD_NET
-#define CONFIG_CMD_PCI
-#define CONFIG_CMD_PING
-#define CONFIG_CMD_SAVEENV
-#define CONFIG_CMD_SNTP
-
-/*
- * Miscellaneous configurable options
- */
-#define CONFIG_SYS_LONGHELP                    /* undef to save memory */
-#define CONFIG_SYS_LOAD_ADDR   0x100000        /* default load address */
-#define CONFIG_SYS_PROMPT      "=> "           /* Monitor Command Prompt */
-#define CONFIG_SYS_CBSIZE      256             /* Console I/O Buffer Size */
-#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
-#define CONFIG_SYS_MAXARGS     16              /* max number of command args */
-#define CONFIG_SYS_BARGSIZE    CONFIG_SYS_CBSIZE       /* Boot Argument Buffer Size */
-#define CONFIG_SYS_HZ          1000            /* decrementer freq: 1 ms ticks */
-#define CONFIG_CMDLINE_EDITING 1               /* Command-line editing */
-#define CONFIG_BOOTDELAY       3               /* -1 disables auto-boot */
-#define CONFIG_PANIC_HANG                      /* do not reset board on panic */
-#define CONFIG_PREBOOT                         /* enable preboot variable */
-#define CONFIG_FIT             1
-#define CONFIG_FIT_VERBOSE     1
-#define CONFIG_INTEGRITY                       /* support booting INTEGRITY OS */
-#define CONFIG_SYS_EXTBDINFO   1               /* To use extended board_into (bd_t) */
-
-/*
- * For booting Linux, the board info and command line data
- * have to be in the first 8 MB of memory, since this is
- * the maximum mapped by the Linux kernel during initialization.
- */
-#define CONFIG_SYS_BOOTMAPSZ           (8 << 20)       /* Initial Memory map for Linux */
-
-/*
- * Environment Configuration
- */
-#define CONFIG_ENV_IS_IN_FLASH 1
-#define CONFIG_ENV_SECT_SIZE   0x20000 /* 128k (one sector) for env */
-#define CONFIG_ENV_SIZE                0x8000
-#define CONFIG_ENV_ADDR                (CONFIG_SYS_MONITOR_BASE - (256 * 1024))
-
-/*
- * Flash memory map:
- * fff80000 - ffffffff U-Boot (512 KB)
- * fff40000 - fff7ffff U-Boot Environment (256 KB)
- * fff00000 - fff3ffff FDT (256KB)
- * ffc00000 - ffefffff OS image (3MB)
- * ff000000 - ffbfffff OS Use/Filesystem (12MB)
- */
-
-#define CONFIG_UBOOT_ENV_ADDR  MK_STR(CONFIG_SYS_TEXT_BASE)
-#define CONFIG_FDT_ENV_ADDR    MK_STR(0xfff00000)
-#define CONFIG_OS_ENV_ADDR     MK_STR(0xffc00000)
-
-#define CONFIG_PROG_UBOOT                                              \
-       "$download_cmd $loadaddr $ubootfile; "                          \
-       "if test $? -eq 0; then "                                       \
-               "protect off "CONFIG_UBOOT_ENV_ADDR" +80000; "          \
-               "erase "CONFIG_UBOOT_ENV_ADDR" +80000; "                \
-               "cp.w $loadaddr "CONFIG_UBOOT_ENV_ADDR" 40000; "        \
-               "protect on "CONFIG_UBOOT_ENV_ADDR" +80000; "           \
-               "cmp.b $loadaddr "CONFIG_UBOOT_ENV_ADDR" 80000; "       \
-               "if test $? -ne 0; then "                               \
-                       "echo PROGRAM FAILED; "                         \
-               "else; "                                                \
-                       "echo PROGRAM SUCCEEDED; "                      \
-               "fi; "                                                  \
-       "else; "                                                        \
-               "echo DOWNLOAD FAILED; "                                \
-       "fi;"
-
-#define CONFIG_BOOT_OS_NET                                             \
-       "$download_cmd $osaddr $osfile; "                               \
-       "if test $? -eq 0; then "                                       \
-               "if test -n $fdtaddr; then "                            \
-                       "$download_cmd $fdtaddr $fdtfile; "             \
-                       "if test $? -eq 0; then "                       \
-                               "bootm $osaddr - $fdtaddr; "            \
-                       "else; "                                        \
-                               "echo FDT DOWNLOAD FAILED; "            \
-                       "fi; "                                          \
-               "else; "                                                \
-                       "bootm $osaddr; "                               \
-               "fi; "                                                  \
-       "else; "                                                        \
-               "echo OS DOWNLOAD FAILED; "                             \
-       "fi;"
-
-#define CONFIG_PROG_OS                                                 \
-       "$download_cmd $osaddr $osfile; "                               \
-       "if test $? -eq 0; then "                                       \
-               "erase "CONFIG_OS_ENV_ADDR" +$filesize; "               \
-               "cp.b $osaddr "CONFIG_OS_ENV_ADDR" $filesize; "         \
-               "cmp.b $osaddr "CONFIG_OS_ENV_ADDR" $filesize; "        \
-               "if test $? -ne 0; then "                               \
-                       "echo OS PROGRAM FAILED; "                      \
-               "else; "                                                \
-                       "echo OS PROGRAM SUCCEEDED; "                   \
-               "fi; "                                                  \
-       "else; "                                                        \
-               "echo OS DOWNLOAD FAILED; "                             \
-       "fi;"
-
-#define CONFIG_PROG_FDT                                                        \
-       "$download_cmd $fdtaddr $fdtfile; "                             \
-       "if test $? -eq 0; then "                                       \
-               "erase "CONFIG_FDT_ENV_ADDR" +$filesize;"               \
-               "cp.b $fdtaddr "CONFIG_FDT_ENV_ADDR" $filesize; "       \
-               "cmp.b $fdtaddr "CONFIG_FDT_ENV_ADDR" $filesize; "      \
-               "if test $? -ne 0; then "                               \
-                       "echo FDT PROGRAM FAILED; "                     \
-               "else; "                                                \
-                       "echo FDT PROGRAM SUCCEEDED; "                  \
-               "fi; "                                                  \
-       "else; "                                                        \
-               "echo FDT DOWNLOAD FAILED; "                            \
-       "fi;"
-
-#define        CONFIG_EXTRA_ENV_SETTINGS                                       \
-       "autoload=yes\0"                                                \
-       "download_cmd=tftp\0"                                           \
-       "console_args=console=ttyS0,115200\0"                           \
-       "root_args=root=/dev/nfs rw\0"                                  \
-       "misc_args=ip=on\0"                                             \
-       "set_bootargs=setenv bootargs ${console_args} ${root_args} ${misc_args}\0" \
-       "bootfile=/home/user/file\0"                                    \
-       "osfile=/home/user/uImage-XPedite1000\0"                        \
-       "fdtfile=/home/user/xpedite1000.dtb\0"                          \
-       "ubootfile=/home/user/u-boot.bin\0"                             \
-       "fdtaddr=c00000\0"                                              \
-       "osaddr=0x1000000\0"                                            \
-       "loadaddr=0x1000000\0"                                          \
-       "prog_uboot="CONFIG_PROG_UBOOT"\0"                              \
-       "prog_os="CONFIG_PROG_OS"\0"                                    \
-       "prog_fdt="CONFIG_PROG_FDT"\0"                                  \
-       "bootcmd_net=run set_bootargs; "CONFIG_BOOT_OS_NET"\0"          \
-       "bootcmd_flash=run set_bootargs; "                              \
-               "bootm "CONFIG_OS_ENV_ADDR" - "CONFIG_FDT_ENV_ADDR"\0"  \
-       "bootcmd=run bootcmd_flash\0"
-#endif /* __CONFIG_H */
diff --git a/include/configs/XPEDITE5170.h b/include/configs/XPEDITE5170.h
deleted file mode 100644 (file)
index 1851997..0000000
+++ /dev/null
@@ -1,746 +0,0 @@
-/*
- * Copyright 2009 Extreme Engineering Solutions, Inc.
- * Copyright 2007-2008 Freescale Semiconductor, Inc.
- *
- * 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
- */
-
-/*
- * xpedite5170 board configuration file
- */
-#ifndef __CONFIG_H
-#define __CONFIG_H
-
-/*
- * High Level Configuration Options
- */
-#define CONFIG_MPC86xx         1       /* MPC86xx */
-#define CONFIG_MPC8641         1       /* MPC8641 specific */
-#define CONFIG_XPEDITE5140     1       /* MPC8641HPCN board specific */
-#define CONFIG_SYS_BOARD_NAME  "XPedite5170"
-#define CONFIG_LINUX_RESET_VEC 0x100   /* Reset vector used by Linux */
-#define CONFIG_BOARD_EARLY_INIT_R      /* Call board_pre_init */
-#define CONFIG_BAT_RW          1       /* Use common BAT rw code */
-#define CONFIG_HIGH_BATS       1       /* High BATs supported and enabled */
-#define CONFIG_ALTIVEC         1
-
-#define        CONFIG_SYS_TEXT_BASE    0xfff00000
-
-#define CONFIG_PCI             1       /* Enable PCI/PCIE */
-#define CONFIG_PCI_PNP         1       /* do pci plug-and-play */
-#define CONFIG_PCI_SCAN_SHOW   1       /* show pci devices on startup */
-#define CONFIG_PCIE1           1       /* PCIE controler 1 */
-#define CONFIG_PCIE2           1       /* PCIE controler 2 */
-#define CONFIG_FSL_PCI_INIT    1       /* Use common FSL init code */
-#define CONFIG_SYS_PCI_64BIT   1       /* enable 64-bit PCI resources */
-#define CONFIG_FSL_LAW         1       /* Use common FSL init code */
-
-/*
- * DDR config
- */
-#define CONFIG_FSL_DDR2
-#define CONFIG_SPD_EEPROM              /* Use SPD EEPROM for DDR setup */
-#define CONFIG_DDR_SPD
-#define CONFIG_MEM_INIT_VALUE          0xdeadbeef
-#define SPD_EEPROM_ADDRESS1            0x54    /* Both channels use the */
-#define SPD_EEPROM_ADDRESS2            0x54    /* same SPD data         */
-#define SPD_EEPROM_OFFSET              0x200   /* OFFSET of SPD in EEPROM */
-#define CONFIG_NUM_DDR_CONTROLLERS     2
-#define CONFIG_DIMM_SLOTS_PER_CTLR     1
-#define CONFIG_CHIP_SELECTS_PER_CTRL   1
-#define CONFIG_DDR_ECC
-#define CONFIG_ECC_INIT_VIA_DDRCONTROLLER
-#define CONFIG_SYS_DDR_SDRAM_BASE      0x00000000      /* DDR is system memory*/
-#define CONFIG_SYS_SDRAM_BASE          CONFIG_SYS_DDR_SDRAM_BASE
-#define CONFIG_VERY_BIG_RAM
-#define CONFIG_SYS_MAX_DDR_BAT_SIZE    0x80000000      /* BAT mapping size */
-
-/*
- * virtual address to be used for temporary mappings.  There
- * should be 128k free at this VA.
- */
-#define CONFIG_SYS_SCRATCH_VA  0xe0000000
-
-#ifndef __ASSEMBLY__
-extern unsigned long get_board_sys_clk(unsigned long dummy);
-#endif
-
-#define CONFIG_SYS_CLK_FREQ    get_board_sys_clk(0) /* sysclk for MPC86xx */
-
-/*
- * L2CR setup
- */
-#define CONFIG_SYS_L2
-#define L2_INIT                0
-#define L2_ENABLE      (L2CR_L2E)
-
-/*
- * Base addresses -- Note these are effective addresses where the
- * actual resources get mapped (not physical addresses)
- */
-#define CONFIG_SYS_CCSRBAR_DEFAULT     0xff700000      /* CCSRBAR Default */
-#define CONFIG_SYS_CCSRBAR             0xef000000      /* relocated CCSRBAR */
-#define CONFIG_SYS_CCSRBAR_PHYS                CONFIG_SYS_CCSRBAR
-#define CONFIG_SYS_CCSRBAR_PHYS_LOW    CONFIG_SYS_CCSRBAR
-#define CONFIG_SYS_CCSRBAR_PHYS_HIGH   0x0
-#define CONFIG_SYS_IMMR                        CONFIG_SYS_CCSRBAR
-
-/*
- * Diagnostics
- */
-#define CONFIG_SYS_ALT_MEMTEST
-#define CONFIG_SYS_MEMTEST_START       0x10000000
-#define CONFIG_SYS_MEMTEST_END         0x20000000
-
-/*
- * Memory map
- * 0x0000_0000 0x7fff_ffff     DDR                     2G Cacheable
- * 0x8000_0000 0xbfff_ffff     PCIe1 Mem               1G non-cacheable
- * 0xc000_0000 0xcfff_ffff     PCIe2 Mem               256M non-cacheable
- * 0xe000_0000 0xe7ff_ffff     SRAM/SSRAM/L1 Cache     128M non-cacheable
- * 0xe800_0000 0xe87f_ffff     PCIe1 IO                8M non-cacheable
- * 0xe880_0000 0xe8ff_ffff     PCIe2 IO                8M non-cacheable
- * 0xef00_0000 0xef0f_ffff     CCSR/IMMR               1M non-cacheable
- * 0xef80_0000 0xef8f_ffff     NAND Flash              1M non-cacheable
- * 0xf000_0000 0xf7ff_ffff     NOR Flash 2             128M non-cacheable
- * 0xf800_0000 0xffff_ffff     NOR Flash 1             128M non-cacheable
- */
-
-#define CONFIG_SYS_LBC_LCRR            (LCRR_CLKDIV_4 | LCRR_EADC_3)
-
-/*
- * NAND flash configuration
- */
-#define CONFIG_SYS_NAND_BASE           0xef800000
-#define CONFIG_SYS_NAND_BASE2          0xef840000      /* Unused at this time */
-#define CONFIG_SYS_NAND_BASE_LIST      {CONFIG_SYS_NAND_BASE, CONFIG_SYS_NAND_BASE2}
-#define CONFIG_SYS_MAX_NAND_DEVICE     2
-#define CONFIG_NAND_ACTL
-#define CONFIG_SYS_NAND_ACTL_ALE       (1 << 14)       /* C_LA14 */
-#define CONFIG_SYS_NAND_ACTL_CLE       (1 << 15)       /* C_LA15 */
-#define CONFIG_SYS_NAND_ACTL_NCE       0               /* NCE not controlled by ADDR */
-#define CONFIG_SYS_NAND_ACTL_DELAY     25
-#define CONFIG_SYS_NAND_QUIET_TEST
-#define CONFIG_JFFS2_NAND
-
-/*
- * NOR flash configuration
- */
-#define CONFIG_SYS_FLASH_BASE          0xf8000000
-#define CONFIG_SYS_FLASH_BASE2         0xf0000000
-#define CONFIG_SYS_FLASH_BANKS_LIST    {CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FLASH_BASE2}
-#define CONFIG_SYS_MAX_FLASH_BANKS     2               /* number of banks */
-#define CONFIG_SYS_MAX_FLASH_SECT      1024            /* sectors per device */
-#define CONFIG_SYS_FLASH_ERASE_TOUT    60000           /* Flash Erase Timeout (ms) */
-#define CONFIG_SYS_FLASH_WRITE_TOUT    500             /* Flash Write Timeout (ms) */
-#define CONFIG_FLASH_CFI_DRIVER
-#define CONFIG_SYS_FLASH_CFI
-#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
-#define CONFIG_SYS_FLASH_AUTOPROTECT_LIST      { {0xfff00000, 0xc0000}, \
-                                                 {0xf7f00000, 0xc0000} }
-#define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE    /* start of monitor */
-#define CONFIG_SYS_MONITOR_BASE_EARLY  0xfff00000      /* early monitor loc */
-
-/*
- * Chip select configuration
- */
-/* NOR Flash 0 on CS0 */
-#define CONFIG_SYS_BR0_PRELIM  (CONFIG_SYS_FLASH_BASE  |\
-                                BR_PS_16               |\
-                                BR_V)
-#define CONFIG_SYS_OR0_PRELIM  (OR_AM_128MB            |\
-                                OR_GPCM_CSNT           |\
-                                OR_GPCM_XACS           |\
-                                OR_GPCM_ACS_DIV2       |\
-                                OR_GPCM_SCY_8          |\
-                                OR_GPCM_TRLX           |\
-                                OR_GPCM_EHTR           |\
-                                OR_GPCM_EAD)
-
-/* NOR Flash 1 on CS1 */
-#define CONFIG_SYS_BR1_PRELIM  (CONFIG_SYS_FLASH_BASE2 |\
-                                BR_PS_16               |\
-                                BR_V)
-#define CONFIG_SYS_OR1_PRELIM  CONFIG_SYS_OR0_PRELIM
-
-/* NAND flash on CS2 */
-#define CONFIG_SYS_BR2_PRELIM  (CONFIG_SYS_NAND_BASE   |\
-                                BR_PS_8                |\
-                                BR_V)
-#define CONFIG_SYS_OR2_PRELIM  (OR_AM_256KB            |\
-                                OR_GPCM_BCTLD          |\
-                                OR_GPCM_CSNT           |\
-                                OR_GPCM_ACS_DIV4       |\
-                                OR_GPCM_SCY_4          |\
-                                OR_GPCM_TRLX           |\
-                                OR_GPCM_EHTR)
-
-/* Optional NAND flash on CS3 */
-#define CONFIG_SYS_BR3_PRELIM  (CONFIG_SYS_NAND_BASE2  |\
-                                BR_PS_8                |\
-                                BR_V)
-#define CONFIG_SYS_OR3_PRELIM  CONFIG_SYS_OR2_PRELIM
-
-/*
- * Use L1 as initial stack
- */
-#define CONFIG_SYS_INIT_RAM_LOCK       1
-#define CONFIG_SYS_INIT_RAM_ADDR       0xe0000000
-#define CONFIG_SYS_INIT_RAM_END                0x00004000
-
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* num bytes initial data */
-#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_LEN         (512 * 1024)    /* Reserve 512 KB for Mon */
-#define CONFIG_SYS_MALLOC_LEN          (1024 * 1024)   /* Reserved for malloc */
-
-/*
- * Serial Port
- */
-#define CONFIG_CONS_INDEX              1
-#define CONFIG_SYS_NS16550
-#define CONFIG_SYS_NS16550_SERIAL
-#define CONFIG_SYS_NS16550_REG_SIZE    1
-#define CONFIG_SYS_NS16550_CLK         get_bus_freq(0)
-#define CONFIG_SYS_NS16550_COM1        (CONFIG_SYS_CCSRBAR+0x4500)
-#define CONFIG_SYS_NS16550_COM2        (CONFIG_SYS_CCSRBAR+0x4600)
-#define CONFIG_SYS_BAUDRATE_TABLE      \
-       {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200}
-#define CONFIG_BAUDRATE                        115200
-#define CONFIG_LOADS_ECHO              1       /* echo on for serial download */
-#define CONFIG_SYS_LOADS_BAUD_CHANGE   1       /* allow baudrate change */
-
-/*
- * Use the HUSH parser
- */
-#define CONFIG_SYS_HUSH_PARSER
-#define CONFIG_SYS_PROMPT_HUSH_PS2     "> "
-
-/*
- * Pass open firmware flat tree
- */
-#define CONFIG_OF_LIBFDT               1
-#define CONFIG_OF_BOARD_SETUP          1
-#define CONFIG_OF_STDOUT_VIA_ALIAS     1
-
-/*
- * I2C
- */
-#define CONFIG_FSL_I2C                         /* Use FSL common I2C driver */
-#define CONFIG_HARD_I2C                                /* I2C with hardware support */
-#define CONFIG_SYS_I2C_SPEED           100000  /* M41T00 only supports 100 KHz */
-#define CONFIG_SYS_I2C_SLAVE           0x7F
-#define CONFIG_SYS_I2C_OFFSET          0x3000
-#define CONFIG_SYS_I2C2_OFFSET         0x3100
-#define CONFIG_I2C_MULTI_BUS
-
-/* PEX8518 slave I2C interface */
-#define CONFIG_SYS_I2C_PEX8518_ADDR    0x70
-
-/* I2C DS1631 temperature sensor */
-#define CONFIG_SYS_I2C_DS1621_ADDR     0x48
-#define CONFIG_DTT_DS1621
-#define CONFIG_DTT_SENSORS             { 0 }
-
-/* I2C EEPROM - AT24C128B */
-#define CONFIG_SYS_I2C_EEPROM_ADDR             0x54
-#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN         2
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS      6       /* 64 byte pages */
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS  10      /* take up to 10 msec */
-
-/* I2C RTC */
-#define CONFIG_RTC_M41T11              1
-#define CONFIG_SYS_I2C_RTC_ADDR                0x68
-#define CONFIG_SYS_M41T11_BASE_YEAR    2000
-
-/* GPIO/EEPROM/SRAM */
-#define CONFIG_DS4510
-#define CONFIG_SYS_I2C_DS4510_ADDR     0x51
-
-/* GPIO */
-#define CONFIG_PCA953X
-#define CONFIG_SYS_I2C_PCA953X_ADDR0   0x18
-#define CONFIG_SYS_I2C_PCA953X_ADDR1   0x1c
-#define CONFIG_SYS_I2C_PCA953X_ADDR2   0x1e
-#define CONFIG_SYS_I2C_PCA953X_ADDR3   0x1f
-#define CONFIG_SYS_I2C_PCA953X_ADDR    CONFIG_SYS_I2C_PCA953X_ADDR0
-
-/*
- * PU = pulled high, PD = pulled low
- * I = input, O = output, IO = input/output
- */
-/* PCA9557 @ 0x18*/
-#define CONFIG_SYS_PCA953X_C0_SER0_EN          0x01 /* PU; UART0 enable (1: enabled) */
-#define CONFIG_SYS_PCA953X_C0_SER0_MODE                0x02 /* PU; UART0 serial mode select */
-#define CONFIG_SYS_PCA953X_C0_SER1_EN          0x04 /* PU; UART1 enable (1: enabled) */
-#define CONFIG_SYS_PCA953X_C0_SER1_MODE                0x08 /* PU; UART1 serial mode select */
-#define CONFIG_SYS_PCA953X_C0_FLASH_PASS_CS    0x10 /* PU; Boot flash CS select */
-#define CONFIG_SYS_PCA953X_NVM_WP              0x20 /* PU; Set to 0 to enable NVM writing */
-
-/* PCA9557 @ 0x1c*/
-#define CONFIG_SYS_PCA953X_XMC0_ROOT0          0x01 /* PU; Low if XMC is RC */
-#define CONFIG_SYS_PCA953X_PLUG_GPIO0          0x02 /* Samtec connector GPIO */
-#define CONFIG_SYS_PCA953X_XMC0_WAKE           0x04 /* PU; XMC wake */
-#define CONFIG_SYS_PCA953X_XMC0_BIST           0x08 /* PU; XMC built in self test */
-#define CONFIG_SYS_PCA953X_XMC_PRESENT         0x10 /* PU; Low if XMC module installed */
-#define CONFIG_SYS_PCA953X_PMC_PRESENT         0x20 /* PU; Low if PMC module installed */
-#define CONFIG_SYS_PCA953X_PMC0_MONARCH                0x40 /* PMC monarch mode enable */
-#define CONFIG_SYS_PCA953X_PMC0_EREADY         0x80 /* PU; PMC PCI eready */
-
-/* PCA9557 @ 0x1e*/
-#define CONFIG_SYS_PCA953X_P0_GA0              0x01 /* PU; VPX Geographical address */
-#define CONFIG_SYS_PCA953X_P0_GA1              0x02 /* PU; VPX Geographical address */
-#define CONFIG_SYS_PCA953X_P0_GA2              0x04 /* PU; VPX Geographical address */
-#define CONFIG_SYS_PCA953X_P0_GA3              0x08 /* PU; VPX Geographical address */
-#define CONFIG_SYS_PCA953X_P0_GA4              0x10 /* PU; VPX Geographical address */
-#define CONFIG_SYS_PCA953X_P0_GAP              0x20 /* PU; VPX Geographical address parity */
-#define CONFIG_SYS_PCA953X_P1_SYSEN            0x80 /* PU; VPX P1 SYSCON */
-
-/* PCA9557 @ 0x1f */
-#define CONFIG_SYS_PCA953X_VPX_GPIO0           0x01 /* PU; VPX P15 GPIO */
-#define CONFIG_SYS_PCA953X_VPX_GPIO1           0x02 /* PU; VPX P15 GPIO */
-#define CONFIG_SYS_PCA953X_VPX_GPIO2           0x04 /* PU; VPX P15 GPIO */
-#define CONFIG_SYS_PCA953X_VPX_GPIO3           0x08 /* PU; VPX P15 GPIO */
-
-/*
- * General PCI
- * Memory space is mapped 1-1, but I/O space must start from 0.
- */
-/* PCIE1 - PEX8518 */
-#define CONFIG_SYS_PCIE1_MEM_BASE      0x80000000
-#define CONFIG_SYS_PCIE1_MEM_PHYS      CONFIG_SYS_PCIE1_MEM_BASE
-#define CONFIG_SYS_PCIE1_MEM_SIZE      0x40000000      /* 1G */
-#define CONFIG_SYS_PCIE1_IO_BASE       0x00000000
-#define CONFIG_SYS_PCIE1_IO_PHYS       0xe8000000
-#define CONFIG_SYS_PCIE1_IO_SIZE       0x00800000      /* 8M */
-
-/* PCIE2 - VPX P1 */
-#define CONFIG_SYS_PCIE2_MEM_BASE      0xc0000000
-#define CONFIG_SYS_PCIE2_MEM_PHYS      CONFIG_SYS_PCIE2_MEM_BASE
-#define CONFIG_SYS_PCIE2_MEM_SIZE      0x10000000      /* 256M */
-#define CONFIG_SYS_PCIE2_IO_BASE       0x00000000
-#define CONFIG_SYS_PCIE2_IO_PHYS       0xe8800000
-#define CONFIG_SYS_PCIE2_IO_SIZE       0x00800000      /* 8M */
-
-/*
- * Networking options
- */
-#define CONFIG_TSEC_ENET               /* tsec ethernet support */
-#define CONFIG_PHY_GIGE                1       /* Include GbE speed/duplex detection */
-#define CONFIG_NET_MULTI       1
-#define CONFIG_MII             1       /* MII PHY management */
-#define CONFIG_ETHPRIME                "eTSEC1"
-
-#define CONFIG_TSEC1           1
-#define CONFIG_TSEC1_NAME      "eTSEC1"
-#define TSEC1_FLAGS            (TSEC_GIGABIT | TSEC_REDUCED)
-#define TSEC1_PHY_ADDR         1
-#define TSEC1_PHYIDX           0
-#define CONFIG_HAS_ETH0
-
-#define CONFIG_TSEC2           1
-#define CONFIG_TSEC2_NAME      "eTSEC2"
-#define TSEC2_FLAGS            (TSEC_GIGABIT | TSEC_REDUCED)
-#define TSEC2_PHY_ADDR         2
-#define TSEC2_PHYIDX           0
-#define CONFIG_HAS_ETH1
-
-/*
- * BAT mappings
- */
-#if (CONFIG_SYS_CCSRBAR_DEFAULT != CONFIG_SYS_CCSRBAR)
-#define CONFIG_SYS_CCSR_DEFAULT_DBATL  (CONFIG_SYS_CCSRBAR_DEFAULT     |\
-                                        BATL_PP_RW                     |\
-                                        BATL_CACHEINHIBIT              |\
-                                        BATL_GUARDEDSTORAGE)
-#define CONFIG_SYS_CCSR_DEFAULT_DBATU  (CONFIG_SYS_CCSRBAR_DEFAULT     |\
-                                        BATU_BL_1M                     |\
-                                        BATU_VS                        |\
-                                        BATU_VP)
-#define CONFIG_SYS_CCSR_DEFAULT_IBATL  (CONFIG_SYS_CCSRBAR_DEFAULT     |\
-                                        BATL_PP_RW                     |\
-                                        BATL_CACHEINHIBIT)
-#define CONFIG_SYS_CCSR_DEFAULT_IBATU  CONFIG_SYS_CCSR_DEFAULT_DBATU
-#endif
-
-/*
- * BAT0                2G      Cacheable, non-guarded
- * 0x0000_0000 2G      DDR
- */
-#define CONFIG_SYS_DBAT0L      (BATL_PP_RW | BATL_MEMCOHERENCE)
-#define CONFIG_SYS_DBAT0U      (BATU_BL_2G | BATU_VS | BATU_VP)
-#define CONFIG_SYS_IBAT0L      (BATL_PP_RW | BATL_MEMCOHERENCE)
-#define CONFIG_SYS_IBAT0U      CONFIG_SYS_DBAT0U
-
-/*
- * BAT1                1G      Cache-inhibited, guarded
- * 0x8000_0000 1G      PCI-Express 1 Memory
- */
-#define CONFIG_SYS_DBAT1L      (CONFIG_SYS_PCIE1_MEM_PHYS      |\
-                                BATL_PP_RW                     |\
-                                BATL_CACHEINHIBIT              |\
-                                BATL_GUARDEDSTORAGE)
-#define CONFIG_SYS_DBAT1U      (CONFIG_SYS_PCIE1_MEM_PHYS      |\
-                                BATU_BL_1G                     |\
-                                BATU_VS                        |\
-                                BATU_VP)
-#define CONFIG_SYS_IBAT1L      (CONFIG_SYS_PCIE1_MEM_PHYS      |\
-                                BATL_PP_RW                     |\
-                                BATL_CACHEINHIBIT)
-#define CONFIG_SYS_IBAT1U      CONFIG_SYS_DBAT1U
-
-/*
- * BAT2                512M    Cache-inhibited, guarded
- * 0xc000_0000 512M    PCI-Express 2 Memory
- */
-#define CONFIG_SYS_DBAT2L      (CONFIG_SYS_PCIE2_MEM_PHYS      |\
-                                BATL_PP_RW                     |\
-                                BATL_CACHEINHIBIT              |\
-                                BATL_GUARDEDSTORAGE)
-#define CONFIG_SYS_DBAT2U      (CONFIG_SYS_PCIE2_MEM_PHYS      |\
-                                BATU_BL_512M                   |\
-                                BATU_VS                        |\
-                                BATU_VP)
-#define CONFIG_SYS_IBAT2L      (CONFIG_SYS_PCIE2_MEM_PHYS      |\
-                                BATL_PP_RW                     |\
-                                BATL_CACHEINHIBIT)
-#define CONFIG_SYS_IBAT2U      CONFIG_SYS_DBAT2U
-
-/*
- * BAT3                1M      Cache-inhibited, guarded
- * 0xe000_0000 1M      CCSR
- */
-#define CONFIG_SYS_DBAT3L      (CONFIG_SYS_CCSRBAR             |\
-                                BATL_PP_RW                     |\
-                                BATL_CACHEINHIBIT              |\
-                                BATL_GUARDEDSTORAGE)
-#define CONFIG_SYS_DBAT3U      (CONFIG_SYS_CCSRBAR             |\
-                                BATU_BL_1M                     |\
-                                BATU_VS                        |\
-                                BATU_VP)
-#define CONFIG_SYS_IBAT3L      (CONFIG_SYS_CCSRBAR             |\
-                                BATL_PP_RW                     |\
-                                BATL_CACHEINHIBIT)
-#define CONFIG_SYS_IBAT3U      CONFIG_SYS_DBAT3U
-
-/*
- * BAT4                32M     Cache-inhibited, guarded
- * 0xe200_0000 16M     PCI-Express 1 I/O
- * 0xe300_0000 16M     PCI-Express 2 I/0
- */
-#define CONFIG_SYS_DBAT4L      (CONFIG_SYS_PCIE1_IO_PHYS       |\
-                                BATL_PP_RW                     |\
-                                BATL_CACHEINHIBIT              |\
-                                BATL_GUARDEDSTORAGE)
-#define CONFIG_SYS_DBAT4U      (CONFIG_SYS_PCIE1_IO_PHYS       |\
-                                BATU_BL_32M                    |\
-                                BATU_VS                        |\
-                                BATU_VP)
-#define CONFIG_SYS_IBAT4L      (CONFIG_SYS_PCIE1_IO_PHYS       |\
-                                BATL_PP_RW                     |\
-                                BATL_CACHEINHIBIT)
-#define CONFIG_SYS_IBAT4U      CONFIG_SYS_DBAT4U
-
-/*
- * BAT5                128K    Cacheable, non-guarded
- * 0xe400_1000 128K    Init RAM for stack in the CPU DCache (no backing memory)
- */
-#define CONFIG_SYS_DBAT5L      (CONFIG_SYS_INIT_RAM_ADDR       |\
-                                BATL_PP_RW                     |\
-                                BATL_MEMCOHERENCE)
-#define CONFIG_SYS_DBAT5U      (CONFIG_SYS_INIT_RAM_ADDR       |\
-                                BATU_BL_128K                   |\
-                                BATU_VS                        |\
-                                BATU_VP)
-#define CONFIG_SYS_IBAT5L      CONFIG_SYS_DBAT5L
-#define CONFIG_SYS_IBAT5U      CONFIG_SYS_DBAT5U
-
-/*
- * BAT6                256M    Cache-inhibited, guarded
- * 0xf000_0000 256M    FLASH
- */
-#define CONFIG_SYS_DBAT6L      (CONFIG_SYS_FLASH_BASE2         |\
-                                BATL_PP_RW                     |\
-                                BATL_CACHEINHIBIT              |\
-                                BATL_GUARDEDSTORAGE)
-#define CONFIG_SYS_DBAT6U      (CONFIG_SYS_FLASH_BASE          |\
-                                BATU_BL_256M                   |\
-                                BATU_VS                        |\
-                                BATU_VP)
-#define CONFIG_SYS_IBAT6L      (CONFIG_SYS_FLASH_BASE          |\
-                                BATL_PP_RW                     |\
-                                BATL_MEMCOHERENCE)
-#define CONFIG_SYS_IBAT6U      CONFIG_SYS_DBAT6U
-
-/* Map the last 1M of flash where we're running from reset */
-#define CONFIG_SYS_DBAT6L_EARLY        (CONFIG_SYS_MONITOR_BASE_EARLY  |\
-                                BATL_PP_RW                     |\
-                                BATL_CACHEINHIBIT              |\
-                                BATL_GUARDEDSTORAGE)
-#define CONFIG_SYS_DBAT6U_EARLY        (CONFIG_SYS_TEXT_BASE                   |\
-                                BATU_BL_1M                     |\
-                                BATU_VS                        |\
-                                BATU_VP)
-#define CONFIG_SYS_IBAT6L_EARLY        (CONFIG_SYS_MONITOR_BASE_EARLY  |\
-                                BATL_PP_RW                     |\
-                                BATL_MEMCOHERENCE)
-#define CONFIG_SYS_IBAT6U_EARLY        CONFIG_SYS_DBAT6U_EARLY
-
-/*
- * BAT7                64M     Cache-inhibited, guarded
- * 0xe800_0000 64K     NAND FLASH
- * 0xe804_0000 128K    DUART Registers
- */
-#define CONFIG_SYS_DBAT7L      (CONFIG_SYS_NAND_BASE           |\
-                                BATL_PP_RW                     |\
-                                BATL_CACHEINHIBIT              |\
-                                BATL_GUARDEDSTORAGE)
-#define CONFIG_SYS_DBAT7U      (CONFIG_SYS_NAND_BASE           |\
-                                BATU_BL_512K                   |\
-                                BATU_VS                        |\
-                                BATU_VP)
-#define CONFIG_SYS_IBAT7L      (CONFIG_SYS_NAND_BASE           |\
-                                BATL_PP_RW                     |\
-                                BATL_CACHEINHIBIT)
-#define CONFIG_SYS_IBAT7U      CONFIG_SYS_DBAT7U
-
-/*
- * Command configuration.
- */
-#include <config_cmd_default.h>
-
-#define CONFIG_CMD_ASKENV
-#define CONFIG_CMD_DATE
-#define CONFIG_CMD_DHCP
-#define CONFIG_CMD_DS4510
-#define CONFIG_CMD_DS4510_INFO
-#define CONFIG_CMD_DTT
-#define CONFIG_CMD_EEPROM
-#define CONFIG_CMD_ELF
-#define CONFIG_CMD_SAVEENV
-#define CONFIG_CMD_FLASH
-#define CONFIG_CMD_I2C
-#define CONFIG_CMD_IRQ
-#define CONFIG_CMD_JFFS2
-#define CONFIG_CMD_MII
-#define CONFIG_CMD_NAND
-#define CONFIG_CMD_NET
-#define CONFIG_CMD_PCA953X
-#define CONFIG_CMD_PCA953X_INFO
-#define CONFIG_CMD_PCI
-#define CONFIG_CMD_PING
-#define CONFIG_CMD_REGINFO
-#define CONFIG_CMD_SNTP
-
-/*
- * Miscellaneous configurable options
- */
-#define CONFIG_SYS_LONGHELP                    /* undef to save memory */
-#define CONFIG_SYS_LOAD_ADDR   0x2000000       /* default load address */
-#define CONFIG_SYS_PROMPT      "=> "           /* Monitor Command Prompt */
-#define CONFIG_SYS_CBSIZE      256             /* Console I/O Buffer Size */
-#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
-#define CONFIG_SYS_MAXARGS     16              /* max number of command args */
-#define CONFIG_SYS_BARGSIZE    CONFIG_SYS_CBSIZE       /* Boot Argument Buffer Size */
-#define CONFIG_SYS_HZ          1000            /* decrementer freq: 1ms ticks */
-#define CONFIG_CMDLINE_EDITING 1               /* Command-line editing */
-#define CONFIG_LOADADDR                0x1000000       /* default location for tftp and bootm */
-#define CONFIG_BOOTDELAY       3               /* -1 disables auto-boot */
-#define CONFIG_PANIC_HANG                      /* do not reset board on panic */
-#define CONFIG_PREBOOT                         /* enable preboot variable */
-#define CONFIG_FIT             1
-#define CONFIG_FIT_VERBOSE     1
-#define CONFIG_INTEGRITY                       /* support booting INTEGRITY OS */
-
-/*
- * For booting Linux, the board info and command line data
- * have to be in the first 16 MB of memory, since this is
- * the maximum mapped by the Linux kernel during initialization.
- */
-#define CONFIG_SYS_BOOTMAPSZ   (16 << 20)      /* Initial Memory map for Linux*/
-#define CONFIG_SYS_BOOTM_LEN   (16 << 20)      /* Increase max gunzip size */
-
-/*
- * Environment Configuration
- */
-#define CONFIG_ENV_IS_IN_FLASH 1
-#define CONFIG_ENV_SECT_SIZE   0x20000         /* 128k (one sector) for env */
-#define CONFIG_ENV_SIZE                0x8000
-#define CONFIG_ENV_ADDR                (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
-
-/*
- * Flash memory map:
- * fffc0000 - ffffffff Pri FDT (256KB)
- * fff80000 - fffbffff Pri U-Boot Environment (256 KB)
- * fff00000 - fff7ffff Pri U-Boot (512 KB)
- * fef00000 - ffefffff Pri OS image (16MB)
- * f8000000 - feefffff Pri OS Use/Filesystem (111MB)
- *
- * f7fc0000 - f7ffffff Sec FDT (256KB)
- * f7f80000 - f7fbffff Sec U-Boot Environment (256 KB)
- * f7f00000 - f7f7ffff Sec U-Boot (512 KB)
- * f6f00000 - f7efffff Sec OS image (16MB)
- * f0000000 - f6efffff Sec OS Use/Filesystem (111MB)
- */
-#define CONFIG_UBOOT1_ENV_ADDR MK_STR(0xfff00000)
-#define CONFIG_UBOOT2_ENV_ADDR MK_STR(0xf7f00000)
-#define CONFIG_FDT1_ENV_ADDR   MK_STR(0xfffc0000)
-#define CONFIG_FDT2_ENV_ADDR   MK_STR(0xf7fc0000)
-#define CONFIG_OS1_ENV_ADDR    MK_STR(0xfef00000)
-#define CONFIG_OS2_ENV_ADDR    MK_STR(0xf6f00000)
-
-#define CONFIG_PROG_UBOOT1                                             \
-       "$download_cmd $loadaddr $ubootfile; "                          \
-       "if test $? -eq 0; then "                                       \
-               "protect off "CONFIG_UBOOT1_ENV_ADDR" +80000; "         \
-               "erase "CONFIG_UBOOT1_ENV_ADDR" +80000; "               \
-               "cp.w $loadaddr "CONFIG_UBOOT1_ENV_ADDR" 40000; "       \
-               "protect on "CONFIG_UBOOT1_ENV_ADDR" +80000; "          \
-               "cmp.b $loadaddr "CONFIG_UBOOT1_ENV_ADDR" 80000; "      \
-               "if test $? -ne 0; then "                               \
-                       "echo PROGRAM FAILED; "                         \
-               "else; "                                                \
-                       "echo PROGRAM SUCCEEDED; "                      \
-               "fi; "                                                  \
-       "else; "                                                        \
-               "echo DOWNLOAD FAILED; "                                \
-       "fi;"
-
-#define CONFIG_PROG_UBOOT2                                             \
-       "$download_cmd $loadaddr $ubootfile; "                          \
-       "if test $? -eq 0; then "                                       \
-               "protect off "CONFIG_UBOOT2_ENV_ADDR" +80000; "         \
-               "erase "CONFIG_UBOOT2_ENV_ADDR" +80000; "               \
-               "cp.w $loadaddr "CONFIG_UBOOT2_ENV_ADDR" 40000; "       \
-               "protect on "CONFIG_UBOOT2_ENV_ADDR" +80000; "          \
-               "cmp.b $loadaddr "CONFIG_UBOOT2_ENV_ADDR" 80000; "      \
-               "if test $? -ne 0; then "                               \
-                       "echo PROGRAM FAILED; "                         \
-               "else; "                                                \
-                       "echo PROGRAM SUCCEEDED; "                      \
-               "fi; "                                                  \
-       "else; "                                                        \
-               "echo DOWNLOAD FAILED; "                                \
-       "fi;"
-
-#define CONFIG_BOOT_OS_NET                                             \
-       "$download_cmd $osaddr $osfile; "                               \
-       "if test $? -eq 0; then "                                       \
-               "if test -n $fdtaddr; then "                            \
-                       "$download_cmd $fdtaddr $fdtfile; "             \
-                       "if test $? -eq 0; then "                       \
-                               "bootm $osaddr - $fdtaddr; "            \
-                       "else; "                                        \
-                               "echo FDT DOWNLOAD FAILED; "            \
-                       "fi; "                                          \
-               "else; "                                                \
-                       "bootm $osaddr; "                               \
-               "fi; "                                                  \
-       "else; "                                                        \
-               "echo OS DOWNLOAD FAILED; "                             \
-       "fi;"
-
-#define CONFIG_PROG_OS1                                                        \
-       "$download_cmd $osaddr $osfile; "                               \
-       "if test $? -eq 0; then "                                       \
-               "erase "CONFIG_OS1_ENV_ADDR" +$filesize; "              \
-               "cp.b $osaddr "CONFIG_OS1_ENV_ADDR" $filesize; "        \
-               "cmp.b $osaddr "CONFIG_OS1_ENV_ADDR" $filesize; "       \
-               "if test $? -ne 0; then "                               \
-                       "echo OS PROGRAM FAILED; "                      \
-               "else; "                                                \
-                       "echo OS PROGRAM SUCCEEDED; "                   \
-               "fi; "                                                  \
-       "else; "                                                        \
-               "echo OS DOWNLOAD FAILED; "                             \
-       "fi;"
-
-#define CONFIG_PROG_OS2                                                        \
-       "$download_cmd $osaddr $osfile; "                               \
-       "if test $? -eq 0; then "                                       \
-               "erase "CONFIG_OS2_ENV_ADDR" +$filesize; "              \
-               "cp.b $osaddr "CONFIG_OS2_ENV_ADDR" $filesize; "        \
-               "cmp.b $osaddr "CONFIG_OS2_ENV_ADDR" $filesize; "       \
-               "if test $? -ne 0; then "                               \
-                       "echo OS PROGRAM FAILED; "                      \
-               "else; "                                                \
-                       "echo OS PROGRAM SUCCEEDED; "                   \
-               "fi; "                                                  \
-       "else; "                                                        \
-               "echo OS DOWNLOAD FAILED; "                             \
-       "fi;"
-
-#define CONFIG_PROG_FDT1                                               \
-       "$download_cmd $fdtaddr $fdtfile; "                             \
-       "if test $? -eq 0; then "                                       \
-               "erase "CONFIG_FDT1_ENV_ADDR" +$filesize;"              \
-               "cp.b $fdtaddr "CONFIG_FDT1_ENV_ADDR" $filesize; "      \
-               "cmp.b $fdtaddr "CONFIG_FDT1_ENV_ADDR" $filesize; "     \
-               "if test $? -ne 0; then "                               \
-                       "echo FDT PROGRAM FAILED; "                     \
-               "else; "                                                \
-                       "echo FDT PROGRAM SUCCEEDED; "                  \
-               "fi; "                                                  \
-       "else; "                                                        \
-               "echo FDT DOWNLOAD FAILED; "                            \
-       "fi;"
-
-#define CONFIG_PROG_FDT2                                               \
-       "$download_cmd $fdtaddr $fdtfile; "                             \
-       "if test $? -eq 0; then "                                       \
-               "erase "CONFIG_FDT2_ENV_ADDR" +$filesize;"              \
-               "cp.b $fdtaddr "CONFIG_FDT2_ENV_ADDR" $filesize; "      \
-               "cmp.b $fdtaddr "CONFIG_FDT2_ENV_ADDR" $filesize; "     \
-               "if test $? -ne 0; then "                               \
-                       "echo FDT PROGRAM FAILED; "                     \
-               "else; "                                                \
-                       "echo FDT PROGRAM SUCCEEDED; "                  \
-               "fi; "                                                  \
-       "else; "                                                        \
-               "echo FDT DOWNLOAD FAILED; "                            \
-       "fi;"
-
-#define        CONFIG_EXTRA_ENV_SETTINGS                                       \
-       "autoload=yes\0"                                                \
-       "download_cmd=tftp\0"                                           \
-       "console_args=console=ttyS0,115200\0"                           \
-       "root_args=root=/dev/nfs rw\0"                                  \
-       "misc_args=ip=on\0"                                             \
-       "set_bootargs=setenv bootargs ${console_args} ${root_args} ${misc_args}\0" \
-       "bootfile=/home/user/file\0"                                    \
-       "osfile=/home/user/uImage-XPedite5170\0"                        \
-       "fdtfile=/home/user/xpedite5170.dtb\0"                          \
-       "ubootfile=/home/user/u-boot.bin\0"                             \
-       "fdtaddr=c00000\0"                                              \
-       "osaddr=0x1000000\0"                                            \
-       "loadaddr=0x1000000\0"                                          \
-       "prog_uboot1="CONFIG_PROG_UBOOT1"\0"                            \
-       "prog_uboot2="CONFIG_PROG_UBOOT2"\0"                            \
-       "prog_os1="CONFIG_PROG_OS1"\0"                                  \
-       "prog_os2="CONFIG_PROG_OS2"\0"                                  \
-       "prog_fdt1="CONFIG_PROG_FDT1"\0"                                \
-       "prog_fdt2="CONFIG_PROG_FDT2"\0"                                \
-       "bootcmd_net=run set_bootargs; "CONFIG_BOOT_OS_NET"\0"          \
-       "bootcmd_flash1=run set_bootargs; "                             \
-               "bootm "CONFIG_OS1_ENV_ADDR" - "CONFIG_FDT1_ENV_ADDR"\0"\
-       "bootcmd_flash2=run set_bootargs; "                             \
-               "bootm "CONFIG_OS2_ENV_ADDR" - "CONFIG_FDT2_ENV_ADDR"\0"\
-       "bootcmd=run bootcmd_flash1\0"
-#endif /* __CONFIG_H */
diff --git a/include/configs/XPEDITE5200.h b/include/configs/XPEDITE5200.h
deleted file mode 100644 (file)
index d0e9492..0000000
+++ /dev/null
@@ -1,542 +0,0 @@
-/*
- * Copyright 2008 Extreme Engineering Solutions, Inc.
- * Copyright 2004-2008 Freescale Semiconductor, Inc.
- *
- * 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
- */
-
-/*
- * xpedite5200 board configuration file
- */
-#ifndef __CONFIG_H
-#define __CONFIG_H
-
-/*
- * High Level Configuration Options
- */
-#define CONFIG_BOOKE           1       /* BOOKE */
-#define CONFIG_E500            1       /* BOOKE e500 family */
-#define CONFIG_MPC85xx         1       /* MPC8540/60/55/41/48 */
-#define CONFIG_MPC8548         1
-#define CONFIG_XPEDITE5200     1
-#define CONFIG_SYS_BOARD_NAME  "XPedite5200"
-#define CONFIG_BOARD_EARLY_INIT_R      /* Call board_pre_init */
-
-#ifndef CONFIG_SYS_TEXT_BASE
-#define CONFIG_SYS_TEXT_BASE   0xfff80000
-#endif
-
-#define CONFIG_PCI             1       /* Enable PCI/PCIE */
-#define CONFIG_PCI_PNP         1       /* do pci plug-and-play */
-#define CONFIG_PCI_SCAN_SHOW   1       /* show pci devices on startup */
-#define CONFIG_PCI1            1       /* PCI controller 1 */
-#define CONFIG_FSL_PCI_INIT    1       /* Use common FSL init code */
-#define CONFIG_SYS_PCI_64BIT   1       /* enable 64-bit PCI resources */
-#define CONFIG_FSL_LAW         1       /* Use common FSL init code */
-
-/*
- * DDR config
- */
-#define CONFIG_FSL_DDR2
-#undef CONFIG_FSL_DDR_INTERACTIVE
-#define CONFIG_SPD_EEPROM              /* Use SPD EEPROM for DDR setup */
-#define CONFIG_DDR_SPD
-#define CONFIG_MEM_INIT_VALUE          0xdeadbeef
-#define SPD_EEPROM_ADDRESS             0x54
-#define CONFIG_NUM_DDR_CONTROLLERS     1
-#define CONFIG_DIMM_SLOTS_PER_CTLR     1
-#define CONFIG_CHIP_SELECTS_PER_CTRL   2
-#define CONFIG_DDR_ECC
-#define CONFIG_ECC_INIT_VIA_DDRCONTROLLER
-#define CONFIG_SYS_DDR_SDRAM_BASE      0x00000000
-#define CONFIG_SYS_SDRAM_BASE          CONFIG_SYS_DDR_SDRAM_BASE
-#define CONFIG_VERY_BIG_RAM
-
-#define CONFIG_SYS_CLK_FREQ    66666666
-
-/*
- * These can be toggled for performance analysis, otherwise use default.
- */
-#define CONFIG_L2_CACHE                        /* toggle L2 cache */
-#define CONFIG_BTB                     /* toggle branch predition */
-#define CONFIG_ENABLE_36BIT_PHYS       1
-
-/*
- * Base addresses -- Note these are effective addresses where the
- * actual resources get mapped (not physical addresses)
- */
-#define CONFIG_SYS_CCSRBAR_DEFAULT     0xff700000      /* CCSRBAR Default */
-#define CONFIG_SYS_CCSRBAR             0xef000000      /* relocated CCSRBAR */
-#define CONFIG_SYS_CCSRBAR_PHYS        CONFIG_SYS_CCSRBAR      /* physical addr of CCSRBAR */
-#define CONFIG_SYS_IMMR                CONFIG_SYS_CCSRBAR      /* PQII uses CONFIG_SYS_IMMR */
-
-/*
- * Diagnostics
- */
-#define CONFIG_SYS_ALT_MEMTEST
-#define CONFIG_SYS_MEMTEST_START       0x10000000
-#define CONFIG_SYS_MEMTEST_END         0x20000000
-
-/*
- * Memory map
- * 0x0000_0000 0x7fff_ffff     DDR                     2G Cacheable
- * 0x8000_0000 0xbfff_ffff     PCI1 Mem                1G non-cacheable
- * 0xe000_0000 0xe7ff_ffff     SRAM/SSRAM/L1 Cache     128M non-cacheable
- * 0xe800_0000 0xe87f_ffff     PCI1 IO                 8M non-cacheable
- * 0xef00_0000 0xef0f_ffff     CCSR/IMMR               1M non-cacheable
- * 0xef80_0000 0xef8f_ffff     NAND Flash              1M non-cacheable
- * 0xf800_0000 0xfbff_ffff     NOR Flash 2             64M non-cacheable
- * 0xfc00_0000 0xffff_ffff     NOR Flash 1             64M non-cacheable
- */
-
-#define CONFIG_SYS_LBC_LCRR    (LCRR_CLKDIV_8 | LCRR_EADC_3)
-
-/*
- * NAND flash configuration
- */
-#define CONFIG_SYS_NAND_BASE           0xef800000
-#define CONFIG_SYS_NAND_BASE2          0xef840000 /* Unused at this time */
-#define CONFIG_SYS_MAX_NAND_DEVICE     1
-#define CONFIG_NAND_ACTL
-#define CONFIG_SYS_NAND_ACTL_CLE       (1 << 3)        /* ADDR3 is CLE */
-#define CONFIG_SYS_NAND_ACTL_ALE       (1 << 4)        /* ADDR4 is ALE */
-#define CONFIG_SYS_NAND_ACTL_NCE       (0)             /* NCE not controlled by ADDR */
-#define CONFIG_SYS_NAND_ACTL_DELAY     25
-
-/*
- * NOR flash configuration
- */
-#define CONFIG_SYS_FLASH_BASE          0xfc000000
-#define CONFIG_SYS_FLASH_BASE2         0xf8000000
-#define CONFIG_SYS_FLASH_BANKS_LIST    {CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FLASH_BASE2}
-#define CONFIG_SYS_MAX_FLASH_BANKS     2               /* number of banks */
-#define CONFIG_SYS_MAX_FLASH_SECT      1024            /* sectors per device */
-#define CONFIG_SYS_FLASH_ERASE_TOUT    60000           /* Flash Erase Timeout (ms) */
-#define CONFIG_SYS_FLASH_WRITE_TOUT    500             /* Flash Write Timeout (ms) */
-#define CONFIG_FLASH_CFI_DRIVER
-#define CONFIG_SYS_FLASH_CFI
-#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
-#define CONFIG_SYS_FLASH_AUTOPROTECT_LIST      { {0xfff40000, 0xc0000}, \
-                                                 {0xfbf40000, 0xc0000} }
-#define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE    /* start of monitor */
-
-/*
- * Chip select configuration
- */
-/* NOR Flash 0 on CS0 */
-#define CONFIG_SYS_BR0_PRELIM  (CONFIG_SYS_FLASH_BASE  | \
-                                BR_PS_16               | \
-                                BR_V)
-#define CONFIG_SYS_OR0_PRELIM  (OR_AM_64MB             | \
-                                OR_GPCM_ACS_DIV4       | \
-                                OR_GPCM_SCY_8)
-
-/* NOR Flash 1 on CS1 */
-#define CONFIG_SYS_BR1_PRELIM  (CONFIG_SYS_FLASH_BASE2 | \
-                                BR_PS_16               | \
-                                BR_V)
-#define CONFIG_SYS_OR1_PRELIM  CONFIG_SYS_OR0_PRELIM
-
-/* NAND flash on CS2 */
-#define CONFIG_SYS_BR2_PRELIM  (CONFIG_SYS_NAND_BASE   | \
-                                BR_PS_8                | \
-                                BR_V)
-
-/* NAND flash on CS2 */
-#define CONFIG_SYS_OR2_PRELIM  (OR_AM_256KB            | \
-                                OR_GPCM_BCTLD          | \
-                                OR_GPCM_CSNT           | \
-                                OR_GPCM_ACS_DIV4       | \
-                                OR_GPCM_SCY_4          | \
-                                OR_GPCM_TRLX           | \
-                                OR_GPCM_EHTR)
-
-/* NAND flash on CS3 */
-#define CONFIG_SYS_BR3_PRELIM  (CONFIG_SYS_NAND_BASE2  | \
-                                BR_PS_8                | \
-                                BR_V)
-#define CONFIG_SYS_OR3_PRELIM  CONFIG_SYS_OR2_PRELIM
-
-/*
- * Use L1 as initial stack
- */
-#define CONFIG_SYS_INIT_RAM_LOCK       1
-#define CONFIG_SYS_INIT_RAM_ADDR       0xe0000000
-#define CONFIG_SYS_INIT_RAM_END                0x4000
-
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* num bytes initial data */
-#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_LEN         (512 * 1024)    /* Reserve 512 KB for Mon */
-#define CONFIG_SYS_MALLOC_LEN          (1024 * 1024)   /* Reserved for malloc */
-
-/*
- * Serial Port
- */
-#define CONFIG_CONS_INDEX              1
-#define CONFIG_SYS_NS16550
-#define CONFIG_SYS_NS16550_SERIAL
-#define CONFIG_SYS_NS16550_REG_SIZE    1
-#define CONFIG_SYS_NS16550_CLK         get_bus_freq(0)
-#define CONFIG_SYS_NS16550_COM1        (CONFIG_SYS_CCSRBAR+0x4500)
-#define CONFIG_SYS_NS16550_COM2        (CONFIG_SYS_CCSRBAR+0x4600)
-#define CONFIG_SYS_BAUDRATE_TABLE      \
-       {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200}
-#define CONFIG_BAUDRATE                        115200
-#define CONFIG_LOADS_ECHO              1       /* echo on for serial download */
-#define CONFIG_SYS_LOADS_BAUD_CHANGE   1       /* allow baudrate change */
-
-/*
- * Use the HUSH parser
- */
-#define CONFIG_SYS_HUSH_PARSER
-#define CONFIG_SYS_PROMPT_HUSH_PS2     "> "
-
-/*
- * Pass open firmware flat tree
- */
-#define CONFIG_OF_LIBFDT               1
-#define CONFIG_OF_BOARD_SETUP          1
-#define CONFIG_OF_STDOUT_VIA_ALIAS     1
-
-/*
- * I2C
- */
-#define CONFIG_FSL_I2C                         /* Use FSL common I2C driver */
-#define CONFIG_HARD_I2C                                /* I2C with hardware support */
-#define CONFIG_SYS_I2C_SPEED           400000  /* I2C speed and slave address */
-#define CONFIG_SYS_I2C_SLAVE           0x7F
-#define CONFIG_SYS_I2C_OFFSET          0x3000
-#define CONFIG_SYS_I2C2_OFFSET         0x3100
-#define CONFIG_I2C_MULTI_BUS
-
-/* I2C EEPROM */
-#define CONFIG_SYS_I2C_EEPROM_ADDR             0x50
-#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN         1
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS      6       /* 64 byte pages */
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS  10      /* take up to 10 msec */
-
-/* I2C RTC */
-#define CONFIG_RTC_M41T11                      1
-#define CONFIG_SYS_I2C_RTC_ADDR                        0x68
-#define CONFIG_SYS_M41T11_BASE_YEAR            2000
-
-/* GPIO */
-#define CONFIG_PCA953X
-#define CONFIG_SYS_I2C_PCA953X_ADDR0           0x18
-#define CONFIG_SYS_I2C_PCA953X_ADDR1           0x19
-#define CONFIG_SYS_I2C_PCA953X_ADDR            CONFIG_SYS_I2C_PCA953X_ADDR0
-
-/* PCA957 @ 0x18 */
-#define CONFIG_SYS_PCA953X_BRD_CFG0            0x01
-#define CONFIG_SYS_PCA953X_BRD_CFG1            0x02
-#define CONFIG_SYS_PCA953X_BRD_CFG2            0x04
-#define CONFIG_SYS_PCA953X_XMC_ROOT0           0x08
-#define CONFIG_SYS_PCA953X_FLASH_PASS_CS       0x10
-#define CONFIG_SYS_PCA953X_FLASH_WP            0x20
-#define CONFIG_SYS_PCA953X_MONARCH             0x40
-#define CONFIG_SYS_PCA953X_EREADY              0x80
-
-/* PCA957 @ 0x19 */
-#define CONFIG_SYS_PCA953X_P14_IO0             0x01
-#define CONFIG_SYS_PCA953X_P14_IO1             0x02
-#define CONFIG_SYS_PCA953X_P14_IO2             0x04
-#define CONFIG_SYS_PCA953X_P14_IO3             0x08
-#define CONFIG_SYS_PCA953X_P14_IO4             0x10
-#define CONFIG_SYS_PCA953X_P14_IO5             0x20
-#define CONFIG_SYS_PCA953X_P14_IO6             0x40
-#define CONFIG_SYS_PCA953X_P14_IO7             0x80
-
-/*
- * General PCI
- * Memory space is mapped 1-1, but I/O space must start from 0.
- */
-#define CONFIG_SYS_PCI1_MEM_BASE       0x80000000
-#define CONFIG_SYS_PCI1_MEM_PHYS       CONFIG_SYS_PCI1_MEM_BASE
-#define CONFIG_SYS_PCI1_MEM_SIZE       0x40000000      /* 1G */
-#define CONFIG_SYS_PCI1_IO_BASE                0x00000000
-#define CONFIG_SYS_PCI1_IO_PHYS                0xe8000000
-#define CONFIG_SYS_PCI1_IO_SIZE                0x00800000      /* 1M */
-
-/*
- * Networking options
- */
-#define CONFIG_TSEC_ENET               /* tsec ethernet support */
-#define CONFIG_PHY_GIGE                1       /* Include GbE speed/duplex detection */
-#define CONFIG_NET_MULTI       1
-#define CONFIG_MII             1       /* MII PHY management */
-#define CONFIG_ETHPRIME                "eTSEC1"
-
-#define CONFIG_TSEC1           1
-#define CONFIG_TSEC1_NAME      "eTSEC1"
-#define TSEC1_FLAGS            TSEC_GIGABIT
-#define TSEC1_PHY_ADDR         1
-#define TSEC1_PHYIDX           0
-#define CONFIG_HAS_ETH0
-
-#define CONFIG_TSEC2           1
-#define CONFIG_TSEC2_NAME      "eTSEC2"
-#define TSEC2_FLAGS            TSEC_GIGABIT
-#define TSEC2_PHY_ADDR         2
-#define TSEC2_PHYIDX           0
-#define CONFIG_HAS_ETH1
-
-#define CONFIG_TSEC3   1
-#define CONFIG_TSEC3_NAME      "eTSEC3"
-#define TSEC3_FLAGS            TSEC_GIGABIT
-#define TSEC3_PHY_ADDR         3
-#define TSEC3_PHYIDX           0
-#define CONFIG_HAS_ETH2
-
-#define CONFIG_TSEC4   1
-#define CONFIG_TSEC4_NAME      "eTSEC4"
-#define TSEC4_FLAGS            TSEC_GIGABIT
-#define TSEC4_PHY_ADDR         4
-#define TSEC4_PHYIDX           0
-#define CONFIG_HAS_ETH3
-
-/*
- * BOOTP options
- */
-#define CONFIG_BOOTP_BOOTFILESIZE
-#define CONFIG_BOOTP_BOOTPATH
-#define CONFIG_BOOTP_GATEWAY
-
-/*
- * Command configuration.
- */
-#include <config_cmd_default.h>
-
-#define CONFIG_CMD_ASKENV
-#define CONFIG_CMD_DATE
-#define CONFIG_CMD_DHCP
-#define CONFIG_CMD_EEPROM
-#define CONFIG_CMD_ELF
-#define CONFIG_CMD_SAVEENV
-#define CONFIG_CMD_FLASH
-#define CONFIG_CMD_I2C
-#define CONFIG_CMD_JFFS2
-#define CONFIG_CMD_MII
-#define CONFIG_CMD_NAND
-#define CONFIG_CMD_NET
-#define CONFIG_CMD_PCA953X
-#define CONFIG_CMD_PCA953X_INFO
-#define CONFIG_CMD_PCI
-#define CONFIG_CMD_PING
-#define CONFIG_CMD_SNTP
-#define CONFIG_CMD_REGINFO
-
-/*
- * Miscellaneous configurable options
- */
-#define CONFIG_SYS_LONGHELP                    /* undef to save memory */
-#define CONFIG_SYS_LOAD_ADDR   0x2000000       /* default load address */
-#define CONFIG_SYS_PROMPT      "=> "           /* Monitor Command Prompt */
-#define CONFIG_SYS_CBSIZE      256             /* Console I/O Buffer Size */
-#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
-#define CONFIG_SYS_MAXARGS     16              /* max number of command args */
-#define CONFIG_SYS_BARGSIZE    CONFIG_SYS_CBSIZE       /* Boot Argument Buffer Size */
-#define CONFIG_SYS_HZ          1000            /* decrementer freq: 1ms ticks */
-#define CONFIG_CMDLINE_EDITING 1               /* add command line history     */
-#define CONFIG_AUTO_COMPLETE   1               /* add autocompletion support */
-#define CONFIG_LOADADDR                0x1000000       /* default location for tftp and bootm */
-#define CONFIG_BOOTDELAY       3               /* -1 disables auto-boot */
-#define CONFIG_PANIC_HANG                      /* do not reset board on panic */
-#define CONFIG_PREBOOT                         /* enable preboot variable */
-#define CONFIG_FIT             1
-#define CONFIG_FIT_VERBOSE     1
-#define CONFIG_INTEGRITY                       /* support booting INTEGRITY OS */
-#define CONFIG_INTERRUPTS              /* enable pci, srio, ddr interrupts */
-
-/*
- * For booting Linux, the board info and command line data
- * have to be in the first 16 MB of memory, since this is
- * the maximum mapped by the Linux kernel during initialization.
- */
-#define CONFIG_SYS_BOOTMAPSZ   (16 << 20)      /* Initial Memory map for Linux*/
-#define CONFIG_SYS_BOOTM_LEN   (16 << 20)      /* Increase max gunzip size */
-
-/*
- * Environment Configuration
- */
-#define CONFIG_ENV_IS_IN_FLASH 1
-#define CONFIG_ENV_SECT_SIZE   0x20000         /* 128k (one sector) for env */
-#define CONFIG_ENV_SIZE                0x8000
-#define CONFIG_ENV_ADDR                (CONFIG_SYS_MONITOR_BASE - (256 * 1024))
-
-/*
- * Flash memory map:
- * fff80000 - ffffffff     Pri U-Boot (512 KB)
- * fff40000 - fff7ffff     Pri U-Boot Environment (256 KB)
- * fff00000 - fff3ffff     Pri FDT (256KB)
- * fef00000 - ffefffff     Pri OS image (16MB)
- * fc000000 - feefffff     Pri OS Use/Filesystem (47MB)
- *
- * fbf80000 - fbffffff     Sec U-Boot (512 KB)
- * fbf40000 - fbf7ffff     Sec U-Boot Environment (256 KB)
- * fbf00000 - fbf3ffff     Sec FDT (256KB)
- * faf00000 - fbefffff     Sec OS image (16MB)
- * f8000000 - faefffff     Sec OS Use/Filesystem (47MB)
- */
-#define CONFIG_UBOOT1_ENV_ADDR MK_STR(0xfff80000)
-#define CONFIG_UBOOT2_ENV_ADDR MK_STR(0xfbf80000)
-#define CONFIG_FDT1_ENV_ADDR   MK_STR(0xfff00000)
-#define CONFIG_FDT2_ENV_ADDR   MK_STR(0xfbf00000)
-#define CONFIG_OS1_ENV_ADDR    MK_STR(0xfef00000)
-#define CONFIG_OS2_ENV_ADDR    MK_STR(0xfaf00000)
-
-#define CONFIG_PROG_UBOOT1                                             \
-       "$download_cmd $loadaddr $ubootfile; "                          \
-       "if test $? -eq 0; then "                                       \
-               "protect off "CONFIG_UBOOT1_ENV_ADDR" +80000; "         \
-               "erase "CONFIG_UBOOT1_ENV_ADDR" +80000; "               \
-               "cp.w $loadaddr "CONFIG_UBOOT1_ENV_ADDR" 40000; "       \
-               "protect on "CONFIG_UBOOT1_ENV_ADDR" +80000; "          \
-               "cmp.b $loadaddr "CONFIG_UBOOT1_ENV_ADDR" 80000; "      \
-               "if test $? -ne 0; then "                               \
-                       "echo PROGRAM FAILED; "                         \
-               "else; "                                                \
-                       "echo PROGRAM SUCCEEDED; "                      \
-               "fi; "                                                  \
-       "else; "                                                        \
-               "echo DOWNLOAD FAILED; "                                \
-       "fi;"
-
-#define CONFIG_PROG_UBOOT2                                             \
-       "$download_cmd $loadaddr $ubootfile; "                          \
-       "if test $? -eq 0; then "                                       \
-               "protect off "CONFIG_UBOOT2_ENV_ADDR" +80000; "         \
-               "erase "CONFIG_UBOOT2_ENV_ADDR" +80000; "               \
-               "cp.w $loadaddr "CONFIG_UBOOT2_ENV_ADDR" 40000; "       \
-               "protect on "CONFIG_UBOOT2_ENV_ADDR" +80000; "          \
-               "cmp.b $loadaddr "CONFIG_UBOOT2_ENV_ADDR" 80000; "      \
-               "if test $? -ne 0; then "                               \
-                       "echo PROGRAM FAILED; "                         \
-               "else; "                                                \
-                       "echo PROGRAM SUCCEEDED; "                      \
-               "fi; "                                                  \
-       "else; "                                                        \
-               "echo DOWNLOAD FAILED; "                                \
-       "fi;"
-
-#define CONFIG_BOOT_OS_NET                                             \
-       "$download_cmd $osaddr $osfile; "                               \
-       "if test $? -eq 0; then "                                       \
-               "if test -n $fdtaddr; then "                            \
-                       "$download_cmd $fdtaddr $fdtfile; "             \
-                       "if test $? -eq 0; then "                       \
-                               "bootm $osaddr - $fdtaddr; "            \
-                       "else; "                                        \
-                               "echo FDT DOWNLOAD FAILED; "            \
-                       "fi; "                                          \
-               "else; "                                                \
-                       "bootm $osaddr; "                               \
-               "fi; "                                                  \
-       "else; "                                                        \
-               "echo OS DOWNLOAD FAILED; "                             \
-       "fi;"
-
-#define CONFIG_PROG_OS1                                                        \
-       "$download_cmd $osaddr $osfile; "                               \
-       "if test $? -eq 0; then "                                       \
-               "erase "CONFIG_OS1_ENV_ADDR" +$filesize; "              \
-               "cp.b $osaddr "CONFIG_OS1_ENV_ADDR" $filesize; "        \
-               "cmp.b $osaddr "CONFIG_OS1_ENV_ADDR" $filesize; "       \
-               "if test $? -ne 0; then "                               \
-                       "echo OS PROGRAM FAILED; "                      \
-               "else; "                                                \
-                       "echo OS PROGRAM SUCCEEDED; "                   \
-               "fi; "                                                  \
-       "else; "                                                        \
-               "echo OS DOWNLOAD FAILED; "                             \
-       "fi;"
-
-#define CONFIG_PROG_OS2                                                        \
-       "$download_cmd $osaddr $osfile; "                               \
-       "if test $? -eq 0; then "                                       \
-               "erase "CONFIG_OS2_ENV_ADDR" +$filesize; "              \
-               "cp.b $osaddr "CONFIG_OS2_ENV_ADDR" $filesize; "        \
-               "cmp.b $osaddr "CONFIG_OS2_ENV_ADDR" $filesize; "       \
-               "if test $? -ne 0; then "                               \
-                       "echo OS PROGRAM FAILED; "                      \
-               "else; "                                                \
-                       "echo OS PROGRAM SUCCEEDED; "                   \
-               "fi; "                                                  \
-       "else; "                                                        \
-               "echo OS DOWNLOAD FAILED; "                             \
-       "fi;"
-
-#define CONFIG_PROG_FDT1                                               \
-       "$download_cmd $fdtaddr $fdtfile; "                             \
-       "if test $? -eq 0; then "                                       \
-               "erase "CONFIG_FDT1_ENV_ADDR" +$filesize;"              \
-               "cp.b $fdtaddr "CONFIG_FDT1_ENV_ADDR" $filesize; "      \
-               "cmp.b $fdtaddr "CONFIG_FDT1_ENV_ADDR" $filesize; "     \
-               "if test $? -ne 0; then "                               \
-                       "echo FDT PROGRAM FAILED; "                     \
-               "else; "                                                \
-                       "echo FDT PROGRAM SUCCEEDED; "                  \
-               "fi; "                                                  \
-       "else; "                                                        \
-               "echo FDT DOWNLOAD FAILED; "                            \
-       "fi;"
-
-#define CONFIG_PROG_FDT2                                               \
-       "$download_cmd $fdtaddr $fdtfile; "                             \
-       "if test $? -eq 0; then "                                       \
-               "erase "CONFIG_FDT2_ENV_ADDR" +$filesize;"              \
-               "cp.b $fdtaddr "CONFIG_FDT2_ENV_ADDR" $filesize; "      \
-               "cmp.b $fdtaddr "CONFIG_FDT2_ENV_ADDR" $filesize; "     \
-               "if test $? -ne 0; then "                               \
-                       "echo FDT PROGRAM FAILED; "                     \
-               "else; "                                                \
-                       "echo FDT PROGRAM SUCCEEDED; "                  \
-               "fi; "                                                  \
-       "else; "                                                        \
-               "echo FDT DOWNLOAD FAILED; "                            \
-       "fi;"
-
-#define        CONFIG_EXTRA_ENV_SETTINGS                                       \
-       "autoload=yes\0"                                                \
-       "download_cmd=tftp\0"                                           \
-       "console_args=console=ttyS0,115200\0"                           \
-       "root_args=root=/dev/nfs rw\0"                                  \
-       "misc_args=ip=on\0"                                             \
-       "set_bootargs=setenv bootargs ${console_args} ${root_args} ${misc_args}\0" \
-       "bootfile=/home/user/file\0"                                    \
-       "osfile=/home/user/uImage-XPedite5200\0"                        \
-       "fdtfile=/home/user/xpedite5200.dtb\0"                          \
-       "ubootfile=/home/user/u-boot.bin\0"                             \
-       "fdtaddr=c00000\0"                                              \
-       "osaddr=0x1000000\0"                                            \
-       "loadaddr=0x1000000\0"                                          \
-       "prog_uboot1="CONFIG_PROG_UBOOT1"\0"                            \
-       "prog_uboot2="CONFIG_PROG_UBOOT2"\0"                            \
-       "prog_os1="CONFIG_PROG_OS1"\0"                                  \
-       "prog_os2="CONFIG_PROG_OS2"\0"                                  \
-       "prog_fdt1="CONFIG_PROG_FDT1"\0"                                \
-       "prog_fdt2="CONFIG_PROG_FDT2"\0"                                \
-       "bootcmd_net=run set_bootargs; "CONFIG_BOOT_OS_NET"\0"          \
-       "bootcmd_flash1=run set_bootargs; "                             \
-               "bootm "CONFIG_OS1_ENV_ADDR" - "CONFIG_FDT1_ENV_ADDR"\0"\
-       "bootcmd_flash2=run set_bootargs; "                             \
-               "bootm "CONFIG_OS2_ENV_ADDR" - "CONFIG_FDT2_ENV_ADDR"\0"\
-       "bootcmd=run bootcmd_flash1\0"
-#endif /* __CONFIG_H */
diff --git a/include/configs/XPEDITE5370.h b/include/configs/XPEDITE5370.h
deleted file mode 100644 (file)
index 629dc0d..0000000
+++ /dev/null
@@ -1,599 +0,0 @@
-/*
- * Copyright 2008 Extreme Engineering Solutions, Inc.
- * Copyright 2007-2008 Freescale Semiconductor, Inc.
- *
- * 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
- */
-
-/*
- * xpedite5370 board configuration file
- */
-#ifndef __CONFIG_H
-#define __CONFIG_H
-
-/*
- * High Level Configuration Options
- */
-#define CONFIG_BOOKE           1       /* BOOKE */
-#define CONFIG_E500            1       /* BOOKE e500 family */
-#define CONFIG_MPC85xx         1       /* MPC8540/60/55/41/48 */
-#define CONFIG_MPC8572         1
-#define CONFIG_XPEDITE5370     1
-#define CONFIG_SYS_BOARD_NAME  "XPedite5370"
-#define CONFIG_BOARD_EARLY_INIT_R      /* Call board_pre_init */
-
-#ifndef CONFIG_SYS_TEXT_BASE
-#define CONFIG_SYS_TEXT_BASE   0xfff80000
-#endif
-
-#define CONFIG_PCI             1       /* Enable PCI/PCIE */
-#define CONFIG_PCI_PNP         1       /* do pci plug-and-play */
-#define CONFIG_PCI_SCAN_SHOW   1       /* show pci devices on startup */
-#define CONFIG_PCIE1           1       /* PCIE controler 1 */
-#define CONFIG_PCIE2           1       /* PCIE controler 2 */
-#define CONFIG_FSL_PCI_INIT    1       /* Use common FSL init code */
-#define CONFIG_SYS_PCI_64BIT   1       /* enable 64-bit PCI resources */
-#define CONFIG_FSL_PCIE_RESET  1       /* need PCIe reset errata */
-#define CONFIG_FSL_LAW         1       /* Use common FSL init code */
-#define CONFIG_FSL_ELBC                1
-
-/*
- * Multicore config
- */
-#define CONFIG_MP
-#define CONFIG_BPTR_VIRT_ADDR  0xee000000      /* virt boot page address */
-#define CONFIG_MPC8xxx_DISABLE_BPTR            /* Don't leave BPTR enabled */
-
-/*
- * DDR config
- */
-#define CONFIG_FSL_DDR2
-#undef CONFIG_FSL_DDR_INTERACTIVE
-#define CONFIG_SPD_EEPROM              /* Use SPD EEPROM for DDR setup */
-#define CONFIG_DDR_SPD
-#define CONFIG_MEM_INIT_VALUE          0xdeadbeef
-#define SPD_EEPROM_ADDRESS1            0x54    /* Both channels use the */
-#define SPD_EEPROM_ADDRESS2            0x54    /* same SPD data         */
-#define SPD_EEPROM_OFFSET              0x200   /* OFFSET of SPD in EEPROM */
-#define CONFIG_NUM_DDR_CONTROLLERS     2
-#define CONFIG_DIMM_SLOTS_PER_CTLR     1
-#define CONFIG_CHIP_SELECTS_PER_CTRL   1
-#define CONFIG_DDR_ECC
-#define CONFIG_ECC_INIT_VIA_DDRCONTROLLER
-#define CONFIG_SYS_DDR_SDRAM_BASE      0x00000000 /* DDR is system memory*/
-#define CONFIG_SYS_SDRAM_BASE          CONFIG_SYS_DDR_SDRAM_BASE
-#define CONFIG_VERY_BIG_RAM
-
-#ifndef __ASSEMBLY__
-extern unsigned long get_board_sys_clk(unsigned long dummy);
-extern unsigned long get_board_ddr_clk(unsigned long dummy);
-#endif
-
-#define CONFIG_SYS_CLK_FREQ    get_board_sys_clk(0) /* sysclk for MPC85xx */
-#define CONFIG_DDR_CLK_FREQ    get_board_ddr_clk(0) /* ddrclk for MPC85xx */
-
-/*
- * These can be toggled for performance analysis, otherwise use default.
- */
-#define CONFIG_L2_CACHE                        /* toggle L2 cache */
-#define CONFIG_BTB                     /* toggle branch predition */
-#define CONFIG_ENABLE_36BIT_PHYS       1
-
-/*
- * Base addresses -- Note these are effective addresses where the
- * actual resources get mapped (not physical addresses)
- */
-#define CONFIG_SYS_CCSRBAR_DEFAULT     0xff700000      /* CCSRBAR Default */
-#define CONFIG_SYS_CCSRBAR             0xef000000      /* relocated CCSRBAR */
-#define CONFIG_SYS_CCSRBAR_PHYS        CONFIG_SYS_CCSRBAR      /* physical addr of CCSRBAR */
-#define CONFIG_SYS_IMMR                CONFIG_SYS_CCSRBAR      /* PQII uses CONFIG_SYS_IMMR */
-
-/*
- * Diagnostics
- */
-#define CONFIG_SYS_ALT_MEMTEST
-#define CONFIG_SYS_MEMTEST_START       0x10000000
-#define CONFIG_SYS_MEMTEST_END         0x20000000
-
-/*
- * Memory map
- * 0x0000_0000 0x7fff_ffff     DDR                     2G Cacheable
- * 0x8000_0000 0xbfff_ffff     PCIe1 Mem               1G non-cacheable
- * 0xc000_0000 0xcfff_ffff     PCIe2 Mem               256M non-cacheable
- * 0xe000_0000 0xe7ff_ffff     SRAM/SSRAM/L1 Cache     128M non-cacheable
- * 0xe800_0000 0xe87f_ffff     PCIe1 IO                8M non-cacheable
- * 0xe880_0000 0xe8ff_ffff     PCIe2 IO                8M non-cacheable
- * 0xee00_0000 0xee00_ffff     Boot page translation   4K non-cacheable
- * 0xef00_0000 0xef0f_ffff     CCSR/IMMR               1M non-cacheable
- * 0xef80_0000 0xef8f_ffff     NAND Flash              1M non-cacheable
- * 0xf000_0000 0xf7ff_ffff     NOR Flash 2             128M non-cacheable
- * 0xf800_0000 0xffff_ffff     NOR Flash 1             128M non-cacheable
- */
-
-#define CONFIG_SYS_LBC_LCRR    (LCRR_CLKDIV_8 | LCRR_EADC_3)
-
-/*
- * NAND flash configuration
- */
-#define CONFIG_SYS_NAND_BASE           0xef800000
-#define CONFIG_SYS_NAND_BASE2          0xef840000 /* Unused at this time */
-#define CONFIG_SYS_NAND_BASE_LIST      {CONFIG_SYS_NAND_BASE, \
-                                        CONFIG_SYS_NAND_BASE2}
-#define CONFIG_SYS_MAX_NAND_DEVICE     2
-#define CONFIG_MTD_NAND_VERIFY_WRITE
-#define CONFIG_SYS_NAND_QUIET_TEST     /* 2nd NAND flash not always populated */
-#define CONFIG_NAND_FSL_ELBC
-
-/*
- * NOR flash configuration
- */
-#define CONFIG_SYS_FLASH_BASE          0xf8000000
-#define CONFIG_SYS_FLASH_BASE2         0xf0000000
-#define CONFIG_SYS_FLASH_BANKS_LIST    {CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FLASH_BASE2}
-#define CONFIG_SYS_MAX_FLASH_BANKS     2               /* number of banks */
-#define CONFIG_SYS_MAX_FLASH_SECT      1024            /* sectors per device */
-#define CONFIG_SYS_FLASH_ERASE_TOUT    60000           /* Flash Erase Timeout (ms) */
-#define CONFIG_SYS_FLASH_WRITE_TOUT    500             /* Flash Write Timeout (ms) */
-#define CONFIG_FLASH_CFI_DRIVER
-#define CONFIG_SYS_FLASH_CFI
-#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
-#define CONFIG_SYS_FLASH_AUTOPROTECT_LIST      { {0xfff40000, 0xc0000}, \
-                                                 {0xf7f40000, 0xc0000} }
-#define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE    /* start of monitor */
-
-/*
- * Chip select configuration
- */
-/* NOR Flash 0 on CS0 */
-#define CONFIG_SYS_BR0_PRELIM  (CONFIG_SYS_FLASH_BASE  | \
-                                BR_PS_16               | \
-                                BR_V)
-#define CONFIG_SYS_OR0_PRELIM  (OR_AM_128MB            | \
-                                OR_GPCM_CSNT           | \
-                                OR_GPCM_XACS           | \
-                                OR_GPCM_ACS_DIV2       | \
-                                OR_GPCM_SCY_8          | \
-                                OR_GPCM_TRLX           | \
-                                OR_GPCM_EHTR           | \
-                                OR_GPCM_EAD)
-
-/* NOR Flash 1 on CS1 */
-#define CONFIG_SYS_BR1_PRELIM  (CONFIG_SYS_FLASH_BASE2 | \
-                                BR_PS_16               | \
-                                BR_V)
-#define CONFIG_SYS_OR1_PRELIM  CONFIG_SYS_OR0_PRELIM
-
-/* NAND flash on CS2 */
-#define CONFIG_SYS_BR2_PRELIM  (CONFIG_SYS_NAND_BASE   | \
-                                (2<<BR_DECC_SHIFT)     | \
-                                BR_PS_8                | \
-                                BR_MS_FCM              | \
-                                BR_V)
-
-/* NAND flash on CS2 */
-#define CONFIG_SYS_OR2_PRELIM  (OR_AM_256KB    | \
-                                OR_FCM_PGS     | \
-                                OR_FCM_CSCT    | \
-                                OR_FCM_CST     | \
-                                OR_FCM_CHT     | \
-                                OR_FCM_SCY_1   | \
-                                OR_FCM_TRLX    | \
-                                OR_FCM_EHTR)
-
-/* NAND flash on CS3 */
-#define CONFIG_SYS_BR3_PRELIM  (CONFIG_SYS_NAND_BASE2  | \
-                                (2<<BR_DECC_SHIFT)     | \
-                                BR_PS_8                | \
-                                BR_MS_FCM              | \
-                                BR_V)
-#define CONFIG_SYS_OR3_PRELIM  CONFIG_SYS_OR2_PRELIM
-
-/*
- * Use L1 as initial stack
- */
-#define CONFIG_SYS_INIT_RAM_LOCK       1
-#define CONFIG_SYS_INIT_RAM_ADDR       0xe0000000
-#define CONFIG_SYS_INIT_RAM_END                0x00004000
-
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* num bytes initial data */
-#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_LEN         (512 * 1024)    /* Reserve 512 KB for Mon */
-#define CONFIG_SYS_MALLOC_LEN          (1024 * 1024)   /* Reserved for malloc */
-
-/*
- * Serial Port
- */
-#define CONFIG_CONS_INDEX              1
-#define CONFIG_SYS_NS16550
-#define CONFIG_SYS_NS16550_SERIAL
-#define CONFIG_SYS_NS16550_REG_SIZE    1
-#define CONFIG_SYS_NS16550_CLK         get_bus_freq(0)
-#define CONFIG_SYS_NS16550_COM1        (CONFIG_SYS_CCSRBAR+0x4500)
-#define CONFIG_SYS_NS16550_COM2        (CONFIG_SYS_CCSRBAR+0x4600)
-#define CONFIG_SYS_BAUDRATE_TABLE      \
-       {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200}
-#define CONFIG_BAUDRATE                        115200
-#define CONFIG_LOADS_ECHO              1       /* echo on for serial download */
-#define CONFIG_SYS_LOADS_BAUD_CHANGE   1       /* allow baudrate change */
-
-/*
- * Use the HUSH parser
- */
-#define CONFIG_SYS_HUSH_PARSER
-#define CONFIG_SYS_PROMPT_HUSH_PS2     "> "
-
-/*
- * Pass open firmware flat tree
- */
-#define CONFIG_OF_LIBFDT               1
-#define CONFIG_OF_BOARD_SETUP          1
-#define CONFIG_OF_STDOUT_VIA_ALIAS     1
-
-/*
- * I2C
- */
-#define CONFIG_FSL_I2C                         /* Use FSL common I2C driver */
-#define CONFIG_HARD_I2C                                /* I2C with hardware support */
-#define CONFIG_SYS_I2C_SPEED           400000  /* I2C speed and slave address */
-#define CONFIG_SYS_I2C_SLAVE           0x7F
-#define CONFIG_SYS_I2C_OFFSET          0x3000
-#define CONFIG_SYS_I2C2_OFFSET         0x3100
-#define CONFIG_I2C_MULTI_BUS
-
-/* PEX8518 slave I2C interface */
-#define CONFIG_SYS_I2C_PEX8518_ADDR    0x70
-
-/* I2C DS1631 temperature sensor */
-#define CONFIG_SYS_I2C_DS1621_ADDR     0x48
-#define CONFIG_DTT_DS1621
-#define CONFIG_DTT_SENSORS             { 0 }
-
-/* I2C EEPROM - AT24C128B */
-#define CONFIG_SYS_I2C_EEPROM_ADDR             0x54
-#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN         2
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS      6       /* 64 byte pages */
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS  10      /* take up to 10 msec */
-
-/* I2C RTC */
-#define CONFIG_RTC_M41T11              1
-#define CONFIG_SYS_I2C_RTC_ADDR                0x68
-#define CONFIG_SYS_M41T11_BASE_YEAR    2000
-
-/* GPIO/EEPROM/SRAM */
-#define CONFIG_DS4510
-#define CONFIG_SYS_I2C_DS4510_ADDR     0x51
-
-/* GPIO */
-#define CONFIG_PCA953X
-#define CONFIG_SYS_I2C_PCA953X_ADDR0   0x18
-#define CONFIG_SYS_I2C_PCA953X_ADDR1   0x1c
-#define CONFIG_SYS_I2C_PCA953X_ADDR2   0x1e
-#define CONFIG_SYS_I2C_PCA953X_ADDR3   0x1f
-#define CONFIG_SYS_I2C_PCA953X_ADDR    CONFIG_SYS_I2C_PCA953X_ADDR0
-
-/*
- * PU = pulled high, PD = pulled low
- * I = input, O = output, IO = input/output
- */
-/* PCA9557 @ 0x18*/
-#define CONFIG_SYS_PCA953X_C0_SER0_EN          0x01 /* PU; UART0 enable (1: enabled) */
-#define CONFIG_SYS_PCA953X_C0_SER0_MODE                0x02 /* PU; UART0 serial mode select */
-#define CONFIG_SYS_PCA953X_C0_SER1_EN          0x04 /* PU; UART1 enable (1: enabled) */
-#define CONFIG_SYS_PCA953X_C0_SER1_MODE                0x08 /* PU; UART1 serial mode select */
-#define CONFIG_SYS_PCA953X_C0_FLASH_PASS_CS    0x10 /* PU; Boot flash CS select */
-#define CONFIG_SYS_PCA953X_NVM_WP              0x20 /* PU; Set to 0 to enable NVM writing */
-#define CONFIG_SYS_PCA953X_C0_VCORE_VID2       0x40 /* VID2 of ISL6262 */
-#define CONFIG_SYS_PCA953X_C0_VCORE_VID3       0x80 /* VID3 of ISL6262 */
-
-/* PCA9557 @ 0x1c*/
-#define CONFIG_SYS_PCA953X_XMC0_ROOT0          0x01 /* PU; Low if XMC is RC */
-#define CONFIG_SYS_PCA953X_XMC0_MVMR0          0x02 /* XMC EEPROM write protect */
-#define CONFIG_SYS_PCA953X_XMC0_WAKE           0x04 /* PU; XMC wake */
-#define CONFIG_SYS_PCA953X_XMC0_BIST           0x08 /* PU; XMC built in self test */
-#define CONFIG_SYS_PCA953X_XMC_PRESENT         0x10 /* PU; Low if XMC module installed */
-#define CONFIG_SYS_PCA953X_PMC_PRESENT         0x20 /* PU; Low if PMC module installed */
-#define CONFIG_SYS_PCA953X_PMC0_MONARCH                0x40 /* PMC monarch mode enable */
-#define CONFIG_SYS_PCA953X_PMC0_EREADY         0x80 /* PU; PMC PCI eready */
-
-/* PCA9557 @ 0x1e*/
-#define CONFIG_SYS_PCA953X_P0_GA0              0x01 /* PU; VPX Geographical address */
-#define CONFIG_SYS_PCA953X_P0_GA1              0x02 /* PU; VPX Geographical address */
-#define CONFIG_SYS_PCA953X_P0_GA2              0x04 /* PU; VPX Geographical address */
-#define CONFIG_SYS_PCA953X_P0_GA3              0x08 /* PU; VPX Geographical address */
-#define CONFIG_SYS_PCA953X_P0_GA4              0x10 /* PU; VPX Geographical address */
-#define CONFIG_SYS_PCA953X_P0_GAP              0x20 /* PU; tied to VPX P0.GAP */
-#define CONFIG_SYS_PCA953X_P1_SYSEN            0x80 /* PU; Pulled high; tied to VPX P1.SYSCON */
-
-/* PCA9557 @ 0x1f */
-#define CONFIG_SYS_PCA953X_GPIO_VPX0           0x01 /* PU */
-#define CONFIG_SYS_PCA953X_GPIO_VPX1           0x02 /* PU */
-#define CONFIG_SYS_PCA953X_GPIO_VPX2           0x04 /* PU */
-#define CONFIG_SYS_PCA953X_GPIO_VPX3           0x08 /* PU */
-#define CONFIG_SYS_PCA953X_VPX_FRU_WRCTL       0x10 /* PD; I2C master source for FRU SEEPROM */
-
-/*
- * General PCI
- * Memory space is mapped 1-1, but I/O space must start from 0.
- */
-/* PCIE1 - VPX P1 */
-#define CONFIG_SYS_PCIE1_MEM_BASE      0x80000000
-#define CONFIG_SYS_PCIE1_MEM_PHYS      CONFIG_SYS_PCIE1_MEM_BASE
-#define CONFIG_SYS_PCIE1_MEM_SIZE      0x40000000      /* 1G */
-#define CONFIG_SYS_PCIE1_IO_BASE       0x00000000
-#define CONFIG_SYS_PCIE1_IO_PHYS       0xe8000000
-#define CONFIG_SYS_PCIE1_IO_SIZE       0x00800000      /* 8M */
-
-/* PCIE2 - PEX8518 */
-#define CONFIG_SYS_PCIE2_MEM_BASE      0xc0000000
-#define CONFIG_SYS_PCIE2_MEM_PHYS      CONFIG_SYS_PCIE2_MEM_BASE
-#define CONFIG_SYS_PCIE2_MEM_SIZE      0x10000000      /* 256M */
-#define CONFIG_SYS_PCIE2_IO_BASE       0x00000000
-#define CONFIG_SYS_PCIE2_IO_PHYS       0xe8800000
-#define CONFIG_SYS_PCIE2_IO_SIZE       0x00800000      /* 8M */
-
-/*
- * Networking options
- */
-#define CONFIG_TSEC_ENET               /* tsec ethernet support */
-#define CONFIG_PHY_GIGE                1       /* Include GbE speed/duplex detection */
-#define CONFIG_NET_MULTI       1
-#define CONFIG_TSEC_TBI
-#define CONFIG_MII             1       /* MII PHY management */
-#define CONFIG_MII_DEFAULT_TSEC        1       /* Allow unregistered phys */
-#define CONFIG_ETHPRIME                "eTSEC2"
-
-#define CONFIG_TSEC1           1
-#define CONFIG_TSEC1_NAME      "eTSEC1"
-#define TSEC1_FLAGS            (TSEC_GIGABIT | TSEC_REDUCED)
-#define TSEC1_PHY_ADDR         1
-#define TSEC1_PHYIDX           0
-#define CONFIG_HAS_ETH0
-
-#define CONFIG_TSEC2           1
-#define CONFIG_TSEC2_NAME      "eTSEC2"
-#define TSEC2_FLAGS            (TSEC_GIGABIT | TSEC_REDUCED)
-#define TSEC2_PHY_ADDR         2
-#define TSEC2_PHYIDX           0
-#define CONFIG_HAS_ETH1
-
-/*
- * Command configuration.
- */
-#include <config_cmd_default.h>
-
-#define CONFIG_CMD_ASKENV
-#define CONFIG_CMD_DATE
-#define CONFIG_CMD_DHCP
-#define CONFIG_CMD_DS4510
-#define CONFIG_CMD_DS4510_INFO
-#define CONFIG_CMD_DTT
-#define CONFIG_CMD_EEPROM
-#define CONFIG_CMD_ELF
-#define CONFIG_CMD_FLASH
-#define CONFIG_CMD_I2C
-#define CONFIG_CMD_JFFS2
-#define CONFIG_CMD_MII
-#define CONFIG_CMD_NAND
-#define CONFIG_CMD_NET
-#define CONFIG_CMD_PCA953X
-#define CONFIG_CMD_PCA953X_INFO
-#define CONFIG_CMD_PCI
-#define CONFIG_CMD_PING
-#define CONFIG_CMD_SAVEENV
-#define CONFIG_CMD_SNTP
-#define CONFIG_CMD_REGINFO
-
-/*
- * Miscellaneous configurable options
- */
-#define CONFIG_SYS_LONGHELP                    /* undef to save memory */
-#define CONFIG_SYS_LOAD_ADDR   0x2000000       /* default load address */
-#define CONFIG_SYS_PROMPT      "=> "           /* Monitor Command Prompt */
-#define CONFIG_SYS_CBSIZE      256             /* Console I/O Buffer Size */
-#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
-#define CONFIG_SYS_MAXARGS     16              /* max number of command args */
-#define CONFIG_SYS_BARGSIZE    CONFIG_SYS_CBSIZE       /* Boot Argument Buffer Size */
-#define CONFIG_SYS_HZ          1000            /* decrementer freq: 1ms ticks */
-#define CONFIG_CMDLINE_EDITING 1               /* add command line history     */
-#define CONFIG_AUTO_COMPLETE   1               /* add autocompletion support */
-#define CONFIG_LOADADDR                0x1000000       /* default location for tftp and bootm */
-#define CONFIG_BOOTDELAY       3               /* -1 disables auto-boot */
-#define CONFIG_PANIC_HANG                      /* do not reset board on panic */
-#define CONFIG_PREBOOT                         /* enable preboot variable */
-#define CONFIG_FIT             1
-#define CONFIG_FIT_VERBOSE     1
-#define CONFIG_INTEGRITY                       /* support booting INTEGRITY OS */
-
-/*
- * For booting Linux, the board info and command line data
- * have to be in the first 16 MB of memory, since this is
- * the maximum mapped by the Linux kernel during initialization.
- */
-#define CONFIG_SYS_BOOTMAPSZ   (16 << 20)      /* Initial Memory map for Linux*/
-#define CONFIG_SYS_BOOTM_LEN   (16 << 20)      /* Increase max gunzip size */
-
-/*
- * Environment Configuration
- */
-#define CONFIG_ENV_IS_IN_FLASH 1
-#define CONFIG_ENV_SECT_SIZE   0x20000         /* 128k (one sector) for env */
-#define CONFIG_ENV_SIZE                0x8000
-#define CONFIG_ENV_ADDR                (CONFIG_SYS_MONITOR_BASE - (256 * 1024))
-
-/*
- * Flash memory map:
- * fff80000 - ffffffff     Pri U-Boot (512 KB)
- * fff40000 - fff7ffff     Pri U-Boot Environment (256 KB)
- * fff00000 - fff3ffff     Pri FDT (256KB)
- * fef00000 - ffefffff     Pri OS image (16MB)
- * f8000000 - feefffff     Pri OS Use/Filesystem (111MB)
- *
- * f7f80000 - f7ffffff     Sec U-Boot (512 KB)
- * f7f40000 - f7f7ffff     Sec U-Boot Environment (256 KB)
- * f7f00000 - f7f3ffff     Sec FDT (256KB)
- * f6f00000 - f7efffff     Sec OS image (16MB)
- * f0000000 - f6efffff     Sec OS Use/Filesystem (111MB)
- */
-#define CONFIG_UBOOT1_ENV_ADDR MK_STR(0xfff80000)
-#define CONFIG_UBOOT2_ENV_ADDR MK_STR(0xf7f80000)
-#define CONFIG_FDT1_ENV_ADDR   MK_STR(0xfff00000)
-#define CONFIG_FDT2_ENV_ADDR   MK_STR(0xf7f00000)
-#define CONFIG_OS1_ENV_ADDR    MK_STR(0xfef00000)
-#define CONFIG_OS2_ENV_ADDR    MK_STR(0xf6f00000)
-
-#define CONFIG_PROG_UBOOT1                                             \
-       "$download_cmd $loadaddr $ubootfile; "                          \
-       "if test $? -eq 0; then "                                       \
-               "protect off "CONFIG_UBOOT1_ENV_ADDR" +80000; "         \
-               "erase "CONFIG_UBOOT1_ENV_ADDR" +80000; "               \
-               "cp.w $loadaddr "CONFIG_UBOOT1_ENV_ADDR" 40000; "       \
-               "protect on "CONFIG_UBOOT1_ENV_ADDR" +80000; "          \
-               "cmp.b $loadaddr "CONFIG_UBOOT1_ENV_ADDR" 80000; "      \
-               "if test $? -ne 0; then "                               \
-                       "echo PROGRAM FAILED; "                         \
-               "else; "                                                \
-                       "echo PROGRAM SUCCEEDED; "                      \
-               "fi; "                                                  \
-       "else; "                                                        \
-               "echo DOWNLOAD FAILED; "                                \
-       "fi;"
-
-#define CONFIG_PROG_UBOOT2                                             \
-       "$download_cmd $loadaddr $ubootfile; "                          \
-       "if test $? -eq 0; then "                                       \
-               "protect off "CONFIG_UBOOT2_ENV_ADDR" +80000; "         \
-               "erase "CONFIG_UBOOT2_ENV_ADDR" +80000; "               \
-               "cp.w $loadaddr "CONFIG_UBOOT2_ENV_ADDR" 40000; "       \
-               "protect on "CONFIG_UBOOT2_ENV_ADDR" +80000; "          \
-               "cmp.b $loadaddr "CONFIG_UBOOT2_ENV_ADDR" 80000; "      \
-               "if test $? -ne 0; then "                               \
-                       "echo PROGRAM FAILED; "                         \
-               "else; "                                                \
-                       "echo PROGRAM SUCCEEDED; "                      \
-               "fi; "                                                  \
-       "else; "                                                        \
-               "echo DOWNLOAD FAILED; "                                \
-       "fi;"
-
-#define CONFIG_BOOT_OS_NET                                             \
-       "$download_cmd $osaddr $osfile; "                               \
-       "if test $? -eq 0; then "                                       \
-               "if test -n $fdtaddr; then "                            \
-                       "$download_cmd $fdtaddr $fdtfile; "             \
-                       "if test $? -eq 0; then "                       \
-                               "bootm $osaddr - $fdtaddr; "            \
-                       "else; "                                        \
-                               "echo FDT DOWNLOAD FAILED; "            \
-                       "fi; "                                          \
-               "else; "                                                \
-                       "bootm $osaddr; "                               \
-               "fi; "                                                  \
-       "else; "                                                        \
-               "echo OS DOWNLOAD FAILED; "                             \
-       "fi;"
-
-#define CONFIG_PROG_OS1                                                        \
-       "$download_cmd $osaddr $osfile; "                               \
-       "if test $? -eq 0; then "                                       \
-               "erase "CONFIG_OS1_ENV_ADDR" +$filesize; "              \
-               "cp.b $osaddr "CONFIG_OS1_ENV_ADDR" $filesize; "        \
-               "cmp.b $osaddr "CONFIG_OS1_ENV_ADDR" $filesize; "       \
-               "if test $? -ne 0; then "                               \
-                       "echo OS PROGRAM FAILED; "                      \
-               "else; "                                                \
-                       "echo OS PROGRAM SUCCEEDED; "                   \
-               "fi; "                                                  \
-       "else; "                                                        \
-               "echo OS DOWNLOAD FAILED; "                             \
-       "fi;"
-
-#define CONFIG_PROG_OS2                                                        \
-       "$download_cmd $osaddr $osfile; "                               \
-       "if test $? -eq 0; then "                                       \
-               "erase "CONFIG_OS2_ENV_ADDR" +$filesize; "              \
-               "cp.b $osaddr "CONFIG_OS2_ENV_ADDR" $filesize; "        \
-               "cmp.b $osaddr "CONFIG_OS2_ENV_ADDR" $filesize; "       \
-               "if test $? -ne 0; then "                               \
-                       "echo OS PROGRAM FAILED; "                      \
-               "else; "                                                \
-                       "echo OS PROGRAM SUCCEEDED; "                   \
-               "fi; "                                                  \
-       "else; "                                                        \
-               "echo OS DOWNLOAD FAILED; "                             \
-       "fi;"
-
-#define CONFIG_PROG_FDT1                                               \
-       "$download_cmd $fdtaddr $fdtfile; "                             \
-       "if test $? -eq 0; then "                                       \
-               "erase "CONFIG_FDT1_ENV_ADDR" +$filesize;"              \
-               "cp.b $fdtaddr "CONFIG_FDT1_ENV_ADDR" $filesize; "      \
-               "cmp.b $fdtaddr "CONFIG_FDT1_ENV_ADDR" $filesize; "     \
-               "if test $? -ne 0; then "                               \
-                       "echo FDT PROGRAM FAILED; "                     \
-               "else; "                                                \
-                       "echo FDT PROGRAM SUCCEEDED; "                  \
-               "fi; "                                                  \
-       "else; "                                                        \
-               "echo FDT DOWNLOAD FAILED; "                            \
-       "fi;"
-
-#define CONFIG_PROG_FDT2                                               \
-       "$download_cmd $fdtaddr $fdtfile; "                             \
-       "if test $? -eq 0; then "                                       \
-               "erase "CONFIG_FDT2_ENV_ADDR" +$filesize;"              \
-               "cp.b $fdtaddr "CONFIG_FDT2_ENV_ADDR" $filesize; "      \
-               "cmp.b $fdtaddr "CONFIG_FDT2_ENV_ADDR" $filesize; "     \
-               "if test $? -ne 0; then "                               \
-                       "echo FDT PROGRAM FAILED; "                     \
-               "else; "                                                \
-                       "echo FDT PROGRAM SUCCEEDED; "                  \
-               "fi; "                                                  \
-       "else; "                                                        \
-               "echo FDT DOWNLOAD FAILED; "                            \
-       "fi;"
-
-#define        CONFIG_EXTRA_ENV_SETTINGS                                       \
-       "autoload=yes\0"                                                \
-       "download_cmd=tftp\0"                                           \
-       "console_args=console=ttyS0,115200\0"                           \
-       "root_args=root=/dev/nfs rw\0"                                  \
-       "misc_args=ip=on\0"                                             \
-       "set_bootargs=setenv bootargs ${console_args} ${root_args} ${misc_args}\0" \
-       "bootfile=/home/user/file\0"                                    \
-       "osfile=/home/user/uImage-XPedite5370\0"                        \
-       "fdtfile=/home/user/xpedite5370.dtb\0"                          \
-       "ubootfile=/home/user/u-boot.bin\0"                             \
-       "fdtaddr=c00000\0"                                              \
-       "osaddr=0x1000000\0"                                            \
-       "loadaddr=0x1000000\0"                                          \
-       "prog_uboot1="CONFIG_PROG_UBOOT1"\0"                            \
-       "prog_uboot2="CONFIG_PROG_UBOOT2"\0"                            \
-       "prog_os1="CONFIG_PROG_OS1"\0"                                  \
-       "prog_os2="CONFIG_PROG_OS2"\0"                                  \
-       "prog_fdt1="CONFIG_PROG_FDT1"\0"                                \
-       "prog_fdt2="CONFIG_PROG_FDT2"\0"                                \
-       "bootcmd_net=run set_bootargs; "CONFIG_BOOT_OS_NET"\0"          \
-       "bootcmd_flash1=run set_bootargs; "                             \
-               "bootm "CONFIG_OS1_ENV_ADDR" - "CONFIG_FDT1_ENV_ADDR"\0"\
-       "bootcmd_flash2=run set_bootargs; "                             \
-               "bootm "CONFIG_OS2_ENV_ADDR" - "CONFIG_FDT2_ENV_ADDR"\0"\
-       "bootcmd=run bootcmd_flash1\0"
-#endif /* __CONFIG_H */
index a0fca032f4706ff5c50658456d357b6279be31b0..0e340e898e099e34b6d894fe21d7faea42b10d69 100644 (file)
 
 /* Use SRAM until RAM will be available */
 #define CONFIG_SYS_INIT_RAM_ADDR       (CONFIG_SYS_MBAR + 0x20000)
-#define CONFIG_SYS_INIT_RAM_END        0x8000  /* End of used area in DPRAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x8000  /* Size of used area in DPRAM */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE
index 0eabf37e58f6288e7a24d9b0933185dd4d292da2..265b1112fe694ffa05e5c38c96afb19d0c99da01 100644 (file)
 #define BCSR_PCI_MODE          0x01
 
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x4000  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /* Hard reset configuration word */
index 17ada0d9a528e1d57a62b3a01c53d740e1be16ae..5489bd831d5b725530fd34061d51e619ba22af27 100644 (file)
  * Definitions for initial stack pointer and data area
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x40000000
-#define CONFIG_SYS_INIT_RAM_END        0x1000
-#define CONFIG_SYS_GBL_DATA_SIZE       128  /* size in bytes reserved for init data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x1000
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_RAM_LOCK
 
 
index fcc556321ba5c41d4a797a6be76cf07db10282f8..f67cf067b90de4630c19571095e22dce9c44f0e3 100644 (file)
 /*-----------------------------------------------------------------------
  * size in bytes reserved for initial data
 */
-#define CONFIG_SYS_GBL_DATA_SIZE       128
 
 /*-----------------------------------------------------------------------
  * SDRAM controller configuration
index 6dcebe6f44c069c3a84ec1bdf26dbc5a5216c836..b5d20bd7b25d1386b2c58e2de042d28417041f19 100644 (file)
@@ -37,6 +37,8 @@
 #define CONFIG_A4M072          1       /* ... on A4M072 board */
 #define CONFIG_MPC5200_DDR     1       /* ... use DDR RAM */
 
+#define CONFIG_SYS_TEXT_BASE   0xFE000000
+
 #define CONFIG_MISC_INIT_R
 
 #define CONFIG_SYS_MPC5XXX_CLKIN       33000000 /* ... running at 33.000000MHz */
@@ -77,7 +79,7 @@
 #define CONFIG_SYS_XLB_PIPELINING      1
 
 #undef CONFIG_NET_MULTI
-#undef CONFIG_EEPRO100 
+#undef CONFIG_EEPRO100
 
 /* Partitions */
 #define CONFIG_MAC_PARTITION
 #define CONFIG_CMD_PCI
 #endif
 
-#if (TEXT_BASE == 0xFE000000)          /* Boot low with 32 MB Flash */
+#if (CONFIG_SYS_TEXT_BASE == 0xFE000000)               /* Boot low with 32 MB Flash */
 #define CONFIG_SYS_LOWBOOT             1
 #define CONFIG_SYS_LOWBOOT32           1
 #endif
 #define CONFIG_PREBOOT                         "run try_update"
 
 #define        CONFIG_EXTRA_ENV_SETTINGS                                       \
-       "bk=run add_mtd ; run add_consolespec ; bootm 200000\0" \
-       "cf1=diskboot 200000 0:1\0"     \
-       "bootcmd_cf1=run bcf1\0"        \
-       "bcf=setenv bootargs root=/dev/hda3\0"  \
-       "bootcmd_nfs=run bnfs\0"        \
-       "norargs=setenv bootargs root=/dev/mtdblock3 rootfstype=cramfs\0"       \
-       "bootcmd_nor=cp.b ${kernel_addr} 200000 100000; run norargs addip; run bk\0"    \
-       "bnfs=nfs 200000 ${rootpath}/boot/uImage ; run nfsargs addip ; run bk\0"        \
-       "nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath}\0"    \
-       "try_update=usb start;sleep 2;usb start;sleep 1;fatload usb 0 2F0000 PCPUUPDT 2FF;usb stop;source 2F0000\0"     \
-       "env_addr=FE060000\0"   \
-       "kernel_addr=FE100000\0"        \
-       "rootfs_addr=FE200000\0"        \
-       "add_mtd=setenv bootargs ${bootargs} mtdparts=phys_mapped_flash:384k(u),640k(e),1m(k),30m(r)\0" \
-       "bcf1=run cf1; run bcf; run addip; run bk\0"    \
-       "add_consolespec=setenv bootargs ${bootargs} console=/dev/null quiet\0" \
-       "addip=if test \"${ethaddr}\" != \"00:00:00:00:00:00\" ; then if test -n ${ipaddr}; then setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off panic=1; fi ; fi\0"     \
-       "hostname=CPUP0\0"      \
-       "ethaddr=00:00:00:00:00:00\0"   \
-       "netdev=eth0\0" \
-       "bootcmd=run bootcmd_nor\0" \
+       "bk=run add_mtd ; run add_consolespec ; bootm 200000\0"         \
+       "cf1=diskboot 200000 0:1\0"                                     \
+       "bootcmd_cf1=run bcf1\0"                                        \
+       "bcf=setenv bootargs root=/dev/hda3\0"                          \
+       "bootcmd_nfs=run bnfs\0"                                        \
+       "norargs=setenv bootargs root=/dev/mtdblock3 rootfstype=cramfs "\
+               "panic=1\0"                                             \
+       "bootcmd_nor=cp.b ${kernel_addr} 200000 100000;"                \
+                       "run norargs addip; run bk\0"                   \
+       "bnfs=nfs 200000 ${rootpath}/boot/uImage;"                      \
+                       "run nfsargs addip ; run bk\0"                  \
+       "nfsargs=setenv bootargs root=/dev/nfs rw "                     \
+                               "nfsroot=${serverip}:${rootpath}\0"     \
+       "try_update=usb start;sleep 2;usb start;sleep 1;"               \
+                       "fatload usb 0 2F0000 PCPUUPDT 2FF;usb stop;"   \
+                       "source 2F0000\0"                               \
+       "env_addr=FE060000\0"                                           \
+       "kernel_addr=FE100000\0"                                        \
+       "rootfs_addr=FE200000\0"                                        \
+       "add_mtd=setenv bootargs ${bootargs} mtdparts="                 \
+               "phys_mapped_flash:384k(u),640k(e),1m(k),30m(r)\0"      \
+       "bcf1=run cf1; run bcf; run addip; run bk\0"                    \
+       "add_consolespec=setenv bootargs ${bootargs} "                  \
+                               "console=/dev/null quiet\0"             \
+       "addip=if test -n ${ethaddr};"                                  \
+               "then if test -n ${ipaddr};"                            \
+                       "then setenv bootargs ${bootargs} "             \
+                               "ip=${ipaddr}:${serverip}:${gatewayip}:"\
+                               "${netmask}:${hostname}:${netdev}:off;" \
+                       "fi;"                                           \
+               "else;"                                                 \
+                       "setenv bootargs ${bootargs} no_ethaddr;"       \
+               "fi\0"                                                  \
+       "hostname=CPUP0\0"                                              \
+       "ethaddr=00:00:00:00:00:00\0"                                   \
+       "netdev=eth0\0"                                                 \
+       "bootcmd=run bootcmd_nor\0"                                     \
        ""
 /*
  * IPB Bus clocking configuration.
 #define CONFIG_SYS_FLASH_CFI
 #define CONFIG_SYS_FLASH_CFI_WIDTH     FLASH_CFI_16BIT
 #define CONFIG_SYS_FLASH_BANKS_LIST    {CONFIG_SYS_CS0_START}
+#define CONFIG_SYS_FLASH_BANKS_SIZES   {CONFIG_SYS_CS0_SIZE}
 
 /*
  * Environment settings
 
 /* Use SRAM until RAM will be available */
 #define CONFIG_SYS_INIT_RAM_ADDR       MPC5XXX_SRAM
-#define CONFIG_SYS_INIT_RAM_END                MPC5XXX_SRAM_SIZE       /* End of used area in DPRAM */
+#define CONFIG_SYS_INIT_RAM_SIZE               MPC5XXX_SRAM_SIZE       /* Size of used area in DPRAM */
 
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
-#define CONFIG_SYS_MONITOR_BASE    TEXT_BASE
+#define CONFIG_SYS_MONITOR_BASE    CONFIG_SYS_TEXT_BASE
 #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE)
 #   define CONFIG_SYS_RAMBOOT          1
 #endif
index c1bd4be9441cfde9f216338f11896ac4a146887b..5573dc7a32f73a9397efac5e97e927a2b9837988 100644 (file)
 #define CONFIG_SYS_OCM_DATA_ADDR       0xf8000000
 #define CONFIG_SYS_OCM_DATA_SIZE       0x4000                  /* 16K of onchip SRAM           */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR        /* inside of SRAM               */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE        /* End of used area in RAM      */
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE        /* Size of used area in RAM     */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128                     /* size for initial data        */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 91f6ff03f971b87aa8f9233f18dac3ab51b1adba..8886eff9e5625b83422759754f4a8aad751362cd 100644 (file)
@@ -55,7 +55,6 @@
  */
 #define CONFIG_SYS_MALLOC_LEN                  (CONFIG_ENV_SIZE + 128*1024)
 /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_SIZE               128
 
 /* allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
index b9369383593c61dc28c1224ab9e50acd26e47ef2..756279e398dd4ba868a31e3ba6cafb9a0f49782b 100644 (file)
@@ -46,7 +46,6 @@
 /* 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
 
 /* allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
index f5ee8991023d3d4b0e8b9720149efb43c2960f4b..ad9173f347940f636f993f17be10c24db08c07d7 100644 (file)
@@ -46,7 +46,6 @@
 /* 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
 
 /* allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
index 8d70a268ce54d38952b4a02e8f349ff40e167ee3..04145c35c311eedff22de407d551037845c7a888 100644 (file)
@@ -46,7 +46,6 @@
 /* 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
 
 /* allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
index 10ffb2e113b8df7140838acd91778e24474d5fe9..fb958fd943a57c4bef86b29c51984b4d46dde8ef 100644 (file)
 #define CONFIG_SYS_INIT_RAM_ADDR       MPC5XXX_SRAM
 #ifdef CONFIG_POST
 /* preserve space for the post_word at end of on-chip SRAM */
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_POST_SIZE
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_POST_SIZE
 #else
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_SIZE
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_SIZE
 #endif
 
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE
index 24484fd0c87565dda50bf21ecaa1bdf6831baab2..36a2a461d16fb94071dc0b89f186b1d32483515c 100644 (file)
@@ -42,7 +42,6 @@
 #define CONFIG_INITRD_TAG      1
 
 #define CONFIG_SKIP_LOWLEVEL_INIT
-#define CONFIG_SKIP_RELOCATE_UBOOT
 
 /*
  * Hardware drivers
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* 128 bytes for initial data */
 
 #define CONFIG_STACKSIZE       (32 * 1024)     /* regular stack */
 
index dfe7802119f7df75ac519b53f23f3ef3d55738c6..d93e505907c9b112da73958bf88fca9e0e3b7fc0 100644 (file)
 #define CONFIG_SYS_TEMP_STACK_OCM  1
 #define CONFIG_SYS_OCM_DATA_ADDR   CONFIG_SYS_ISRAM_BASE
 #define CONFIG_SYS_INIT_RAM_ADDR   CONFIG_SYS_ISRAM_BASE  /* Initial RAM address       */
-#define CONFIG_SYS_INIT_RAM_END    0x2000          /* End of used area in RAM  */
-#define CONFIG_SYS_GBL_DATA_SIZE   128             /* num bytes initial data   */
+#define CONFIG_SYS_INIT_RAM_SIZE    0x2000         /* Size of used area in RAM */
 
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      (CONFIG_SYS_GBL_DATA_OFFSET - 0x4)
 
 #define CONFIG_SYS_MONITOR_LEN     (256 * 1024)    /* Reserve 256 kB for Mon   */
index a9045d8bade79b8dc295559fc64f948b11eac9c3..9a9ba8890771410f12c5e45911d362f29ee6ea70 100644 (file)
@@ -61,7 +61,6 @@
  */
 #define CONFIG_ENV_SIZE                        (128 << 10)     /* 128 KiB sector */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + (128 << 10))
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* bytes reserved for */
                                                /* initial data */
 /*
  * DDR related
index b9f1f6bafe6292d9db0f24aa6fe428aeea38f83e..b5d3e102b29bb68fcb7d0fce0162f1b619cc7334 100644 (file)
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_REGINFO
 
-#if defined(CONFIG_SYS_RAMBOOT)
-/*
- * Disable NOR FLASH commands on RAM-booting version. One main reason for this
- * RAM-booting version is boards with NAND and without NOR. This image can
- * be used for initial NAND programming.
- */
-#define CONFIG_SYS_NO_FLASH
-#undef CONFIG_CMD_FLASH
-#undef CONFIG_CMD_IMLS
-#endif
-
 /*
  * Miscellaneous configurable options
  */
        "load=tftp 200000 ${u-boot}\0"                                  \
        "update=protect off " xstr(CONFIG_SYS_MONITOR_BASE) " FFFFFFFF;"        \
                "era " xstr(CONFIG_SYS_MONITOR_BASE) " FFFFFFFF;"               \
-               "cp.b ${fileaddr} " xstr(CONFIG_SYS_MONITOR_BASE) " ${filesize}" \
+               "cp.b ${fileaddr} " xstr(CONFIG_SYS_MONITOR_BASE) " ${filesize}\0" \
        "upd=run load update\0"                                         \
 
 #define CONFIG_AMCC_DEF_ENV_NAND_UPD                                   \
        "u-boot-nand=" xstr(CONFIG_HOSTNAME) "/u-boot-nand.bin\0"       \
        "nload=tftp 200000 ${u-boot-nand}\0"                            \
-       "nupdate=nand erase 0 100000;nand write 200000 0 100000"        \
+       "nupdate=nand erase 0 100000;nand write 200000 0 100000\0"      \
        "nupd=run nload nupdate\0"
 
 #endif /* __AMCC_COMMON_H */
index 80a5797493da1960605cf4d6f6a4e5d66dbce812..e7f37f59fdebda69ad9ecb26dd653f25e9476019 100644 (file)
 /* Size of DRAM reserved for malloc() use */
 #define CONFIG_SYS_MALLOC_LEN  (256 * 1024)
 /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_SIZE       (256)
 #define CONFIG_SYS_BOOTMAPSZ   (8 * 1024 * 1024)
 
 /* FLASH */
index c1295de36d2e8cb1026496ec8c96aaf87771a961..aa7446233c0ee4524eb41128970e9faa38ea169b 100644 (file)
@@ -79,7 +79,6 @@
 #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
 
 /*
  * Hardware drivers
index a63c45334a807ae84f627cfc2b8c9f3ff88a5b7f..b3ca8d23f8c715ab74ee32093e6a5f27b0526f22 100644 (file)
 
 /* Use SRAM for initial stack */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_SRAM_BASE
-#define CONFIG_SYS_INIT_RAM_END                CONFIG_SYS_SRAM_SIZE
+#define CONFIG_SYS_INIT_RAM_SIZE               CONFIG_SYS_SRAM_SIZE
 
-#define CONFIG_SYS_GBL_DATA_SIZE       0x100
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - \
-                                        CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - \
+                                        GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_BASE                CONFIG_SYS_TEXT_BASE
index 49ea3a16685979c34e61cd8619ecc0b789331585..d0d0998d6efbc80038353b6502d2992ed1517056 100644 (file)
@@ -51,7 +51,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
index 58cdbd59043cd2920e1bccb01b1312a82f38eff9..5cd1836434f43029840701d844ba288563be58c1 100644 (file)
@@ -48,7 +48,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size rsrvd for initial data */
 
 /*
  * Hardware drivers
index f2bc26aab818adea5b541a3d322c380d8833a593..d468e498fa49b503294c9367bff0b1debf2a28e7 100644 (file)
  * Definitions for initial stack pointer and data area (in internal SRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x80000000
-#define CONFIG_SYS_INIT_RAM_END                0x8000
+#define CONFIG_SYS_INIT_RAM_SIZE               0x8000
 #define CONFIG_SYS_INIT_RAM_CTRL       0x221
-#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_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - \
+                                        GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*
 #define CONFIG_SYS_CACHELINE_SIZE      16
 
 #define ICACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 8)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 8)
 #define DCACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 4)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 4)
 #define CONFIG_SYS_ICACHE_INV          (CF_CACR_CINVA)
 #define CONFIG_SYS_CACHE_ACR0          (CONFIG_SYS_SDRAM_BASE | \
                                         CF_ADDRMASK(CONFIG_SYS_SDRAM_SIZE) | \
index 44c287033ff3acb66938699c6fc8f98d6d61e737..49c923f163dc66a769061b7ad2ed3432bb67fdc6 100644 (file)
@@ -44,7 +44,6 @@
 #define CONFIG_INITRD_TAG      1
 
 #define CONFIG_SKIP_LOWLEVEL_INIT
-#define CONFIG_SKIP_RELOCATE_UBOOT
 
 /*
  * Hardware drivers
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          ROUND(CONFIG_ENV_SIZE + 128*1024, 0x1000)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* 128 bytes for initial data */
 
 #define CONFIG_STACKSIZE       (32*1024)       /* regular stack */
 
index d39e8f28a960e02338758326c502f9ce9d410406..15de3103048f4ce086a86aa73741318152890bf9 100644 (file)
 #define CONFIG_SYS_SDRC_MR_VAL2        0x00000003 /* Load Mode Register */
 #define CONFIG_SYS_SDRC_MR_VAL3        0x00000000 /* Normal Mode */
 #define CONFIG_SYS_SDRC_TR_VAL 0x000002E0 /* Write refresh rate */
-#else
-#define CONFIG_SKIP_RELOCATE_UBOOT
 #endif /* CONFIG_SKIP_LOWLEVEL_INIT */
 /*
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN  (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 #define CONFIG_BAUDRATE 115200
 
index 145c3c37dacbbde326879973d3bff6a5d94ea5bd..14559f5ccca093389ccae5d8982b3958afa4da72 100644 (file)
@@ -1,4 +1,8 @@
 /*
+ * Copyright (C) 2010 Andreas Bießmann <biessmann.devel@googlemail.com>
+ *
+ * based on previous work by
+ *
  * Ulf Samuelsson <ulf@atmel.com>
  * Rick Bronson <rick@efn.org>
  *
  * MA 02111-1307 USA
  */
 
-#ifndef __CONFIG_H
-#define __CONFIG_H
+#ifndef __AT91RM9200EK_CONFIG_H__
+#define __AT91RM9200EK_CONFIG_H__
 
-#define CONFIG_AT91_LEGACY
+#include <asm/sizes.h>
 
-/* ARM asynchronous clock */
 /*
- * from 18.432 MHz crystal
- * (18432000 / 4 * 39)
+ * AT91C_XTAL_CLOCK is the frequency of external xtal in hertz
+ * AT91C_MAIN_CLOCK is the frequency of PLLA output
+ * AT91C_MASTER_CLOCK is the peripherial clock
+ * CONFIG_SYS_HZ_CLOCK is the value for CCR in tc0 (divider 2 is implicitely
+ *  set in arch/arm/cpu/arm920t/at91/timer.c)
+ * CONFIG_SYS_HZ is the tick rate for timer tc0
  */
-#define AT91C_MAIN_CLOCK       179712000
-/*
- * peripheral clock
- * (AT91C_MASTER_CLOCK / 3)
- */
-#define AT91C_MASTER_CLOCK     59904000
+#define AT91C_XTAL_CLOCK               18432000
+#define AT91C_MAIN_CLOCK               ((AT91C_XTAL_CLOCK / 4) * 39)
+#define AT91C_MASTER_CLOCK             (AT91C_MAIN_CLOCK / 3 )
+#define CONFIG_SYS_HZ_CLOCK            (AT91C_MASTER_CLOCK / 2)
+#define CONFIG_SYS_HZ                  1000
 
-#define AT91_SLOW_CLOCK                32768   /* slow clock */
+/* CPU configuration */
+#define CONFIG_ARM920T
+#define CONFIG_AT91RM9200
+#define CONFIG_AT91RM9200EK
+#define CONFIG_CPUAT91
+#define USE_920T_MMU
 
-#define CONFIG_ARM920T         1       /* This is an ARM920T Core      */
-#define CONFIG_AT91RM9200      1       /* It's an Atmel AT91RM9200 SoC */
-#define CONFIG_AT91RM9200EK    1       /* on an AT91RM9200EK Board     */
-#undef  CONFIG_USE_IRQ                 /* we don't need IRQ/FIQ stuff  */
-#define USE_920T_MMU           1
+#define CONFIG_CMDLINE_TAG
+#define CONFIG_SETUP_MEMORY_TAGS
+#define CONFIG_INITRD_TAG
 
-#define CONFIG_CMDLINE_TAG     1       /* enable passing of ATAGs      */
-#define CONFIG_SETUP_MEMORY_TAGS 1
-#define CONFIG_INITRD_TAG      1
+/*
+ * Memory Configuration
+ */
+#define CONFIG_NR_DRAM_BANKS           1
+#define CONFIG_SYS_SDRAM_BASE          0x20000000
+#define CONFIG_SYS_SDRAM_SIZE          SZ_32M
+
+#define CONFIG_SYS_MEMTEST_START       CONFIG_SYS_SDRAM_BASE
+#define CONFIG_SYS_MEMTEST_END         \
+               (CONFIG_SYS_MEMTEST_START + CONFIG_SYS_SDRAM_SIZE - SZ_256K)
 
 /*
  * LowLevel Init
  */
 #ifndef CONFIG_SKIP_LOWLEVEL_INIT
-#define CONFIG_SYS_USE_MAIN_OSCILLATOR         1
+#define CONFIG_SYS_USE_MAIN_OSCILLATOR
 /* flash */
 #define CONFIG_SYS_EBI_CFGR_VAL        0x00000000
 #define CONFIG_SYS_SMC_CSR0_VAL        0x00003284 /* 16bit, 2 TDF, 4 WS */
 #define CONFIG_SYS_PIOC_PDR_VAL        0xFFFF0000
 #define CONFIG_SYS_EBI_CSA_VAL 0x00000002 /* CS1=CONFIG_SYS_SDRAM */
 #define CONFIG_SYS_SDRC_CR_VAL 0x2188c155 /* set up the CONFIG_SYS_SDRAM */
-#define CONFIG_SYS_SDRAM       0x20000000 /* address of the CONFIG_SYS_SDRAM */
-#define CONFIG_SYS_SDRAM1      0x20000080 /* address of the CONFIG_SYS_SDRAM */
+#define CONFIG_SYS_SDRAM       CONFIG_SYS_SDRAM_BASE /* address of the SDRAM */
+#define CONFIG_SYS_SDRAM1      CONFIG_SYS_SDRAM_BASE /* address of the SDRAM */
 #define CONFIG_SYS_SDRAM_VAL   0x00000000 /* value written to CONFIG_SYS_SDRAM */
 #define CONFIG_SYS_SDRC_MR_VAL 0x00000002 /* Precharge All */
 #define CONFIG_SYS_SDRC_MR_VAL1        0x00000004 /* refresh */
 #define CONFIG_SYS_SDRC_MR_VAL2        0x00000003 /* Load Mode Register */
 #define CONFIG_SYS_SDRC_MR_VAL3        0x00000000 /* Normal Mode */
 #define CONFIG_SYS_SDRC_TR_VAL 0x000002E0 /* Write refresh rate */
-#else
-#define CONFIG_SKIP_RELOCATE_UBOOT
 #endif /* CONFIG_SKIP_LOWLEVEL_INIT */
 
-/* hardcode so no __divsi3 : AT91C_MASTER_CLOCK / baudrate / 16 */
-#define CONFIG_SYS_AT91C_BRGR_DIVISOR  33
-
-/*
- * Memory Configuration
- */
-#define CONFIG_NR_DRAM_BANKS           1
-#define PHYS_SDRAM                     0x20000000
-#define PHYS_SDRAM_SIZE                        0x02000000      /* 32 megs */
-
-#define CONFIG_SYS_MEMTEST_START       PHYS_SDRAM
-#define CONFIG_SYS_MEMTEST_END         \
-               (CONFIG_SYS_MEMTEST_START + PHYS_SDRAM_SIZE - 262144)
-
 /*
  * Hardware drivers
  */
-
 /*
- * UART Configuration
- *
- * define one of these to choose the DBGU,
- * USART0 or USART1 as console
+ * Choose a USART for serial console
+ * CONFIG_DBGU is DBGU unit on J10
+ * CONFIG_USART1 is USART1 on J14
  */
 #define CONFIG_AT91RM9200_USART
 #define CONFIG_DBGU
-#undef CONFIG_USART0
-#undef CONFIG_USART1
-/* don't include RTS/CTS flow control support  */
-#undef CONFIG_HWFLOW
-/* disable modem initialization stuff */
-#undef CONFIG_MODEM_SUPPORT
 
 #define CONFIG_SYS_BAUDRATE_TABLE      {115200 , 19200, 38400, 57600, 9600 }
 #define CONFIG_BAUDRATE                        115200
 #define CONFIG_CMD_FAT
 #define CONFIG_CMD_MII
 #define CONFIG_CMD_PING
-
-#undef CONFIG_CMD_BDI
-#undef CONFIG_CMD_IMI
+#define CONFIG_CMD_USB
 #undef CONFIG_CMD_FPGA
-#undef CONFIG_CMD_MISC
-#undef CONFIG_CMD_LOADS
-
-#include <asm/arch/AT91RM9200.h>       /* needed for port definitions */
-/* Options for MMC/SD Card */
-#define CONFIG_DOS_PARTITION   1
-#undef CONFIG_MMC
-#define CONFIG_SYS_MMC_BASE            0xFFFB4000
-#define CONFIG_SYS_MMC_BLOCKSIZE       512
 
 /*
  * Network Driver Setting
  */
-#define CONFIG_NET_MULTI               1
-#ifdef CONFIG_NET_MULTI
-#define CONFIG_DRIVER_AT91EMAC         1
-#define CONFIG_SYS_RX_ETH_BUFFER       8
-#else
-#define CONFIG_DRIVER_ETHER            1
-#endif
-#define CONFIG_NET_RETRY_COUNT         20
-#define CONFIG_AT91C_USE_RMII
-
-/*
- * AC Characteristics
- * DLYBS = tCSS = 250ns min and DLYBCT = tCSH = 250ns
- */
-#define DATAFLASH_TCSS (0xC << 16)
-#define DATAFLASH_TCHS (0x1 << 24)
-
-#if defined(CONFIG_HAS_DATAFLASH)
-#define CONFIG_SYS_SPI_WRITE_TOUT              (5 * CONFIG_SYS_HZ)
-#define CONFIG_SYS_MAX_DATAFLASH_BANKS         2
-#define CONFIG_SYS_MAX_DATAFLASH_PAGES         16384
-/* Logical adress for CS0 */
-#define CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0    0xC0000000
-/* Logical adress for CS3 */
-#define CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS3    0xD0000000
-#define        CONFIG_SYS_SUPPORT_BLOCK_ERASE          1
-#define        CONFIG_SYS_DATAFLASH_MMC_PIO            AT91C_PIO_PB22
-#endif
+#define CONFIG_NET_MULTI
+#define CONFIG_DRIVER_AT91EMAC
+#define CONFIG_SYS_RX_ETH_BUFFER       16
+#define CONFIG_RMII
+#define CONFIG_MII
 
 /*
  * NOR Flash
  */
-#define CONFIG_SYS_FLASH_BASE                  0x10000000
-#define PHYS_FLASH_SIZE                                0x800000        /* 8MB */
-#define CONFIG_SYS_FLASH_CFI                   1
-#define CONFIG_FLASH_CFI_DRIVER                        1
-#define CONFIG_SYS_MAX_FLASH_BANKS             1
-#define CONFIG_SYS_MAX_FLASH_SECT              256
+#define CONFIG_FLASH_CFI_DRIVER
+#define CONFIG_SYS_FLASH_CFI
+#define CONFIG_SYS_FLASH_BASE          0x10000000
+#define PHYS_FLASH_1                   CONFIG_SYS_FLASH_BASE
+#define PHYS_FLASH_SIZE                        SZ_8M
+#define CONFIG_SYS_MAX_FLASH_BANKS     1
+#define CONFIG_SYS_MAX_FLASH_SECT      256
 #define CONFIG_SYS_FLASH_PROTECTION
 
 /*
- * Environment Settings
- */
-#ifdef CONFIG_ENV_IS_IN_DATAFLASH
-/*
- * Datasflash Environment Settings
+ * USB Config
  */
-#define CONFIG_ENV_OFFSET                      0x4200
-#define CONFIG_ENV_ADDR                        \
-               (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + CONFIG_ENV_OFFSET)
-/* 8 * 1056 really , but start.s is not OK with this*/
-#define CONFIG_ENV_SIZE                        0x2000
+#define CONFIG_USB_ATMEL                       1
+#define CONFIG_USB_OHCI_NEW                    1
+#define CONFIG_USB_KEYBOARD                    1
+#define CONFIG_USB_STORAGE                     1
+#define CONFIG_DOS_PARTITION                   1
 
-#else
-/*
- * NOR Flash Environment Settings
- */
-#define CONFIG_ENV_IS_IN_FLASH         1
+#define CONFIG_SYS_USB_OHCI_CPU_INIT           1
+#define CONFIG_SYS_USB_OHCI_REGS_BASE          AT91_USB_HOST_BASE
+#define CONFIG_SYS_USB_OHCI_SLOT_NAME          "at91rm9200"
+#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS     15
 
-#ifdef CONFIG_SKIP_LOWLEVEL_INIT
 /*
- * between boot.bin and u-boot.bin.gz
+ * Environment Settings
  */
-#define CONFIG_ENV_ADDR                        (CONFIG_SYS_FLASH_BASE + 0xe000)
-#define CONFIG_ENV_SIZE                        0x10000 /* sectors are 64K here */
-#else
+#define CONFIG_ENV_IS_IN_FLASH
+
 /*
  * after u-boot.bin
  */
 #define CONFIG_ENV_ADDR                        \
                (CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN)
-#define CONFIG_ENV_SIZE                        0x10000 /* sectors are 64K here */
+#define CONFIG_ENV_SIZE                        SZ_64K /* sectors are 64K here */
 /* The following #defines are needed to get flash environment right */
 #define CONFIG_SYS_MONITOR_BASE                CONFIG_SYS_FLASH_BASE
-#define CONFIG_SYS_MONITOR_LEN         \
-               (CONFIG_SYS_BOOT_SIZE + CONFIG_SYS_U_BOOT_SIZE)
-#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
-
-#endif /* CONFIG_ENV_IS_IN_DATAFLASH */
+#define CONFIG_SYS_MONITOR_LEN         SZ_256K
 
 /*
  * Boot option
  */
 #define CONFIG_BOOTDELAY               3
 
-#ifdef CONFIG_SKIP_LOWLEVEL_INIT
-/* boot.bin, env, u-boot.bin.gz */
-#define CONFIG_SYS_BOOT_SIZE           0x6000 /* 24 KBytes */
-#define CONFIG_SYS_U_BOOT_BASE         (CONFIG_SYS_FLASH_BASE + 0x10000)
-#define CONFIG_SYS_U_BOOT_SIZE         0x10000 /* 64 KBytes */
-#else
-/* u-boot.bin */
-#define CONFIG_SYS_BOOT_SIZE           0x0 /* 0 KBytes */
-#define CONFIG_SYS_U_BOOT_BASE         CONFIG_SYS_FLASH_BASE
-#define CONFIG_SYS_U_BOOT_SIZE         0x40000 /* 128 KBytes */
-#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
-
-#define CONFIG_SYS_LOAD_ADDR           0x21000000 /* default load address */
-#define CONFIG_ENV_OVERWRITE   1
-
-/*
- * USB Config
- */
-#define CONFIG_CMD_USB
-#define CONFIG_USB_OHCI_NEW    1
-#define CONFIG_USB_KEYBOARD    1
-#define CONFIG_USB_STORAGE     1
-#define CONFIG_DOS_PARTITION   1
-
-#undef CONFIG_SYS_USB_OHCI_BOARD_INIT
-#define CONFIG_SYS_USB_OHCI_CPU_INIT           1
-#define CONFIG_SYS_USB_OHCI_REGS_BASE          AT91_USB_HOST_BASE
-#define CONFIG_SYS_USB_OHCI_SLOT_NAME          "at91rm9200"
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS     15
-
-/*
- * I2C
- */
-#define CONFIG_HARD_I2C
-
-#ifdef CONFIG_HARD_I2C
-#define CONFIG_CMD_I2C
-#define CONFIG_SYS_I2C_SPEED           0       /* not used */
-#define CONFIG_SYS_I2C_SLAVE           0       /* not used */
-#endif
+/* default load address */
+#define CONFIG_SYS_LOAD_ADDR           CONFIG_SYS_SDRAM_BASE + SZ_16M
+#define CONFIG_ENV_OVERWRITE
 
 /*
  * Shell Settings
  */
-#define CONFIG_CMDLINE_EDITING         1
-#define CONFIG_SYS_LONGHELP            1
-#define CONFIG_AUTO_COMPLETE           1
-#define CONFIG_SYS_HUSH_PARSER         1
+#define CONFIG_CMDLINE_EDITING
+#define CONFIG_SYS_LONGHELP
+#define CONFIG_AUTO_COMPLETE
+#define CONFIG_SYS_HUSH_PARSER
 #define CONFIG_SYS_PROMPT              "U-Boot> "
 #define CONFIG_SYS_PROMPT_HUSH_PS2     "> "
 #define CONFIG_SYS_CBSIZE              256     /* Console I/O Buffer Size */
 #define CONFIG_SYS_PBSIZE              \
                (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
 
-#ifndef __ASSEMBLY__
-/*-----------------------------------------------------------------------
- * Board specific extension for bd_info
- *
- * This structure is embedded in the global bd_info (bd_t) structure
- * and can be used by the board specific code (eg board/...)
- */
-
-struct bd_info_ext {
-       /* helper variable for board environment handling
-        *
-        * env_crc_valid == 0   =>      uninitialised
-        * env_crc_valid > 0    =>      environment crc in flash is valid
-        * env_crc_valid < 0    =>      environment crc in flash is invalid
-        */
-       int env_crc_valid;
-};
-#endif
-
-#define CONFIG_SYS_HZ 1000
-/*
- * AT91C_TC0_CMR is implicitly set to
- * AT91C_TC_TIMER_DIV1_CLOCK
- */
-#define CONFIG_SYS_HZ_CLOCK (AT91C_MASTER_CLOCK / 2)
-
 /*
  * Size of malloc() pool
  */
-#define CONFIG_SYS_MALLOC_LEN          ROUND(3 * CONFIG_ENV_SIZE + 128 * 1024 \
-                                            , 0x1000)
+#define CONFIG_SYS_MALLOC_LEN          ROUND(3 * CONFIG_ENV_SIZE + SZ_128K, \
+                                            SZ_4K)
 /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_SIZE       128
 
-#define CONFIG_STACKSIZE               (32 * 1024)     /* regular stack */
-#define CONFIG_STACKSIZE_IRQ           (4 * 1024) /* Unsure if to big or to small*/
-#define CONFIG_STACKSIZE_FIQ           (4 * 1024) /* Unsure if to big or to small*/
-#endif
+#define CONFIG_SYS_INIT_SP_ADDR                (CONFIG_SYS_SDRAM_BASE + SZ_4K \
+                                       - GENERATED_GBL_DATA_SIZE)
+
+#define CONFIG_STACKSIZE               SZ_32K  /* regular stack */
+#define CONFIG_STACKSIZE_IRQ           SZ_4K   /* Unsure if to big or to small*/
+#define CONFIG_STACKSIZE_FIQ           SZ_4K   /* Unsure if to big or to small*/
+#endif /* __AT91RM9200EK_CONFIG_H__ */
index b89242b3a17631ac6fa10d9565dc57dbbaaf65e4..5e7dee5299fed0438174957fe4a2473cdab8eaa1 100644 (file)
@@ -49,7 +49,6 @@
 #define CONFIG_INITRD_TAG      1
 
 #define CONFIG_SKIP_LOWLEVEL_INIT
-#define CONFIG_SKIP_RELOCATE_UBOOT
 
 /*
  * Hardware drivers
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* 128 bytes for initial data */
 
 #define CONFIG_STACKSIZE       (32*1024)       /* regular stack */
 
index df8181b755ba7bcd8337e2154810347257339f46..401478b270571d2e127af55a37b4a99dfbeab9e1 100644 (file)
@@ -47,7 +47,6 @@
 #define CONFIG_INITRD_TAG      1
 
 #define CONFIG_SKIP_LOWLEVEL_INIT
-#define CONFIG_SKIP_RELOCATE_UBOOT
 
 /*
  * Hardware drivers
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* 128 bytes for initial data */
 
 #define CONFIG_STACKSIZE       (32*1024)       /* regular stack */
 
index 5cafa1ef4ac3df80f1c8192d2332667bc7be3e4a..f6cb40684fdbea5f4d10d19ffef119c793a12cd0 100644 (file)
@@ -43,7 +43,6 @@
 
 #ifndef CONFIG_SYS_USE_BOOT_NORFLASH
 #define CONFIG_SKIP_LOWLEVEL_INIT
-#define CONFIG_SKIP_RELOCATE_UBOOT
 #endif
 
 /*
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* 128 bytes for initial data */
 
 #define CONFIG_STACKSIZE       (32*1024)       /* regular stack */
 
index 44c5496b631cf675fd8214b91b499acc2eb2d92c..de74dcf18b5533f41a0be2cade699847513546e2 100644 (file)
@@ -47,7 +47,6 @@
 #define CONFIG_INITRD_TAG      1
 
 #define CONFIG_SKIP_LOWLEVEL_INIT
-#define CONFIG_SKIP_RELOCATE_UBOOT
 
 /*
  * Hardware drivers
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* 128 bytes for initial data */
 
 #define CONFIG_STACKSIZE       (32*1024)       /* regular stack */
 
index e8fcd66c940673bed9cd06e035520f93034da67e..8dbd0825b522080620a01ff14de0ced5d4e555f1 100644 (file)
@@ -44,7 +44,6 @@
 #define CONFIG_INITRD_TAG      1
 
 #define CONFIG_SKIP_LOWLEVEL_INIT
-#define CONFIG_SKIP_RELOCATE_UBOOT
 
 /*
  * Hardware drivers
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* 128 bytes for initial data */
 
 #define CONFIG_STACKSIZE       (32*1024)       /* regular stack */
 
index 62e38e1cf14464a6270f35e71b77b241c1064991..53da0f7e2c6c4ca5049fd08b8c6fccc72bd51de4 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x2F00  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       128 /* size in bytes reserved for initial data*/
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2F00  /* Size of used area in DPRAM    */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
diff --git a/include/configs/balloon3.h b/include/configs/balloon3.h
new file mode 100644 (file)
index 0000000..63e6d6e
--- /dev/null
@@ -0,0 +1,273 @@
+/*
+ * Balloon3 configuration file
+ *
+ * Copyright (C) 2010 Marek Vasut <marek.vasut@gmail.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
+ */
+
+#ifndef        __CONFIG_H
+#define        __CONFIG_H
+
+/*
+ * High Level Board Configuration Options
+ */
+#define        CONFIG_PXA27X           1       /* Marvell PXA270 CPU */
+#define        CONFIG_BALLOON3         1       /* Balloon3 board */
+
+/*
+ * Environment settings
+ */
+#define        CONFIG_ENV_OVERWRITE
+#define        CONFIG_SYS_MALLOC_LEN           (128*1024)
+#define        CONFIG_ARCH_CPU_INIT
+#define        CONFIG_BOOTCOMMAND                                              \
+       "fpga load 0x0 0x50000 0x62638; "                               \
+       "if usb reset && fatload usb 0 0xa4000000 uImage; then "        \
+               "bootm 0xa4000000; "                                    \
+       "fi; "                                                          \
+       "bootm 0xd0000;"
+#define        CONFIG_BOOTARGS                 "console=tty0 console=ttyS2,115200"
+#define        CONFIG_TIMESTAMP
+#define        CONFIG_BOOTDELAY                2       /* Autoboot delay */
+#define        CONFIG_CMDLINE_TAG
+#define        CONFIG_SETUP_MEMORY_TAGS
+#define        CONFIG_SYS_TEXT_BASE            0x0
+#define        CONFIG_LZMA                     /* LZMA compression support */
+
+/*
+ * Serial Console Configuration
+ */
+#define        CONFIG_PXA_SERIAL
+#define        CONFIG_STUART                   1
+#define        CONFIG_BAUDRATE                 115200
+#define        CONFIG_SYS_BAUDRATE_TABLE       { 9600, 19200, 38400, 57600, 115200 }
+
+/*
+ * Bootloader Components Configuration
+ */
+#include <config_cmd_default.h>
+
+#undef CONFIG_CMD_NET
+#undef CONFIG_CMD_ENV
+#undef CONFIG_CMD_IMLS
+#define        CONFIG_CMD_USB
+#define        CONFIG_CMD_FPGA
+#undef CONFIG_LCD
+
+/*
+ * KGDB
+ */
+#ifdef CONFIG_CMD_KGDB
+#define        CONFIG_KGDB_BAUDRATE            230400  /* kgdb serial port speed */
+#define        CONFIG_KGDB_SER_INDEX           2       /* which serial port to use */
+#endif
+
+/*
+ * HUSH Shell Configuration
+ */
+#define        CONFIG_SYS_HUSH_PARSER          1
+#define        CONFIG_SYS_PROMPT_HUSH_PS2      "> "
+
+#define        CONFIG_SYS_LONGHELP
+#ifdef CONFIG_SYS_HUSH_PARSER
+#define        CONFIG_SYS_PROMPT               "$ "
+#else
+#define        CONFIG_SYS_PROMPT               "=> "
+#endif
+#define        CONFIG_SYS_CBSIZE               256
+#define        CONFIG_SYS_PBSIZE               \
+       (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
+#define        CONFIG_SYS_MAXARGS              16
+#define        CONFIG_SYS_BARGSIZE             CONFIG_SYS_CBSIZE
+#define        CONFIG_SYS_DEVICE_NULLDEV       1
+
+/*
+ * Clock Configuration
+ */
+#undef CONFIG_SYS_CLKS_IN_HZ
+#define        CONFIG_SYS_HZ                   3250000         /* Timer @ 3250000 Hz */
+#define        CONFIG_SYS_CPUSPEED             0x290           /* 520MHz */
+
+/*
+ * Stack sizes
+ */
+#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
+
+/*
+ * DRAM Map
+ */
+#define        CONFIG_NR_DRAM_BANKS            3               /* 2 banks of DRAM */
+#define        PHYS_SDRAM_1                    0xa0000000      /* SDRAM Bank #1 */
+#define        PHYS_SDRAM_1_SIZE               0x08000000      /* 128 MB */
+#define        PHYS_SDRAM_2                    0xb0000000      /* SDRAM Bank #2 */
+#define        PHYS_SDRAM_2_SIZE               0x08000000      /* 128 MB */
+#define        PHYS_SDRAM_3                    0x80000000      /* SDRAM Bank #2 */
+#define        PHYS_SDRAM_3_SIZE               0x08000000      /* 128 MB */
+
+#define        CONFIG_SYS_DRAM_BASE            0xa0000000      /* CS0 */
+#define        CONFIG_SYS_DRAM_SIZE            0x18000000      /* 384 MB DRAM */
+
+#define        CONFIG_SYS_MEMTEST_START        0xa0400000      /* memtest works on */
+#define        CONFIG_SYS_MEMTEST_END          0xa0800000      /* 4 ... 8 MB in DRAM */
+
+#define        CONFIG_SYS_LOAD_ADDR            0xa1000000
+
+#define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM_1
+#define        CONFIG_SYS_INIT_SP_ADDR         \
+       (PHYS_SDRAM_1 + GENERATED_GBL_DATA_SIZE + 2048)
+
+/*
+ * NOR FLASH
+ */
+#ifdef CONFIG_CMD_FLASH
+#define        PHYS_FLASH_1                    0x00000000      /* Flash Bank #1 */
+#define        PHYS_FLASH_SIZE                 0x00800000      /* 8 MB */
+#define        CONFIG_SYS_FLASH_BASE           PHYS_FLASH_1
+
+#define        CONFIG_SYS_FLASH_CFI
+#define        CONFIG_FLASH_CFI_DRIVER         1
+#define        CONFIG_SYS_FLASH_CFI_WIDTH      FLASH_CFI_16BIT
+
+#define        CONFIG_SYS_MAX_FLASH_BANKS      1
+#define        CONFIG_SYS_MAX_FLASH_SECT       256
+
+#define        CONFIG_SYS_FLASH_USE_BUFFER_WRITE       1
+
+#define        CONFIG_SYS_FLASH_ERASE_TOUT     (2*CONFIG_SYS_HZ)
+#define        CONFIG_SYS_FLASH_WRITE_TOUT     (2*CONFIG_SYS_HZ)
+#define        CONFIG_SYS_FLASH_LOCK_TOUT      (2*CONFIG_SYS_HZ)
+#define        CONFIG_SYS_FLASH_UNLOCK_TOUT    (2*CONFIG_SYS_HZ)
+#define        CONFIG_SYS_FLASH_PROTECTION
+#define        CONFIG_ENV_IS_IN_FLASH
+#else
+#define        CONFIG_SYS_NO_FLASH
+#define        CONFIG_SYS_ENV_IS_NOWHERE
+#endif
+
+#define        CONFIG_SYS_MONITOR_BASE         0x000000
+#define        CONFIG_SYS_MONITOR_LEN          0x40000
+
+#define        CONFIG_ENV_SIZE                 0x2000
+#define        CONFIG_ENV_ADDR                 0x40000
+#define        CONFIG_ENV_SECT_SIZE            0x10000
+
+/*
+ * GPIO settings
+ */
+#define        CONFIG_SYS_GPSR0_VAL    0x307dc7fd
+#define        CONFIG_SYS_GPSR1_VAL    0x03cffa4e
+#define        CONFIG_SYS_GPSR2_VAL    0x7131c000
+#define        CONFIG_SYS_GPSR3_VAL    0x01e1f3ff
+
+#define        CONFIG_SYS_GPCR0_VAL    0x0
+#define        CONFIG_SYS_GPCR1_VAL    0x0
+#define        CONFIG_SYS_GPCR2_VAL    0x0
+#define        CONFIG_SYS_GPCR3_VAL    0x0
+
+#define        CONFIG_SYS_GPDR0_VAL    0xc0f98e02
+#define        CONFIG_SYS_GPDR1_VAL    0xfcffa8b7
+#define        CONFIG_SYS_GPDR2_VAL    0x22e3ffff
+#define        CONFIG_SYS_GPDR3_VAL    0x000201fe
+
+#define        CONFIG_SYS_GAFR0_L_VAL  0x96c00000
+#define        CONFIG_SYS_GAFR0_U_VAL  0xa5e5459b
+#define        CONFIG_SYS_GAFR1_L_VAL  0x699b759a
+#define        CONFIG_SYS_GAFR1_U_VAL  0xaaa5a5aa
+#define        CONFIG_SYS_GAFR2_L_VAL  0xaaaaaaaa
+#define        CONFIG_SYS_GAFR2_U_VAL  0x01f9a6aa
+#define        CONFIG_SYS_GAFR3_L_VAL  0x54510003
+#define        CONFIG_SYS_GAFR3_U_VAL  0x00001599
+
+#define        CONFIG_SYS_PSSR_VAL     0x30
+
+/*
+ * Clock settings
+ */
+#define        CONFIG_SYS_CKEN         0xffffffff
+#define        CONFIG_SYS_CCCR         0x00000290
+
+/*
+ * Memory settings
+ */
+#define        CONFIG_SYS_MSC0_VAL     0x7ff07ff8
+#define        CONFIG_SYS_MSC1_VAL     0x7ff07ff0
+#define        CONFIG_SYS_MSC2_VAL     0x74a42491
+#define        CONFIG_SYS_MDCNFG_VAL   0x89d309d3
+#define        CONFIG_SYS_MDREFR_VAL   0x001d8018
+#define        CONFIG_SYS_MDMRS_VAL    0x00220022
+#define        CONFIG_SYS_FLYCNFG_VAL  0x00000000
+#define        CONFIG_SYS_SXCNFG_VAL   0x00000000
+#define        CONFIG_SYS_MEM_BUF_IMP  0x0f
+
+/*
+ * PCMCIA and CF Interfaces
+ */
+#define        CONFIG_SYS_MECR_VAL     0x00000000
+#define        CONFIG_SYS_MCMEM0_VAL   0x00014307
+#define        CONFIG_SYS_MCMEM1_VAL   0x00014307
+#define        CONFIG_SYS_MCATT0_VAL   0x0001c787
+#define        CONFIG_SYS_MCATT1_VAL   0x0001c787
+#define        CONFIG_SYS_MCIO0_VAL    0x0001430f
+#define        CONFIG_SYS_MCIO1_VAL    0x0001430f
+
+/*
+ * LCD
+ */
+#ifdef CONFIG_LCD
+#define        CONFIG_BALLOON3LCD
+#define        CONFIG_VIDEO_LOGO
+#define        CONFIG_CMD_BMP
+#define        CONFIG_SPLASH_SCREEN
+#define        CONFIG_SPLASH_SCREEN_ALIGN
+#define        CONFIG_VIDEO_BMP_GZIP
+#define        CONFIG_VIDEO_BMP_RLE8
+#define        CONFIG_SYS_VIDEO_LOGO_MAX_SIZE  (2 << 20)
+#endif
+
+/*
+ * USB
+ */
+#ifdef CONFIG_CMD_USB
+#define        CONFIG_USB_OHCI_NEW
+#define        CONFIG_SYS_USB_OHCI_CPU_INIT
+#define        CONFIG_SYS_USB_OHCI_BOARD_INIT
+#define        CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS      2
+#define        CONFIG_SYS_USB_OHCI_REGS_BASE   0x4C000000
+#define        CONFIG_SYS_USB_OHCI_SLOT_NAME   "balloon3"
+#define        CONFIG_USB_STORAGE
+#define        CONFIG_DOS_PARTITION
+#define        CONFIG_CMD_FAT
+#define        CONFIG_CMD_EXT2
+#endif
+
+/*
+ * FPGA
+ */
+#ifdef CONFIG_CMD_FPGA
+#define        CONFIG_FPGA
+#define        CONFIG_FPGA_XILINX
+#define        CONFIG_FPGA_SPARTAN3
+#define        CONFIG_SYS_FPGA_PROG_FEEDBACK
+#define        CONFIG_SYS_FPGA_WAIT    1000
+#define        CONFIG_MAX_FPGA_DEVICES 1
+#endif
+
+#endif /* __CONFIG_H */
index 1bdfd9da2f081edf722c49a545945638a79341f8..7b66fc092a73a316539ace3e3aa6720766074c0f 100644 (file)
@@ -80,9 +80,8 @@
  *----------------------------------------------------------------------*/
 #define CONFIG_SYS_INIT_RAM_DCACHE     1               /* d-cache as init ram  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x70000000      /* DCache       */
-#define CONFIG_SYS_INIT_RAM_END        (4 << 10)
-#define CONFIG_SYS_GBL_DATA_SIZE       256             /* num bytes initial data       */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       (4 << 10)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index b656c01597f532397433f1826a2e08251df4f7e9..dcba0cbcc788537659c1ad00ddb27d53e4485c97 100644 (file)
 #define CONFIG_SYS_MONITOR_BASE        0x00090000
 #define CONFIG_SYS_RAMBOOT             1
 #define CONFIG_SYS_INIT_RAM_ADDR       (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
-#define CONFIG_SYS_INIT_RAM_END        0x10000
-#define CONFIG_SYS_GBL_DATA_SIZE       256  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x10000
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 #else
 #undef CONFIG_SYS_RAMBOOT
 #define CONFIG_SYS_MONITOR_LEN         0x00030000
 #define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128
 
 #define CONFIG_SYS_INIT_RAM_ADDR       0x40000000
-#define CONFIG_SYS_INIT_RAM_END        0x1000
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x1000
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 
 #endif
 
index 09691d37377410b04f739cb039053471452e8b52..608ab9f41a4dfe8047b0cf9963b986a13301cdb5 100644 (file)
@@ -11,7 +11,7 @@
 /*
  * Processor Settings
  */
-#define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_BYPASS
+#define CONFIG_BFIN_BOOT_MODE      BFIN_BOOT_BYPASS
 
 
 /*
  */
 /* CONFIG_CLKIN_HZ is any value in Hz                                  */
 #define CONFIG_CLKIN_HZ                        16384000
-/* CLKIN_HALF controls the DF bit in PLL_CTL      0 = CLKIN            */
-/*                                                1 = CLKIN / 2                */
+/* CLKIN_HALF controls the DF bit in PLL_CTL     0 = CLKIN             */
+/*                                               1 = CLKIN / 2         */
 #define CONFIG_CLKIN_HALF              0
 /* PLL_BYPASS controls the BYPASS bit in PLL_CTL  0 = do not bypass    */
-/*                                                1 = bypass PLL       */
+/*                                               1 = bypass PLL        */
 #define CONFIG_PLL_BYPASS              0
 /* VCO_MULT controls the MSEL (multiplier) bits in PLL_CTL             */
 /* Values can range from 0-63 (where 0 means 64)                       */
@@ -36,7 +36,7 @@
 /* SCLK_DIV controls the system clock divider                          */
 /* Values can range from 1-15                                          */
 #define CONFIG_SCLK_DIV                        3
-#define CONFIG_VR_CTL_VAL       (VLEV_110 | GAIN_20 | FREQ_1000)
+#define CONFIG_VR_CTL_VAL      (VLEV_110 | GAIN_20 | FREQ_1000)
 
 
 /*
  * it linked after the configuration sector.
  */
 # define LDS_BOARD_TEXT \
-        arch/blackfin/cpu/traps.o            (.text .text.*); \
-        arch/blackfin/cpu/interrupt.o        (.text .text.*); \
-        arch/blackfin/cpu/serial.o           (.text .text.*); \
-        common/dlmalloc.o               (.text .text.*); \
-        lib/crc32.o             (.text .text.*); \
-        . = DEFINED(env_offset) ? env_offset : .; \
-        common/env_embedded.o           (.text .text.*);
+       arch/blackfin/cpu/traps.o            (.text .text.*); \
+       arch/blackfin/cpu/interrupt.o        (.text .text.*); \
+       arch/blackfin/cpu/serial.o           (.text .text.*); \
+       common/dlmalloc.o               (.text .text.*); \
+       lib/crc32.o             (.text .text.*); \
+       . = DEFINED(env_offset) ? env_offset : .; \
+       common/env_embedded.o           (.text .text.*);
 #endif
 
 
index 4412177ff09c42c36ec77eff5f486191256cc8ce..1c035cfcadad70948244e0ba5851a0048de5d51e 100644 (file)
  * Misc Settings
  */
 #define CONFIG_BOARD_EARLY_INIT_F
+#define CONFIG_BOARD_SIZE_LIMIT $$(( 512 * 1024 ))
 #define CONFIG_RTC_BFIN
 #define CONFIG_UART_CONSOLE    1
 #define CONFIG_BFIN_SPI_IMG_SIZE 0x50000
index 608788a66f9f72fc264e4d404c9bc2d819b1d9d5..03c64339d624026e00530500dc8543781ed646c5 100644 (file)
 /*
  * Misc Settings
  */
+#ifndef CONFIG_BOARD_SIZE_LIMIT
+# define CONFIG_BOARD_SIZE_LIMIT $$(( 256 * 1024 ))
+#endif
 #define CONFIG_BFIN_SPI_GPIO_CS /* Only matters if BFIN_SPI is enabled */
 #define CONFIG_LZMA
 
index 8b2bdc715d6a36eb909787c7aa59c45fae5959c7..e4688a27b4a81c791fec1bbc7e9e7e313bdd6736 100644 (file)
  * AX88180  WEN = 5 clocks  REN 6 clocks @ SCLK = 100 MHz
  * One extra clock needed because AX88180 is asynchronous to CPU.
  */
-                           /* bank 1   0 */
+                          /* bank 1   0 */
 #define CONFIG_EBIU_AMBCTL0_VAL 0xFFC2FFC2
-                           /* bank 3   2 */
+                          /* bank 3   2 */
 #define CONFIG_EBIU_AMBCTL1_VAL 0xFFC2FFC2
 
 /* memory layout */
index 0bb97d9ea44a0ff9506ee03870e5ce35132beee3..3e691fdcf411f19ba7f274413f25d4d7cd59dc26 100644 (file)
  * Initial RAM & stack pointer (placed in OCM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_BASE     /* OCM    */
-#define CONFIG_SYS_INIT_RAM_END                (4 << 10)
-#define CONFIG_SYS_GBL_DATA_SIZE       256     /* num bytes initial data */
+#define CONFIG_SYS_INIT_RAM_SIZE               (4 << 10)
 #define CONFIG_SYS_GBL_DATA_OFFSET     \
-       (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+       (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*
index 7262b3e8a092441948cf409f801d6515d9c04cf5..da67ae3b5a2be7a9f89a64e34b2e77b9b2d4a299 100644 (file)
 #define CONFIG_SYS_OCM_DATA_ADDR       0xF8000000
 #define CONFIG_SYS_OCM_DATA_SIZE       0x1000
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR /* inside of SDRAM             */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE /* End of used area in RAM     */
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE /* Size of used area in RAM    */
 
-#define CONFIG_SYS_GBL_DATA_SIZE      128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 1351f297a969013350b88548becf6b74aa90441d..f325d2b439326bc05645889174a2b95d7447ff34 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 5547d55eecd25c24d53b69ce6fc3f5d9e44e8aff..63f003db23f25215cff161d6c2db8311bc005fc8 100644 (file)
@@ -45,7 +45,6 @@
 
 /* Size of malloc() pool */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128 * 1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128
 
 #define SCTL_BASE                      0x10001000
 #define VEXPRESS_FLASHPROG_FLVPPEN     (1 << 0)
 
 /* additions for new relocation code */
 #define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM_1
-#define CONFIG_SYS_INIT_RAM_END                0x1000
+#define CONFIG_SYS_INIT_RAM_SIZE               0x1000
 #define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_SDRAM_BASE + \
-                                        CONFIG_SYS_INIT_RAM_END - \
-                                        CONFIG_SYS_GBL_DATA_SIZE)
+                                        CONFIG_SYS_INIT_RAM_SIZE - \
+                                        GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_ADDR                CONFIG_SYS_GBL_DATA_OFFSET
 
 /* Basic environment settings */
index e1ee158d4c79a9531138cb464430567c3cef16c0..d4c5bbd5c9f1059663c0072a12179b7e463fb0f6 100644 (file)
 
 /* Use SRAM until RAM will be available */
 #define CONFIG_SYS_INIT_RAM_ADDR       MPC5XXX_SRAM
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_SIZE       /* End of used area in DPRAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_SIZE       /* Size of used area in DPRAM */
 
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_BASE    CONFIG_SYS_TEXT_BASE
index fcc7d0e3ed513f0512582b1fddabd36819cef75f..8c03582c8ddc149249eb3e67a6827b3ad62c5f82 100644 (file)
  * Initial RAM & stack pointer (placed in OCM)
  *----------------------------------------------------------------------*/
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_BASE     /* OCM                  */
-#define CONFIG_SYS_INIT_RAM_END        (4 << 10)
-#define CONFIG_SYS_GBL_DATA_SIZE       256             /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       (4 << 10)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 477b94aa6194cd5ce84584ccec73c31acc34df9d..9696487907dd029b500de3b2c793448c3d64f20d 100644 (file)
@@ -38,6 +38,7 @@
 #define CONFIG_CERF250         1       /* on Cerf PXA Board        */
 #define BOARD_LATE_INIT                1
 #define CONFIG_BAUDRATE                38400
+#define        CONFIG_SYS_TEXT_BASE    0x0
 
 #undef CONFIG_USE_IRQ                  /* we don't need IRQ/FIQ stuff */
 
@@ -48,7 +49,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN      (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
 /*
  * Physical Memory Map
  */
-#define CONFIG_NR_DRAM_BANKS   4                       /* we have 2 banks of DRAM */
+#define CONFIG_NR_DRAM_BANKS           1               /* we have 1 bank of DRAM */
 #define PHYS_SDRAM_1                   0xa0000000      /* SDRAM Bank #1 */
 #define PHYS_SDRAM_1_SIZE              0x04000000      /* 64 MB */
-#define PHYS_SDRAM_2                   0xa4000000      /* SDRAM Bank #2 */
-#define PHYS_SDRAM_2_SIZE              0x00000000      /* 0 MB */
-#define PHYS_SDRAM_3                   0xa8000000      /* SDRAM Bank #3 */
-#define PHYS_SDRAM_3_SIZE              0x00000000      /* 0 MB */
-#define PHYS_SDRAM_4                   0xac000000      /* SDRAM Bank #4 */
-#define PHYS_SDRAM_4_SIZE              0x00000000      /* 0 MB */
 
 #define PHYS_FLASH_1                   0x00000000      /* Flash Bank #1 */
 #define PHYS_FLASH_2                   0x04000000      /* Flash Bank #2 */
 
 #define CONFIG_SYS_FLASH_BASE                  PHYS_FLASH_1
 
+#define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM_1
+#define        CONFIG_SYS_INIT_SP_ADDR         (GENERATED_GBL_DATA_SIZE + PHYS_SDRAM_1)
+
 /*
  * GPIO settings
  */
 
 #define CONFIG_SYS_PSSR_VAL            0x20
 
+#define        CONFIG_SYS_CCCR                 CCCR_L27|CCCR_M2|CCCR_N10
+#define        CONFIG_SYS_CKEN                 0x0
+
 /*
  * Memory settings
  */
 #define CONFIG_SYS_MDCNFG_VAL          0x00001AC9
 #define CONFIG_SYS_MDREFR_VAL          0x03CDC017
 #define CONFIG_SYS_MDMRS_VAL           0x00000000
+#define        CONFIG_SYS_FLYCNFG_VAL          0x00000000
+#define        CONFIG_SYS_SXCNFG_VAL           0x00000000
 
 /*
  * PCMCIA and CF Interfaces
index 7ea1a46033ba2fa2ec3eabdaf7ab0afabf5e49d1..6e4a3b45156dfabbfe6b91c8c1d439275e7c48b7 100644 (file)
@@ -43,7 +43,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
index ea374da86e88cbd5315ea0f2c2bf753e52ad18d3..dca7d54c6b5525145789bc56fb5183898bd7512f 100644 (file)
@@ -43,7 +43,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
index 1b129a2e667ec446838df0ad988462539a359d8f..0abe090c14a0f3b762bd92ed5164a7b34f5d0910 100644 (file)
@@ -80,7 +80,9 @@
 #define CONFIG_POST            (CONFIG_SYS_POST_MEMORY | CONFIG_SYS_POST_CPU | CONFIG_SYS_POST_I2C)
 #define MPC5XXX_SRAM_POST_SIZE (MPC5XXX_SRAM_SIZE - 4)
 /* List of I2C addresses to be verified by POST */
-#define I2C_ADDR_LIST          { CONFIG_SYS_I2C_SLAVE, CONFIG_SYS_I2C_IO, CONFIG_SYS_I2C_EEPROM }
+#define CONFIG_SYS_POST_I2C_ADDRS      {CONFIG_SYS_I2C_SLAVE,  \
+                                        CONFIG_SYS_I2C_IO,     \
+                                        CONFIG_SYS_I2C_EEPROM}
 
 /* display image timestamps */
 #define CONFIG_TIMESTAMP       1
 #define CONFIG_SYS_INIT_RAM_ADDR       MPC5XXX_SRAM
 #ifdef CONFIG_POST
 /* preserve space for the post_word at end of on-chip SRAM */
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_POST_SIZE
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_POST_SIZE
 #else
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_SIZE
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_SIZE
 #endif
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_BOARD_TYPES     1       /* we use board_type */
 
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
index ffe83f091c0596b4cc020cd36b07636dd6659419..a1976350e4fdb8297455fc9cf6ab627775b4251f 100644 (file)
 #define CONFIG_SYS_SDRC_MR_VAL2        0x00000003 /* Load Mode Register */
 #define CONFIG_SYS_SDRC_MR_VAL3        0x00000000 /* Normal Mode */
 #define CONFIG_SYS_SDRC_TR_VAL 0x000002E0 /* Write refresh rate */
-#else
-#define CONFIG_SKIP_RELOCATE_UBOOT
 #endif /* CONFIG_SKIP_LOWLEVEL_INIT */
 
 /*
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN  (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 #define CONFIG_BAUDRATE                9600
 
index 88a45c324995f0ff0c40efdbd22fdd4393f488ee..198f3423e8ddca0a9599ff0b4ac8259d39be52f8 100644 (file)
  * Definitions for initial stack pointer and data area
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       (CONFIG_SYS_IMMR + 0x003f9800)  /* Physical start adress of internal MPC555 writable RAM */
-#define        CONFIG_SYS_INIT_RAM_END (CONFIG_SYS_IMMR + 0x003fffff)  /* Physical end adress of internal MPC555 used RAM area */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64                      /* Size in bytes reserved for initial global data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     ((CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_INIT_RAM_ADDR) - CONFIG_SYS_GBL_DATA_SIZE) /* Offset from the beginning of ram */
+#define        CONFIG_SYS_INIT_RAM_SIZE        (CONFIG_SYS_IMMR + 0x003fffff)  /* Physical end adress of internal MPC555 used RAM area */
+#define CONFIG_SYS_GBL_DATA_OFFSET     ((CONFIG_SYS_INIT_RAM_SIZE - CONFIG_SYS_INIT_RAM_ADDR) - GENERATED_GBL_DATA_SIZE) /* Offset from the beginning of ram */
 #define        CONFIG_SYS_INIT_SP_ADDR 0x013fa000              /* Physical start adress of inital stack */
 
 /*
index 18710fbe5aed435bb2f20aa321e20bfd4d3970b5..5348ad126b54359dfb69ec3c39bbecba1934a86a 100644 (file)
@@ -276,9 +276,8 @@ from which user programs will be started */
  * Definitions for initial stack pointer and data area (in internal SRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x20000000
-#define CONFIG_SYS_INIT_RAM_END        0x1000  /* End of used area in internal SRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       64      /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x1000  /* Size of used area in internal SRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
@@ -332,9 +331,9 @@ from which user programs will be started */
 #define CONFIG_SYS_CACHELINE_SIZE      16
 
 #define ICACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 8)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 8)
 #define DCACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 4)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 4)
 #define CONFIG_SYS_ICACHE_INV          (CF_CACR_CINV | CF_CACR_INVI)
 #define CONFIG_SYS_CACHE_ACR0          (CONFIG_SYS_SDRAM_BASE | \
                                         CF_ADDRMASK(CONFIG_SYS_SDRAM_SIZE) | \
index 8bfd7022c0399e8a75f3e5e39f52f39bf30457d7..d77af0defdff24fe8618d67251aa7cfbc1946f4d 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x4000  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x4000  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 3cc95b4a4a2cc3fcb2f6f2c1e3c0340058aab001..3ee4a40a3eadb61a5b8791164bc0b381b58ade48 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 277ff67bf0b8ccc27262a56d424755c5bae2db74..23bfbeb1d7cef4f4266980b74ede0769be908873 100644 (file)
@@ -29,7 +29,6 @@
 #define        CONFIG_VPAC270          1       /* Toradex Colibri PXA270 board */
 
 #undef BOARD_LATE_INIT
-#undef CONFIG_SKIP_RELOCATE_UBOOT
 #undef CONFIG_USE_IRQ
 #undef CONFIG_SKIP_LOWLEVEL_INIT
 
@@ -38,8 +37,7 @@
  */
 #define        CONFIG_ENV_SIZE                 0x4000
 #define        CONFIG_SYS_MALLOC_LEN           (CONFIG_ENV_SIZE + 128*1024)
-#define        CONFIG_SYS_GBL_DATA_SIZE        128
-
+#define        CONFIG_SYS_TEXT_BASE            0x0
 #define        CONFIG_ENV_OVERWRITE            /* override default environment */
 
 #define        CONFIG_BOOTCOMMAND                                              \
 
 #define        CONFIG_SYS_LOAD_ADDR            (0xa1000000)
 
+#define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM_1
+#define        CONFIG_SYS_INIT_SP_ADDR         (GENERATED_GBL_DATA_SIZE + PHYS_SDRAM_1)
+
 /*
  * NOR FLASH
  */
index c021d826114901c8f49458b31c74eef2cf1cb7af..2ac59e54b61ad516f1dbb427e678c519cf886e4f 100644 (file)
@@ -86,6 +86,7 @@
 #define CONFIG_SYS_NUM_ADDR_MAP                64      /* number of TLB1 entries */
 #endif
 
+#define CONFIG_POST CONFIG_SYS_POST_MEMORY     /* test POST memory test */
 #define CONFIG_SYS_MEMTEST_START       0x00200000      /* memtest works on */
 #define CONFIG_SYS_MEMTEST_END         0x00400000
 #define CONFIG_SYS_ALT_MEMTEST
 #define CONFIG_DDR_SPD
 #define CONFIG_FSL_DDR3
 
-#ifdef CONFIG_DDR_SPD
 #define CONFIG_SYS_SPD_BUS_NUM 1
 #define SPD_EEPROM_ADDRESS1    0x51
 #define SPD_EEPROM_ADDRESS2    0x52
-#else
-#define CONFIG_SYS_SDRAM_SIZE          4096
-
-#define CONFIG_SYS_DDR_CS0_BNDS                0x0000003f
-#define CONFIG_SYS_DDR_CS1_BNDS                0x0040007f
-#define CONFIG_SYS_DDR_CS0_CONFIG      0x80014202
-#define CONFIG_SYS_DDR_CS1_CONFIG      0x80014202
-#define CONFIG_SYS_DDR_TIMING_3                0x01031000
-#define CONFIG_SYS_DDR_TIMING_0                0x55440804
-#define CONFIG_SYS_DDR_TIMING_1                0x74713a66
-#define CONFIG_SYS_DDR_TIMING_2                0x0fb8911b
-#define CONFIG_SYS_DDR_MODE_1          0x00421850
-#define CONFIG_SYS_DDR_MODE_2          0x00100000
-#define CONFIG_SYS_DDR_MODE_CTRL       0x00000000
-#define CONFIG_SYS_DDR_INTERVAL                0x10400100
-#define CONFIG_SYS_DDR_DATA_INIT       0xdeadbeef
-#define CONFIG_SYS_DDR_CLK_CTRL                0x03000000
-#define CONFIG_SYS_DDR_TIMING_4                0x00220001
-#define CONFIG_SYS_DDR_TIMING_5                0x03401500
-#define CONFIG_SYS_DDR_ZQ_CNTL         0x89080600
-#define CONFIG_SYS_DDR_WRLVL_CNTL      0x8655a608
-#define CONFIG_SYS_DDR_CONTROL         0xc7048000
-#define CONFIG_SYS_DDR_CONTROL2                0x24400011
-#define CONFIG_SYS_DDR_CDR1            0x00000000
-#define CONFIG_SYS_DDR_CDR2            0x00000000
-#define CONFIG_SYS_DDR_ERR_INT_EN      0x0000000d
-#define CONFIG_SYS_DDR_ERR_DIS         0x00000000
-#define CONFIG_SYS_DDR_SBE             0x00010000
-#define CONFIG_SYS_DDR_DEBUG_18                0x40100400
-
-#define CONFIG_SYS_DDR2_CS0_BNDS       0x008000bf
-#define CONFIG_SYS_DDR2_CS1_BNDS       0x00C000ff
-#define CONFIG_SYS_DDR2_CS0_CONFIG     CONFIG_SYS_DDR_CS0_CONFIG
-#define CONFIG_SYS_DDR2_CS1_CONFIG     CONFIG_SYS_DDR_CS1_CONFIG
-#define CONFIG_SYS_DDR2_TIMING_3       CONFIG_SYS_DDR_TIMING_3
-#define CONFIG_SYS_DDR2_TIMING_0       CONFIG_SYS_DDR_TIMING_0
-#define CONFIG_SYS_DDR2_TIMING_1       CONFIG_SYS_DDR_TIMING_1
-#define CONFIG_SYS_DDR2_TIMING_2       CONFIG_SYS_DDR_TIMING_2
-#define CONFIG_SYS_DDR2_MODE_1         CONFIG_SYS_DDR_MODE_1
-#define CONFIG_SYS_DDR2_MODE_2         CONFIG_SYS_DDR_MODE_2
-#define CONFIG_SYS_DDR2_MODE_CTRL      CONFIG_SYS_DDR_MODE_CTRL
-#define CONFIG_SYS_DDR2_INTERVAL       CONFIG_SYS_DDR_INTERVAL
-#define CONFIG_SYS_DDR2_DATA_INIT      CONFIG_SYS_DDR_DATA_INIT
-#define CONFIG_SYS_DDR2_CLK_CTRL       CONFIG_SYS_DDR_CLK_CTRL
-#define CONFIG_SYS_DDR2_TIMING_4       CONFIG_SYS_DDR_TIMING_4
-#define CONFIG_SYS_DDR2_TIMING_5       CONFIG_SYS_DDR_TIMING_5
-#define CONFIG_SYS_DDR2_ZQ_CNTL                CONFIG_SYS_DDR_ZQ_CNTL
-#define CONFIG_SYS_DDR2_WRLVL_CNTL     CONFIG_SYS_DDR_WRLVL_CNTL
-#define CONFIG_SYS_DDR2_CONTROL                CONFIG_SYS_DDR_CONTROL
-#define CONFIG_SYS_DDR2_CONTROL2       CONFIG_SYS_DDR_CONTROL2
-#define CONFIG_SYS_DDR2_CDR1           CONFIG_SYS_DDR_CDR1
-#define CONFIG_SYS_DDR2_CDR2           CONFIG_SYS_DDR_CDR2
-#define CONFIG_SYS_DDR2_ERR_INT_EN     CONFIG_SYS_DDR_ERR_INT_EN
-#define CONFIG_SYS_DDR2_ERR_DIS                CONFIG_SYS_DDR_ERR_DIS
-#define CONFIG_SYS_DDR2_SBE            CONFIG_SYS_DDR_SBE
-#define CONFIG_SYS_DDR2_DEBUG_18       CONFIG_SYS_DDR_DEBUG_18
-
-#endif
+#define CONFIG_SYS_SDRAM_SIZE  4096    /* for fixed parameter use */
 
 /*
  * Local Bus Definitions
 #define CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH 0
 #define CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW CONFIG_SYS_INIT_RAM_ADDR_PHYS
 #endif
-#define CONFIG_SYS_INIT_RAM_END                0x00004000      /* End of used area in RAM */
+#define CONFIG_SYS_INIT_RAM_SIZE               0x00004000      /* Size of used area in RAM */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_LEN         (512 * 1024)
index a865296fdf997df4874896a4d77dc5cc823ff589..c1742c1a693c8a0e649e8ec679452c801eaeb6de 100644 (file)
 
 /* Use SRAM until RAM will be available */
 #define CONFIG_SYS_INIT_RAM_ADDR       MPC5XXX_SRAM
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_SIZE       /* End of used area in DPRAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_SIZE       /* Size of used area in DPRAM */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_BASE    CONFIG_SYS_TEXT_BASE
index fb6f79a42300260b24320211f075e4d67ab3841d..d2394235f193f109340c76a63f5ad5b8780f9ee2 100644 (file)
  */
 #define CONFIG_SYS_MALLOC_LEN          \
                ROUND(3 * CONFIG_ENV_SIZE + 128 * 1024, 0x1000)
-#define CONFIG_SYS_GBL_DATA_SIZE       128
 
 #define CONFIG_STACKSIZE               (32 * 1024)
 
index 9ef4523de427dbc124d1c09c5f8d9e957d7a0da4..f31081dbf37b25d76674e8eaad3fe0e1114225e3 100644 (file)
@@ -28,7 +28,6 @@
 
 #ifdef CONFIG_CPUAT91_RAM
 #define CONFIG_SKIP_LOWLEVEL_INIT      1
-#define CONFIG_SKIP_RELOCATE_UBOOT     1
 #else
 #define CONFIG_BOOTDELAY               1
 #endif
 #define CONFIG_SYS_HZ_CLOCK            (AT91C_MASTER_CLOCK / 2)
 
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128 * 1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128
 #define CONFIG_STACKSIZE               (32 * 1024)
 
 #if defined(CONFIG_USE_IRQ)
index 200b61e0c7fcf8f2f9db75a49c41f6c9cd0b7c25..c21af3817f431ea16b810348f31ba17c7fc079e2 100644 (file)
 
 /* we will never enable dcache, because we have to setup MMU first */
 #define CONFIG_SYS_NO_DCACHE
-
+#define        CONFIG_SYS_TEXT_BASE            0x0
 /*
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
 /*
  * Physical Memory Map
  */
-#define CONFIG_NR_DRAM_BANKS    4          /* we have 2 banks of DRAM */
+#define CONFIG_NR_DRAM_BANKS    1          /* we have 1 bank of DRAM */
 #define PHYS_SDRAM_1            0xa0000000 /* SDRAM Bank #1 */
 #define PHYS_SDRAM_1_SIZE       0x01000000 /* 64 MB */
-#define PHYS_SDRAM_2            0xa4000000 /* SDRAM Bank #2 */
-#define PHYS_SDRAM_2_SIZE       0x00000000 /* 0 MB */
-#define PHYS_SDRAM_3            0xa8000000 /* SDRAM Bank #3 */
-#define PHYS_SDRAM_3_SIZE       0x00000000 /* 0 MB */
-#define PHYS_SDRAM_4            0xac000000 /* SDRAM Bank #4 */
-#define PHYS_SDRAM_4_SIZE       0x00000000 /* 0 MB */
 
 #define PHYS_FLASH_1            0x00000000 /* Flash Bank #1 */
 #define PHYS_FLASH_2            0x04000000 /* Flash Bank #1 */
 
 #define CONFIG_SYS_FLASH_BASE          PHYS_FLASH_1
 
+#define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM_1
+#define        CONFIG_SYS_INIT_SP_ADDR         (GENERATED_GBL_DATA_SIZE + PHYS_SDRAM_1)
+
 /*
  * FLASH and environment organization
  */
  * Clocks, power control and interrupts
  */
 #define CONFIG_SYS_PSSR_VAL        0x00000020
-#define CONFIG_SYS_CCCR_VAL        0x00000141  /* 100 MHz memory, 200 MHz CPU  */
-#define CONFIG_SYS_CKEN_VAL        0x00000060  /* FFUART and STUART enabled    */
-#define CONFIG_SYS_ICMR_VAL        0x00000000  /* No interrupts enabled        */
+#define CONFIG_SYS_CCCR        0x00000141  /* 100 MHz memory, 200 MHz CPU  */
+#define CONFIG_SYS_CKEN        0x00000060  /* FFUART and STUART enabled    */
+#define CONFIG_SYS_ICMR        0x00000000  /* No interrupts enabled        */
 
 /* FIXME
  *
 #define CONFIG_SYS_MDMRS_VAL       0x00000000
 #define CONFIG_SYS_MDREFR_VAL      0x00403018  /* Initial setting, individual bits set in lowlevel_init.S */
 #endif
+#define        CONFIG_SYS_FLYCNFG_VAL          0x00000000
+#define        CONFIG_SYS_SXCNFG_VAL           0x00000000
 
 /*
  * PCMCIA and CF Interfaces (NOT USED, these values from lubbock init)
 #define LED_IRDA1 2
 #define LED_IRDA2 4
 #define LED_IRDA3 6
-#define CRADLE_LED_SET_REG GPSR2
-#define CRADLE_LED_CLR_REG GPCR2
 
 /* SuperIO defines */
 #define CRADLE_SIO_INDEX      0x2e
index 0661d65aba4dfaa1e1bb8fd5b7b3439d00ab4e9e..505740c4d41e2302099170613366025a93f056ae 100644 (file)
@@ -45,7 +45,7 @@
 
 /* we will never enable dcache, because we have to setup MMU first */
 #define CONFIG_SYS_NO_DCACHE
-
+#define        CONFIG_SYS_TEXT_BASE    0x0
 /*
  * Hardware drivers
  */
  *
  */
 #define CONFIG_SYS_MALLOC_LEN          (128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* size in bytes reserved for initial data */
 
 #define CONFIG_SYS_LONGHELP                            /* undef to save memory         */
 #define CONFIG_SYS_PROMPT              "uboot> "       /* Monitor Command Prompt       */
 
 #define CONFIG_SYS_FLASH_BASE          PHYS_FLASH_1
 
+#define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM_1
+#define        CONFIG_SYS_INIT_SP_ADDR         (GENERATED_GBL_DATA_SIZE + PHYS_SDRAM_1)
+
 # if 0
 /* FIXME: switch to _documented_ registers */
 /*
 
 #define CONFIG_SYS_PSSR_VAL        0x20
 
+#define        CONFIG_SYS_CCCR                 CCCR_L27|CCCR_M2|CCCR_N10
+#define        CONFIG_SYS_CKEN                 0x0
+
 /*
  * Memory settings
  */
 #define CONFIG_SYS_MDCNFG_VAL          0x09a909a9
 #define CONFIG_SYS_MDREFR_VAL          0x038ff030
 #define CONFIG_SYS_MDMRS_VAL           0x00220022
+#define        CONFIG_SYS_FLYCNFG_VAL          0x00000000
+#define        CONFIG_SYS_SXCNFG_VAL           0x00000000
 
 /*
  * PCMCIA and CF Interfaces
index acd9c93efd992b358f65066ba964ee8698bac95c..0ea34b89d85185971f2c52c2c13ced19a415160a 100644 (file)
  *
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR /* inside of on-chip SRAM */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE /* End of used area in RAM */
-#define CONFIG_SYS_GBL_DATA_SIZE       128 /* byte size reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE /* Size of used area in RAM */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*
index 69abb167625cbdf79e37d4fe395b196ae0e2195c..23731676f25da36f4565299e4730ed83f592cc47 100644 (file)
  *
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR /* inside of on-chip SRAM */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE /* End of used area in RAM */
-#define CONFIG_SYS_GBL_DATA_SIZE       128 /* byte size reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE /* Size of used area in RAM */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*
index efa27809920415fb7a187f58b112e43dc31fd12a..7a85d65302060ba1211b6da43938964d407d4c8d 100644 (file)
 #define CONFIG_SYS_SDRC_MR_VAL2        0x00000003 /* Load Mode Register */
 #define CONFIG_SYS_SDRC_MR_VAL3        0x00000000 /* Normal Mode */
 #define CONFIG_SYS_SDRC_TR_VAL 0x000002E0 /* Write refresh rate */
-#else
-#define CONFIG_SKIP_RELOCATE_UBOOT
 #endif /* CONFIG_SKIP_LOWLEVEL_INIT */
 /*
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN  (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 #define CONFIG_BAUDRATE 115200
 
index 160ece2bf9cf8d20097d38178ea6e4aea98e80e6..1feada926321272f1206cf40dba86496ff147b79 100644 (file)
 #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 */
+#define CONFIG_SYS_TEXT_BASE           0xc1080000
 
 /*
  * 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 */
index 7bf6336b1312544958874f6dd37395fd5992b853..7b04be05b9be408af3991fb99a47db2b738b7c5f 100644 (file)
 #define CONFIG_SYS_HZ_CLOCK            clk_get(DAVINCI_AUXCLK_CLKID)
 #define CONFIG_SYS_HZ                  1000
 #define CONFIG_SKIP_LOWLEVEL_INIT
+#define CONFIG_SYS_TEXT_BASE           0xc1080000
 
 /*
  * 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_MAX_RAM_BANK_SIZE (512 << 20) /* max size from SPRS586*/
 /* additions for new relocation code, must added to all boards */
 #define CONFIG_SYS_SDRAM_BASE          0xc0000000
 #define CONFIG_SYS_INIT_SP_ADDR                (CONFIG_SYS_SDRAM_BASE + 0x1000 - /* Fix this */ \
-                                       CONFIG_SYS_GBL_DATA_SIZE)
+                                       GENERATED_GBL_DATA_SIZE)
 #endif /* __CONFIG_H */
index 37011c0935c4b0ba6c2b605e34ef8df018ad13ef..8a6905241c74d1979ecde5448f0227998d774bfb 100644 (file)
@@ -24,7 +24,6 @@
 #define DAVINCI_DM355EVM
 
 #define CONFIG_SKIP_LOWLEVEL_INIT      /* U-Boot is a 3rd stage loader */
-#define CONFIG_SKIP_RELOCATE_UBOOT
 #define CONFIG_SYS_NO_FLASH            /* that is, no *NOR* flash */
 #define CONFIG_SYS_CONSOLE_INFO_QUIET
 #define CONFIG_DISPLAY_CPUINFO
 /* U-Boot memory configuration */
 #define CONFIG_STACKSIZE               (256 << 10)     /* 256 KiB */
 #define CONFIG_SYS_MALLOC_LEN          (1 << 20)       /* 1 MiB */
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* for initial data */
 #define CONFIG_SYS_MEMTEST_START       0x87000000      /* physical address */
 #define CONFIG_SYS_MEMTEST_END         0x88000000      /* test 16MB RAM */
 
index e09fb751894d1e6419ea43246c6a65852020e949..c9530327c65f9b7d22818f8ab1edbddbb0f7411f 100644 (file)
@@ -23,7 +23,6 @@
 #define DAVINCI_DM355LEOPARD
 
 #define CONFIG_SKIP_LOWLEVEL_INIT      /* U-Boot is a 3rd stage loader */
-#define CONFIG_SKIP_RELOCATE_UBOOT
 #define CONFIG_SYS_NO_FLASH            /* that is, no *NOR* flash */
 #define CONFIG_SYS_CONSOLE_INFO_QUIET
 #define CONFIG_DISPLAY_CPUINFO
 /* U-Boot memory configuration */
 #define CONFIG_STACKSIZE               (256 << 10)     /* 256 KiB */
 #define CONFIG_SYS_MALLOC_LEN          (1 << 20)       /* 1 MiB */
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* for initial data */
 #define CONFIG_SYS_MEMTEST_START       0x87000000      /* physical address */
 #define CONFIG_SYS_MEMTEST_END         0x88000000      /* test 16MB RAM */
 
index 2c3d88dc174740a35c88d79bb399cf0cf9a98eb3..b78fe83867182a8e68fbe21fee10965b54467e7a 100644 (file)
@@ -24,7 +24,6 @@
 #define DAVINCI_DM365EVM
 
 #define CONFIG_SKIP_LOWLEVEL_INIT      /* U-Boot is a 3rd stage loader */
-#define CONFIG_SKIP_RELOCATE_UBOOT
 #define CONFIG_SYS_NO_FLASH            /* that is, no *NOR* flash */
 #define CONFIG_SYS_CONSOLE_INFO_QUIET
 
 /* U-Boot memory configuration */
 #define CONFIG_STACKSIZE               (256 << 10)     /* 256 KiB */
 #define CONFIG_SYS_MALLOC_LEN          (1 << 20)       /* 1 MiB */
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* for initial data */
 #define CONFIG_SYS_MEMTEST_START       0x87000000      /* physical address */
 #define CONFIG_SYS_MEMTEST_END         0x88000000      /* test 16MB RAM */
 
index ddc5990cef5f09d53ab1b9983611e24936b83986..f0a8e98c36a8fec7482b456fb5d55c8d8f0b8deb 100644 (file)
@@ -24,7 +24,6 @@
 #define DAVINCI_DM6467EVM
 
 #define CONFIG_SKIP_LOWLEVEL_INIT
-#define CONFIG_SKIP_RELOCATE_UBOOT
 
 /* SoC Configuration */
 #define CONFIG_ARM926EJS                               /* arm926ejs CPU */
@@ -41,7 +40,6 @@
 
 /* Memory Info */
 #define CONFIG_SYS_MALLOC_LEN          (1 << 20)       /* 1 MiB */
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* initial data */
 #define CONFIG_SYS_MEMTEST_START       0x80000000
 #define CONFIG_SYS_MEMTEST_END         0x81000000      /* 16MB RAM test */
 #define CONFIG_NR_DRAM_BANKS           1
index aab2afa962b22ad81084366f0e754668cbbbb445..186726d3a6759944e790d1ced74a95a52c416ae9 100644 (file)
@@ -72,7 +72,6 @@
 /* Memory Info */
 /*=============*/
 #define CONFIG_SYS_MALLOC_LEN          (0x10000 + 128*1024)    /* malloc() len */
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* reserved for initial data */
 #define CONFIG_SYS_MEMTEST_START       0x80000000      /* memtest start address */
 #define CONFIG_SYS_MEMTEST_END         0x81000000      /* 16MB RAM test */
 #define CONFIG_NR_DRAM_BANKS   1               /* we have 1 bank of DRAM */
 #define CONFIG_ENV_SIZE                (128 << 10)     /* 128 KiB */
 #endif
 #define CONFIG_SKIP_LOWLEVEL_INIT      /* U-Boot is loaded by a bootloader */
-#define CONFIG_SKIP_RELOCATE_UBOOT     /* to a proper address, init done */
 #define CONFIG_SYS_NAND_BASE           0x02000000
 #define CONFIG_SYS_NAND_USE_FLASH_BBT
 #define CONFIG_SYS_NAND_HW_ECC
 #elif defined(CONFIG_SYS_USE_NOR)
 #ifdef CONFIG_NOR_UART_BOOT
 #define CONFIG_SKIP_LOWLEVEL_INIT      /* U-Boot is loaded by a bootloader */
-#define CONFIG_SKIP_RELOCATE_UBOOT     /* to a proper address, init done */
 #else
 #undef CONFIG_SKIP_LOWLEVEL_INIT
-#undef CONFIG_SKIP_RELOCATE_UBOOT
 #endif
 #define CONFIG_ENV_IS_IN_FLASH
 #undef CONFIG_SYS_NO_FLASH
index 04cdc210e62b3a81522159c29cfedbcf786314dd..967ebcc98a502de4a9f24d2f42f99dc638bfb2cb 100644 (file)
@@ -39,7 +39,6 @@
 /* Memory Info */
 /*=============*/
 #define CONFIG_SYS_MALLOC_LEN          (0x10000 + 256*1024)    /* malloc() len */
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* reserved for initial data */
 #define CONFIG_SYS_MEMTEST_START       0x80000000      /* memtest start address */
 #define CONFIG_SYS_MEMTEST_END         0x81000000      /* 16MB RAM test */
 #define CONFIG_NR_DRAM_BANKS   1               /* we have 1 bank of DRAM */
@@ -89,7 +88,6 @@
 #define CONFIG_ENV_SECT_SIZE   2048    /* Env sector Size */
 #define CONFIG_ENV_SIZE                (128 << 10)     /* 128 KiB */
 #define CONFIG_SKIP_LOWLEVEL_INIT      /* U-Boot is loaded by a bootloader */
-#define CONFIG_SKIP_RELOCATE_UBOOT     /* to a proper address, init done */
 #define CONFIG_SYS_NAND_BASE           0x02000000
 #define CONFIG_SYS_NAND_HW_ECC
 #define CONFIG_SYS_MAX_NAND_DEVICE     1       /* Max number of NAND devices */
index f4e17f8cc227e8a9ef5e70517d5fb9cc2bce9a17..4d866d0eb207fb76466462182324376e39ac3e30 100644 (file)
@@ -42,7 +42,6 @@
 #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS  20
 /* Memory Info */
 #define CONFIG_SYS_MALLOC_LEN          (0x10000 + 256*1024)    /* malloc() len */
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* reserved for initial data */
 #define CONFIG_SYS_MEMTEST_START       0x80000000      /* memtest start address */
 #define CONFIG_SYS_MEMTEST_END         0x81000000      /* 16MB RAM test */
 #define CONFIG_NR_DRAM_BANKS   1               /* we have 1 bank of DRAM */
@@ -84,7 +83,6 @@
 #define CONFIG_ENV_SECT_SIZE   2048    /* Env sector Size */
 #define CONFIG_ENV_SIZE                (128 << 10)     /* 128 KiB */
 #define CONFIG_SKIP_LOWLEVEL_INIT      /* U-Boot is loaded by a bootloader */
-#define CONFIG_SKIP_RELOCATE_UBOOT     /* to a proper address, init done */
 #define CONFIG_SYS_NAND_BASE           0x02000000
 #define CONFIG_SYS_NAND_HW_ECC
 #define CONFIG_SYS_MAX_NAND_DEVICE     1       /* Max number of NAND devices */
index 1746495e9a791478732369e8eb845f8f2d65ea24..0dc89ef41e2c2b329105c255a323ced809380843 100644 (file)
@@ -72,7 +72,6 @@
 /* Memory Info */
 /*=============*/
 #define CONFIG_SYS_MALLOC_LEN          (0x10000 + 128*1024)    /* malloc() len */
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* reserved for initial data */
 #define CONFIG_SYS_MEMTEST_START       0x80000000      /* memtest start address */
 #define CONFIG_SYS_MEMTEST_END         0x81000000      /* 16MB RAM test */
 #define CONFIG_NR_DRAM_BANKS   1               /* we have 1 bank of DRAM */
 #define CONFIG_ENV_SECT_SIZE   512     /* Env sector Size */
 #define CONFIG_ENV_SIZE                (16 << 10)      /* 16 KiB */
 #define CONFIG_SKIP_LOWLEVEL_INIT      /* U-Boot is loaded by a bootloader */
-#define CONFIG_SKIP_RELOCATE_UBOOT     /* to a proper address, init done */
 #define CONFIG_SYS_NAND_BASE           0x02000000
 #define CONFIG_SYS_NAND_HW_ECC
 #define CONFIG_SYS_MAX_NAND_DEVICE     1       /* Max number of NAND devices */
 #elif defined(CONFIG_SYS_USE_NOR)
 #ifdef CONFIG_NOR_UART_BOOT
 #define CONFIG_SKIP_LOWLEVEL_INIT      /* U-Boot is loaded by a bootloader */
-#define CONFIG_SKIP_RELOCATE_UBOOT     /* to a proper address, init done */
 #else
 #undef CONFIG_SKIP_LOWLEVEL_INIT
-#undef CONFIG_SKIP_RELOCATE_UBOOT
 #endif
 #define CONFIG_ENV_IS_IN_FLASH
 #undef CONFIG_SYS_NO_FLASH
index 188061e9c19416b1895476887729554a5f7a0a6e..7ad36a1ce882e851d80c7f62f1a309d08a6c119f 100644 (file)
 #define CONFIG_SYS_MONITOR_BASE        0x00090000
 #define CONFIG_SYS_RAMBOOT             1
 #define CONFIG_SYS_INIT_RAM_ADDR       (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
-#define CONFIG_SYS_INIT_RAM_END        0x10000
-#define CONFIG_SYS_GBL_DATA_SIZE       256  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x10000
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 #else
 #undef CONFIG_SYS_RAMBOOT
 #define CONFIG_SYS_MONITOR_LEN         0x00040000
 #define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE
 
-/*#define CONFIG_SYS_GBL_DATA_SIZE    256*/
-#define CONFIG_SYS_GBL_DATA_SIZE       128
 
 #define CONFIG_SYS_INIT_RAM_ADDR     0x40000000
-#define CONFIG_SYS_INIT_RAM_END      0x1000
-#define CONFIG_SYS_GBL_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE      0x1000
+#define CONFIG_SYS_GBL_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 
 #endif
 
diff --git a/include/configs/delta.h b/include/configs/delta.h
deleted file mode 100644 (file)
index 9c46c5b..0000000
+++ /dev/null
@@ -1,263 +0,0 @@
-/*
- * Configuation settings for the Delta board.
- *
- * 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
- * (easy to change)
- */
-#define CONFIG_CPU_MONAHANS    1       /* Intel Monahan CPU    */
-#define CONFIG_DELTA           1       /* Delta board       */
-
-/* #define CONFIG_LCD          1 */
-#ifdef CONFIG_LCD
-#define CONFIG_SHARP_LM8V31
-#endif
-#define BOARD_LATE_INIT                1
-
-#undef CONFIG_SKIP_RELOCATE_UBOOT
-#undef CONFIG_USE_IRQ                  /* we don't need IRQ/FIQ stuff */
-
-/* we will never enable dcache, because we have to setup MMU first */
-#define CONFIG_SYS_NO_DCACHE
-
-/*
- * Size of malloc() pool
- */
-#define CONFIG_SYS_MALLOC_LEN      (CONFIG_ENV_SIZE + 256*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-
-/*
- * Hardware drivers
- */
-#undef TURN_ON_ETHERNET
-#ifdef TURN_ON_ETHERNET
-# define CONFIG_DRIVER_SMC91111 1
-# define CONFIG_SMC91111_BASE   0x14000300
-# define CONFIG_SMC91111_EXT_PHY
-# define CONFIG_SMC_USE_32_BIT
-# undef CONFIG_SMC_USE_IOFUNCS          /* just for use with the kernel */
-#endif
-
-#define CONFIG_HARD_I2C                1       /* required for DA9030 access */
-#define CONFIG_SYS_I2C_SPEED           400000  /* I2C speed */
-#define CONFIG_SYS_I2C_SLAVE           1       /* I2C controllers address */
-#define DA9030_I2C_ADDR                0x49    /* I2C address of DA9030 */
-#define CONFIG_SYS_DA9030_EXTON_DELAY  100000  /* wait x us after DA9030 reset via EXTON */
-#define CONFIG_SYS_I2C_INIT_BOARD      1
-/* #define CONFIG_HW_WATCHDOG  1       /\* Required for hitting the DA9030 WD *\/ */
-
-#define DELTA_CHECK_KEYBD      1       /* check for keys pressed during boot */
-#define CONFIG_PREBOOT         "\0"
-
-#ifdef DELTA_CHECK_KEYBD
-# define KEYBD_DATALEN         4       /* we have four keys */
-# define KEYBD_KP_DKIN0                0x1     /* vol+ */
-# define KEYBD_KP_DKIN1                0x2     /* vol- */
-# define KEYBD_KP_DKIN2                0x3     /* multi */
-# define KEYBD_KP_DKIN5                0x4     /* SWKEY_GN */
-#endif /* DELTA_CHECK_KEYBD */
-
-/*
- * select serial console configuration
- */
-#define CONFIG_PXA_SERIAL
-#define CONFIG_FFUART          1
-
-/* allow to overwrite serial and ethaddr */
-#define CONFIG_ENV_OVERWRITE
-
-#define CONFIG_BAUDRATE                115200
-
-
-/*
- * BOOTP options
- */
-#define CONFIG_BOOTP_BOOTFILESIZE
-#define CONFIG_BOOTP_BOOTPATH
-#define CONFIG_BOOTP_GATEWAY
-#define CONFIG_BOOTP_HOSTNAME
-
-
-/*
- * Command line configuration.
- */
-#include <config_cmd_default.h>
-
-#ifdef TURN_ON_ETHERNET
-
-#define CONFIG_CMD_PING
-
-#else
-
-#define CONFIG_CMD_SAVEENV
-#define CONFIG_CMD_NAND
-#define CONFIG_CMD_I2C
-
-#undef CONFIG_CMD_NET
-#undef CONFIG_CMD_FLASH
-#undef CONFIG_CMD_IMLS
-
-#endif
-
-/* USB */
-#define CONFIG_USB_OHCI_NEW    1
-#define CONFIG_USB_STORAGE      1
-#define CONFIG_DOS_PARTITION    1
-
-#include <asm/arch/pxa-regs.h> /* for OHCI_REGS_BASE */
-
-#undef CONFIG_SYS_USB_OHCI_BOARD_INIT
-#define CONFIG_SYS_USB_OHCI_CPU_INIT   1
-#define CONFIG_SYS_USB_OHCI_REGS_BASE  OHCI_REGS_BASE
-#define CONFIG_SYS_USB_OHCI_SLOT_NAME  "delta"
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS     3
-
-#define CONFIG_BOOTDELAY       -1
-#define CONFIG_ETHADDR         08:00:3e:26:0a:5b
-#define CONFIG_NETMASK         255.255.0.0
-#define CONFIG_IPADDR          192.168.0.21
-#define CONFIG_SERVERIP                192.168.0.250
-#define CONFIG_BOOTCOMMAND     "bootm 80000"
-#define CONFIG_BOOTARGS                "root=/dev/mtdblock2 rootfstype=cramfs console=ttyS0,115200"
-#define CONFIG_CMDLINE_TAG
-#define CONFIG_TIMESTAMP
-
-#if defined(CONFIG_CMD_KGDB)
-#define CONFIG_KGDB_BAUDRATE   230400          /* speed to run kgdb serial port */
-#define CONFIG_KGDB_SER_INDEX  2               /* which serial port to use */
-#endif
-
-/*
- * Miscellaneous configurable options
- */
-#define CONFIG_SYS_HUSH_PARSER         1
-#define CONFIG_SYS_PROMPT_HUSH_PS2     "> "
-
-#define CONFIG_SYS_LONGHELP                            /* undef to save memory         */
-#ifdef CONFIG_SYS_HUSH_PARSER
-#define CONFIG_SYS_PROMPT              "$ "            /* Monitor Command Prompt */
-#else
-#define CONFIG_SYS_PROMPT              "=> "           /* Monitor Command Prompt */
-#endif
-#define CONFIG_SYS_CBSIZE              256             /* Console I/O Buffer Size      */
-#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
-#define CONFIG_SYS_MAXARGS             16              /* max number of command args   */
-#define CONFIG_SYS_BARGSIZE            CONFIG_SYS_CBSIZE       /* Boot Argument Buffer Size    */
-#define CONFIG_SYS_DEVICE_NULLDEV      1
-
-#define CONFIG_SYS_MEMTEST_START       0x80400000      /* memtest works on     */
-#define CONFIG_SYS_MEMTEST_END         0x80800000      /* 4 ... 8 MB in DRAM   */
-
-#define CONFIG_SYS_LOAD_ADDR   (CONFIG_SYS_DRAM_BASE + 0x8000) /* default load address */
-
-#define CONFIG_SYS_HZ                  1000
-
-/* Monahans Core Frequency */
-#define CONFIG_SYS_MONAHANS_RUN_MODE_OSC_RATIO         16 /* valid values: 8, 16, 24, 31 */
-#define CONFIG_SYS_MONAHANS_TURBO_RUN_MODE_RATIO       1  /* valid values: 1, 2 */
-
-
-                                               /* valid baudrates */
-#define CONFIG_SYS_BAUDRATE_TABLE      { 9600, 19200, 38400, 57600, 115200 }
-
-#ifdef CONFIG_MMC
-#define CONFIG_PXA_MMC
-#define CONFIG_CMD_MMC
-#define CONFIG_SYS_MMC_BASE            0xF0000000
-#endif
-
-/*
- * 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
-
-/*
- * Physical Memory Map
- */
-#define CONFIG_NR_DRAM_BANKS   4          /* we have 2 banks of DRAM */
-#define PHYS_SDRAM_1           0x80000000 /* SDRAM Bank #1 */
-#define PHYS_SDRAM_1_SIZE      0x1000000  /* 64 MB */
-#define PHYS_SDRAM_2           0x81000000 /* SDRAM Bank #2 */
-#define PHYS_SDRAM_2_SIZE      0x1000000  /* 64 MB */
-#define PHYS_SDRAM_3           0x82000000 /* SDRAM Bank #3 */
-#define PHYS_SDRAM_3_SIZE      0x1000000  /* 64 MB */
-#define PHYS_SDRAM_4           0x83000000 /* SDRAM Bank #4 */
-#define PHYS_SDRAM_4_SIZE      0x1000000  /* 64 MB */
-
-#define CONFIG_SYS_DRAM_BASE           0x80000000 /* at CS0 */
-#define CONFIG_SYS_DRAM_SIZE           0x04000000 /* 64 MB Ram */
-
-#undef CONFIG_SYS_SKIP_DRAM_SCRUB
-
-/*
- * NAND Flash
- */
-#define CONFIG_SYS_NAND0_BASE          0x0 /* 0x43100040 */ /* 0x10000000 */
-#undef CONFIG_SYS_NAND1_BASE
-
-#define CONFIG_SYS_NAND_BASE_LIST      { CONFIG_SYS_NAND0_BASE }
-#define CONFIG_SYS_MAX_NAND_DEVICE     1       /* Max number of NAND devices */
-
-/* nand timeout values */
-#define CONFIG_SYS_NAND_PROG_ERASE_TO  3000
-#define CONFIG_SYS_NAND_OTHER_TO       100
-#define CONFIG_SYS_NAND_SENDCMD_RETRY  3
-#undef NAND_ALLOW_ERASE_ALL    /* Allow erasing bad blocks - don't use */
-
-/* NAND Timing Parameters (in ns) */
-#define NAND_TIMING_tCH                10
-#define NAND_TIMING_tCS                0
-#define NAND_TIMING_tWH                20
-#define NAND_TIMING_tWP                40
-
-#define NAND_TIMING_tRH                20
-#define NAND_TIMING_tRP                40
-
-#define NAND_TIMING_tR         11123
-#define NAND_TIMING_tWHR       100
-#define NAND_TIMING_tAR                10
-
-/* NAND debugging */
-#define CONFIG_SYS_DFC_DEBUG1 /* usefull */
-#undef CONFIG_SYS_DFC_DEBUG2  /* noisy */
-#undef CONFIG_SYS_DFC_DEBUG3  /* extremly noisy  */
-
-#define CONFIG_MTD_DEBUG
-#define CONFIG_MTD_DEBUG_VERBOSE 1
-
-#define CONFIG_SYS_NO_FLASH            1
-
-#define CONFIG_ENV_IS_IN_NAND  1
-#define CONFIG_ENV_OFFSET              0x40000
-#define CONFIG_ENV_OFFSET_REDUND       0x44000
-#define CONFIG_ENV_SIZE                0x4000
-
-#endif /* __CONFIG_H */
index 281577153fce2c6af4f49c9a6d211f11a5fca485..fb81c64715dfc3019abda9ab0adba64013295026 100644 (file)
@@ -63,7 +63,6 @@
 #define CONFIG_ENV_SIZE                        (128 << 10)     /* 128 KiB */
                                                /* Sector */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + (128 << 10))
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* bytes reserved for */
                                                /* initial data */
 
 /* Hardware drivers */
index 2e9a13f7e4a609941a847544a87a7b55206a20d0..d541160bd39b153f2f48c95bdddada6b061cf98c 100644 (file)
  *  Use SRAM until RAM will be available
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       MPC5XXX_SRAM
-#define CONFIG_SYS_INIT_RAM_END                MPC5XXX_SRAM_SIZE
+#define CONFIG_SYS_INIT_RAM_SIZE               MPC5XXX_SRAM_SIZE
 
-#define CONFIG_SYS_GBL_DATA_SIZE       4096
 #define CONFIG_SYS_GBL_DATA_OFFSET     \
-       (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+       (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE
index 0d44eda867043549ba2831b13b5241f39e7580c8..c490ff67da411e20dd7ce6d8cacacd9350029507 100644 (file)
 #define CONFIG_SYS_OCM_DATA_ADDR       0xF8000000
 #define CONFIG_SYS_OCM_DATA_SIZE       0x1000
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR /* in SDRAM */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE /* End of used area */
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE /* Size of used area */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128  /* size/bytes res'd for init data*/
 #define CONFIG_SYS_GBL_DATA_OFFSET \
-       (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+       (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*
index e48e20f6853f3d549fe85240dd4b092e9f81bb1f..69c6420fe9d916b6c95f47730f9ea23c2bc265be 100644 (file)
@@ -32,7 +32,6 @@
  * so we MUST NOT initialize critical regs like mem-timing ...
  */
 #define CONFIG_SKIP_LOWLEVEL_INIT      1
-#undef  CONFIG_SKIP_RELOCATE_UBOOT
 
 /*
  * High Level Configuration Options
@@ -49,7 +48,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
index 637cc55e0687980eb8625e7c1668f529315182c4..61f34ddc446221a34c8134aea8720515036a31be 100644 (file)
 #define CONFIG_SYS_INIT_DATA_SIZE      128
 
 #define CONFIG_SYS_INIT_RAM_ADDR       0x40000000
-#define CONFIG_SYS_INIT_RAM_END        0x1000
-#define CONFIG_SYS_INIT_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_INIT_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x1000
+#define CONFIG_SYS_INIT_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_SIZE - CONFIG_SYS_INIT_DATA_SIZE)
 
-#define CONFIG_SYS_GBL_DATA_SIZE        256    /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 
index 4ff4a85cb52be0aefc7cbedf64a274f58f6f3262..754fc8bf8b61dd74af507eee9332541599917828 100644 (file)
@@ -42,7 +42,7 @@
 #define CONFIG_MISC_INIT_R
 
 /*--------------------------------------------------------------------------*/
-
+#define CONFIG_SYS_TEXT_BASE           0x00000000
 #define CONFIG_SYS_LOAD_ADDR           0x21000000  /* default load address */
 
 #define CONFIG_SYS_BOOT_SIZE           0x00 /* 0 KBytes */
  */
 
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 520*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128
 
 /*
  * sdram
  */
 
 #define CONFIG_NR_DRAM_BANKS           1
-#define PHYS_SDRAM                     0x20000000
-#define PHYS_SDRAM_SIZE                        0x04000000  /* 64 megs */
 
-#define CONFIG_SYS_MEMTEST_START       PHYS_SDRAM
+#define CONFIG_SYS_SDRAM_BASE          0x20000000
+#define CONFIG_SYS_SDRAM_SIZE          0x04000000  /* 64 megs */
+#define CONFIG_SYS_INIT_SP_ADDR                0x00204000  /* use internal SRAM */
+
+#define CONFIG_SYS_MEMTEST_START       CONFIG_SYS_SDRAM_BASE
 #define CONFIG_SYS_MEMTEST_END         (CONFIG_SYS_MEMTEST_START + \
-                                       PHYS_SDRAM_SIZE - 0x00400000 - \
+                                       CONFIG_SYS_SDRAM_SIZE - 0x00400000 - \
                                        CONFIG_SYS_MALLOC_LEN)
 
 #define CONFIG_SYS_PIOC_ASR_VAL                0xFFFF0000 /* PIOC as D16/D31 */
 /* FLASH organization */
 
 /*  NOR-FLASH */
+#define CONFIG_FLASH_SHOW_PROGRESS     45
 
 #define CONFIG_FLASH_CFI_DRIVER        1
 
        "nandboot=run bootargsdefaults;"                                \
                "set bootargs $(bootargs) root=initramfs boot=nand "    \
                ";bootm $(kerneladdr)\0"                                \
-       "uu=run update_uboot\0"                                         \
-       "ur=run update_root;run nk\0"                                   \
-       "nk=run bootargsdefaults;set bootargs $(bootargs) root=initramfs " \
-               "boot=local "                                           \
-               ";echo $(bootargs)"                                     \
-               ";dhcp uImage_cpux9k2;bootm\0"                          \
-       "nn=run bootargsdefaults;set bootargs $(bootargs) root=initramfs " \
-               "boot=nand "                                            \
-               ";echo $(bootargs)"                                     \
-               ";dhcp uImage_cpux9k2;bootm\0"                          \
        " "
 
 /*--------------------------------------------------------------------------*/
index a0d38696607034162e5434020dbf0ac3180779a7..d6b655122a584854913acb79e1683d521c54e06e 100644 (file)
  * Initial RAM & stack pointer (placed in internal SRAM)
  *----------------------------------------------------------------------*/
 #define CONFIG_SYS_INIT_RAM_ADDR   CONFIG_SYS_ISRAM_BASE  /* Initial RAM address       */
-#define CONFIG_SYS_INIT_RAM_END    0x2000          /* End of used area in RAM  */
-#define CONFIG_SYS_GBL_DATA_SIZE  128              /* num bytes initial data   */
+#define CONFIG_SYS_INIT_RAM_SIZE    0x2000         /* Size of used area in RAM */
 
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index ff25ee2754642f0b1a2f01880b4224bf83c79983..19b76321e656b3500d031bcd1f87e762df5f0773 100644 (file)
 #define LINUX_BOOT_PARAM_ADDR  (PHYS_SDRAM_1 + 0x100)
 
 /* Run-time memory allocatons */
-#define CONFIG_SYS_GBL_DATA_SIZE       128
 #define CONFIG_STACKSIZE               (128 * 1024)
 
 #if defined(CONFIG_USE_IRQ)
index ccfc66053b5627553ccd9730b67ae949a37430b3..a75f06aa5950d7c940a933b92d4c3511476332cd 100644 (file)
  */
 #define CONFIG_SYS_MALLOC_LEN  (1024 * 128) /* 128kB for malloc() */
 /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_SIZE       128
 
 /*
  * Other required minimal configurations
 #define CONFIG_SYS_RESET_ADDRESS       0xffff0000
 #define CONFIG_SYS_MAXARGS             16
 
+/* additions for new relocation code, must be added to all boards */
+#define CONFIG_SYS_SDRAM_BASE          0
+#define CONFIG_SYS_INIT_SP_ADDR        \
+       (CONFIG_SYS_SDRAM_BASE + 0x1000 - GENERATED_GBL_DATA_SIZE)
+
 #endif /* _CONFIG_EDMINIV2_H */
index e151faa9655ab916cffd88d2cf320ce77e6e591c..fdb98b5cbcc83c3fdf1b915300145f206dd5a6c7 100644 (file)
@@ -42,7 +42,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
index 5f083bda177a0269dc79adf1ee2ce93a07d6e475..bb87d3623cd398bd6d6dbd41defe741998d683a8 100644 (file)
 #define CONFIG_SYS_IMMR                0xF0000000
 
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x2000  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2000  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /* Hard reset configuration word */
index cbf55dba89eacd619430b49fe46b721de127e9b8..b15659d918d62ebc4554ed401f4dad7b7443e7b2 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x4000  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE      128     /* bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE        0x4000  /* Size of used area in DPRAM    */
+#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 48985a06ca2f3aedf71178a6ae6da7e09cd154b2..692f0ec77a69b71cbcf6b4d5251e0f16275f23a9 100644 (file)
 #define CONFIG_SYS_IMMR                0xF0000000
 
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x2000  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2000  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 
index 2ec907c1f1321fac73f4b1af6ba8dbe829afca5c..26389ed02535c074596c9c27b999f677785bce1c 100644 (file)
@@ -85,7 +85,6 @@
 /* Size of DRAM reserved for malloc() use */
 #define CONFIG_SYS_MALLOC_LEN          (1024 * 1024)
 /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_SIZE       (256)
 #define CONFIG_SYS_BOOTMAPSZ           (8 * 1024 * 1024)
 
 #define CONFIG_SYS_FLASH_CFI
index 0f415d9c8b9ade0268c900b305bba65c478cddcc..fb05727cde15fa7e3f2c5f865959edeb0008bce9 100644 (file)
@@ -53,7 +53,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128
 
 /*
  * Hardware drivers
index d95144d589c37842c726f7d6e555258e58653735..9535eb9edec9a038cb400755ff7b1680595b64ec 100644 (file)
 #define CONFIG_SYS_INIT_RAM_ADDR       MPC5XXX_SRAM
 
 /* End of used area in SPRAM */
-#define CONFIG_SYS_INIT_RAM_END                MPC5XXX_SRAM_SIZE
+#define CONFIG_SYS_INIT_RAM_SIZE               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_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - \
+                                               GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE
index 41294b9be62a64505dbfa50c0770820c24af105d..fd39ab4a033849665668055b5ea2b14518fb939e 100644 (file)
@@ -39,7 +39,6 @@
  * we use lowlevel_init (!CONFIG_SKIP_LOWLEVEL_INIT) to remedy that problem.
  */
 #undef  CONFIG_SKIP_LOWLEVEL_INIT
-#define CONFIG_SKIP_RELOCATE_UBOOT     1
 
 /*
  * High Level Configuration Options
@@ -60,7 +59,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size rsrvd for initial data */
 
 
 /*
index 282afbcc6100e24cacfb0362166ff9a5081e6bcb..3c59ff4922c86948373869f045146ce259f5a607 100644 (file)
  */
 #define CONFIG_SYS_INIT_RAM_DCACHE     1               /* d-cache as init ram*/
 #define CONFIG_SYS_INIT_RAM_ADDR       0x70000000      /* DCache             */
-#define CONFIG_SYS_INIT_RAM_END                (4 << 10)
-#define CONFIG_SYS_GBL_DATA_SIZE       256             /* num bytes init data*/
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END \
-                                        - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE               (4 << 10)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE \
+                                        - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*
index bb4ea7921d08b17871c729af9494391386bb9885..dc62ea30c26c40e0c1a3f68903fa3bbbaf52d4ea 100644 (file)
 #define CONFIG_SYS_RAM_END CONFIG_SYS_SDRAM_END
 #endif
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_RAM_END - GENERATED_GBL_DATA_SIZE)
 
-#define CONFIG_SYS_PROM_SIZE           (8192-CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_PROM_SIZE           (8192-GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_PROM_OFFSET         (CONFIG_SYS_GBL_DATA_OFFSET-CONFIG_SYS_PROM_SIZE)
 
 #define CONFIG_SYS_INIT_SP_OFFSET      (CONFIG_SYS_PROM_OFFSET-32)
index 35c4a083530927abec72a73afeac245deed7ec68..5efe676bce2441bd3af8ac7052ff4cb5f4720a5b 100644 (file)
 #define CONFIG_SYS_RAM_SIZE CONFIG_SYS_SDRAM_SIZE
 #define CONFIG_SYS_RAM_END CONFIG_SYS_SDRAM_END
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_SDRAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_SDRAM_END - GENERATED_GBL_DATA_SIZE)
 
-#define CONFIG_SYS_PROM_SIZE           (8192-CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_PROM_SIZE           (8192-GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_PROM_OFFSET         (CONFIG_SYS_GBL_DATA_OFFSET-CONFIG_SYS_PROM_SIZE)
 
 #define CONFIG_SYS_INIT_SP_OFFSET      (CONFIG_SYS_PROM_OFFSET-32)
index 92fbbbb5582c090839844f1c93a4caa7079242fa..505db10a0f7ba7eb2b2599a59a4e401c1c779922 100644 (file)
 #define CONFIG_SYS_RAM_SIZE CONFIG_SYS_SDRAM_SIZE
 #define CONFIG_SYS_RAM_END CONFIG_SYS_SDRAM_END
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_RAM_END - GENERATED_GBL_DATA_SIZE)
 
-#define CONFIG_SYS_PROM_SIZE           (8192-CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_PROM_SIZE           (8192-GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_PROM_OFFSET         (CONFIG_SYS_GBL_DATA_OFFSET-CONFIG_SYS_PROM_SIZE)
 
 #define CONFIG_SYS_INIT_SP_OFFSET      (CONFIG_SYS_PROM_OFFSET-32)
index 5dfdf5156ff91246d569465d5335079eb858d1e1..bbd2f91abd312f24bfc110b51342cf29dd0e3c38 100644 (file)
 #define CONFIG_SYS_RAM_SIZE CONFIG_SYS_SDRAM_SIZE
 #define CONFIG_SYS_RAM_END CONFIG_SYS_SDRAM_END
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_RAM_END - GENERATED_GBL_DATA_SIZE)
 
-#define CONFIG_SYS_PROM_SIZE           (8192-CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_PROM_SIZE           (8192-GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_PROM_OFFSET         (CONFIG_SYS_GBL_DATA_OFFSET-CONFIG_SYS_PROM_SIZE)
 
 #define CONFIG_SYS_INIT_SP_OFFSET      (CONFIG_SYS_PROM_OFFSET-32)
index 39af8feb43fad49ba0fa65b8b87f7399ffb79807..294d6c4f870dcaf0907b976176b9e58aace48dab 100644 (file)
 #define CONFIG_SYS_RAM_SIZE CONFIG_SYS_SDRAM_SIZE
 #define CONFIG_SYS_RAM_END CONFIG_SYS_SDRAM_END
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_RAM_END - GENERATED_GBL_DATA_SIZE)
 
-#define CONFIG_SYS_PROM_SIZE           (8192-CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_PROM_SIZE           (8192-GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_PROM_OFFSET         (CONFIG_SYS_GBL_DATA_OFFSET-CONFIG_SYS_PROM_SIZE)
 
 #define CONFIG_SYS_INIT_SP_OFFSET      (CONFIG_SYS_PROM_OFFSET-32)
index 6c1ddac85d59339c814274c2a0e1029c7bc92c26..35e6944d5487381c9011a94beb32096908fee89c 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR    CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END     0x4000  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE   128 /* bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE     0x4000  /* Size of used area in DPRAM    */
+#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET   CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index dd5e5a20c642487b59ebaa090065dd7eff5fa10f..c56efde7e0befe3d7afb5a06d16f2e86c7662382 100644 (file)
@@ -71,9 +71,8 @@
 #define CONFIG_SYS_TEMP_STACK_OCM 1
 
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR        /* OCM          */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE
-#define CONFIG_SYS_GBL_DATA_SIZE       256             /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      (CONFIG_SYS_GBL_DATA_OFFSET - 0x4)
 
 /*-----------------------------------------------------------------------
index a2edf51e202e2fcfb3ec1c5d75dd1357c851e5d3..0c8fdf504cccc71b0606ef768af899aedf504697 100644 (file)
@@ -82,9 +82,8 @@
 /* 440EPx/440GRx have 16KB of internal SRAM, so no need for D-Cache    */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_BASE     /* OCM                  */
 
-#define CONFIG_SYS_INIT_RAM_END        (4 << 10)
-#define CONFIG_SYS_GBL_DATA_SIZE       256             /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       (4 << 10)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      (CONFIG_SYS_GBL_DATA_OFFSET - 0x4)
 
 /*-----------------------------------------------------------------------
index 58fc4ce76f927cb8d445d3363944cd8aa9df0589..d849b5cc81a503e269d740421f90375f447f5c49 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 60e5c2b4bb527313578bad10cc39b0fd8d545e1d..354072a8e67957bcd22f0d60480a976e585a4ca2 100644 (file)
 #define MPC5XXX_SRAM_POST_SIZE (MPC5XXX_SRAM_SIZE - 4)
 
 #ifdef CONFIG_POST
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_POST_SIZE
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_POST_SIZE
 #else
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_SIZE
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_SIZE
 #endif
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_BASE    CONFIG_SYS_TEXT_BASE
index ccfc3dfdfb1d43e2153d15d0a18bca5303996f6f..7c4c2ba4ea9b63a1269b519f14622eb2335ea72a 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x4000  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x4000  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 8d98d57f88ec6bfbaaaa06bd17e16368a5b902a3..2fac0efe13051902c9946497bc4678371b963e5a 100644 (file)
 #define CONFIG_SYS_TEMP_STACK_OCM      1
 #define CONFIG_SYS_OCM_DATA_ADDR       CONFIG_SYS_ISRAM_BASE
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_ISRAM_BASE   /* Init RAM */
-#define CONFIG_SYS_INIT_RAM_END                0x2000          /* end used area */
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* sizeof init data */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2000          /* size of used area */
 
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - \
-                                        CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - \
+                                        GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      (CONFIG_SYS_GBL_DATA_OFFSET - 0x4)
 
 /*
index 8105876e4ead49843dbf095548c1d60f48958bc8..fc046d60556869960a48d43a5c96f0580cc5e7fc 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x20000000
-#define CONFIG_SYS_INIT_RAM_END        0x1000  /* End of used area in internal SRAM */
-#define CONFIG_SYS_GBL_DATA_SIZE       64      /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x1000  /* Size of used area in internal SRAM */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*
 #define CONFIG_SYS_CACHELINE_SIZE      16
 
 #define ICACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 8)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 8)
 #define DCACHE_STATUS                  (CONFIG_SYS_INIT_RAM_ADDR + \
-                                        CONFIG_SYS_INIT_RAM_END - 4)
+                                        CONFIG_SYS_INIT_RAM_SIZE - 4)
 #define CONFIG_SYS_ICACHE_INV          (CF_CACR_CINV | CF_CACR_INVI)
 #define CONFIG_SYS_CACHE_ACR0          (CONFIG_SYS_SDRAM_BASE | \
                                         CF_ADDRMASK(CONFIG_SYS_SDRAM_SIZE) | \
index 34e8a57b9636b29c15c14302bc80e0d9078eaa11..16d92793afbc88504f806371fd3f068ab45ce92c 100644 (file)
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + (128 << 10))
-#define CONFIG_SYS_GBL_DATA_SIZE       128 /* bytes for initial data */
 
 /*
  * SMSC911x Ethernet
 #endif /* (CONFIG_CMD_NET) */
 
 #define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM_1
-#define CONFIG_SYS_INIT_SP_ADDR                (LOW_LEVEL_SRAM_STACK - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_SP_ADDR                (LOW_LEVEL_SRAM_STACK - GENERATED_GBL_DATA_SIZE)
 
 #endif /* __CONFIG_H */
index 5e2e0ed7bf6317f92bfb7bd98883e9c13edcbee3..d6fbec7b1f18abbdee05570985e59357b39131c9 100644 (file)
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + (128 << 10))
-#define CONFIG_SYS_GBL_DATA_SIZE       128 /* bytes for initial data */
 
 #define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM_1
-#define CONFIG_SYS_INIT_SP_ADDR                (LOW_LEVEL_SRAM_STACK - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_SP_ADDR                (LOW_LEVEL_SRAM_STACK - GENERATED_GBL_DATA_SIZE)
 
 #endif /* __CONFIG_H */
index fdfa022c0b0d3e3c7f18d415ee32b5d26d4b904c..3328e639a9c5d1ed420cba786026f3f65ac8e5d5 100644 (file)
@@ -42,7 +42,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
index 88e8d3db104b1e8400742f05bae64ccad8501017..b8dc5aac5daadafb36c4fb99f2b5caebef0309d6 100644 (file)
@@ -89,7 +89,6 @@
 /* malloc() len */
 #define CONFIG_SYS_MALLOC_LEN          (0x10000 + 512 * 1024)
 /* reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_SIZE       128
 /* memtest start address */
 #define CONFIG_SYS_MEMTEST_START       0xA0000000
 #define CONFIG_SYS_MEMTEST_END         0xA1000000      /* 16MB RAM test */
 /* additions for new relocation code, must be added to all boards */
 #define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM_1
 #define CONFIG_SYS_INIT_SP_ADDR                (CONFIG_SYS_SDRAM_BASE + 0x1000 - /* Fix this */ \
-                                       CONFIG_SYS_GBL_DATA_SIZE)
+                                       GENERATED_GBL_DATA_SIZE)
 #endif /* __IMX27LITE_COMMON_CONFIG_H */
index 88c62d11e1bf85ce84a04fe5e3db057b0be5ee7c..50236380704236b079baef9f4fdd1689b22a1c11 100644 (file)
@@ -54,7 +54,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128 * 1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128  /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
 #define PHYS_SDRAM_1           CSD0_BASE
 #define PHYS_SDRAM_1_SIZE      (128 * 1024 * 1024)
 
+#define CONFIG_SYS_SDRAM_BASE          CSD0_BASE
+#define CONFIG_SYS_INIT_RAM_ADDR       IRAM_BASE_ADDR
+#define CONFIG_SYS_INIT_RAM_SIZE               IRAM_SIZE
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_SP_ADDR                (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_GBL_DATA_OFFSET)
+
 /*-----------------------------------------------------------------------
  * FLASH and environment organization
  */
index 62944a93f6ee7301ea206aac50bdb3f6913cd9e4..4d11f97d6f5251faf91871271aa4d20aa33fb34b 100644 (file)
@@ -52,7 +52,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128 * 1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128  /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
index 3636d12509d46b1fe297bfcee0d40dad1bd402fa..9b116e690ecc4b00f5383ac4f10cbf94fd2187ac 100644 (file)
 #define MPC5XXX_SRAM_POST_SIZE (MPC5XXX_SRAM_SIZE - 4)
 
 #ifdef CONFIG_POST
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_POST_SIZE
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_POST_SIZE
 #else
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_SIZE
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_SIZE
 #endif
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_BASE    CONFIG_SYS_TEXT_BASE
index 9cb0d42eac7b02dfd71ab8a6aec195077710f033..d8fcbdb42199f3a5ec520b12935a22b6cde7609e 100644 (file)
@@ -40,6 +40,8 @@
 #undef CONFIG_USE_IRQ                  /* we don't need IRQ/FIQ stuff      */
                                        /* for timer/console/ethernet       */
 
+#define        CONFIG_SYS_TEXT_BASE    0x0
+
 /* we will never enable dcache, because we have to setup MMU first */
 #define CONFIG_SYS_NO_DCACHE
 
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (256*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* size in bytes reserved for initial data */
 
 #define CONFIG_SYS_LONGHELP                            /* undef to save memory         */
 #define CONFIG_SYS_PROMPT              "uboot> "       /* Monitor Command Prompt       */
 
 #define CONFIG_SYS_FLASH_BASE          PHYS_FLASH_1
 
+#define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM_1
+#define        CONFIG_SYS_INIT_SP_ADDR         (GENERATED_GBL_DATA_SIZE + PHYS_SDRAM_1)
+
 /*
  * JFFS2 partitions
  *
  */
 #define CONFIG_SYS_PSSR_VAL            0x37
 
+#define        CONFIG_SYS_CCCR                 CCCR_L27|CCCR_M2|CCCR_N10
+#define        CONFIG_SYS_CKEN                 0x0
+
 /*
  * Memory settings
  *
 #define CONFIG_SYS_MCIO0_VAL           0x00000000
 #define CONFIG_SYS_MCIO1_VAL           0x00000000
 
+#define        CONFIG_SYS_FLYCNFG_VAL          0x00000000
+#define        CONFIG_SYS_SXCNFG_VAL           0x00000000
+
 /*
 #define CSB226_USER_LED0       0x00000008
 #define CSB226_USER_LED1       0x00000010
index e0e82583410516c1c0f4fca9a6da2aaf8821d3bb..32ff1932c6eea84658dcaebd12258f85b5f4a70e 100644 (file)
@@ -53,7 +53,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN  (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * PL010 Configuration
index caafc93116ce2f277851162c3d9a060643118125..2c8ca2ddc59bd04502bbd44e8e2510cde703bb75 100644 (file)
@@ -48,7 +48,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
index 56d2be2afe71662237ee9adfe57079a71272e954..3ff4a86ab963deb2a83e8bc2a1c677c07129f3b1 100644 (file)
  * Initial RAM & stack pointer (placed in OCM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_BASE     /* OCM */
-#define CONFIG_SYS_INIT_RAM_END        (4 << 10)
-#define CONFIG_SYS_GBL_DATA_SIZE       256     /* num bytes initial data */
+#define CONFIG_SYS_INIT_RAM_SIZE       (4 << 10)
 #define CONFIG_SYS_GBL_DATA_OFFSET \
-       (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+       (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*
diff --git a/include/configs/io.h b/include/configs/io.h
new file mode 100644 (file)
index 0000000..a66c704
--- /dev/null
@@ -0,0 +1,251 @@
+/*
+ * (C) Copyright 2010
+ * Dirk Eibach,  Guntermann & Drunck GmbH, eibach@gdsys.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
+
+#define CONFIG_405EP           1       /* this is a PPC405 CPU */
+#define CONFIG_4xx             1       /*  member of PPC4xx family */
+#define CONFIG_IO              1       /*  on a Io board */
+
+#define        CONFIG_SYS_TEXT_BASE    0xFFFC0000
+
+/*
+ * Include common defines/options for all AMCC eval boards
+ */
+#define CONFIG_HOSTNAME                io
+#define CONFIG_IDENT_STRING    " io 0.04"
+#include "amcc-common.h"
+
+#define CONFIG_BOARD_EARLY_INIT_F      /* call board_early_init_f */
+#define CONFIG_LAST_STAGE_INIT         /* call last_stage_init */
+
+#define CONFIG_SYS_CLK_FREQ    33333333 /* external frequency to pll   */
+
+/*
+ * Configure PLL
+ */
+#define PLLMR0_DEFAULT PLLMR0_266_133_66
+#define PLLMR1_DEFAULT PLLMR1_266_133_66
+
+/* new uImage format support */
+#define CONFIG_FIT
+#define CONFIG_FIT_VERBOSE     /* enable fit_format_{error,warning}() */
+
+#define CONFIG_ENV_IS_IN_FLASH /* use FLASH for environment vars */
+
+/*
+ * Default environment variables
+ */
+#define        CONFIG_EXTRA_ENV_SETTINGS                                       \
+       CONFIG_AMCC_DEF_ENV                                             \
+       CONFIG_AMCC_DEF_ENV_POWERPC                                     \
+       CONFIG_AMCC_DEF_ENV_NOR_UPD                                     \
+       "kernel_addr=fc000000\0"                                        \
+       "fdt_addr=fc1e0000\0"                                           \
+       "ramdisk_addr=fc200000\0"                                       \
+       ""
+
+#define CONFIG_PHY_ADDR                4       /* PHY address                  */
+#define CONFIG_HAS_ETH0
+#define CONFIG_HAS_ETH1
+#define CONFIG_PHY1_ADDR       0xc     /* EMAC1 PHY address            */
+#define CONFIG_PHY_CLK_FREQ    EMAC_STACR_CLK_66MHZ
+
+/*
+ * Commands additional to the ones defined in amcc-common.h
+ */
+#define CONFIG_CMD_CACHE
+#undef CONFIG_CMD_EEPROM
+
+/*
+ * SDRAM configuration (please see cpu/ppc/sdram.[ch])
+ */
+#define CONFIG_SDRAM_BANK0     1       /* init onboard SDRAM bank 0 */
+
+/* SDRAM timings used in datasheet */
+#define CONFIG_SYS_SDRAM_CL             3      /* CAS latency */
+#define CONFIG_SYS_SDRAM_tRP           20      /* PRECHARGE command period */
+#define CONFIG_SYS_SDRAM_tRC           66      /* ACTIVE-to-ACTIVE period */
+#define CONFIG_SYS_SDRAM_tRCD          20      /* ACTIVE-to-READ delay */
+#define CONFIG_SYS_SDRAM_tRFC          66      /* Auto refresh period */
+
+/*
+ * If CONFIG_SYS_EXT_SERIAL_CLOCK, then the UART divisor is 1.
+ * If CONFIG_SYS_405_UART_ERRATA_59, then UART divisor is 31.
+ * Otherwise, UART divisor is determined by CPU Clock and CONFIG_SYS_BASE_BAUD.
+ * The Linux BASE_BAUD define should match this configuration.
+ *    baseBaud = cpuClock/(uartDivisor*16)
+ * If CONFIG_SYS_405_UART_ERRATA_59 and 200MHz CPU clock,
+ * set Linux BASE_BAUD to 403200.
+ */
+#define CONFIG_CONS_INDEX      1       /* Use UART0                    */
+#undef  CONFIG_SYS_EXT_SERIAL_CLOCK    /* external serial clock */
+#undef  CONFIG_SYS_405_UART_ERRATA_59  /* 405GP/CR Rev. D silicon */
+#define CONFIG_SYS_BASE_BAUD           691200
+
+/*
+ * I2C stuff
+ */
+#define CONFIG_SYS_I2C_SPEED           100000
+
+/* Temp sensor/hwmon/dtt */
+#define CONFIG_DTT_LM63                1       /* National LM63        */
+#define CONFIG_DTT_SENSORS     { 0 }   /* Sensor addresses     */
+#define CONFIG_DTT_PWM_LOOKUPTABLE     \
+               { { 40, 10 }, { 50, 20 }, { 60, 40 } }
+#define CONFIG_DTT_TACH_LIMIT  0xa10
+
+/*
+ * FLASH organization
+ */
+#define CONFIG_SYS_FLASH_CFI           /* The flash is CFI compatible  */
+#define CONFIG_FLASH_CFI_DRIVER                /* Use common CFI driver        */
+
+#define CONFIG_SYS_FLASH_BASE          0xFC000000
+#define CONFIG_SYS_FLASH_BANKS_LIST    { CONFIG_SYS_FLASH_BASE }
+
+#define CONFIG_SYS_MAX_FLASH_BANKS     1       /* max num of memory banks */
+#define CONFIG_SYS_MAX_FLASH_SECT      512     /* max num of sectors per chip*/
+
+#define CONFIG_SYS_FLASH_ERASE_TOUT    120000  /* Timeout for Flash Erase/ms */
+#define CONFIG_SYS_FLASH_WRITE_TOUT    500     /* Timeout for Flash Write/ms */
+
+#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1    /* use buff'd writes */
+#define CONFIG_SYS_FLASH_PROTECTION    1       /* use hardware flash protect */
+
+#define CONFIG_SYS_FLASH_EMPTY_INFO    /* 'E' for empty sector on flinfo */
+#define CONFIG_SYS_FLASH_QUIET_TEST    1       /* no warn upon unknown flash */
+
+#ifdef CONFIG_ENV_IS_IN_FLASH
+#define CONFIG_ENV_SECT_SIZE   0x20000 /* size of one complete sector */
+#define CONFIG_ENV_ADDR                ((-CONFIG_SYS_MONITOR_LEN)-CONFIG_ENV_SECT_SIZE)
+#define        CONFIG_ENV_SIZE         0x2000  /* Total Size of Environment Sector */
+
+/* Address and size of Redundant Environment Sector    */
+#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR-CONFIG_ENV_SECT_SIZE)
+#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
+#endif
+
+/* Gbit PHYs */
+#define CONFIG_BITBANGMII              /* bit-bang MII PHY management */
+#define CONFIG_BITBANGMII_MULTI
+
+#define CONFIG_SYS_MDIO_PIN  (0x80000000 >> 13)        /* our MDIO is GPIO0 */
+#define CONFIG_SYS_MDC_PIN   (0x80000000 >> 7) /* our MDC  is GPIO7 */
+
+#define CONFIG_SYS_GBIT_MII_BUSNAME    "io_miiphy"
+
+/*
+ * PPC405 GPIO Configuration
+ */
+#define CONFIG_SYS_4xx_GPIO_TABLE { /* GPIO    Alternate1      */ \
+{ \
+/* GPIO Core 0 */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_SEL,  GPIO_OUT_NO_CHG }, /* GPIO0  PerBLast */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_SEL,  GPIO_OUT_NO_CHG }, /* GPIO1  TS1E */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_SEL,  GPIO_OUT_NO_CHG }, /* GPIO2  TS2E */ \
+{ GPIO_BASE, GPIO_IN,  GPIO_SEL,  GPIO_OUT_NO_CHG }, /* GPIO3  TS1O */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_SEL,  GPIO_OUT_NO_CHG }, /* GPIO4  TS2O */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_SEL,  GPIO_OUT_1      }, /* GPIO5  TS3 */ \
+{ GPIO_BASE, GPIO_IN,  GPIO_SEL,  GPIO_OUT_NO_CHG }, /* GPIO6  TS4 */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_SEL,  GPIO_OUT_1      }, /* GPIO7  TS5 */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_SEL,  GPIO_OUT_NO_CHG }, /* GPIO8  TS6 */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_SEL,  GPIO_OUT_NO_CHG }, /* GPIO9  TrcClk */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_NO_CHG }, /* GPIO10 PerCS1 */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_NO_CHG }, /* GPIO11 PerCS2 */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_NO_CHG }, /* GPIO12 PerCS3 */ \
+{ GPIO_BASE, GPIO_IN,  GPIO_SEL,  GPIO_OUT_NO_CHG }, /* GPIO13 PerCS4 */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_NO_CHG }, /* GPIO14 PerAddr03 */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_NO_CHG }, /* GPIO15 PerAddr04 */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_NO_CHG }, /* GPIO16 PerAddr05 */ \
+{ GPIO_BASE, GPIO_IN,  GPIO_ALT1, GPIO_OUT_NO_CHG }, /* GPIO17 IRQ0 */ \
+{ GPIO_BASE, GPIO_IN,  GPIO_ALT1, GPIO_OUT_NO_CHG }, /* GPIO18 IRQ1 */ \
+{ GPIO_BASE, GPIO_IN,  GPIO_ALT1, GPIO_OUT_NO_CHG }, /* GPIO19 IRQ2 */ \
+{ GPIO_BASE, GPIO_IN,  GPIO_SEL,  GPIO_OUT_NO_CHG }, /* GPIO20 IRQ3 */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_SEL,  GPIO_OUT_NO_CHG }, /* GPIO21 IRQ4 */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_SEL,  GPIO_OUT_NO_CHG }, /* GPIO22 IRQ5 */ \
+{ GPIO_BASE, GPIO_IN,  GPIO_SEL,  GPIO_OUT_NO_CHG }, /* GPIO23 IRQ6 */ \
+{ GPIO_BASE, GPIO_IN,  GPIO_ALT1, GPIO_OUT_NO_CHG }, /* GPIO24 UART0_DCD */ \
+{ GPIO_BASE, GPIO_IN,  GPIO_ALT1, GPIO_OUT_NO_CHG }, /* GPIO25 UART0_DSR */ \
+{ GPIO_BASE, GPIO_IN,  GPIO_ALT1, GPIO_OUT_NO_CHG }, /* GPIO26 UART0_RI */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_NO_CHG }, /* GPIO27 UART0_DTR */ \
+{ GPIO_BASE, GPIO_IN,  GPIO_ALT1, GPIO_OUT_NO_CHG }, /* GPIO28 UART1_Rx */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_NO_CHG }, /* GPIO29 UART1_Tx */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_SEL,  GPIO_OUT_NO_CHG }, /* GPIO30 RejectPkt0 */ \
+{ GPIO_BASE, GPIO_IN,  GPIO_SEL,  GPIO_OUT_NO_CHG }, /* GPIO31 RejectPkt1 */ \
+} \
+}
+
+/*
+ * Definitions for initial stack pointer and data area (in data cache)
+ */
+/* use on chip memory (OCM) for temperary stack until sdram is tested */
+#define CONFIG_SYS_TEMP_STACK_OCM        1
+
+/* On Chip Memory location */
+#define CONFIG_SYS_OCM_DATA_ADDR       0xF8000000
+#define CONFIG_SYS_OCM_DATA_SIZE       0x1000
+#define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR /* in SDRAM */
+#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE /* End of used area */
+
+#define CONFIG_SYS_GBL_DATA_SIZE       128  /* size/bytes res'd for init data*/
+#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
+
+/*
+ * External Bus Controller (EBC) Setup
+ */
+
+/* Memory Bank 0 (NOR-FLASH) initialization */
+#define CONFIG_SYS_EBC_PB0AP           0xa382a880
+/* BAS=0xFC0,BS=64MB,BU=R/W,BW=16bit */
+#define CONFIG_SYS_EBC_PB0CR           0xFC0DA000
+
+/* Memory Bank 1 (NVRAM) initializatio */
+#define CONFIG_SYS_EBC_PB1AP           0x92015480
+/* BAS=0xFF8,BS=4MB,BU=R/W,BW=8bit  */
+#define CONFIG_SYS_EBC_PB1CR           0x7f318000
+
+/* Memory Bank 2 (FPGA) initialization */
+#define CONFIG_SYS_FPGA_BASE           0x7f100000
+#define CONFIG_SYS_EBC_PB2AP           0x02025080
+/* BAS=0x7f1,BS=1MB,BU=R/W,BW=16bit */
+#define CONFIG_SYS_EBC_PB2CR           0x7f11a000
+
+#define CONFIG_SYS_FPGA_RFL_LOW                0x0000
+#define CONFIG_SYS_FPGA_RFL_HIGH       0x3ffe
+
+/* Memory Bank 3 (Latches) initialization */
+#define CONFIG_SYS_LATCH_BASE          0x7f200000
+#define CONFIG_SYS_EBC_PB3AP           0xa2015480
+/* BAS=0x7f2,BS=1MB,BU=R/W,BW=16bit */
+#define CONFIG_SYS_EBC_PB3CR           0x7f21a000
+
+#define CONFIG_SYS_LATCH0_RESET                0xffff
+#define CONFIG_SYS_LATCH0_BOOT         0xffff
+#define CONFIG_SYS_LATCH1_RESET                0xffbf
+#define CONFIG_SYS_LATCH1_BOOT         0xffff
+
+#endif /* __CONFIG_H */
diff --git a/include/configs/iocon.h b/include/configs/iocon.h
new file mode 100644 (file)
index 0000000..5e61b11
--- /dev/null
@@ -0,0 +1,252 @@
+/*
+ * (C) Copyright 2010
+ * Dirk Eibach,  Guntermann & Drunck GmbH, eibach@gdsys.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
+
+#define CONFIG_405EP           1       /* this is a PPC405 CPU */
+#define CONFIG_4xx             1       /*  member of PPC4xx family */
+#define CONFIG_IOCON           1       /*  on a IoCon board */
+
+#define        CONFIG_SYS_TEXT_BASE    0xFFFC0000
+
+/*
+ * Include common defines/options for all AMCC eval boards
+ */
+#define CONFIG_HOSTNAME                iocon
+#define CONFIG_IDENT_STRING    " iocon 0.03"
+#include "amcc-common.h"
+
+#define CONFIG_BOARD_EARLY_INIT_F      /* call board_early_init_f */
+#define CONFIG_LAST_STAGE_INIT
+
+#define CONFIG_SYS_CLK_FREQ    33333333 /* external frequency to pll   */
+
+/*
+ * Configure PLL
+ */
+#define PLLMR0_DEFAULT PLLMR0_266_133_66
+#define PLLMR1_DEFAULT PLLMR1_266_133_66
+
+/* new uImage format support */
+#define CONFIG_FIT
+#define CONFIG_FIT_VERBOSE     /* enable fit_format_{error,warning}() */
+
+#define CONFIG_ENV_IS_IN_FLASH /* use FLASH for environment vars */
+
+/*
+ * Default environment variables
+ */
+#define        CONFIG_EXTRA_ENV_SETTINGS                                       \
+       CONFIG_AMCC_DEF_ENV                                             \
+       CONFIG_AMCC_DEF_ENV_POWERPC                                     \
+       CONFIG_AMCC_DEF_ENV_NOR_UPD                                     \
+       "kernel_addr=fc000000\0"                                        \
+       "fdt_addr=fc1e0000\0"                                           \
+       "ramdisk_addr=fc200000\0"                                       \
+       ""
+
+#define CONFIG_PHY_ADDR                4       /* PHY address                  */
+#define CONFIG_HAS_ETH0
+#define CONFIG_PHY_CLK_FREQ    EMAC_STACR_CLK_66MHZ
+
+/*
+ * Commands additional to the ones defined in amcc-common.h
+ */
+#define CONFIG_CMD_CACHE
+#undef CONFIG_CMD_EEPROM
+
+/*
+ * SDRAM configuration (please see cpu/ppc/sdram.[ch])
+ */
+#define CONFIG_SDRAM_BANK0     1       /* init onboard SDRAM bank 0 */
+
+/* SDRAM timings used in datasheet */
+#define CONFIG_SYS_SDRAM_CL             3      /* CAS latency */
+#define CONFIG_SYS_SDRAM_tRP           20      /* PRECHARGE command period */
+#define CONFIG_SYS_SDRAM_tRC           66      /* ACTIVE-to-ACTIVE period */
+#define CONFIG_SYS_SDRAM_tRCD          20      /* ACTIVE-to-READ delay */
+#define CONFIG_SYS_SDRAM_tRFC          66      /* Auto refresh period */
+
+/*
+ * If CONFIG_SYS_EXT_SERIAL_CLOCK, then the UART divisor is 1.
+ * If CONFIG_SYS_405_UART_ERRATA_59, then UART divisor is 31.
+ * Otherwise, UART divisor is determined by CPU Clock and CONFIG_SYS_BASE_BAUD.
+ * The Linux BASE_BAUD define should match this configuration.
+ *    baseBaud = cpuClock/(uartDivisor*16)
+ * If CONFIG_SYS_405_UART_ERRATA_59 and 200MHz CPU clock,
+ * set Linux BASE_BAUD to 403200.
+ */
+#define CONFIG_CONS_INDEX              1       /* Use UART0 */
+#undef  CONFIG_SYS_EXT_SERIAL_CLOCK            /* external serial clock */
+#undef  CONFIG_SYS_405_UART_ERRATA_59          /* 405GP/CR Rev. D silicon */
+#define CONFIG_SYS_BASE_BAUD           691200
+
+/*
+ * I2C stuff
+ */
+#define CONFIG_SYS_I2C_SPEED           400000
+
+/* enable I2C and select the hardware/software driver */
+#undef  CONFIG_HARD_I2C                        /* I2C with hardware support    */
+#define CONFIG_SOFT_I2C                1       /* I2C bit-banged               */
+
+/*
+ * Software (bit-bang) I2C driver configuration
+ */
+
+#ifndef __ASSEMBLY__
+void fpga_gpio_set(int pin);
+void fpga_gpio_clear(int pin);
+int fpga_gpio_get(int pin);
+#endif
+
+#define I2C_ACTIVE     { }
+#define I2C_TRISTATE   { }
+#define I2C_READ       fpga_gpio_get(0x0040) ? 1 : 0
+#define I2C_SDA(bit)   if (bit) fpga_gpio_set(0x0040); \
+                       else fpga_gpio_clear(0x0040)
+#define I2C_SCL(bit)   if (bit) fpga_gpio_set(0x0020); \
+                       else fpga_gpio_clear(0x0020)
+#define I2C_DELAY      udelay(25)      /* 1/4 I2C clock duration */
+
+/*
+ * FLASH organization
+ */
+#define CONFIG_SYS_FLASH_CFI           /* The flash is CFI compatible  */
+#define CONFIG_FLASH_CFI_DRIVER                /* Use common CFI driver        */
+
+#define CONFIG_SYS_FLASH_BASE          0xFC000000
+#define CONFIG_SYS_FLASH_BANKS_LIST    { CONFIG_SYS_FLASH_BASE }
+
+#define CONFIG_SYS_MAX_FLASH_BANKS     1       /* max num of memory banks */
+#define CONFIG_SYS_MAX_FLASH_SECT      512     /* max num of sectors per chip*/
+
+#define CONFIG_SYS_FLASH_ERASE_TOUT    120000  /* Timeout for Flash Erase/ms */
+#define CONFIG_SYS_FLASH_WRITE_TOUT    500     /* Timeout for Flash Write/ms */
+
+#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1    /* use buff'd writes */
+#define CONFIG_SYS_FLASH_PROTECTION    1       /* use hardware flash protect */
+
+#define CONFIG_SYS_FLASH_EMPTY_INFO    /* 'E' for empty sector on flinfo */
+#define CONFIG_SYS_FLASH_QUIET_TEST    1       /* no warn upon unknown flash */
+
+#ifdef CONFIG_ENV_IS_IN_FLASH
+#define CONFIG_ENV_SECT_SIZE   0x20000 /* size of one complete sector */
+#define CONFIG_ENV_ADDR                ((-CONFIG_SYS_MONITOR_LEN)-CONFIG_ENV_SECT_SIZE)
+#define        CONFIG_ENV_SIZE         0x2000  /* Total Size of Environment Sector */
+
+/* Address and size of Redundant Environment Sector    */
+#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR-CONFIG_ENV_SECT_SIZE)
+#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
+#endif
+
+/*
+ * PPC405 GPIO Configuration
+ */
+#define CONFIG_SYS_4xx_GPIO_TABLE { /* GPIO    Alternate1      */ \
+{ \
+/* GPIO Core 0 */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_NO_CHG }, /* GPIO0  PerBLast */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_SEL,  GPIO_OUT_NO_CHG }, /* GPIO1  TS1E */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_SEL,  GPIO_OUT_NO_CHG }, /* GPIO2  TS2E */ \
+{ GPIO_BASE, GPIO_IN,  GPIO_SEL,  GPIO_OUT_NO_CHG }, /* GPIO3  TS1O */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_SEL,  GPIO_OUT_NO_CHG }, /* GPIO4  TS2O */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_SEL,  GPIO_OUT_1      }, /* GPIO5  TS3 */ \
+{ GPIO_BASE, GPIO_IN,  GPIO_SEL,  GPIO_OUT_NO_CHG }, /* GPIO6  TS4 */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_SEL,  GPIO_OUT_NO_CHG }, /* GPIO7  TS5 */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_SEL,  GPIO_OUT_NO_CHG }, /* GPIO8  TS6 */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_SEL,  GPIO_OUT_NO_CHG }, /* GPIO9  TrcClk */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_NO_CHG }, /* GPIO10 PerCS1 */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_NO_CHG }, /* GPIO11 PerCS2 */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_NO_CHG }, /* GPIO12 PerCS3 */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_NO_CHG }, /* GPIO13 PerCS4 */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_NO_CHG }, /* GPIO14 PerAddr03 */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_NO_CHG }, /* GPIO15 PerAddr04 */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_NO_CHG }, /* GPIO16 PerAddr05 */ \
+{ GPIO_BASE, GPIO_IN,  GPIO_ALT1, GPIO_OUT_NO_CHG }, /* GPIO17 IRQ0 */ \
+{ GPIO_BASE, GPIO_IN,  GPIO_ALT1, GPIO_OUT_NO_CHG }, /* GPIO18 IRQ1 */ \
+{ GPIO_BASE, GPIO_IN,  GPIO_ALT1, GPIO_OUT_NO_CHG }, /* GPIO19 IRQ2 */ \
+{ GPIO_BASE, GPIO_IN,  GPIO_SEL,  GPIO_OUT_NO_CHG }, /* GPIO20 IRQ3 */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_SEL,  GPIO_OUT_NO_CHG }, /* GPIO21 IRQ4 */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_SEL,  GPIO_OUT_NO_CHG }, /* GPIO22 IRQ5 */ \
+{ GPIO_BASE, GPIO_IN,  GPIO_SEL,  GPIO_OUT_NO_CHG }, /* GPIO23 IRQ6 */ \
+{ GPIO_BASE, GPIO_IN,  GPIO_ALT1, GPIO_OUT_NO_CHG }, /* GPIO24 UART0_DCD */ \
+{ GPIO_BASE, GPIO_IN,  GPIO_ALT1, GPIO_OUT_NO_CHG }, /* GPIO25 UART0_DSR */ \
+{ GPIO_BASE, GPIO_IN,  GPIO_ALT1, GPIO_OUT_NO_CHG }, /* GPIO26 UART0_RI */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_NO_CHG }, /* GPIO27 UART0_DTR */ \
+{ GPIO_BASE, GPIO_IN,  GPIO_ALT1, GPIO_OUT_NO_CHG }, /* GPIO28 UART1_Rx */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_NO_CHG }, /* GPIO29 UART1_Tx */ \
+{ GPIO_BASE, GPIO_OUT, GPIO_SEL,  GPIO_OUT_NO_CHG }, /* GPIO30 RejectPkt0 */ \
+{ GPIO_BASE, GPIO_IN,  GPIO_SEL,  GPIO_OUT_NO_CHG }, /* GPIO31 RejectPkt1 */ \
+} \
+}
+
+/*
+ * Definitions for initial stack pointer and data area (in data cache)
+ */
+/* use on chip memory (OCM) for temperary stack until sdram is tested */
+#define CONFIG_SYS_TEMP_STACK_OCM        1
+
+/* On Chip Memory location */
+#define CONFIG_SYS_OCM_DATA_ADDR       0xF8000000
+#define CONFIG_SYS_OCM_DATA_SIZE       0x1000
+#define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR /* in SDRAM */
+#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE /* End of used area */
+
+#define CONFIG_SYS_GBL_DATA_SIZE       128  /* size/bytes res'd for init data*/
+#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
+
+/*
+ * External Bus Controller (EBC) Setup
+ */
+
+/* Memory Bank 0 (NOR-FLASH) initialization */
+#define CONFIG_SYS_EBC_PB0AP           0xa382a880
+#define CONFIG_SYS_EBC_PB0CR           0xFC0DA000
+
+/* Memory Bank 1 (NVRAM) initializatio */
+#define CONFIG_SYS_EBC_PB1AP           0x92015480
+#define CONFIG_SYS_EBC_PB1CR           0xFB858000
+
+/* Memory Bank 2 (FPGA) initialization */
+#define CONFIG_SYS_FPGA_BASE           0x7f100000
+#define CONFIG_SYS_EBC_PB2AP           0x02825080
+#define CONFIG_SYS_EBC_PB2CR           (CONFIG_SYS_FPGA_BASE | 0x1a000)
+
+#define CONFIG_SYS_FPGA_RFL_LOW                0x0000
+#define CONFIG_SYS_FPGA_RFL_HIGH       0x00fe
+
+/* Memory Bank 3 (Latches) initialization */
+#define CONFIG_SYS_LATCH_BASE          0x7f200000
+#define CONFIG_SYS_EBC_PB3AP           0x02025080
+#define CONFIG_SYS_EBC_PB3CR           0x7f21a000
+
+#define CONFIG_SYS_LATCH0_RESET                0xffef
+#define CONFIG_SYS_LATCH0_BOOT         0xffff
+#define CONFIG_SYS_LATCH1_RESET                0xffff
+#define CONFIG_SYS_LATCH1_BOOT         0xffff
+
+#endif /* __CONFIG_H */
index c37b83b09593d84e96fab950d47e8e2e5ab7accd..d3821389fd5025f64cc12a42436216f7d5aabc31 100644 (file)
 /* 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
+#define CONFIG_SYS_INIT_RAM_SIZE               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_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - \
+                                        GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_BASE                CONFIG_SYS_TEXT_BASE
index 768e8366bda2d6a584f82f747278ad3077d0a3bb..28d41e29254a27acc3d6bb5f74d5a51502d17bca 100644 (file)
@@ -46,7 +46,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN      (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /* allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
index 0c092347ca794abd9cb6c1a253b4d99190e71b86..637fd7d4f89b80bb1c2a08decaa00965f6937e5f 100644 (file)
@@ -68,7 +68,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (256 << 10)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /* allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
index a5d8764b519cae58160bf784f80e07b5fd2c9f56..c1193926bde8f22e6bc43d989848faaeeb90ed6f 100644 (file)
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN  (0x400000 - 0x8000)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* 128 bytes for initial data */
 
 #define CONFIG_STACKSIZE       (32*1024)       /* regular stack */
 
diff --git a/include/configs/jornada.h b/include/configs/jornada.h
new file mode 100644 (file)
index 0000000..41b09aa
--- /dev/null
@@ -0,0 +1,153 @@
+/*
+ * Copyright 2010 (C)
+ * Kristoffer Ericson <kristoffer.ericson@gmail.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
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+/*
+ * High Level Configuration Options
+ * (easy to change)
+ */
+#define CONFIG_SA1110                  1       /* This is an SA110 CPU */
+#define CONFIG_JORNADA700              1       /* on an HP Jornada 700 series */
+#define CONFIG_SYS_FLASH_PROTECTION    1
+
+#define CONFIG_SYS_TEXT_BASE           0xC1F00000
+
+/* we will never enable dcache, because we have to setup MMU first */
+#define CONFIG_SYS_NO_DCACHE
+#undef CONFIG_USE_IRQ
+
+/* Console setting */
+
+#define CONFIG_CMDLINE_TAG             1       /* enable passing of ATAGs      */
+#define CONFIG_SETUP_MEMORY_TAGS       1
+#define CONFIG_INITRD_TAG              1
+
+/*
+ * Size of malloc() pool
+ */
+#define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128*1024)
+
+/*
+ * select serial console configuration
+ */
+#define CONFIG_SA1100_SERIAL   1
+#define CONFIG_SERIAL3         1       /* we use serial 3 */
+#define CONFIG_BAUDRATE        19200
+#define CONFIG_LOADS_ECHO      1
+
+/*
+ * Command line configuration.
+ */
+#include <config_cmd_default.h>
+#define CONFIG_CMD_FLASH
+#define CONFIG_CMD_JFFS2
+#undef CONFIG_CMD_NET
+#undef CONFIG_CMD_NFS
+#undef CONFIG_CMD_FPGA
+#undef CONFIG_CMD_MISC
+#undef CONFIG_CMD_SETGETDCR
+#undef CONFIG_CMD_XIMG
+
+#define CONFIG_BOOTDELAY       5
+#define CONFIG_BOOTARGS        "root=/dev/hda1 console=ttySA0,19200n8 console=tty1"
+#define CONFIG_BOOTCOMMAND     "run boot_kernel"
+#define CONFIG_SYS_AUTOLOAD    "n"     /* No autoload */
+#define CONFIG_SYS_LOAD_ADDR   0xc0000000
+
+/*
+ * Miscellaneous configurable options
+ */
+#define CONFIG_SYS_LONGHELP    /* undef to save memory */
+#define CONFIG_SYS_PROMPT              "HP Jornada# "
+#define CONFIG_SYS_CBSIZE              256     /* console buffsize */
+#define CONFIG_SYS_PBSIZE              (256+sizeof(CONFIG_SYS_PROMPT)+16)
+#define CONFIG_SYS_MAXARGS             16      /* max number of command args */
+#define CONFIG_SYS_BARGSIZE            256     /* Boot Argument Buffer Size */
+#define CONFIG_SYS_MEMTEST_START       0xc0040000      /* memtest works on */
+#define CONFIG_SYS_MEMTEST_END         0xc2000000      /* 4..128 MB */
+#define CONFIG_SYS_HZ                  1000
+#define CONFIG_SYS_CPUSPEED            0x0a /* core clock 206MHz */
+#define CONFIG_SYS_BAUDRATE_TABLE      { 19200, 38400, 57600, 115200 }
+
+/*-----------------------------------------------------------------------
+ * Stack sizes
+ *
+ * The stack sizes are set up in start.S using the settings below
+ */
+#define CONFIG_STACKSIZE               (128*1024)      /* regular stack */
+#define CONFIG_SYS_FLASH_CFI           1
+#define CONFIG_FLASH_CFI_DRIVER        1
+#define CONFIG_FLASH_CFI_WIDTH         FLASH_CFI_32BIT
+#define CONFIG_SYS_FLASH_BASE          0x00000000
+#define CONFIG_SYS_FLASH_ERASE_TOUT    (4096)
+#define CONFIG_SYS_FLASH_WRITE_TOUT    (4096)
+#define CONFIG_SYS_FLASH_INCREMENT     0x02000000
+#define PHYS_FLASH_1                   0x00000000      /* starts at 0x0 */
+#define PHYS_FLASH_SIZE                0x04000000      /* 64MB */
+#define PHYS_FLASH_SECT_SIZE           0x00040000      /* 256KB Sectors */
+#define CONFIG_SYS_MAX_FLASH_BANKS     1
+#define CONFIG_SYS_MAX_FLASH_SECT      260
+#define CONFIG_SYS_FLASH_BANKS_LIST    { PHYS_FLASH_1 }
+#define CONFIG_SYS_FLASH_EMPTY_INFO    1
+#define CONFIG_SYS_MONITOR_LEN         0x00040000
+#define CONFIG_SYS_MONITOR_BASE        0x00000000
+#define CONFIG_FLASH_SHOW_PROGRESS     1
+
+/* Environment */
+#define CONFIG_ENV_IS_IN_FLASH 1
+#define CONFIG_ENV_ADDR                0x00040000
+#define CONFIG_ENV_OFFSET      0x00040000
+#define CONFIG_ENV_SIZE                0x00040000
+#define CONFIG_ENV_SECT_SIZE   0x00040000
+#define CONFIG_ENV_OVERWRITE   1
+
+/*
+  Monitor -     0x00000000 - 0x00040000 (256kb)
+  Environment - 0x00040000 - 0x00080000 (256kb)
+  Kernel -      0x00080000 - 0x00380000 (3mb)
+  Rootfs -      0x00380000 - 0x........ (rest)
+*/
+
+#define CONFIG_NR_DRAM_BANKS           2
+#define CONFIG_SYS_SDRAM_BASE          0x00000000
+#define CONFIG_SYS_INTRAM_BASE         INTERNAL_SRAM_BASE
+#define CONFIG_SYS_INTRAM_SIZE         INTERNAL_SRAM_SIZE
+#define CONFIG_SYS_INIT_SP_ADDR        0x0
+#define PHYS_SDRAM_1                   0xc0000000      /* SDRAM Bank #1 */
+#define PHYS_SDRAM_2                   0xc4000000      /* SDRAM Bank #2 */
+#define PHYS_SDRAM_1_SIZE              0x04000000      /* 64 MB */
+#define PHYS_SDRAM_2_SIZE              0x04000000      /* 64 MB */
+
+#define CONFIG_CMD_MTDPARTS
+#define CONFIG_MTD_DEVICE
+#define CONFIG_FLASH_CFI_MTD
+#define MTDIDS_DEFAULT         "nor0=jornada7xx-0"
+#define MTDPARTS_DEFAULT       "mtdparts=jornada7xx-0:256k(u-boot),256k(env),"\
+               "3m(kernel),-(user);"
+
+#define        CONFIG_EXTRA_ENV_SETTINGS                               \
+       "flash_kernel=protect off all; "                                \
+       "erase 00080000 0037ffff;cp.b c0000000 00080000 00300000;\0"    \
+       "flash_uboot=protect off all; "                                 \
+       "erase 00000000 0003ffff;cp.b c0000000 00000000 00040000;\0"    \
+       "boot_kernel=cp.b 00080000 c0000000 00300000;bootm;\0"
+#endif /* __CONFIG_H */
index 6f5ac942f4e1594e0a386d1608ad378ca27375fa..8d27c0b2d10dcbc7ca72a5c896772a1691c4288e 100644 (file)
 
 /* Use SRAM until RAM will be available */
 #define CONFIG_SYS_INIT_RAM_ADDR       MPC5XXX_SRAM
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_SIZE       /* End of used area in DPRAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_SIZE       /* Size of used area in DPRAM */
 
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_BASE    CONFIG_SYS_TEXT_BASE
index 135a4c26aa4cc80a2aa07e2885204026a662d5ab..3ed8dc7f3ea2a8ce251006ef500b10db9497ef27 100644 (file)
 #define CONFIG_SYS_TEMP_STACK_OCM      1
 #define CONFIG_SYS_OCM_DATA_ADDR       CONFIG_SYS_ISRAM_BASE
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_ISRAM_BASE   /* Initial RAM address  */
-#define CONFIG_SYS_INIT_RAM_END        0x2000          /* End of used area in RAM */
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* num bytes initial data */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2000          /* Size of used area in RAM */
 
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      (CONFIG_SYS_GBL_DATA_OFFSET - 0x4)
 
 /*-----------------------------------------------------------------------
index 41ec1d52e39b0309000952756e3ec2d5ab9d29e8..cfb7ceacc1dac6232c91b6fe189f412da70b4f2f 100644 (file)
@@ -53,8 +53,6 @@
 #define CONFIG_INITRD_TAG      1
 
 #define        CONFIG_SKIP_LOWLEVEL_INIT
-#define CONFIG_SKIP_RELOCATE_UBOOT     /* undef this for direct boot from */
-                                                                       /* NOR flash without preloader */
 
 #define        CONFIG_SYS_LONGHELP
 
@@ -65,7 +63,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN  (roundup(CONFIG_ENV_SIZE,4096) + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 #define CONFIG_BAUDRATE 115200
 
index e153b3120fbc0c3bc21a458b0117871a5fac64ae..031f8fb4ec991a37eae9f3476d873fadfc0fe474 100644 (file)
@@ -92,9 +92,8 @@
 #define CONFIG_SYS_INIT_RAM_ADDR       (CONFIG_SYS_SDRAM_BASE + (32 << 20))    /* 32 MiB */
 #endif /* defined(CONFIG_SYS_INIT_DCACHE_CS) */
 
-#define CONFIG_SYS_INIT_RAM_END        (4 << 10)                       /*  4 KiB */
-#define CONFIG_SYS_GBL_DATA_SIZE       256             /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE        (4 << 10)                      /*  4 KiB */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 
 /*
  * If the data cache is being used for the primordial stack and global
index 2a42e99743165443af4198581992e48b2c462bef..7683fe542e562eab865ab179a270bf0d1b29d89f 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x2F00  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       64
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index faa0f503266e6a5227bd86b4662d7a4f0d38b248..986c46ec642231b637c5e704adbaa99b80d13757 100644 (file)
 #define CONFIG_KM_CONSOLE_TTY  "ttyS0"
 
 /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_SIZE       128
 
 /*
  * Other required minimal configurations
@@ -183,5 +182,5 @@ int get_scl (void);
 /* additions for new relocation code, must be added to all boards */
 #define CONFIG_SYS_SDRAM_BASE          0x00000000
 #define CONFIG_SYS_INIT_SP_ADDR                (0x00000000 + 0x1000 - /* Fix this */ \
-                                       CONFIG_SYS_GBL_DATA_SIZE)
+                                       GENERATED_GBL_DATA_SIZE)
 #endif /* _CONFIG_KM_ARM_H */
index 03d3aacb8f5ecc8599a7bbbbc22f6894d7a4695a..8fcadfee50603c68217d580578416591beed6814 100644 (file)
  */
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0xE6000000 /* Initial RAM address */
-#define CONFIG_SYS_INIT_RAM_END        0x1000 /* End of used area in RAM */
-#define CONFIG_SYS_GBL_DATA_SIZE       0x100 /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x1000 /* Size of used area in RAM */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 
 /*
  * Local Bus Configuration & Clock Setup
index 3a0531bc8f14c0a51b878626b23569fb2a290412..66cb53337d6d8b01401ccc53b5cc2f1ed50a7f63 100644 (file)
@@ -88,9 +88,8 @@
 /* 440EPx has 16KB of internal SRAM, so no need for D-Cache            */
 #undef CONFIG_SYS_INIT_RAM_DCACHE
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_BASE     /* OCM                  */
-#define CONFIG_SYS_INIT_RAM_END        (4 << 10)
-#define CONFIG_SYS_GBL_DATA_SIZE       256     /* num bytes initial data       */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       (4 << 10)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      (CONFIG_SYS_GBL_DATA_OFFSET - 0x4)
 
 /*
index fa876255bf1c5d21d17780e165d3d7b8f64c502d..95fc2437dd5b7bec976d1f1ee1113b05c21e1eb0 100644 (file)
 #define CONFIG_SYS_BAUDRATE_TABLE      { 9600, 19200, 38400, 57600, 115200 }
 
 #define CONFIG_SYS_INIT_RAM_ADDR       0x40000000
-#define CONFIG_SYS_INIT_RAM_END        0x1000
-#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_RAM_SIZE       0x1000
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 
 #define CONFIG_SYS_SDRAM_BASE          0x00000000
 #define CONFIG_SYS_FLASH_BASE          0x7C000000
index 2d3b369aae68078c8c7fa53a03e53ee88a4b5a7d..795cf3487b3a5bbd0323eea8cbf5d55de64d63d3 100644 (file)
@@ -42,7 +42,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
index aaf663a749b6316ec7e1ef8f2dd59c24d77c8a67..b00647b3e01eef168660e215b4e77d703d3aa6e8 100644 (file)
 #else
 #define CONFIG_SYS_INIT_RAM_ADDR       0x40000000
 #endif
-#define CONFIG_SYS_INIT_RAM_END        0x1000
-#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_RAM_SIZE       0x1000
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 
 /*----------------------------------------------------------------------
  * Serial configuration
index 65276a27c0b7f63d5a620bf3431d160212678074..17972d7e6ffa27b22461725476afa537b065dcec 100644 (file)
@@ -31,7 +31,6 @@
  * so we MUST NOT initialize critical regs like mem-timing ...
  */
 #undef CONFIG_SKIP_LOWLEVEL_INIT
-#undef CONFIG_SKIP_RELOCATE_UBOOT
 
 /*
  * High Level Configuration Options
@@ -48,7 +47,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
index bf4a57d249bd06ce4d2a65860de04445977d3bd4..06f3d7e58ff3b7f355aa127f7cced22314966f9f 100644 (file)
@@ -38,7 +38,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * select serial console configuration
index 557f389ccbf2690e4c3265facd9211159d8631dc..7535f62d3df7026cfe1acf8210dbceb53cefb00f 100644 (file)
@@ -38,7 +38,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * select serial console configuration
index d8014047b7b6d0fe0986063518cb3c4658ddf209..3b4761bd08719919657851195e4067026446446a 100644 (file)
@@ -80,9 +80,8 @@
  * Initial RAM & stack pointer (placed in SDRAM)
  *----------------------------------------------------------------------*/
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_ISRAM_BASE
-#define CONFIG_SYS_INIT_RAM_END        (8 << 10)
-#define CONFIG_SYS_GBL_DATA_SIZE       256             /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       (8 << 10)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 0a6921044c78da2301f1f97e065a03cb3dea8183..b7d53b65b787e62c10ca151165de0f993400f3c0 100644 (file)
@@ -43,7 +43,7 @@
 #define CONFIG_MMC
 #define BOARD_LATE_INIT                1
 #define CONFIG_DOS_PARTITION
-
+#define        CONFIG_SYS_TEXT_BASE    0x0
 #undef CONFIG_USE_IRQ                  /* we don't need IRQ/FIQ stuff */
 
 /* we will never enable dcache, because we have to setup MMU first */
@@ -53,7 +53,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN      (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
 
 #define CONFIG_SYS_FLASH_BASE          PHYS_FLASH_1
 
+#define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM_1
+#define        CONFIG_SYS_INIT_SP_ADDR         (GENERATED_GBL_DATA_SIZE + PHYS_SDRAM_1)
+
 #define FPGA_REGS_BASE_PHYSICAL 0x08000000
 
 /*
 
 #define CONFIG_SYS_PSSR_VAL            0x20
 
+#define        CONFIG_SYS_CCCR                 CCCR_L27|CCCR_M2|CCCR_N10
+#define        CONFIG_SYS_CKEN                 0x0
+
 /*
  * Memory settings
  */
 #define CONFIG_SYS_MDREFR_VAL          0x00018018
 #define CONFIG_SYS_MDMRS_VAL           0x00000000
 
+#define        CONFIG_SYS_FLYCNFG_VAL          0x00000000
+#define        CONFIG_SYS_SXCNFG_VAL           0x00000000
+
 /*
  * PCMCIA and CF Interfaces
  */
index 1062765f03662813afc02a367545b64c4eaa3679..e23b0a1b2f25d0a75b1135c8f8ef34e6c60915db 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x2F00  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       68  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
 
 /* List of I2C addresses to be verified by POST */
 #ifdef CONFIG_USE_FRAM
-#define I2C_ADDR_LIST  {  /*   CONFIG_SYS_I2C_AUDIO_ADDR, */   \
-                               CONFIG_SYS_I2C_SYSMON_ADDR,     \
-                               CONFIG_SYS_I2C_RTC_ADDR,        \
-                               CONFIG_SYS_I2C_POWER_A_ADDR,    \
-                               CONFIG_SYS_I2C_POWER_B_ADDR,    \
-                               CONFIG_SYS_I2C_KEYBD_ADDR,      \
-                               CONFIG_SYS_I2C_PICIO_ADDR,      \
-                               CONFIG_SYS_I2C_EEPROM_ADDR,     \
-                       }
+#define CONFIG_SYS_POST_I2C_ADDRS      {/* CONFIG_SYS_I2C_AUDIO_ADDR, */ \
+                                        CONFIG_SYS_I2C_SYSMON_ADDR,    \
+                                        CONFIG_SYS_I2C_RTC_ADDR,       \
+                                        CONFIG_SYS_I2C_POWER_A_ADDR,   \
+                                        CONFIG_SYS_I2C_POWER_B_ADDR,   \
+                                        CONFIG_SYS_I2C_KEYBD_ADDR,     \
+                                        CONFIG_SYS_I2C_PICIO_ADDR,     \
+                                        CONFIG_SYS_I2C_EEPROM_ADDR,    \
+                                       }
 #else  /* Use EEPROM - which show up on 8 consequtive addresses */
-#define I2C_ADDR_LIST  {  /*   CONFIG_SYS_I2C_AUDIO_ADDR, */   \
-                               CONFIG_SYS_I2C_SYSMON_ADDR,     \
-                               CONFIG_SYS_I2C_RTC_ADDR,        \
-                               CONFIG_SYS_I2C_POWER_A_ADDR,    \
-                               CONFIG_SYS_I2C_POWER_B_ADDR,    \
-                               CONFIG_SYS_I2C_KEYBD_ADDR,      \
-                               CONFIG_SYS_I2C_PICIO_ADDR,      \
-                               CONFIG_SYS_I2C_EEPROM_ADDR+0,   \
-                               CONFIG_SYS_I2C_EEPROM_ADDR+1,   \
-                               CONFIG_SYS_I2C_EEPROM_ADDR+2,   \
-                               CONFIG_SYS_I2C_EEPROM_ADDR+3,   \
-                               CONFIG_SYS_I2C_EEPROM_ADDR+4,   \
-                               CONFIG_SYS_I2C_EEPROM_ADDR+5,   \
-                               CONFIG_SYS_I2C_EEPROM_ADDR+6,   \
-                               CONFIG_SYS_I2C_EEPROM_ADDR+7,   \
-                       }
+#define CONFIG_SYS_POST_I2C_ADDRS      {/* CONFIG_SYS_I2C_AUDIO_ADDR, */ \
+                                        CONFIG_SYS_I2C_SYSMON_ADDR,    \
+                                        CONFIG_SYS_I2C_RTC_ADDR,       \
+                                        CONFIG_SYS_I2C_POWER_A_ADDR,   \
+                                        CONFIG_SYS_I2C_POWER_B_ADDR,   \
+                                        CONFIG_SYS_I2C_KEYBD_ADDR,     \
+                                        CONFIG_SYS_I2C_PICIO_ADDR,     \
+                                        CONFIG_SYS_I2C_EEPROM_ADDR+0,  \
+                                        CONFIG_SYS_I2C_EEPROM_ADDR+1,  \
+                                        CONFIG_SYS_I2C_EEPROM_ADDR+2,  \
+                                        CONFIG_SYS_I2C_EEPROM_ADDR+3,  \
+                                        CONFIG_SYS_I2C_EEPROM_ADDR+4,  \
+                                        CONFIG_SYS_I2C_EEPROM_ADDR+5,  \
+                                        CONFIG_SYS_I2C_EEPROM_ADDR+6,  \
+                                        CONFIG_SYS_I2C_EEPROM_ADDR+7,  \
+                                       }
 #endif /* CONFIG_USE_FRAM */
 
 /*-----------------------------------------------------------------------
index d00371012507a78bc1dd6fb651d7738da78d1f07..4c9744ca4fa16fdacbbe32a6a0eb6ad3c0c6a538 100644 (file)
  */
 #define CONFIG_SYS_INIT_RAM_DCACHE     1               /* d-cache as init ram  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x70000000              /* DCache       */
-#define CONFIG_SYS_INIT_RAM_END                (4 << 10)
-#define CONFIG_SYS_GBL_DATA_SIZE       256             /* num bytes initial data*/
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - \
-                                        CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE               (4 << 10)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - \
+                                        GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 /* unused GPT0 COMP reg        */
 #define CONFIG_SYS_POST_WORD_ADDR      (CONFIG_SYS_PERIPHERAL_BASE + GPT0_COMP6)
 #define CONFIG_SYS_POST_UART_TABLE     { CONFIG_SYS_NS16550_COM1, \
                        CONFIG_SYS_NS16550_COM2 }
 
+#define CONFIG_POST_UART  {                            \
+       "UART test",                                    \
+       "uart",                                         \
+       "This test verifies the UART operation.",       \
+       POST_RAM | POST_SLOWTEST | POST_ALWAYS | POST_MANUAL,   \
+       &uart_post_test,                                \
+       NULL,                                           \
+       NULL,                                           \
+       CONFIG_SYS_POST_UART                            \
+       }
+
 #define CONFIG_POST_WATCHDOG  {                                \
        "Watchdog timer test",                          \
        "watchdog",                                     \
 #define CONFIG_SYS_I2C_KEYBD_ADDR      0x56    /* PIC LWE keyboard             */
 #define CONFIG_SYS_I2C_DSPIC_IO_ADDR   0x57    /* PIC I/O addr               */
 
-#define I2C_ADDR_LIST  {                                               \
-                       CONFIG_SYS_I2C_RTC_ADDR,                        \
-                       CONFIG_SYS_I2C_EEPROM_CPU_ADDR,                 \
-                       CONFIG_SYS_I2C_EEPROM_MB_ADDR,                  \
-                       CONFIG_SYS_I2C_DSPIC_ADDR,                      \
-                       CONFIG_SYS_I2C_DSPIC_2_ADDR,                    \
-                       CONFIG_SYS_I2C_DSPIC_KEYB_ADDR,                 \
-                       CONFIG_SYS_I2C_DSPIC_IO_ADDR }
+#define CONFIG_SYS_POST_I2C_ADDRS      {CONFIG_SYS_I2C_RTC_ADDR,       \
+                                        CONFIG_SYS_I2C_EEPROM_CPU_ADDR,\
+                                        CONFIG_SYS_I2C_EEPROM_MB_ADDR, \
+                                        CONFIG_SYS_I2C_DSPIC_ADDR,     \
+                                        CONFIG_SYS_I2C_DSPIC_2_ADDR,   \
+                                        CONFIG_SYS_I2C_DSPIC_KEYB_ADDR,\
+                                        CONFIG_SYS_I2C_DSPIC_IO_ADDR }
 
 /*
  * Pass open firmware flat tree
index 26c2bcb6893ff1c841f5f6b9443dfe613a93d88d..68f0415a37b839a79e2d14dbeb39b3126e57c3cd 100644 (file)
@@ -77,7 +77,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* Bytes reserved for initial data */
 
 #define CONFIG_BAUDRATE                        115200
 
index c4853ab9c20db74f39bbc9f3ebcb5abac3d77e52..fcc789d714158349b5cd6c11b6eec943f6ad1215 100644 (file)
@@ -88,9 +88,8 @@
 #define CONFIG_SYS_INIT_RAM_ADDR       (CONFIG_SYS_SDRAM_BASE + (32 << 20))    /* 32 MiB */
 #endif /* defined(CONFIG_SYS_INIT_DCACHE_CS) */
 
-#define CONFIG_SYS_INIT_RAM_END        (4 << 10)                       /*  4 KiB */
-#define CONFIG_SYS_GBL_DATA_SIZE       256             /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE        (4 << 10)                      /*  4 KiB */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 
 /*
  * If the data cache is being used for the primordial stack and global
index 7be135478ff5034ac268faf41605ae016dacbbba..3e4131eae171dad0fff741330983c9e3fd0309b8 100644 (file)
 #define CONFIG_SYS_MBAR                0xF0000000
 #define CONFIG_SYS_DEFAULT_MBAR        0x80000000
 
-#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_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE -\
+                                        GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_SDRAM_BASE          0x00000000
 #define CONFIG_SYS_INIT_RAM_ADDR       MPC5XXX_SRAM
 #ifdef CONFIG_POST
 /* preserve space for the post_word at end of on-chip SRAM */
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_POST_SIZE
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_POST_SIZE
 #else
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_SIZE
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_SIZE
 #endif
 
 #define CONFIG_SYS_MONITOR_BASE    CONFIG_SYS_TEXT_BASE
index 4d946abb23c2a59aa5fcff9be5c7cc1799796d33..f1cdc4019eb7bfeffbaf4485ff46c5687891c6cf 100644 (file)
 
 /* Use SRAM until RAM will be available */
 #define CONFIG_SYS_INIT_RAM_ADDR       MPC5XXX_SRAM
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_SIZE       /* End of used area in DPRAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_SIZE       /* Size of used area in DPRAM */
 
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE
index 4aef6fc9622b722cd75a6bea4cdf5b6a42e09a82..a1622916a03ba2904fe1ac2946fd8ee919498df9 100644 (file)
@@ -71,9 +71,8 @@
 #define CONFIG_SYS_TEMP_STACK_OCM      1
 
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR        /* OCM          */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE
-#define CONFIG_SYS_GBL_DATA_SIZE       256             /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      (CONFIG_SYS_GBL_DATA_OFFSET - 0x4)
 
 /*-----------------------------------------------------------------------
index 1e82bc5ca7db8b7b2e30caf9d217cbf97b2204ac..b9cf1dc7975a2b260f1d2e84a0db2be4d5678048 100644 (file)
 
 /* Use SRAM for initial stack */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_SRAM_BASE /* Init RAM addr */
-#define CONFIG_SYS_INIT_RAM_END                CONFIG_SYS_SRAM_SIZE
+#define CONFIG_SYS_INIT_RAM_SIZE               CONFIG_SYS_SRAM_SIZE
 
-#define CONFIG_SYS_GBL_DATA_SIZE       0x100           /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_BASE                CONFIG_SYS_TEXT_BASE    /* Start of monitor */
index 036b7904f353fcb5b944428f0e66991bd6d73aff..9961f122b1128323b912783850044c85c6da36bb 100644 (file)
 
 /* Use SRAM until RAM will be available */
 #define CONFIG_SYS_INIT_RAM_ADDR       MPC5XXX_SRAM
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_SIZE       /* End of used area in DPRAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_SIZE       /* Size of used area in DPRAM */
 
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_BASE    CONFIG_SYS_TEXT_BASE
index dbb253143998c2774d58beae0fca239ff83ee261..a27b36b3786a3549d39e0aed0db6b55639bf0c92 100644 (file)
@@ -48,7 +48,6 @@
 #undef CONFIG_USE_IRQ                          /* don't need IRQ/FIQ stuff */
 
 #define CONFIG_SKIP_LOWLEVEL_INIT
-#define CONFIG_SKIP_RELOCATE_UBOOT
 #define CONFIG_MISC_INIT_R                     /* Call misc_init_r */
 
 #define CONFIG_ARCH_CPU_INIT
  */
 #define CONFIG_SYS_MALLOC_LEN          ROUND(3 * CONFIG_ENV_SIZE + \
                                        128*1024, 0x1000)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* 128 bytes for initial data */
 
 #define CONFIG_STACKSIZE               (32 * 1024)     /* regular stack */
 
index 4dcd67919ba2978e6fc7682aa2b9dbbcc0b3402c..6dec0ee7403565d767548cd50a1e352915fea79b 100644 (file)
 #define CONFIG_SYS_IMMR                0xF0000000
 
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x2000  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2000  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /* Hard reset configuration word */
index bcdd86e9f3bd970da0e597c9459dc039d6c72e2b..75e4e076178a9d4214f94ff3bedfe3230dd912dc 100644 (file)
 #define        CONFIG_SYS_MEMTEST_END          (CONFIG_SYS_SDRAM_BASE + 0x1000)
 
 /* global pointer */
-#define        CONFIG_SYS_GBL_DATA_SIZE        128 /* size of global data */
 /* start of global data */
 #define        CONFIG_SYS_GBL_DATA_OFFSET \
        (CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_SDRAM_SIZE \
-                               - CONFIG_SYS_GBL_DATA_SIZE)
+                               - GENERATED_GBL_DATA_SIZE)
 
 /* monitor code */
 #define        SIZE                            0x40000
-#define        CONFIG_SYS_MONITOR_LEN          (SIZE - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_MONITOR_LEN          (SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_MONITOR_BASE \
                        (CONFIG_SYS_GBL_DATA_OFFSET - CONFIG_SYS_MONITOR_LEN)
 #define        CONFIG_SYS_MONITOR_END \
index 74bab5fc4c1fe0bf41d60f227f0afd24fae3a496..57707f38e674d6c1a686822df5b1e6c022e07687 100644 (file)
@@ -46,7 +46,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128
 
 /*
  * Hardware drivers
index 935b5b9a052930320e285d72cf9e1e129e3fda3a..bdcae59e0df4207e8ed7685a4fcad2144a6979e3 100644 (file)
 #define CONFIG_BOOTP_GATEWAY
 #define CONFIG_BOOTP_HOSTNAME
 
-
 /*
  * Command line configuration.
  */
 #include <config_cmd_default.h>
 
 #define CONFIG_CMD_ASKENV
+#define CONFIG_CMD_BEDBUG
+#define CONFIG_CMD_DATE
 #define CONFIG_CMD_DHCP
-#define CONFIG_CMD_REGINFO
-#define CONFIG_CMD_IMMAP
+#define CONFIG_CMD_DTT
+#define CONFIG_CMD_EEPROM
 #define CONFIG_CMD_ELF
+#define CONFIG_CMD_FAT
+#define CONFIG_CMD_I2C
+#define CONFIG_CMD_IDE
+#define CONFIG_CMD_IMMAP
+#define CONFIG_CMD_JFFS2
 #define CONFIG_CMD_MII
-#define CONFIG_CMD_BEDBUG
 #define CONFIG_CMD_NET
 #define CONFIG_CMD_PING
-#define CONFIG_CMD_IDE
-#define CONFIG_CMD_FAT
-#define CONFIG_CMD_JFFS2
-#define CONFIG_CMD_I2C
-#define CONFIG_CMD_DATE
-#define CONFIG_CMD_EEPROM
-#define CONFIG_CMD_DTT
-
+#define CONFIG_CMD_REGINFO
 
 /*
  * Serial console configuration
@@ -79,7 +77,6 @@
 #define CONFIG_BAUDRATE                115200
 #define CONFIG_SYS_BAUDRATE_TABLE      { 9600, 19200, 38400, 57600, 115200, 230400 }
 
-
 /*
  * Ethernet configuration
  */
 #define CONFIG_AUTOBOOT_PROMPT "Autobooting in %d seconds, "           \
                                "press \"<Esc><Esc>\" to stop\n", bootdelay
 
+#define CONFIG_CMDLINE_EDITING         1       /* add command line history     */
+#define        CONFIG_SYS_HUSH_PARSER          1       /* use "hush" command parser    */
+#define        CONFIG_SYS_PROMPT_HUSH_PS2      "> "
+
 #define CONFIG_ETHADDR         00:50:C2:40:10:00
 #define CONFIG_OVERWRITE_ETHADDR_ONCE  1
 #define CONFIG_VERSION_VARIABLE        1       /* include version env variable */
 
-
 /*
  * Default environment settings
  */
        "serverip=192.168.1.1\0"                                        \
        "gatewayip=192.168.1.1\0"                                       \
        "console=ttyPSC0,115200\0"                                      \
-       "u-boot_addr=100000\0"                                          \
-       "kernel_addr=200000\0"                                          \
-       "fdt_addr=400000\0"                                             \
-       "ramdisk_addr=500000\0"                                         \
+       "u-boot_addr=400000\0"                                          \
+       "kernel_addr=400000\0"                                          \
+       "fdt_addr=700000\0"                                             \
+       "ramdisk_addr=800000\0"                                         \
        "multi_image_addr=800000\0"                                     \
-       "rootpath=/opt/eldk-4.1/ppc_6xx\0"                              \
-       "u-boot=/tftpboot/motionpro/u-boot.bin\0"                       \
-       "bootfile=/tftpboot/motionpro/uImage\0"                         \
-       "fdt_file=/tftpboot/motionpro/motionpro.dtb\0"                  \
-       "ramdisk_file=/tftpboot/motionpro/uRamdisk\0"                   \
+       "rootpath=/opt/eldk/ppc_6xx\0"                                  \
+       "u-boot=motionpro/u-boot.bin\0"                                 \
+       "bootfile=motionpro/uImage\0"                                   \
+       "fdt_file=motionpro/motionpro.dtb\0"                            \
+       "ramdisk_file=motionpro/uRamdisk\0"                             \
        "multi_image_file=kernel+initrd+dtb.img\0"                      \
        "load=tftp ${u-boot_addr} ${u-boot}\0"                          \
-       "update=prot off fff00000 fff3ffff; era fff00000 fff3ffff; "    \
+       "update=prot off fff00000 +${filesize};"                        \
+               "era fff00000 +${filesize}; "                           \
                "cp.b ${u-boot_addr} fff00000 ${filesize};"             \
-               "prot on fff00000 fff3ffff\0"                           \
+               "prot on fff00000 +${filesize}\0"                       \
        "ramargs=setenv bootargs root=/dev/ram rw\0"                    \
        "nfsargs=setenv bootargs root=/dev/nfs rw "                     \
                "nfsroot=${serverip}:${rootpath}\0"                     \
  */
 #define CONFIG_BOARD_EARLY_INIT_R      1
 
-
 /*
  * Low level configuration
  */
 
-
 /*
  * Clock configuration: SYS_XTALIN = 33MHz
  */
 #define CONFIG_SYS_MPC5XXX_CLKIN       33000000
 
-
 /*
  * Set IPB speed to 100MHz
  */
 #define CONFIG_SYS_IPBCLK_EQUALS_XLBCLK
 
-
 /*
  * Memory map
  */
  * Setting MBAR to otherwise will cause system hang when using SmartDMA such
  * as network commands.
  */
-#define CONFIG_SYS_MBAR                0xf0000000
+#define CONFIG_SYS_MBAR                        0xf0000000
 #define CONFIG_SYS_SDRAM_BASE          0x00000000
 
 /*
 
 /* Use SRAM until RAM will be available */
 #define CONFIG_SYS_INIT_RAM_ADDR       MPC5XXX_SRAM
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_SIZE
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_SIZE
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_MALLOC_LEN          (1024 << 10)    /* 1 MiB for malloc() */
 #define CONFIG_SYS_BOOTMAPSZ           (8 << 20)       /* initial mem map for Linux */
 
-
 /*
  * Chip selects configuration
  */
 #define CONFIG_SYS_CS_BURST            0x00000000
 #define CONFIG_SYS_CS_DEADCYCLE        0x22222222
 
-
 /*
  * SDRAM configuration
  */
 #define SDRAM_CONTROL          0x504f0000
 #define SDRAM_MODE             0x00cd0000
 
-
 /*
  * Flash configuration
  */
 #define CONFIG_SYS_ATA_STRIDE          4
 #define CONFIG_DOS_PARTITION
 
-
 /*
  * I2C configuration
  */
 #define CONFIG_SYS_I2C_SPEED           100000  /* 100 kHz */
 #define CONFIG_SYS_I2C_SLAVE           0x7F
 
-
 /*
  * EEPROM configuration
  */
 #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS  5       /* 2ms/cycle + 3ms extra */
 #define CONFIG_SYS_I2C_MULTI_EEPROMS           1       /* 2 EEPROMs (addr:50,52) */
 
-
 /*
  * RTC configuration
  */
 #define CONFIG_RTC_DS1337      1
 #define CONFIG_SYS_I2C_RTC_ADDR        0x68
 
-
 /*
  * Status LED configuration
  */
@@ -346,14 +335,12 @@ extern void __led_toggle(led_id_t id);
 extern void __led_set(led_id_t id, int state);
 #endif /* __ASSEMBLY__ */
 
-
 /*
  * Temperature sensor
  */
 #define CONFIG_DTT_LM75                1
 #define CONFIG_DTT_SENSORS     { 0x49 }
 
-
 /*
  * Environment settings
  */
@@ -381,13 +368,11 @@ extern void __led_set(led_id_t id, int state);
  */
 #define CONFIG_SYS_GPS_PORT_CONFIG     0x1105a004
 
-
 /*
  * Motion-PRO's CPLD revision control register
  */
 #define CPLD_REV_REGISTER      (CONFIG_SYS_CS2_START + 0x06)
 
-
 /*
  * Miscellaneous configurable options
  */
@@ -406,7 +391,6 @@ extern void __led_set(led_id_t id, int state);
 
 #define CONFIG_SYS_HZ                  1000    /* decrementer freq: 1 ms ticks */
 
-
 /*
  * Various low-level settings
  */
@@ -415,7 +399,6 @@ extern void __led_set(led_id_t id, int state);
 
 #define CONFIG_SYS_CACHELINE_SIZE      32      /* For MPC5xxx CPUs */
 
-
 /* Not needed for MPC 5xxx U-Boot, but used by tools/updater */
 #define CONFIG_SYS_RESET_ADDRESS       0xfff00100
 
index 3138b493cd8d28e0099f9929228e748d81c30845..8e398d7205d6dce67abbdf2c8e9fc97791461d56 100644 (file)
 #define CONFIG_SYS_SDRC_MR_VAL2        0x00000003 /* Load Mode Register */
 #define CONFIG_SYS_SDRC_MR_VAL3        0x00000000 /* Normal Mode */
 #define CONFIG_SYS_SDRC_TR_VAL 0x000002E0 /* Write refresh rate */
-#else
-#define CONFIG_SKIP_RELOCATE_UBOOT
 #endif /* CONFIG_SKIP_LOWLEVEL_INIT */
 
 /*
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN  (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 #define CONFIG_BAUDRATE                115200
 
index afae1ab6dae1e18a64d090a8f017ecd1b7dee51b..a5e77c5a791302ffd1fc0df31ae5c7602a5b2d21 100644 (file)
 
 /* Use SRAM for initial stack */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_SRAM_BASE /* Init RAM base */
-#define CONFIG_SYS_INIT_RAM_END                CONFIG_SYS_SRAM_SIZE /* End of area */
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_SRAM_SIZE /* Size of area */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       0x100   /* num bytes of initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - \
-                                        CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - \
+                                        GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      (CONFIG_SYS_GBL_DATA_OFFSET - 0x4)
 
 #define CONFIG_SYS_MEMTEST_START       0x00200000      /* memtest region */
index fbcc8392e7db5b232924f8675f8e72340b700a65..f966325a8e2859a4e59cabb3300cb8104ebeddff 100644 (file)
 
 /* Use SRAM for initial stack */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_SRAM_BASE            /* Initial RAM address */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_SRAM_SIZE            /* End of used area in RAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_SRAM_SIZE            /* Size of used area in RAM */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       0x100                   /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE            /* Start of monitor */
index 94a8c93b42b8f286d69179a02c85f094f4acfdbc..927446438ceb45742c5bc3e4f89cb804577a9937 100644 (file)
  */
 #undef  CONFIG_SYS_INIT_RAM_LOCK
 #define CONFIG_SYS_INIT_RAM_ADDR       0x07d00000      /* unused memory region */
-#define CONFIG_SYS_INIT_RAM_END        0x4000/* larger space - we have SDRAM initialized */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000/* larger space - we have SDRAM initialized */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128/* size in bytes reserved for init data */
-#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 
 /*-----------------------------------------------------------------------
  * Start addresses for the final memory configuration
index 14f663f3b6ef24c82a7371ea0d4991eb6a94b0dd..d7a3a9690fe7581ce305e23d3d9402894cbff897 100644 (file)
  */
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0xE6000000 /* Initial RAM address */
-#define CONFIG_SYS_INIT_RAM_END                0x1000 /* End of used area in RAM */
-#define CONFIG_SYS_GBL_DATA_SIZE       0x100 /* num bytes initial data */
+#define CONFIG_SYS_INIT_RAM_SIZE               0x1000 /* Size of used area in RAM */
 #define CONFIG_SYS_GBL_DATA_OFFSET     \
-       (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+       (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 
 /*
  * Local Bus Configuration & Clock Setup
index 0a472a65817f1355ebcc1b154a58e4af6ee730a8..311f524024da7788ade2cb762a07402ef0a3b4dc 100644 (file)
@@ -57,7 +57,6 @@
 #define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_FLASH_BASE
 #define CONFIG_SYS_MONITOR_LEN         (128 * 1024)
 #define CONFIG_SYS_MALLOC_LEN          (256 * 1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       256
 
 /* Memory */
 #define CONFIG_SYS_SDRAM_BASE          0x8C000000
index 0ea3527e30b0821ca886bf9bd9d18d08ff2f06cb..5304237a741528ae6adbbfddb22d7fff41c77a53 100644 (file)
@@ -76,7 +76,6 @@
 #define CONFIG_SYS_MONITOR_BASE        MS7720SE_FLASH_BASE_1
 #define CONFIG_SYS_MONITOR_LEN         (128 * 1024)
 #define CONFIG_SYS_MALLOC_LEN          (256 * 1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       256
 #define CONFIG_SYS_BOOTMAPSZ           (8 * 1024 * 1024)
 
 
index 02514285cc2008b188c42dc59d2cca1fddd0445d..1ddadf696d9ee4ea54bf46ed97c36b57bc5efb71 100644 (file)
@@ -89,7 +89,6 @@
                                                        in Flash (NOT run time address in SDRAM) ?!? */
 #define CONFIG_SYS_MONITOR_LEN (128 * 1024)            /* */
 #define CONFIG_SYS_MALLOC_LEN  (256 * 1024)            /* Size of DRAM reserved for malloc() use */
-#define CONFIG_SYS_GBL_DATA_SIZE       (256)           /* size in bytes reserved for initial data */
 #define CONFIG_SYS_BOOTMAPSZ   (8 * 1024 * 1024)
 
 /* FLASH */
index 02090f23157de19141cc3d2c531b0fa5b50709b2..9b43acb2076589cfb318740a0bd4995ee27ca735 100644 (file)
@@ -81,7 +81,6 @@
 #define CONFIG_SYS_MONITOR_LEN         (128 * 1024)
 #define CONFIG_SYS_MALLOC_LEN          (256 * 1024)            /* Size of DRAM reserved for malloc() use */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       (256)                   /* size in bytes reserved for initial data */
 #define CONFIG_SYS_BOOTMAPSZ           (8 * 1024 * 1024)
 #define CONFIG_SYS_RX_ETH_BUFFER       (8)
 
index 345bdd119a9c3cdca6d24e7f6ffb522ad5056744..8b3022b2c0974e0965ada9331e0942fb927d3a16 100644 (file)
 #define CONFIG_SYS_DEFAULT_IMMR        0x0F010000
 
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x2000  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2000  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /* Hard reset configuration word */
index 97330d564010f5248a2331156c127d2155e3419a..425a1d83d7e0f78f32aa54fbb473630bbec299df 100644 (file)
 #define CONFIG_SYS_SDRAM_BASE          0x00000000
 /* Use SRAM until RAM will be available */
 #define CONFIG_SYS_INIT_RAM_ADDR       MPC5XXX_SRAM
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_SIZE       /* End of used area in DPRAM */
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_SIZE       /* Size of used area in DPRAM */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_BASE    CONFIG_SYS_TEXT_BASE
index bdcebd3b5dec128461e114e1a6dc9e3df3993561..bc81f2daa61b0f00a4f00b4ac572879660331ae8 100644 (file)
  */
 #define CONFIG_SYS_MALLOC_LEN  (1024 * 1024) /* 1MiB for malloc() */
 /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_SIZE       128
 
 /*
  * Other required minimal configurations
index b2ffd3e935487849938ab4b2c6de1cb096ec2ca2..166da6ca7fd6f2e17122d9c26faddd3cce298a41 100644 (file)
@@ -60,9 +60,6 @@
 
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128*1024)
 
-
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-
 /*
  *  CS8900 Ethernet drivers
  */
@@ -80,7 +77,6 @@
 
 #define CONFIG_BAUDRATE                115200
 
-
 /*
  * BOOTP options
  */
@@ -89,7 +85,6 @@
 #define CONFIG_BOOTP_GATEWAY
 #define CONFIG_BOOTP_HOSTNAME
 
-
 /*
  * Command line configuration.
  */
@@ -99,7 +94,6 @@
 #define CONFIG_CMD_REGINFO
 #define CONFIG_CMD_ELF
 
-
 #define CONFIG_BOOTDELAY       3
 #define CONFIG_BOOTARGS                "root=/dev/msdk mem=48M"
 #define CONFIG_BOOTFILE                "mx1ads"
index 90a8d8405b503fec999f866b1086f4aface3516a..1632ce82ba33fb2aeb873654996453f43e6c308f 100644 (file)
@@ -34,7 +34,6 @@
 #undef _CONFIG_UART4 /* internal uart 4 */
 #undef CONFIG_SILENT_CONSOLE  /* use this to disable output */
 
-
 /*
  * BOOTP options
  */
@@ -43,7 +42,6 @@
 #define CONFIG_BOOTP_GATEWAY
 #define CONFIG_BOOTP_HOSTNAME
 
-
 /*
  * Command line configuration.
  */
@@ -58,7 +56,6 @@
 #undef CONFIG_CMD_PING
 #undef CONFIG_CMD_SOURCE
 
-
 /*
  * Boot options. Setting delay to -1 stops autostart count down.
  */
@@ -98,9 +95,6 @@
  */
 #define CONFIG_SYS_MALLOC_LEN    (CONFIG_ENV_SIZE + (128<<10) )
 
-
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-
 #define CONFIG_STACKSIZE       (120<<10)      /* stack size */
 
 #ifdef CONFIG_USE_IRQ
index 57955dfc3b09ffb6fbd5ea29da66bd27a513f5b7..d2798e974bf07b83ab316d7380668e10f44b76f7 100644 (file)
@@ -51,7 +51,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128 * 1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
index 4b4fb1a06a3f7cfc168b695dad7610bf9168125e..3b90a01623933b9995d229ebdb6667f60e310e36 100644 (file)
@@ -47,7 +47,6 @@
 
 #if defined(CONFIG_NAND_U_BOOT) && !defined(CONFIG_NAND_SPL)
 #define CONFIG_SKIP_LOWLEVEL_INIT
-#define CONFIG_SKIP_RELOCATE_UBOOT
 #endif
 
 /*
@@ -55,7 +54,6 @@
  */
 #define CONFIG_SYS_MALLOC_LEN          (2*CONFIG_ENV_SIZE + 2 * 128 * 1024)
 /* Bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_SIZE       128
 
 /*
  * Hardware drivers
index 8864f3ab780ba2c7b1649383af3dafe00f83586e..b6868b2447f15766acdd64025253a779cd6472f8 100644 (file)
  /* High Level Configuration Options */
 
 #define CONFIG_MX51    /* in a mx51 */
-#define CONFIG_SKIP_RELOCATE_UBOOT
 
-#define CONFIG_MX51_HCLK_FREQ          24000000        /* RedBoot says 26MHz */
-#define CONFIG_MX51_CLK32              32768
+#define CONFIG_SYS_MX5_HCLK    24000000
+#define CONFIG_SYS_MX5_CLK32           32768
 #define CONFIG_DISPLAY_CPUINFO
 #define CONFIG_DISPLAY_BOARDINFO
 
@@ -52,7 +51,6 @@
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 2 * 1024 * 1024)
 /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_SIZE       128
 
 #define BOARD_LATE_INIT
 
index 1063d123d279a4117121d2a747608fa6e76b2e6f..8de5aaf1ed60067fbea0da7beb45fd6b569f8308 100644 (file)
 #define CONFIG_SYS_OCM_DATA_ADDR       0xF8000000
 #define CONFIG_SYS_OCM_DATA_SIZE       0x1000
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR /* inside of SDRAM             */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE /* End of used area in RAM     */
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE /* Size of used area in RAM    */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*
index c63c84650f044f500d492f7ddce07cdc2322ae73..f15901393441664f5aefe4cfc9111985f9acb4ca 100644 (file)
@@ -72,7 +72,6 @@
 /*
  * Size of malloc() pool
  */
-#define CONFIG_SYS_GBL_DATA_SIZE       128
 #define CONFIG_SYS_MALLOC_LEN          (4 * 1024 * 1024)
 
 /*
 #define CONFIG_BAUDRATE                        115200
 #define CONFIG_SYS_BAUDRATE_TABLE      { 9600, 19200, 38400, 57600, 115200 }
 
-/*#define CONFIG_SKIP_RELOCATE_UBOOT*/
-/*#define CONFIG_SKIP_LOWLEVEL_INIT */
-
 /*
  * Partitions (mtdparts command line support)
  */
index 2b640dca980b14782215096bbcd88b6ffa87c98e..49a16ab2066082c05a2fa2fe4d0903913685ef4d 100644 (file)
@@ -90,7 +90,6 @@
 #define CONFIG_SYS_MEMTEST_START       0x00000000
 #define CONFIG_SYS_MEMTEST_END         0x0FFFFFFF
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 256 * 1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* for initial data */
 
 #define BOARD_LATE_INIT                /* call board_late_init during start up */
 
index e4bf57b7555630238a964cef067b12e419539776..53f2084d9f770dbc9279e6838e0e92590fb38cee 100644 (file)
 #define CONFIG_SYS_MONITOR_BASE        (CONFIG_SYS_SDRAM_BASE + \
                                         CONFIG_SYS_SDRAM_SIZE - \
                                         CONFIG_SYS_MONITOR_LEN)
-#define CONFIG_SYS_GBL_DATA_SIZE       256     /* Global data size rsvd */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 0x20000)
 #define CONFIG_SYS_MALLOC_BASE         (CONFIG_SYS_MONITOR_BASE - \
                                         CONFIG_SYS_MALLOC_LEN)
 #define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_MALLOC_BASE - \
-                                        CONFIG_SYS_GBL_DATA_SIZE)
+                                        GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP             CONFIG_SYS_GBL_DATA_OFFSET
 
 /*
index 79dcd647c2d14fd56ad998e31416523ef61351bb..e6b774f2c318ef1ad20a76f4d4f72deba8d379ad 100644 (file)
@@ -50,7 +50,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial
                                         * data */
 
 /*
index c9c69bbab6c66bed5e7af352fefceadfeaa6ee47..9f5a0b89b7c200714005bf5029767a6a44f2c06a 100644 (file)
 
 /* Use SRAM until RAM will be available */
 #define CONFIG_SYS_INIT_RAM_ADDR       MPC5XXX_SRAM
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_SIZE       /* End of used area in DPRAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_SIZE       /* Size of used area in DPRAM */
 
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE
index f33f0ff2c8c86b2adb2f3519aca5cc74b6ea3710..d0fe9dadfbe47c06ab50a92033f3b34238145d89 100644 (file)
 #define CONFIG_SYS_TEMP_STACK_OCM  1
 #define CONFIG_SYS_OCM_DATA_ADDR   CONFIG_SYS_ISRAM_BASE
 #define CONFIG_SYS_INIT_RAM_ADDR   CONFIG_SYS_ISRAM_BASE  /* Initial RAM address       */
-#define CONFIG_SYS_INIT_RAM_END    0x2000          /* End of used area in RAM  */
-#define CONFIG_SYS_GBL_DATA_SIZE   128             /* num bytes initial data   */
+#define CONFIG_SYS_INIT_RAM_SIZE    0x2000         /* Size of used area in RAM */
 
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      (CONFIG_SYS_GBL_DATA_OFFSET - 0x4)
 
 /*-----------------------------------------------------------------------
index b0ebafd7bd0e2a37c410bc0069f977489adaf8b0..9ff4f843ccd6c1f2a8d5420b2adfa4ea41488a6b 100644 (file)
@@ -50,7 +50,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
index 0bbb5b35c155c162851572860a0b49a5f99017e4..2936dcc56f6916951f7ea6b294b8cfdffc701dab 100644 (file)
@@ -52,7 +52,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN  (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
index 832dd426b6ebc518894f7375fca7d884ffbe4796..0b41c46648d87a4468fb471469f96b8a40951bd6 100644 (file)
@@ -51,7 +51,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN  (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
index 47437b09c645f0e8f25d99dc6fb219a362f91ae2..7161ab18ca38167794172040799f7afbc9ef7893 100644 (file)
@@ -72,7 +72,6 @@
  */
 #define CONFIG_ENV_SIZE             SZ_128K     /* Total Size of Environment Sector */
 #define CONFIG_SYS_MALLOC_LEN           (CONFIG_ENV_SIZE + SZ_128K)
-#define CONFIG_SYS_GBL_DATA_SIZE        128  /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
index 900dbd3f7a06699828312ad8cc8b758b162d3366..1c9a0075b829b049ee5319998e677bfb0d44b846 100644 (file)
@@ -75,7 +75,6 @@
 #define CONFIG_ENV_SIZE                        (128 << 10)     /* 128 KiB */
                                                /* Sector */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + (128 << 10))
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* bytes reserved for */
                                                /* initial data */
 
 /*
@@ -348,6 +347,6 @@ extern unsigned int boot_flash_type;
 
 /* additions for new relocation code, must be added to all boards */
 #define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM_1
-#define CONFIG_SYS_INIT_SP_ADDR                (LOW_LEVEL_SRAM_STACK - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_SP_ADDR                (LOW_LEVEL_SRAM_STACK - GENERATED_GBL_DATA_SIZE)
 
 #endif /* __CONFIG_H */
index c4aa220f78900024875a89abee1fc8908ded30b3..e925f3bd2d63bafb4027f76c99c361a398b73e0d 100644 (file)
@@ -71,7 +71,6 @@
 #define CONFIG_ENV_SIZE                        (128 << 10)     /* 128 KiB */
                                                /* Sector */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + (128 << 10))
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* bytes reserved for */
                                                /* initial data */
 /*
  * Hardware drivers
index 69f912679eae05b29e8b5e5883f8ee85b39f690c..02920787458f6d59d61db3db16dbb19c34118cad 100644 (file)
@@ -58,7 +58,6 @@
 #define CONFIG_ENV_SIZE                        (128 << 10)     /* 128 KiB */
                                                /* Sector */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + (128 << 10))
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* bytes reserved for */
                                                /* initial data */
 
 /*
@@ -325,6 +324,6 @@ extern unsigned int boot_flash_type;
 #endif /* (CONFIG_CMD_NET) */
 
 #define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM_1
-#define CONFIG_SYS_INIT_SP_ADDR                (LOW_LEVEL_SRAM_STACK - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_SP_ADDR                (LOW_LEVEL_SRAM_STACK - GENERATED_GBL_DATA_SIZE)
 
 #endif                         /* __CONFIG_H */
index 3308aceb49264f9169b9382cbacf7b1adf6e08e2..b78aacfa088dcc79a4733765491efec05c91771f 100644 (file)
@@ -61,7 +61,6 @@
 #define CONFIG_ENV_SIZE                        (128 << 10)     /* 128 KiB */
                                                /* Sector */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + (128 << 10))
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* bytes reserved for */
                                                /* initial data */
 
 /*
index 5439aa3dd9c74fb05e7fea2e20e79868f5bf0662..fab263d6cbd992b0728cb0215e5a2f4fabcc2c1a 100644 (file)
@@ -78,7 +78,6 @@
  */
 #define CONFIG_ENV_SIZE                        (256 << 10)
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + (256 << 10))
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* bytes reserved for */
                                                /* initial data */
 
 /*--------------------------------------------------------------------------*/
index f612e0fd19f7758c28528b81aee75f355f203d57..10b248ad865ef17f914f0fb7064a73ad532991f8 100644 (file)
@@ -67,7 +67,6 @@
 #define CONFIG_ENV_SIZE                        (128 << 10)     /* 128 KiB */
                                                /* Sector */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + (128 << 10))
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* bytes reserved for */
                                                /* initial data */
 
 /*
index aaf929e08e284da5b2722d30fc4819572fa52cfc..b7c301f8ed7eb9b21ffb3a9cd64c1e785b9b8de1 100644 (file)
@@ -68,7 +68,6 @@
 #define CONFIG_ENV_SIZE                        (128 << 10)     /* 128 KiB */
                                                /* Sector */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + (128 << 10))
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* bytes reserved for */
                                                /* initial data */
 /*
  * Hardware drivers
index b52ca19ae9ad6ee866900c093194d87406416181..74defabbf896ef27c204d54eb5103ca3529f4768 100644 (file)
@@ -67,7 +67,6 @@
  */
 #define CONFIG_ENV_SIZE                        (256 << 10)
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + (256 << 10))
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* bytes reserved for */
                                                /* initial data */
 /* Vector Base */
 #define CONFIG_SYS_CA9_VECTOR_BASE     SRAM_ROM_VECT_BASE
 #define CONFIG_NR_DRAM_BANKS   1
 
 #define CONFIG_SYS_SDRAM_BASE          0x80000000
-#define CONFIG_SYS_INIT_SP_ADDR                (LOW_LEVEL_SRAM_STACK - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_SP_ADDR                (LOW_LEVEL_SRAM_STACK - GENERATED_GBL_DATA_SIZE)
 
 #endif /* __CONFIG_H */
index 174d73f0668b353d1019460d48b38bbdf8a60923..26c380d3e7eed95ff74ea6a8a475958fb64fe167 100644 (file)
@@ -68,7 +68,6 @@
  */
 #define CONFIG_ENV_SIZE                        (128 << 10)
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + (256 << 10))
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* bytes reserved for */
                                                /* initial data */
 /* Vector Base */
 #define CONFIG_SYS_CA9_VECTOR_BASE     SRAM_ROM_VECT_BASE
 #define CONFIG_NR_DRAM_BANKS   1
 
 #define CONFIG_SYS_SDRAM_BASE          0x80000000
-#define CONFIG_SYS_INIT_SP_ADDR                (LOW_LEVEL_SRAM_STACK - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_SP_ADDR                (LOW_LEVEL_SRAM_STACK - GENERATED_GBL_DATA_SIZE)
 
 #endif /* __CONFIG_H */
index bc660e39e829a86c5fdde4ab331168e60a01692c..b875464b0bd25161b3276182144818895cb27a32 100644 (file)
@@ -54,7 +54,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN  (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
index a6a8a023f1b0ee40a5703a4f2442287276cf2cf1..fa3681e6dc6636fe0404ce3539ec2ae133a159ae 100644 (file)
@@ -59,7 +59,6 @@
  */
 
 #define CONFIG_SYS_MALLOC_LEN             (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE          128       /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
index 4a1cedec0fe8dfdb9f46a74a1faafd3af42ca240..ca3bf26215e92ed040b5ef28b9b737fe0ea361c9 100644 (file)
@@ -48,7 +48,6 @@
 #undef CONFIG_USE_IRQ                          /* don't need IRQ/FIQ stuff */
 
 #define CONFIG_SKIP_LOWLEVEL_INIT
-#define CONFIG_SKIP_RELOCATE_UBOOT
 #define CONFIG_MISC_INIT_R             1       /* Call misc_init_r */
 
 #define CONFIG_ARCH_CPU_INIT
  */
 #define CONFIG_SYS_MALLOC_LEN          ROUND(3 * CONFIG_ENV_SIZE + \
                                        128*1024, 0x1000)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* 128 bytes for initial data */
 
 #define CONFIG_STACKSIZE               (32 * 1024)     /* regular stack */
 
index 8b5ef8fa852fdcf7699715ab98f0f2c3ccae8764..71eb78495f2613d074601a3cfc03d7e0a81f1f1d 100644 (file)
@@ -98,9 +98,8 @@
 */
 #undef CONFIG_SYS_INIT_RAM_LOCK
 #define CONFIG_SYS_INIT_RAM_ADDR       0x42000000
-#define CONFIG_SYS_INIT_RAM_END        0x1000
-#define CONFIG_SYS_GBL_DATA_SIZE       128  /* size in bytes reserved for init data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x1000
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 
 
 /*-----------------------------------------------------------------------
index 71529a23d3a96e7b27147aebf724b6d23ad64e58..719a12aaa0cbe4376a334a71a8ecd8a1e8d1e6e3 100644 (file)
  * Initial RAM & stack pointer (placed in internal SRAM)
  *----------------------------------------------------------------------*/
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_ISRAM_BASE  /* Initial RAM address   */
-#define CONFIG_SYS_INIT_RAM_END        0x2000      /* End of used area in RAM  */
-#define CONFIG_SYS_GBL_DATA_SIZE       128         /* num bytes initial data   */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2000      /* Size of used area in RAM */
 
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_LEN         (256 * 1024)    /* Reserve 256 kB for Mon*/
diff --git a/include/configs/palmld.h b/include/configs/palmld.h
new file mode 100644 (file)
index 0000000..65f1306
--- /dev/null
@@ -0,0 +1,276 @@
+/*
+ * Palm LifeDrive configuration file
+ *
+ * Copyright (C) 2010 Marek Vasut <marek.vasut@gmail.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
+ */
+
+#ifndef        __CONFIG_H
+#define        __CONFIG_H
+
+/*
+ * High Level Board Configuration Options
+ */
+#define        CONFIG_PXA27X           1       /* Marvell PXA270 CPU */
+#define        CONFIG_PALMLD           1       /* Palm LifeDrive board */
+
+/*
+ * Environment settings
+ */
+#define        CONFIG_ENV_OVERWRITE
+#define        CONFIG_SYS_MALLOC_LEN           (128*1024)
+#define        CONFIG_SYS_TEXT_BASE    0x0
+
+#define        CONFIG_BOOTCOMMAND                                              \
+       "if mmcinfo && fatload mmc 0 0xa0000000 uboot.script ; then "   \
+               "source 0xa0000000; "                                   \
+       "else "                                                         \
+               "bootm 0x0x60000; "                                     \
+       "fi; "
+#define        CONFIG_BOOTARGS                 "console=tty0 console=ttyS0,9600"
+#define        CONFIG_TIMESTAMP
+#define        CONFIG_BOOTDELAY                2       /* Autoboot delay */
+#define        CONFIG_CMDLINE_TAG
+#define        CONFIG_SETUP_MEMORY_TAGS
+
+#define        CONFIG_LZMA                     /* LZMA compression support */
+
+/*
+ * Serial Console Configuration
+ */
+#define        CONFIG_PXA_SERIAL
+#define        CONFIG_FFUART                   1
+#define        CONFIG_BAUDRATE                 9600
+#define        CONFIG_SYS_BAUDRATE_TABLE       { 9600, 19200, 38400, 57600, 115200 }
+
+/*
+ * Bootloader Components Configuration
+ */
+#include <config_cmd_default.h>
+
+#undef CONFIG_CMD_NET
+#define        CONFIG_CMD_ENV
+#undef CONFIG_CMD_IMLS
+#define        CONFIG_CMD_MMC
+#define        CONFIG_CMD_IDE
+#define        CONFIG_LCD
+
+/*
+ * MMC Card Configuration
+ */
+#ifdef CONFIG_CMD_MMC
+#define        CONFIG_MMC
+#define        CONFIG_GENERIC_MMC
+#define        CONFIG_PXA_MMC_GENERIC
+#define        CONFIG_SYS_MMC_BASE             0xF0000000
+#define        CONFIG_CMD_FAT
+#define        CONFIG_CMD_EXT2
+#define        CONFIG_DOS_PARTITION
+#endif
+
+/*
+ * LCD
+ */
+#ifdef CONFIG_LCD
+#define        CONFIG_LQ038J7DH53
+#define        CONFIG_VIDEO_LOGO
+#define        CONFIG_CMD_BMP
+#define        CONFIG_SPLASH_SCREEN
+#define        CONFIG_SPLASH_SCREEN_ALIGN
+#define        CONFIG_VIDEO_BMP_GZIP
+#define        CONFIG_VIDEO_BMP_RLE8
+#define        CONFIG_SYS_VIDEO_LOGO_MAX_SIZE  (2 << 20)
+#endif
+
+/*
+ * KGDB
+ */
+#ifdef CONFIG_CMD_KGDB
+#define        CONFIG_KGDB_BAUDRATE            230400  /* kgdb serial port speed */
+#define        CONFIG_KGDB_SER_INDEX           2       /* which serial port to use */
+#endif
+
+/*
+ * HUSH Shell Configuration
+ */
+#define        CONFIG_SYS_HUSH_PARSER          1
+#define        CONFIG_SYS_PROMPT_HUSH_PS2      "> "
+
+#define        CONFIG_SYS_LONGHELP
+#ifdef CONFIG_SYS_HUSH_PARSER
+#define        CONFIG_SYS_PROMPT               "$ "
+#else
+#define        CONFIG_SYS_PROMPT               "=> "
+#endif
+#define        CONFIG_SYS_CBSIZE               256
+#define        CONFIG_SYS_PBSIZE               \
+       (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
+#define        CONFIG_SYS_MAXARGS              16
+#define        CONFIG_SYS_BARGSIZE             CONFIG_SYS_CBSIZE
+#define        CONFIG_SYS_DEVICE_NULLDEV       1
+
+/*
+ * Clock Configuration
+ */
+#undef CONFIG_SYS_CLKS_IN_HZ
+#define        CONFIG_SYS_HZ                   3250000         /* Timer @ 3250000 Hz */
+#define        CONFIG_SYS_CPUSPEED             0x210           /* 416MHz ; N=2,L=16 */
+
+/*
+ * Stack sizes
+ */
+#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
+
+/*
+ * DRAM Map
+ */
+#define        CONFIG_NR_DRAM_BANKS            1               /* 1 bank of DRAM */
+#define        PHYS_SDRAM_1                    0xa0000000      /* SDRAM Bank #1 */
+#define        PHYS_SDRAM_1_SIZE               0x02000000      /* 32 MB */
+
+#define        CONFIG_SYS_DRAM_BASE            0xa0000000      /* CS0 */
+#define        CONFIG_SYS_DRAM_SIZE            0x02000000      /* 32 MB DRAM */
+
+#define        CONFIG_SYS_MEMTEST_START        0xa0400000      /* memtest works on */
+#define        CONFIG_SYS_MEMTEST_END          0xa0800000      /* 4 ... 8 MB in DRAM */
+
+#define        CONFIG_SYS_LOAD_ADDR            CONFIG_SYS_DRAM_BASE
+
+#define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM_1
+#define        CONFIG_SYS_INIT_SP_ADDR         (GENERATED_GBL_DATA_SIZE + PHYS_SDRAM_1)
+
+/*
+ * NOR FLASH
+ */
+#ifdef CONFIG_CMD_FLASH
+#define        PHYS_FLASH_1                    0x00000000      /* Flash Bank #1 */
+#define        PHYS_FLASH_SIZE                 0x00080000      /* 512 KB */
+#define        CONFIG_SYS_FLASH_BASE           PHYS_FLASH_1
+
+#define        CONFIG_SYS_FLASH_CFI
+#define        CONFIG_FLASH_CFI_DRIVER         1
+
+#define        CONFIG_FLASH_CFI_LEGACY
+#define        CONFIG_SYS_FLASH_LEGACY_512Kx16
+
+#define        CONFIG_SYS_MONITOR_BASE         0
+#define        CONFIG_SYS_MONITOR_LEN          0x40000
+
+#define        CONFIG_SYS_MAX_FLASH_BANKS      1
+#define        CONFIG_SYS_MAX_FLASH_SECT       256
+
+#define        CONFIG_SYS_FLASH_USE_BUFFER_WRITE       1
+
+#define        CONFIG_SYS_FLASH_ERASE_TOUT     (25*CONFIG_SYS_HZ)
+#define        CONFIG_SYS_FLASH_WRITE_TOUT     (25*CONFIG_SYS_HZ)
+#define        CONFIG_SYS_FLASH_LOCK_TOUT      (25*CONFIG_SYS_HZ)
+#define        CONFIG_SYS_FLASH_UNLOCK_TOUT    (25*CONFIG_SYS_HZ)
+#define        CONFIG_SYS_FLASH_PROTECTION
+
+#define        CONFIG_ENV_IS_IN_FLASH          1
+#define        CONFIG_ENV_SECT_SIZE            0x10000
+#else
+#define        CONFIG_SYS_NO_FLASH
+#define        CONFIG_ENV_IS_NOWHERE
+#endif
+
+#define        CONFIG_ENV_ADDR                 0x40000
+#define        CONFIG_ENV_SIZE                 0x4000
+
+/*
+ * IDE
+ */
+#ifdef CONFIG_CMD_IDE
+#define        CONFIG_LBA48
+#undef CONFIG_IDE_LED
+#undef CONFIG_IDE_RESET
+
+#define        __io
+
+#define        CONFIG_SYS_IDE_MAXBUS           1
+#define        CONFIG_SYS_IDE_MAXDEVICE        1
+
+#define        CONFIG_SYS_ATA_BASE_ADDR        0x20000000
+#define        CONFIG_SYS_ATA_IDE0_OFFSET      0x0
+
+#define        CONFIG_SYS_ATA_DATA_OFFSET      0x10
+#define        CONFIG_SYS_ATA_REG_OFFSET       0x10
+#define        CONFIG_SYS_ATA_ALT_OFFSET       0x10
+
+#define        CONFIG_SYS_ATA_STRIDE           1
+#endif
+
+/*
+ * GPIO settings
+ */
+#define        CONFIG_SYS_GAFR0_L_VAL  0x00000000
+#define        CONFIG_SYS_GAFR0_U_VAL  0xa5180012
+#define        CONFIG_SYS_GAFR1_L_VAL  0x69988056
+#define        CONFIG_SYS_GAFR1_U_VAL  0xaaa580aa
+#define        CONFIG_SYS_GAFR2_L_VAL  0x6aaaaaaa
+#define        CONFIG_SYS_GAFR2_U_VAL  0x01040001
+#define        CONFIG_SYS_GAFR3_L_VAL  0x540a950c
+#define        CONFIG_SYS_GAFR3_U_VAL  0x00000009
+#define        CONFIG_SYS_GPCR0_VAL    0x00000000
+#define        CONFIG_SYS_GPCR1_VAL    0x00000000
+#define        CONFIG_SYS_GPCR2_VAL    0x00000000
+#define        CONFIG_SYS_GPCR3_VAL    0x00000000
+#define        CONFIG_SYS_GPDR0_VAL    0xc26b0000
+#define        CONFIG_SYS_GPDR1_VAL    0xfcdfaa93
+#define        CONFIG_SYS_GPDR2_VAL    0x7bbaffff
+#define        CONFIG_SYS_GPDR3_VAL    0x006ff38d
+#define        CONFIG_SYS_GPSR0_VAL    0x0d9e45ee
+#define        CONFIG_SYS_GPSR1_VAL    0x03affdae
+#define        CONFIG_SYS_GPSR2_VAL    0x07554000
+#define        CONFIG_SYS_GPSR3_VAL    0x01bc0785
+
+#define        CONFIG_SYS_PSSR_VAL     0x30
+
+/*
+ * Clock settings
+ */
+#define        CONFIG_SYS_CKEN         0x01ffffff
+#define        CONFIG_SYS_CCCR         0x02000210
+
+/*
+ * Memory settings
+ */
+#define        CONFIG_SYS_MSC0_VAL     0x7ff844c8
+#define        CONFIG_SYS_MSC1_VAL     0x7ff86ab4
+#define        CONFIG_SYS_MSC2_VAL     0x7ff87ff8
+#define        CONFIG_SYS_MDCNFG_VAL   0x0B880acd
+#define        CONFIG_SYS_MDREFR_VAL   0x201fa031
+#define        CONFIG_SYS_MDMRS_VAL    0x00320032
+#define        CONFIG_SYS_FLYCNFG_VAL  0x00000000
+#define        CONFIG_SYS_SXCNFG_VAL   0x40044004
+
+/*
+ * PCMCIA and CF Interfaces
+ */
+#define        CONFIG_SYS_MECR_VAL     0x00000003
+#define        CONFIG_SYS_MCMEM0_VAL   0x0001c391
+#define        CONFIG_SYS_MCMEM1_VAL   0x0001c391
+#define        CONFIG_SYS_MCATT0_VAL   0x0001c391
+#define        CONFIG_SYS_MCATT1_VAL   0x0001c391
+#define        CONFIG_SYS_MCIO0_VAL    0x00014611
+#define        CONFIG_SYS_MCIO1_VAL    0x0001c391
+
+#endif /* __CONFIG_H */
diff --git a/include/configs/palmtc.h b/include/configs/palmtc.h
new file mode 100644 (file)
index 0000000..3f6c2f1
--- /dev/null
@@ -0,0 +1,248 @@
+/*
+ * Palm Tungsten|C configuration file
+ *
+ * Copyright (C) 2009-2010 Marek Vasut <marek.vasut@gmail.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
+ */
+
+#ifndef        __CONFIG_H
+#define        __CONFIG_H
+
+#include <asm/arch/pxa-regs.h>
+
+/*
+ * High Level Board Configuration Options
+ */
+#define        CONFIG_PXA250                   1       /* Intel PXA255 CPU */
+#define        CONFIG_PALMTC                   1       /* Palm Tungsten|C board */
+
+/*
+ * Environment settings
+ */
+#define        CONFIG_ENV_OVERWRITE
+#define        CONFIG_SYS_MALLOC_LEN           (128*1024)
+#define        CONFIG_SYS_TEXT_BASE    0x0
+
+#define        CONFIG_BOOTCOMMAND                                              \
+       "if mmc init && fatload mmc 0 0xa0000000 uboot.script ; then "  \
+               "source 0xa0000000; "                                   \
+       "else "                                                         \
+               "bootm 0x80000; "                                       \
+       "fi; "
+#define        CONFIG_BOOTARGS                                                 \
+       "console=tty0 console=ttyS0,115200"
+#define        CONFIG_TIMESTAMP
+#define        CONFIG_BOOTDELAY                2       /* Autoboot delay */
+#define        CONFIG_CMDLINE_TAG
+#define        CONFIG_SETUP_MEMORY_TAGS
+
+#define        CONFIG_LZMA                     /* LZMA compression support */
+
+/*
+ * Serial Console Configuration
+ * STUART - the lower serial port on Colibri board
+ */
+#define        CONFIG_PXA_SERIAL
+#define        CONFIG_FFUART                   1
+#define        CONFIG_BAUDRATE                 115200
+#define        CONFIG_SYS_BAUDRATE_TABLE       { 9600, 19200, 38400, 57600, 115200 }
+
+/*
+ * Bootloader Components Configuration
+ */
+#include <config_cmd_default.h>
+
+#undef CONFIG_CMD_NET
+#define        CONFIG_CMD_ENV
+#define        CONFIG_CMD_MMC
+#define        CONFIG_LCD
+
+/*
+ * MMC Card Configuration
+ */
+#ifdef CONFIG_CMD_MMC
+#define        CONFIG_MMC
+#define        CONFIG_PXA_MMC
+#define        CONFIG_SYS_MMC_BASE             0xF0000000
+#define        CONFIG_CMD_FAT
+#define        CONFIG_CMD_EXT2
+#define        CONFIG_DOS_PARTITION
+#endif
+
+/*
+ * LCD
+ */
+#ifdef CONFIG_LCD
+#define        CONFIG_ACX517AKN
+#define        CONFIG_VIDEO_LOGO
+#define        CONFIG_CMD_BMP
+#define        CONFIG_SPLASH_SCREEN
+#define        CONFIG_SPLASH_SCREEN_ALIGN
+#define        CONFIG_VIDEO_BMP_GZIP
+#define        CONFIG_VIDEO_BMP_RLE8
+#define        CONFIG_SYS_VIDEO_LOGO_MAX_SIZE  (2 << 20)
+#endif
+
+/*
+ * KGDB
+ */
+#ifdef CONFIG_CMD_KGDB
+#define        CONFIG_KGDB_BAUDRATE            230400  /* kgdb serial port speed */
+#define        CONFIG_KGDB_SER_INDEX           2       /* which serial port to use */
+#endif
+
+/*
+ * HUSH Shell Configuration
+ */
+#define        CONFIG_SYS_HUSH_PARSER          1
+#define        CONFIG_SYS_PROMPT_HUSH_PS2      "> "
+
+#define        CONFIG_SYS_LONGHELP
+#ifdef CONFIG_SYS_HUSH_PARSER
+#define        CONFIG_SYS_PROMPT               "$ "
+#else
+#define        CONFIG_SYS_PROMPT               "=> "
+#endif
+#define        CONFIG_SYS_CBSIZE               256
+#define        CONFIG_SYS_PBSIZE               \
+       (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
+#define        CONFIG_SYS_MAXARGS              16
+#define        CONFIG_SYS_BARGSIZE             CONFIG_SYS_CBSIZE
+#define        CONFIG_SYS_DEVICE_NULLDEV       1
+
+/*
+ * Clock Configuration
+ */
+#undef CONFIG_SYS_CLKS_IN_HZ
+#define        CONFIG_SYS_HZ                   3686400         /* Timer @ 3686400 Hz */
+#define        CONFIG_SYS_CPUSPEED             0x161           /* 400MHz;L=1 M=3 T=1 */
+
+/*
+ * Stack sizes
+ */
+#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
+
+/*
+ * DRAM Map
+ */
+#define        CONFIG_NR_DRAM_BANKS            1               /* 1 bank of DRAM */
+#define        PHYS_SDRAM_1                    0xa0000000      /* SDRAM Bank #1 */
+#define        PHYS_SDRAM_1_SIZE               0x04000000      /* 64 MB */
+
+#define        CONFIG_SYS_DRAM_BASE            0xa0000000      /* CS0 */
+#define        CONFIG_SYS_DRAM_SIZE            0x04000000      /* 64 MB DRAM */
+
+#define        CONFIG_SYS_MEMTEST_START        0xa0400000      /* memtest works on */
+#define        CONFIG_SYS_MEMTEST_END          0xa0800000      /* 4 ... 8 MB in DRAM */
+
+#define        CONFIG_SYS_LOAD_ADDR            CONFIG_SYS_DRAM_BASE
+
+#define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM_1
+#define        CONFIG_SYS_INIT_SP_ADDR         (GENERATED_GBL_DATA_SIZE + PHYS_SDRAM_1)
+
+/*
+ * NOR FLASH
+ */
+#ifdef CONFIG_CMD_FLASH
+#define        PHYS_FLASH_1                    0x00000000      /* Flash Bank #1 */
+#define        PHYS_FLASH_SIZE                 0x01000000      /* 16 MB */
+#define        CONFIG_SYS_FLASH_BASE           PHYS_FLASH_1
+
+#define        CONFIG_SYS_FLASH_CFI
+#define        CONFIG_FLASH_CFI_DRIVER         1
+#define        CONFIG_SYS_FLASH_CFI_WIDTH      FLASH_CFI_32BIT
+
+#define        CONFIG_SYS_MAX_FLASH_BANKS      1
+#define        CONFIG_SYS_MAX_FLASH_SECT       64
+
+#define        CONFIG_SYS_FLASH_USE_BUFFER_WRITE       1
+
+#define        CONFIG_SYS_FLASH_ERASE_TOUT     (2*CONFIG_SYS_HZ)
+#define        CONFIG_SYS_FLASH_WRITE_TOUT     (2*CONFIG_SYS_HZ)
+#define        CONFIG_SYS_FLASH_LOCK_TOUT      (2*CONFIG_SYS_HZ)
+#define        CONFIG_SYS_FLASH_UNLOCK_TOUT    (2*CONFIG_SYS_HZ)
+#define        CONFIG_SYS_FLASH_PROTECTION
+
+#define        CONFIG_ENV_IS_IN_FLASH          1
+#define        CONFIG_ENV_SECT_SIZE            0x40000
+#else
+#define        CONFIG_SYS_NO_FLASH
+#define        CONFIG_ENV_IS_NOWHERE
+#endif
+
+#define        CONFIG_SYS_MONITOR_BASE         0x0
+#define        CONFIG_SYS_MONITOR_LEN          0x40000
+
+#define        CONFIG_ENV_SIZE                 0x4000
+#define        CONFIG_ENV_ADDR                 0x40000
+
+/*
+ * GPIO settings
+ */
+#define        CONFIG_SYS_GAFR0_L_VAL  0x00011004
+#define        CONFIG_SYS_GAFR0_U_VAL  0xa5000008
+#define        CONFIG_SYS_GAFR1_L_VAL  0x60888050
+#define        CONFIG_SYS_GAFR1_U_VAL  0xaaa50aaa
+#define        CONFIG_SYS_GAFR2_L_VAL  0x0aaaaaaa
+#define        CONFIG_SYS_GAFR2_U_VAL  0x00000000
+#define        CONFIG_SYS_GPCR0_VAL    0x0
+#define        CONFIG_SYS_GPCR1_VAL    0x0
+#define        CONFIG_SYS_GPCR2_VAL    0x0
+#define        CONFIG_SYS_GPDR0_VAL    0xcfff8140
+#define        CONFIG_SYS_GPDR1_VAL    0xfcbfbef3
+#define        CONFIG_SYS_GPDR2_VAL    0x0001ffff
+#define        CONFIG_SYS_GPSR0_VAL    0x00010f8f
+#define        CONFIG_SYS_GPSR1_VAL    0x00bf5de5
+#define        CONFIG_SYS_GPSR2_VAL    0x03fe0800
+
+#define        CONFIG_SYS_PSSR_VAL     PSSR_RDH
+
+/* Clock setup:
+ * CKEN[1] - PWM1 ; CKEN[6] - FFUART
+ * CKEN[12] - MMC ; CKEN[16] - LCD
+ */
+#define        CONFIG_SYS_CKEN         0x00011042
+#define        CONFIG_SYS_CCCR         0x00000161
+
+/*
+ * Memory settings
+ */
+#define        CONFIG_SYS_MSC0_VAL     0x800092c2
+#define        CONFIG_SYS_MSC1_VAL     0x80008000
+#define        CONFIG_SYS_MSC2_VAL     0x80008000
+#define        CONFIG_SYS_MDCNFG_VAL   0x00001ac9
+#define        CONFIG_SYS_MDREFR_VAL   0x00118018
+#define        CONFIG_SYS_MDMRS_VAL    0x00220032
+#define        CONFIG_SYS_FLYCNFG_VAL  0x01fe01fe
+#define        CONFIG_SYS_SXCNFG_VAL   0x00000000
+
+/*
+ * PCMCIA and CF Interfaces
+ */
+#define        CONFIG_SYS_MECR_VAL     0x00000000
+#define        CONFIG_SYS_MCMEM0_VAL   0x00010504
+#define        CONFIG_SYS_MCMEM1_VAL   0x00010504
+#define        CONFIG_SYS_MCATT0_VAL   0x00010504
+#define        CONFIG_SYS_MCATT1_VAL   0x00010504
+#define        CONFIG_SYS_MCIO0_VAL    0x00010e04
+#define        CONFIG_SYS_MCIO1_VAL    0x00010e04
+
+#endif /* __CONFIG_H */
index 5898b4e8221eb18e8b89f3a41c8876d431864743..676f40c51a1523fd34fe3d97414159ab9a696e90 100644 (file)
@@ -223,12 +223,11 @@ RTC configuration
 #define CONFIG_SYS_DEFAULT_MBAR                0x80000000
 /* Use SRAM until RAM will be available */
 #define CONFIG_SYS_INIT_RAM_ADDR       MPC5XXX_SRAM
-#define CONFIG_SYS_INIT_RAM_END                MPC5XXX_SRAM_SIZE       /* End of used */
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_SIZE       /* Size of used */
                                                                /* area in DPRAM */
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes */
                                                /* reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - \
-                                               CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - \
+                                               GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE
index afdd69cd78858c29f2e2c9bf7044e4c6e73fe8fd..deb5b332f1fea53f99d5dfea5dee20ea8ff48452 100644 (file)
@@ -74,9 +74,8 @@
  *----------------------------------------------------------------------*/
 #define CONFIG_SYS_INIT_RAM_DCACHE     1               /* d-cache as init ram  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x70000000              /* DCache       */
-#define CONFIG_SYS_INIT_RAM_END        (4 << 10)
-#define CONFIG_SYS_GBL_DATA_SIZE       256                     /* num bytes initial data*/
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       (4 << 10)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 220f68658bc02064bb8e0ad38c73e0d3df78c8a7..33fa6ee8bd2fd2c6caf273238706e361ee56a32d 100644 (file)
@@ -64,7 +64,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (1 << 20)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /* allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
index 28dfe3b2ee7aee632d7921c46339e00dd108c98b..5830345921e7d0e5e9c62c55eb9300092a6613e8 100644 (file)
 
 /* Use SRAM until RAM will be available */
 #define CONFIG_SYS_INIT_RAM_ADDR       MPC5XXX_SRAM
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_SIZE       /* End of used area in DPRAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_SIZE       /* Size of used area in DPRAM */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_BASE    CONFIG_SYS_TEXT_BASE
index 9e694118c5dae00864c02702b762f8c19bb4e546..64654f825e309f548a9f424e79e38a7ed857c92f 100644 (file)
@@ -39,6 +39,7 @@
 #undef CONFIG_LCD
 #undef CONFIG_MMC
 #define BOARD_LATE_INIT                1
+#define        CONFIG_SYS_TEXT_BASE    0x0
 
 #undef CONFIG_USE_IRQ                  /* we don't need IRQ/FIQ stuff */
 
@@ -49,7 +50,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN      (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
 /*
  * Physical Memory Map
  */
-#define CONFIG_NR_DRAM_BANKS   4          /* we have 2 banks of DRAM */
+#define CONFIG_NR_DRAM_BANKS   1          /* we have 1 bank of DRAM */
 #define PHYS_SDRAM_1           0xa0000000 /* SDRAM Bank #1 */
 #define PHYS_SDRAM_1_SIZE      0x02000000 /* 32 MB */
-#define PHYS_SDRAM_2           0xa4000000 /* SDRAM Bank #2 */
-#define PHYS_SDRAM_2_SIZE      0x00000000 /* 0 MB */
-#define PHYS_SDRAM_3           0xa8000000 /* SDRAM Bank #3 */
-#define PHYS_SDRAM_3_SIZE      0x00000000 /* 0 MB */
-#define PHYS_SDRAM_4           0xac000000 /* SDRAM Bank #4 */
-#define PHYS_SDRAM_4_SIZE      0x00000000 /* 0 MB */
 
 #define PHYS_FLASH_1           0x00000000 /* Flash Bank #1 */
 #define PHYS_FLASH_2           0x04000000 /* Flash Bank #2 */
 #define CONFIG_SYS_FLASH_BASE          PHYS_FLASH_1
 #define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_FLASH_BASE
 
+#define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM_1
+#define        CONFIG_SYS_INIT_SP_ADDR         (GENERATED_GBL_DATA_SIZE + PHYS_SDRAM_1)
+
 /*
  * GPIO settings
  */
 #define CONFIG_SYS_GAFR2_U_VAL         0x00000000
 
 #define CONFIG_SYS_PSSR_VAL            0x20
-#define CONFIG_SYS_CCCR_VAL        0x00000141  /* 100 MHz memory, 200 MHz CPU  */
-#define CONFIG_SYS_CKEN_VAL        0x00000060  /* FFUART and STUART enabled    */
-#define CONFIG_SYS_ICMR_VAL        0x00000000  /* No interrupts enabled        */
+#define CONFIG_SYS_CCCR                    0x00000141  /* 100 MHz memory, 200 MHz CPU  */
+#define CONFIG_SYS_CKEN                    0x00000060  /* FFUART and STUART enabled    */
+#define CONFIG_SYS_ICMR                    0x00000000  /* No interrupts enabled        */
 
 /*
  * Memory settings
                                           /* bits set in lowlevel_init.S       */
 #define CONFIG_SYS_MDMRS_VAL           0x00000000
 
+#define        CONFIG_SYS_FLYCNFG_VAL          0x00000000
+#define        CONFIG_SYS_SXCNFG_VAL           0x00000000
+
 /*
  * PCMCIA and CF Interfaces
  */
index a0b00e9706a5beda3586ae17a29b6554887767e1..7fcc9babdc89549c951d06fe05fcf546335d3282 100644 (file)
 #define CONFIG_INITRD_TAG      1
 
 #undef CONFIG_SKIP_LOWLEVEL_INIT
-#undef CONFIG_SKIP_RELOCATE_UBOOT
 
 /*
  * Hardware drivers
  */
 #define CONFIG_SYS_MALLOC_LEN          \
                ROUND(3 * CONFIG_ENV_SIZE + 128 * 1024, 0x1000)
-#define CONFIG_SYS_GBL_DATA_SIZE       128
 
 #define CONFIG_STACKSIZE               (32 * 1024)     /* regular stack */
 
index 9735e6a0797f35b12b595ae2c12c964fd2d5ca36..619af2d9bfca0b79dc9bf33c15357f57741a1126 100644 (file)
 #define CONFIG_INITRD_TAG      1
 
 #undef CONFIG_SKIP_LOWLEVEL_INIT
-#undef CONFIG_SKIP_RELOCATE_UBOOT
 #define CONFIG_USER_LOWLEVEL_INIT      1
 
 /*
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN  ROUND(3 * CONFIG_ENV_SIZE + 128 * 1024, 0x1000)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* 128 bytes for initial data */
 
 #define CONFIG_STACKSIZE               (32 * 1024)     /* regular stack */
 
index 690f119f4cd94a1971c3736ce097ed60fd940a10..3ed6b56bfe2d30f5b4ee690fdb5f93fdc5c4266d 100644 (file)
@@ -47,7 +47,6 @@
 #define CONFIG_INITRD_TAG      1
 
 #define CONFIG_SKIP_LOWLEVEL_INIT
-#define CONFIG_SKIP_RELOCATE_UBOOT
 
 /*
  * Hardware drivers
  */
 #define CONFIG_SYS_MALLOC_LEN          ROUND(3 * CONFIG_ENV_SIZE + 128*1024,\
                                        0x1000)
-#define CONFIG_SYS_GBL_DATA_SIZE       128 /* 128 bytes for initial data */
 
 #define CONFIG_STACKSIZE               (32*1024)       /* regular stack */
 
index e7584c3a2957fddc5190b2f5755ee66e260f1183..652b85efd594c332f9034069346acb2e0f26fa59 100644 (file)
  * copied to top of RAM by the init code.
  *
  * CONFIG_SYS_INIT_RAM_ADDR            - Address of Init RAM, above exception vect
- * CONFIG_SYS_INIT_RAM_END             - Size of Init RAM
- * CONFIG_SYS_GBL_DATA_SIZE            - Ammount of RAM to reserve for global data
+ * CONFIG_SYS_INIT_RAM_SIZE            - Size of Init RAM
+ * GENERATED_GBL_DATA_SIZE             - Ammount of RAM to reserve for global data
  * CONFIG_SYS_GBL_DATA_OFFSET          - Start of global data, top of stack
  */
 
 #define CONFIG_SYS_INIT_RAM_ADDR       (CONFIG_SYS_SDRAM_BASE + 0x4000)
-#define CONFIG_SYS_INIT_RAM_END        0x4000
-#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_RAM_SIZE       0x4000
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 
 
 /*
index 7018a8c3c78d2f4acf9b96b77cb1894cf0260696..68c62770f23757dcdb813a113ed9ed176acefaea 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x4000  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 6c1defc9ae8ba50cb0028ddba711c8a54c8b5140..c1c7f80d4b24deac235130b3b1561101c2ac4279 100644 (file)
@@ -42,7 +42,7 @@
  * so we MUST NOT initialize critical regs like mem-timing ...
  */
 #undef CONFIG_SKIP_LOWLEVEL_INIT                       /* define for developing */
-#undef CONFIG_SKIP_RELOCATE_UBOOT                      /* define for developing */
+#define        CONFIG_SYS_TEXT_BASE    0x0
 
 /*
  * define the following to enable debug blinks.  A debug blink function
@@ -75,7 +75,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN      (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * PXA250 IDP memory map information
 /*
  * Physical Memory Map
  */
-#define CONFIG_NR_DRAM_BANKS   4          /* we have 1 banks of DRAM */
+#define CONFIG_NR_DRAM_BANKS   1          /* we have 1 bank of DRAM */
 #define PHYS_SDRAM_1           0xa0000000 /* SDRAM Bank #1 */
 #define PHYS_SDRAM_1_SIZE      0x04000000 /* 64 MB */
 #define PHYS_SDRAM_2           0xa4000000 /* SDRAM Bank #2 */
 
 #define CONFIG_SYS_FLASH_BASE          PHYS_FLASH_1
 
+#define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM_1
+#define        CONFIG_SYS_INIT_SP_ADDR         (GENERATED_GBL_DATA_SIZE + PHYS_SDRAM_1)
+
 /*
  * GPIO settings
  */
 
 #define CONFIG_SYS_PSSR_VAL            0x20
 
+#define        CONFIG_SYS_CCCR                 CCCR_L27|CCCR_M2|CCCR_N10
+#define        CONFIG_SYS_CKEN                 0x0
+
 /*
  * Memory settings
  */
 #define CONFIG_SYS_MDCNFG_VAL          0x090009C9
 #define CONFIG_SYS_MDREFR_VAL          0x0085C017
 #define CONFIG_SYS_MDMRS_VAL           0x00220022
+#define        CONFIG_SYS_FLYCNFG_VAL          0x00000000
+#define        CONFIG_SYS_SXCNFG_VAL           0x00000000
 
 /*
  * PCMCIA and CF Interfaces
index f26ced1d7f31c2be3ad8cf7c30f4684c1a415fee..e2f7a5e9f9fc13f5e61b3024bdb5dadc63ee97ff 100644 (file)
@@ -43,7 +43,6 @@
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 1024 * 1024)
 /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_SIZE       128
 
 /*
  * Hardware drivers
 #define CONFIG_USB_STORAGE
 #define CONFIG_DOS_PARTITION
 #define CONFIG_SUPPORT_VFAT
+#define CONFIG_CMD_EXT2
 #define CONFIG_CMD_FAT
 #endif /* CONFIG_CMD_USB */
 
 #include <config_cmd_default.h>
 
 #define CONFIG_CMD_CACHE
-#define CONFIG_CMD_PING
+#define CONFIG_CMD_DATE
 #define CONFIG_CMD_DHCP
-#define CONFIG_CMD_NET
 #define CONFIG_CMD_MII
 #define CONFIG_CMD_NAND
+#define CONFIG_CMD_NET
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_SETEXPR
 #define CONFIG_CMD_SPI
-#define CONFIG_CMD_DATE
-#define BOARD_LATE_INIT
 
-/*
- * You can compile in a MAC address and your custom net settings by using
- * the following syntax.
- *
- * #define CONFIG_ETHADDR              xx:xx:xx:xx:xx:xx
- * #define CONFIG_SERVERIP             <server ip>
- * #define CONFIG_IPADDR               <board ip>
- * #define CONFIG_GATEWAYIP            <gateway ip>
- * #define CONFIG_NETMASK              <your netmask>
- */
+#define BOARD_LATE_INIT
 
 #define CONFIG_BOOTDELAY       5
 
        "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0"              \
        "addmisc=setenv bootargs ${bootargs}\0"                         \
        "uboot_addr=A0000000\0"                                         \
-       "kernel_addr=A00A0000\0"                                        \
+       "kernel_addr=A00C0000\0"                                        \
        "ramdisk_addr=A0300000\0"                                       \
        "u-boot=qong/u-boot.bin\0"                                      \
        "kernel_addr_r=80800000\0"                                      \
@@ -296,16 +287,20 @@ extern int qong_nand_rdy(void *chip);
 #define CONFIG_LZO
 #define CONFIG_MTD_DEVICE              /* needed for mtdparts commands */
 #define CONFIG_FLASH_CFI_MTD
-#define MTDIDS_DEFAULT         "nor0=physmap-flash.0"
+#define MTDIDS_DEFAULT         "nor0=physmap-flash.0,"         \
+                               "nand0=gen_nand"
 #define MTDPARTS_DEFAULT       \
-       "mtdparts=physmap-flash.0:384k(U-Boot),128k(env1),"     \
-       "128k(env2),2432k(kernel),13m(ramdisk),-(user)"
+       "mtdparts=physmap-flash.0:"                             \
+                       "512k(U-Boot),128k(env1),128k(env2),"   \
+                       "2304k(kernel),13m(ramdisk),-(user);"   \
+               "gen_nand:"                                     \
+                       "128m(nand)"
 
 /* additions for new relocation code, must be added to all boards */
 #define CONFIG_SYS_SDRAM_BASE          0x80000000
 #define CONFIG_SYS_INIT_RAM_ADDR       IRAM_BASE_ADDR
-#define CONFIG_SYS_INIT_RAM_END                IRAM_SIZE
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE               IRAM_SIZE
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_ADDR                (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_GBL_DATA_OFFSET)
 
 #define CONFIG_BOARD_EARLY_INIT_F      1
index f847f9cb33dda0873b21eb9b3807347d28231ee5..5fd7838d52a52862bf0a11c7c2d2d8247daa1b26 100644 (file)
 #define CONFIG_SYS_OCM_DATA_ADDR       0xF8000000
 #define CONFIG_SYS_OCM_DATA_SIZE       0x1000
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR /* inside of OCM               */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE /* End of used area in RAM     */
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE /* Size of used area in RAM    */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 2440eee7c07cb1c217cc03041bfee0f559de5552..0ebb0940826e2e7926ebfafb35dfa2c0a70271b7 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x2F00  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index bc518db7e2fdf4363d28abb0cc6a10a2aeb9829e..ade6f7c7086efe894738a301d14e4e208033fc4d 100644 (file)
@@ -58,7 +58,6 @@
 /* Size of DRAM reserved for malloc() use */
 #define CONFIG_SYS_MALLOC_LEN          (1024 * 1024)
 /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_SIZE       (256)
 #define CONFIG_SYS_BOOTMAPSZ           (8 * 1024 * 1024)
 
 /*
index 41376da200359a7547021e5b97fb734beb0d7d2f..3416cb897e11c5c1ad46ca62b003f1c295f37d8d 100644 (file)
 #define CONFIG_SYS_MALLOC_LEN          (1204 * 1024)
 
 /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_SIZE       (256)
 #define CONFIG_SYS_BOOTMAPSZ           (8 * 1024 * 1024)
 #define CONFIG_SYS_RX_ETH_BUFFER       (8)
 
index a7d5dac9af8ba364ff2547ce0a7d86e3d9af5225..f75ab6781826455266bf1bf963ecafcd8d70e0fa 100644 (file)
 #define CONFIG_SYS_TEMP_STACK_OCM      1
 #define CONFIG_SYS_OCM_DATA_ADDR       CONFIG_SYS_ISRAM_BASE
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_ISRAM_BASE   /* Initial RAM address  */
-#define CONFIG_SYS_INIT_RAM_END        0x2000          /* End of used area in RAM */
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* num bytes initial data */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2000          /* Size of used area in RAM */
 
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      (CONFIG_SYS_GBL_DATA_OFFSET - 0x4)
 
 /*-----------------------------------------------------------------------
index 5e6bc27e097577d41f87e67fc6305657d306def6..064716f904f0d91bc96e86a14b8741a4440fc757 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index b82ff372a60935f52327cb1d7a6170a24a892f77..5761f20a19e820f65f61576905fd4f6433ccb77d 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x4000  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x4000  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 9aa71b4496a6e84e539c0a85ffd0e1aab940593a..b3feaa8c33276b5314dce8eccbdb33eed6e803e1 100644 (file)
@@ -78,7 +78,6 @@
 #define CONFIG_SYS_MONITOR_BASE        RSK7203_FLASH_BASE_1
 #define CONFIG_SYS_MONITOR_LEN         (128 * 1024)
 #define CONFIG_SYS_MALLOC_LEN          (256 * 1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       256
 #define CONFIG_SYS_BOOTMAPSZ           (8 * 1024 * 1024)
 
 /* FLASH */
index dc01ceb7b26a653075b92f4f00a9907953f36e2f..541aec05ff18d0b5ff71a19fbc16b771c0cb6c98 100644 (file)
@@ -40,8 +40,6 @@
 #define CONFIG_DISPLAY_CPUINFO
 #define CONFIG_DISPLAY_BOARDINFO
 
-#undef CONFIG_SKIP_RELOCATE_UBOOT
-
 /* input clock of PLL: has 24MHz input clock at S5PC110 */
 #define CONFIG_SYS_CLK_FREQ_C110       24000000
 
@@ -58,7 +56,6 @@
  * 1MB = 0x100000, 0x100000 = 1024 * 1024
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + (1 << 20))
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes for */
                                                /* initial data */
 /*
  * select serial console configuration
index d7417164cb3099290577157197bf4ae65b5ff56e..32e0444a2fb197c0d8873ee58385ed743a6d3af2 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x4000  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 025ad0953c2807115f86aa80897fedb888326e68..f0f19b2712cb6acfc1806c4fc53c11ed998394b8 100644 (file)
@@ -59,7 +59,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
index b9f27cc95b7870a10e688f6aead97c9e9045e6e3..00f4dc9f7c08bd2606c2e07ed92d044394319010 100644 (file)
@@ -54,7 +54,6 @@
 #define CONFIG_INITRD_TAG              1
 
 #define CONFIG_SKIP_LOWLEVEL_INIT
-#define CONFIG_SKIP_RELOCATE_UBOOT
 
 /*
  * Hardware drivers
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN  ROUND(3 * CONFIG_ENV_SIZE + 128 * 1024, 0x1000)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* 128 bytes for initial data */
 #define CONFIG_STACKSIZE               (32 * 1024)     /* regular stack */
 
 #ifdef CONFIG_USE_IRQ
index 3de2a9efb88e195612d24f8fbd3ce2cbb6880fde..6f0d728f906e3d8df2527f05b57cf1bdcb775b31 100644 (file)
 #define CONFIG_SYS_OCM_DATA_SIZE       0x1000
 
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR /* inside of SDRAM             */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE /* End of used area in RAM     */
-#define CONFIG_SYS_GBL_DATA_SIZE       128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE /* Size of used area in RAM    */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 0934a002bfdf7ecd0f2dc62c49d824918404281f..5993be6006a06778dca694a13dc8551dcd1c77ff 100644 (file)
@@ -201,11 +201,10 @@ typedef unsigned int led_id_t;
 
        /* Size in bytes reserved for initial data
         */
-#define CONFIG_SYS_GBL_DATA_SIZE    128
 
 #define CONFIG_SYS_INIT_RAM_ADDR     0x40000000
-#define CONFIG_SYS_INIT_RAM_END      0x1000
-#define CONFIG_SYS_GBL_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE      0x1000
+#define CONFIG_SYS_GBL_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 
 /*
  * NS16550 Configuration
index 54a1a36e292fd1b7bc711494170ffd38a5f0fdc5..0d83337254a5116bc29b8f44bf2a8e76b424ecd8 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_END        0x4000  /* End of used area in DPRAM    */
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index ee2292ce8648088f23db86f90624029d66614a35..b418cf23baf60e8fc0daf3dfe434bad68e969dc6 100644 (file)
 
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0xFD000000              /* Initial RAM address */
-#define CONFIG_SYS_INIT_RAM_END        0x1000                  /* End of used area in RAM*/
+#define CONFIG_SYS_INIT_RAM_SIZE       0x1000                  /* Size of used area in RAM*/
 
-#define CONFIG_SYS_GBL_DATA_SIZE       0x100                   /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_LEN         (256 * 1024)            /* Reserve 256 kB for Mon */
index 0ddd20d376b7f0adf4fc33e8dd3863c457434924..7bf9fc76c2168a5b301d76aa71c5807fa22528e4 100644 (file)
 
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0xe4010000      /* Initial RAM address */
-#define CONFIG_SYS_INIT_RAM_END        0x4000          /* End of used area in RAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000          /* Size of used area in RAM */
 
 #define CONFIG_SYS_INIT_L2_ADDR        0xf8f80000      /* relocate boot L2SRAM */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*
index cd9652cfc3efa8c3ea7636fa674ed9178dd68d0b..101c5d943d306f306074dea67f8cce6a431d1e96 100644 (file)
 
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0x70000000      /* Initial RAM address  */
-#define CONFIG_SYS_INIT_RAM_END        0x4000          /* End of used area in RAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000          /* Size of used area in RAM */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_LEN         (256 * 1024)    /* Reserve 256 kB for Mon */
index 9e2aef42eb96ef3dd973c06ae676d9f55489b625..90d84eba8aedc09a2454107a9ac1206066f60f7e 100644 (file)
 #else
 #define CONFIG_SYS_INIT_RAM_ADDR       0xf8400000      /* Initial RAM address */
 #endif
-#define CONFIG_SYS_INIT_RAM_END        0x4000          /* End of used area in RAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000          /* Size of used area in RAM */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_LEN         (256 * 1024)    /* Reserve 256 kB for Mon */
index 3e6abf34e4805b4135a26c33a68c110b8fce05dc..04511057efdbee8bafd7fb5ef5d2174e1d9f33dd 100644 (file)
 /* Where the internal SRAM starts */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR
 /* Where the internal SRAM ends (only offset) */
-#define CONFIG_SYS_INIT_RAM_END        0x0F00
+#define CONFIG_SYS_INIT_RAM_SIZE       0x0F00
 
 /*
 
                           |          |
                           | 64 Bytes |
                           |          |
- CONFIG_SYS_INIT_RAM_END  ------> ------------ higher address
+ CONFIG_SYS_INIT_RAM_SIZE  ------> ------------ higher address
   (offset only)
 
 */
 /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_SIZE     64
-#define CONFIG_SYS_GBL_DATA_OFFSET   (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET   (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 /* Initial value of the stack pointern in internal SRAM */
 #define CONFIG_SYS_INIT_SP_OFFSET    CONFIG_SYS_GBL_DATA_OFFSET
 
index 555671464bb33e09b370a74d607f0889c3288f08..3da214e99dda14857464b1f00745dbf53df58f33 100644 (file)
@@ -35,7 +35,6 @@
  * Select serial console configuration
  */
 
-
 /*
  * BOOTP options
  */
@@ -44,7 +43,6 @@
 #define CONFIG_BOOTP_GATEWAY
 #define CONFIG_BOOTP_HOSTNAME
 
-
 /*
  * Command line configuration.
  */
@@ -58,7 +56,6 @@
 #undef CONFIG_CMD_LOADS
 #undef CONFIG_CMD_SOURCE
 
-
 /*
  * Boot options. Setting delay to -1 stops autostart count down.
  * NOTE: Sending parameters to kernel depends on kernel version and
 #define CONFIG_INITRD_TAG           1   /* send initrd params               */
 #undef CONFIG_VFD                       /* do not send framebuffer setup    */
 
-
 /*
  * Malloc pool need to host env + 128 Kb reserve for other allocations.
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + (128<<10) )
 
-
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-
 #define CONFIG_STACKSIZE       (120<<10)      /* stack size                 */
 
 #ifdef CONFIG_USE_IRQ
 #define SCB9328_SDRAM_1                0x08000000      /* SDRAM bank #1           */
 #define SCB9328_SDRAM_1_SIZE   0x01000000      /* 16 MB                   */
 
-/*
- * Flash Controller settings
- */
-
-/*
- * Hardware drivers
- */
-
-
 /*
  * Configuration for FLASH memory for the Synertronixx board
  */
index 412deeadb6fe682f8aa723064a81c8fb6d147bcf..a406ca032ce9153d023a3199083ce255a8cf3b0d 100644 (file)
@@ -98,9 +98,8 @@
  */
 /* 440EPx/440GRx have 16KB of internal SRAM, so no need for D-Cache    */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_BASE     /* OCM                  */
-#define CONFIG_SYS_INIT_RAM_END        (4 << 10)
-#define CONFIG_SYS_GBL_DATA_SIZE       256     /* num bytes initial data       */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       (4 << 10)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      (CONFIG_SYS_GBL_DATA_OFFSET - 0x4)
 
 /*
index c8c62ad76e391177482680110fe835a4cc681403..209cb88f3f33fe442b4754beac4576c8e53737ee 100644 (file)
@@ -85,7 +85,6 @@
 /* Size of DRAM reserved for malloc() use */
 #define CONFIG_SYS_MALLOC_LEN          (1024 * 1024)
 /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_SIZE       (256)
 #define CONFIG_SYS_BOOTMAPSZ           (8 * 1024 * 1024)
 
 #define CONFIG_SYS_FLASH_CFI
index 2c18e2f7fdf1e039a0c664740bcd0b00a60cd1ac..591fb5cd158d0c3c40ea401235360bb4d9ec38bf 100644 (file)
 
 /* MEMORY */
 #if defined(CONFIG_SH_32BIT)
-#define SH7785LCR_SDRAM_PHYS_BASE      (0x48000000)
-#define SH7785LCR_SDRAM_BASE           (0x88000000)
+/* 0x40000000 - 0x47FFFFFF does not use */
+#define CONFIG_SH_SDRAM_OFFSET         (0x8000000)
+#define SH7785LCR_SDRAM_PHYS_BASE      (0x40000000 + CONFIG_SH_SDRAM_OFFSET)
+#define SH7785LCR_SDRAM_BASE           (0x80000000 + CONFIG_SH_SDRAM_OFFSET)
 #define SH7785LCR_SDRAM_SIZE           (384 * 1024 * 1024)
 #define SH7785LCR_FLASH_BASE_1         (0xa0000000)
 #define SH7785LCR_FLASH_BANK_SIZE      (64 * 1024 * 1024)
 #define CONFIG_SYS_MONITOR_BASE        (SH7785LCR_FLASH_BASE_1)
 #define CONFIG_SYS_MONITOR_LEN         (512 * 1024)
 #define CONFIG_SYS_MALLOC_LEN          (512 * 1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       (256)
 #define CONFIG_SYS_BOOTMAPSZ           (8 * 1024 * 1024)
 
 /* FLASH */
index d848915d0e99761779a6ba2a78bd4467f1f0ff52..c0e6643fb401c0a89cf389398ce36d97b65065ce 100644 (file)
@@ -34,7 +34,6 @@
  */
 #define CONFIG_INFERNO                 /* we are using the inferno bootldr */
 #define CONFIG_SKIP_LOWLEVEL_INIT      1
-#undef  CONFIG_SKIP_RELOCATE_UBOOT
 
 /*
  * High Level Configuration Options
@@ -51,7 +50,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
index fd51219af4cddd1d2e656030aaa92a9d09f3b057..064749e2d6d67b057a1df42cc723db1654ae7341 100644 (file)
@@ -52,7 +52,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
index f9d1e55186fc783c3280de7eceb26a43a8c84c94..62fe97e76ac02c19a457ac55d770516c1e46c0aa 100644 (file)
@@ -49,7 +49,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
index 451b53430c250980a1a2c5656432776f18de942b..671f2c7c8b1df6347b490cf1cdcc8b8ef7fc1f45 100644 (file)
@@ -40,8 +40,6 @@
 #define CONFIG_S3C64XX         1       /* in a SAMSUNG S3C64XX Family  */
 #define CONFIG_SMDK6400                1       /* on a SAMSUNG SMDK6400 Board  */
 
-#define CONFIG_SKIP_RELOCATE_UBOOT
-
 #define CONFIG_PERIPORT_REMAP
 #define CONFIG_PERIPORT_BASE   0x70000000
 #define CONFIG_PERIPORT_SIZE   0x13
@@ -71,7 +69,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 1024 * 1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes for initial data */
 
 /*
  * Hardware drivers
index bfd09a0916eed7ea9668eb10beba485dd2bb38ae..e36b262a8ec56b8471f3e13e0ba5691b9773d5cd 100644 (file)
@@ -45,8 +45,6 @@
 #define CONFIG_DISPLAY_CPUINFO
 #define CONFIG_DISPLAY_BOARDINFO
 
-#undef CONFIG_SKIP_RELOCATE_UBOOT
-
 /* input clock of PLL: SMDKC100 has 12MHz input clock */
 #define CONFIG_SYS_CLK_FREQ            12000000
 
@@ -63,7 +61,6 @@
  * 1MB = 0x100000, 0x100000 = 1024 * 1024
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + (1 << 20))
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes for */
                                                /* initial data */
 /*
  * select serial console configuration
index 0bbad161f6f8b0bad80435fbf49f1f4bde6fa083..5f2fb1e9279cf89c6656c02a450f6035b40990d5 100644 (file)
 
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0xe4010000      /* Initial RAM address  */
-#define CONFIG_SYS_INIT_RAM_END        0x4000          /* End used area in RAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000          /* Size used area in RAM*/
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* num bytes initial data*/
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_LEN         (384 * 1024)    /* Reserve 384KiB for Mon */
index 75b8e600e573b1c3d0424d5295d25b424c587f7c..f1cbe95715e3b239191fbd974c4f303367b9be55 100644 (file)
 
 /* Use SRAM until RAM will be available */
 #define CONFIG_SYS_INIT_RAM_ADDR       (CONFIG_SYS_MBAR + 0x20000)
-#define CONFIG_SYS_INIT_RAM_END        0x8000  /* End of used area in DPRAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x8000  /* Size of used area in DPRAM */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE
index 4d1874714275e640416af96f04a165fcf2611d8e..e39d3bd944b4f12bf6dca847b258aec6398f00d1 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index cc52e39ffb6cc082763ffe8d61410eb27e654f92..4e5bdea369a34ebb30ff23b498b29ac4d41ad522 100644 (file)
 #define CONFIG_SYS_MEMTEST_START               0x00800000
 #define CONFIG_SYS_MEMTEST_END                 0x04000000
 #define CONFIG_SYS_MALLOC_LEN                  (1024*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE               128
 #define CONFIG_IDENT_STRING                    "-SPEAr"
 #define CONFIG_SYS_LONGHELP
 #define CONFIG_SYS_PROMPT                      "u-boot> "
index b5ac1689b886831e2d191a7ce4582255bd84e598..d6195b186a384c01211f5d668ba5c0e8e23af00f 100644 (file)
 
 /* List of I2C addresses to be verified by POST */
 #if defined (CONFIG_MINIFAP)
-#undef I2C_ADDR_LIST
-#define I2C_ADDR_LIST  {       CONFIG_SYS_I2C_EEPROM_ADDR,     \
-                               CONFIG_SYS_I2C_HWMON_ADDR,      \
-                               CONFIG_SYS_I2C_SLAVE }
+#undef CONFIG_SYS_POST_I2C_ADDRS
+#define CONFIG_SYS_POST_I2C_ADDRS      {CONFIG_SYS_I2C_EEPROM_ADDR,    \
+                                        CONFIG_SYS_I2C_HWMON_ADDR,     \
+                                        CONFIG_SYS_I2C_SLAVE}
 #endif
 
 /*
 #define CONFIG_SYS_INIT_RAM_ADDR       MPC5XXX_SRAM
 #ifdef CONFIG_POST
 /* preserve space for the post_word at end of on-chip SRAM */
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_POST_SIZE
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_POST_SIZE
 #else
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_SIZE
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_SIZE
 #endif
 
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE
index 479fbab4cb001d9870a90a4c9bb85c6552caf4cf..c2497ad09c1266d374cf579e8ab60d697d1f6366 100644 (file)
 
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0x60000000      /* Initial RAM address  */
-#define CONFIG_SYS_INIT_RAM_END        0x4000          /* End of used area in RAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000          /* Size of used area in RAM */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_LEN         (256 * 1024)    /* Reserve 256 kB for Mon */
index 6ea58074bb5b260b1ccf55a6d30e0b36466832ff..996120a02b1b022df4d8e1cf3f0d2abd8b29801b 100644 (file)
 
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0x60000000      /* Initial RAM address  */
-#define CONFIG_SYS_INIT_RAM_END        0x4000          /* End of used area in RAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x4000          /* Size of used area in RAM */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_LEN         (256 * 1024)    /* Reserve 256 kB for Mon */
index b9739ff19c63fe9003e0b73c78234da5d26a9ecb..890186e914832058f029f195b8d92c07c0a78269 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x3000  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x3000  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 219b85b59000dc8f422fbb4f1937803ba41da5ea..22486807f44c127a8ce7baba24f2326c45438f4a 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index d00e64eff291cc8f71b84a6333179448fe5d7023..6115a5f41326b64f60be40ccbbb9862a4fa9b2b4 100644 (file)
  * Initial RAM & stack pointer (placed in OCM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_BASE     /* OCM */
-#define CONFIG_SYS_INIT_RAM_END        (4 << 10)
-#define CONFIG_SYS_GBL_DATA_SIZE       256     /* num bytes initial data */
+#define CONFIG_SYS_INIT_RAM_SIZE       (4 << 10)
 #define CONFIG_SYS_GBL_DATA_OFFSET \
-       (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+       (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*
index 6e9dbc5759395d9ce8ded01d3febc70c2718b463..a3738b7b1d2dcafb9db2c96b566eb51ad9abed15 100644 (file)
@@ -288,10 +288,9 @@ unsigned char spi_read(void);
 #define CONFIG_SYS_OCM_DATA_ADDR       0xF8000000
 #define CONFIG_SYS_OCM_DATA_SIZE       0x1000
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR /* inside of SDRAM             */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE /* End of used area in RAM     */
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE /* Size of used area in RAM    */
 
-#define CONFIG_SYS_GBL_DATA_SIZE      128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 12f35ae1f4a71e8313207415111284d36f267e9a..3046081c52efc5fd5e637f00b4cc1e946028c405 100644 (file)
 #define CONFIG_SYS_TEMP_STACK_OCM      1
 #define CONFIG_SYS_OCM_DATA_ADDR       CONFIG_SYS_ISRAM_BASE
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_ISRAM_BASE  /* Initial RAM address   */
-#define CONFIG_SYS_INIT_RAM_END        0x2000          /* End of used area in RAM*/
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* num bytes initial data*/
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2000          /* Size of used area in RAM*/
 
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      (CONFIG_SYS_GBL_DATA_OFFSET - 0x4)
 
 /*-----------------------------------------------------------------------
index f423a0eb2699baf14b62efaa1960209483640a33..68290efca5624bd41cd8d7870b6c759590c86ae9 100644 (file)
@@ -50,7 +50,6 @@
 
 /* Memory Info */
 #define CONFIG_SYS_MALLOC_LEN          (0x10000 + 1*1024*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128
 #define PHYS_SDRAM_1                   TNETV107X_DDR_EMIF_DATA_BASE
 #define PHYS_SDRAM_1_SIZE              0x04000000
 #define CONFIG_SYS_MEMTEST_START       PHYS_SDRAM_1
index 5af2af3d1cb5efb52b02d259fdeeaca4e5eb3181..7b18022c6e36c7f10a31d453aeba86f37bad8182 100644 (file)
@@ -63,7 +63,6 @@
 #define CONFIG_INITRD_TAG      1
 
 #define CONFIG_SKIP_LOWLEVEL_INIT
-#define CONFIG_SKIP_RELOCATE_UBOOT
 
 /*
  * Hardware drivers
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN  ROUND(3 * CONFIG_ENV_SIZE + 128 * 1024, 0x1000)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* 128 bytes for initial data */
 
 #define CONFIG_STACKSIZE       (32 * 1024)     /* regular stack */
 
index 9827195e8d59102ece270f38839844046f6c28f8..d5736a23d22545c0a50b8b0434ab4393a98f72cb 100644 (file)
@@ -95,7 +95,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
index fa5aae8a5c5c773f46650e61109d4d962c4da507..2512f93f9c682940462f37b61f94903a2eff27be 100644 (file)
@@ -44,6 +44,7 @@
 
 #define CONFIG_MMC             1
 #define BOARD_LATE_INIT                1
+#define        CONFIG_SYS_TEXT_BASE    0x0
 
 #undef CONFIG_USE_IRQ                  /* we don't need IRQ/FIQ stuff */
 
@@ -56,7 +57,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN      (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
 
 #define CONFIG_SYS_FLASH_BASE          PHYS_FLASH_1
 
+#define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM_1
+#define        CONFIG_SYS_INIT_SP_ADDR         (GENERATED_GBL_DATA_SIZE + PHYS_SDRAM_1)
+
 /*
  * GPIO settings
  */
index bcc8140df0db0a8ffcbbda6f903ba717fae79a4b..8f8a1a377ebc6e0f4bb3a7c1bbf02dd77492051b 100644 (file)
@@ -41,7 +41,7 @@
 #define CONFIG_SYS_NAND_U_BOOT_OFFS    0x800
 #define CONFIG_SYS_NAND_U_BOOT_SIZE    0x30000
 
-#define CONFIG_SYS_NAND_U_BOOT_DST      (0x81fc0000)
+#define CONFIG_SYS_NAND_U_BOOT_DST      (0x81200000)
 #define CONFIG_SYS_NAND_U_BOOT_START    CONFIG_SYS_NAND_U_BOOT_DST
 
 #define CONFIG_SYS_NAND_PAGE_SIZE      2048
@@ -66,7 +66,6 @@
 /* malloc() len */
 #define CONFIG_SYS_MALLOC_LEN          (1 << 20)       /* 1 MiB */
 /* reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_SIZE       128
 /*
  * Board has 2 32MB banks of DRAM but there is a bug when using
  * both so only the first is configured
 /* additions for new relocation code, must be added to all boards */
 #define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM_1
 #define CONFIG_SYS_INIT_SP_ADDR                (CONFIG_SYS_SDRAM_BASE + 0x1000 - /* Fix this */ \
-                                       CONFIG_SYS_GBL_DATA_SIZE)
+                                       GENERATED_GBL_DATA_SIZE)
 
 #endif /* __CONFIG_H */
index 5392fb590794e21b1182c0fdb5a19f2055ff120b..9da318d4278ba0fb6b9e70cd3f777321fbdf7810 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index c027f46e5d288d95f73a82a34d5d24d70d59b5f8..bb9f606a05f6f038f8cacd5a268d45b2c1a12e06 100644 (file)
@@ -196,10 +196,9 @@ protect on ${u-boot_startaddr} ${u-boot_endaddr}"
 #define CONFIG_SYS_INIT_DATA_SIZE    128       /* Size in bytes reserved for */
                                                                        /* initial data */
 #define CONFIG_SYS_INIT_RAM_ADDR     0x40000000
-#define CONFIG_SYS_INIT_RAM_END      0x1000
-#define CONFIG_SYS_INIT_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_INIT_DATA_SIZE)
-#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_RAM_SIZE      0x1000
+#define CONFIG_SYS_INIT_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_SIZE - CONFIG_SYS_INIT_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 
 /*--------------------------------------------------------------------
  * NS16550 Configuration
index c34b6e86786e92b93164994a25bfc8e1797dea0a..a3fdc38ae1fb455c99f40f7adbeb2a8bf971fa26 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 96ffc6a0d52b5df39f86214893abb99b123ed288..47bb84610df92c87ad86e04dfb8feb5450c5fc8f 100644 (file)
 
 /* Use SRAM until RAM will be available */
 #define CONFIG_SYS_INIT_RAM_ADDR       MPC5XXX_SRAM
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_SIZE       /* End of used area in DPRAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_SIZE       /* Size of used area in DPRAM */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE
index 283b92c433872af40ca372f430f3c6c8beb5ddfc..abb57fe94c560ef0e044e8d3e647ddaa5cad668a 100644 (file)
 
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0xFD000000 /* Initial RAM address */
-#define CONFIG_SYS_INIT_RAM_END                0x1000  /* End of used area in RAM*/
+#define CONFIG_SYS_INIT_RAM_SIZE               0x1000  /* Size of used area in RAM*/
 
-#define CONFIG_SYS_GBL_DATA_SIZE       0x100   /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - \
-                                        CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - \
+                                        GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /* CONFIG_SYS_MONITOR_LEN must be a multiple of CONFIG_ENV_SECT_SIZE */
index 4273b84a44a931ae24cfaf8984b88e8473cb712c..45d8434437de7b74d4dd360f09a29ad3f39dd228 100644 (file)
@@ -76,7 +76,6 @@
  */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128 * 1024)
 /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_SIZE       128
 
 /*
  * Hardware drivers
index 56fb5f7110e1956d9b7feedb311f970ad903c24d..466d930b98305bcd59267fb11f04044d33b99a18 100644 (file)
  * Definitions for initial stack pointer and data area (in DPRAM)
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_END 0x2F00  /* End of used area in DPRAM    */
-#define        CONFIG_SYS_GBL_DATA_SIZE        64  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 44a6f8be696b3541459e4f0fe0c1d8d9ad85617f..a5c116b347f804d6fa97850aeaec7cf8468ad31b 100644 (file)
@@ -29,8 +29,8 @@
 #define CONFIG_MX51    /* in a mx51 */
 #define CONFIG_L2_OFF
 
-#define CONFIG_MX51_HCLK_FREQ          24000000
-#define CONFIG_MX51_CLK32              32768
+#define CONFIG_SYS_MX5_HCLK    24000000
+#define CONFIG_SYS_MX5_CLK32           32768
 #define CONFIG_DISPLAY_CPUINFO
 #define CONFIG_DISPLAY_BOARDINFO
 
@@ -46,7 +46,6 @@
 #define CONFIG_SYS_MALLOC_LEN          (2048 * 1024)
 
 /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_SIZE       128
 
 /*
  * Hardware drivers
 #define CONFIG_SYS_SDRAM_BASE          0x90000000
 #define CONFIG_SYS_INIT_RAM_ADDR       0x1FFE8000
 
-#ifndef CONFIG_SYS_ARM_WITHOUT_RELOC
-#define CONFIG_SYS_INIT_RAM_END                (64 * 1024)
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - \
-                                       CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE               (64 * 1024)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - \
+                                       GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_ADDR                (CONFIG_SYS_INIT_RAM_ADDR + \
                                        CONFIG_SYS_GBL_DATA_OFFSET)
-#undef CONFIG_SKIP_RELOCATE_UBOOT
-#else
-#define CONFIG_SKIP_RELOCATE_UBOOT
-#define CONFIG_SYS_INIT_SP_ADDR                (CONFIG_SYS_INIT_RAM_ADDR + 0x2000)
-#endif
-
 #define CONFIG_BOARD_EARLY_INIT_F
 
 /* 166 MHz DDR RAM */
 
 #define CONFIG_SYS_NO_FLASH
 
+/*
+ * Framebuffer and LCD
+ */
+#define CONFIG_PREBOOT
+#define CONFIG_LCD
+#define CONFIG_VIDEO_MX5
+#define CONFIG_SYS_CONSOLE_ENV_OVERWRITE
+#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
+#define CONFIG_SYS_CONSOLE_IS_IN_ENV
+#define LCD_BPP                LCD_COLOR16
+#define CONFIG_SPLASH_SCREEN
+#define CONFIG_CMD_BMP
+#define CONFIG_BMP_16BPP
+
 #endif                         /* __CONFIG_H */
index 2c95c121f372bc251438fb5b8e65d78c92d71017..d153762885f2aa0677022c6e1b9888df783c04e5 100644 (file)
 
 #define CONFIG_SYS_INIT_RAM_LOCK       1
 #define CONFIG_SYS_INIT_RAM_ADDR       0xF7000000      /* Initial RAM addr */
-#define CONFIG_SYS_INIT_RAM_END                0x1000          /* size */
+#define CONFIG_SYS_INIT_RAM_SIZE               0x1000          /* size */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       0x100           /* size init data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - \
-                                        CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - \
+                                        GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 #define CONFIG_SYS_MONITOR_LEN         (256 * 1024)    /* Reserve 256 kB */
index d46717cd25301a468cc1dab87657e432f7aabaa8..c258030e297d84a92175ccf5b8329209a20d1497 100644 (file)
@@ -71,7 +71,6 @@
 /*
  * Size of malloc() pool and stack
  */
-#define CONFIG_SYS_GBL_DATA_SIZE       128
 #define CONFIG_SYS_MALLOC_LEN          (4 * 1024 * 1024)
 #define CONFIG_STACKSIZE               (1 * 1024 * 1024)
 
index d3e22d9018df80d9ba7726627489f173bb536434..35afcd356c58d37161339e133e1515bec74ec526 100644 (file)
@@ -10,7 +10,7 @@
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
  * MA 02111-1307 USA
  */
 
-#ifndef __CONFIG_H
-#define __CONFIG_H
+#ifndef        __CONFIG_H
+#define        __CONFIG_H
 
 /*
  * High Level Board Configuration Options
  */
 #define        CONFIG_PXA27X           1       /* Marvell PXA270 CPU */
 #define        CONFIG_VPAC270          1       /* Voipac PXA270 board */
-
-#undef BOARD_LATE_INIT
-#undef CONFIG_SKIP_RELOCATE_UBOOT
-#undef CONFIG_USE_IRQ
-#undef CONFIG_SKIP_LOWLEVEL_INIT
+#define        CONFIG_SYS_TEXT_BASE    0x0
 
 /*
  * Environment settings
  */
-#define        CONFIG_ENV_SIZE                 0x4000
-#define        CONFIG_SYS_MALLOC_LEN           (CONFIG_ENV_SIZE + 128*1024)
-#define        CONFIG_SYS_GBL_DATA_SIZE        128
-
-#define        CONFIG_ENV_OVERWRITE            /* override default environment */
-
+#define        CONFIG_ENV_OVERWRITE
+#define        CONFIG_SYS_MALLOC_LEN           (128*1024)
+#define        CONFIG_ARCH_CPU_INIT
 #define        CONFIG_BOOTCOMMAND                                              \
        "if mmc init && fatload mmc 0 0xa4000000 uImage; then "         \
                "bootm 0xa4000000; "                                    \
        "if usb reset && fatload usb 0 0xa4000000 uImage; then "        \
                "bootm 0xa4000000; "                                    \
        "fi; "                                                          \
-       "bootm 0x40000;"
+       "if ide reset && fatload ide 0 0xa4000000 uImage; then "        \
+               "bootm 0xa4000000; "                                    \
+       "fi; "                                                          \
+       "bootm 0x60000;"
 #define        CONFIG_BOOTARGS                 "console=tty0 console=ttyS0,115200"
 #define        CONFIG_TIMESTAMP
 #define        CONFIG_BOOTDELAY                2       /* Autoboot delay */
 #define        CONFIG_CMDLINE_TAG
 #define        CONFIG_SETUP_MEMORY_TAGS
-
+#define        CONFIG_SYS_TEXT_BASE            0x0
 #define        CONFIG_LZMA                     /* LZMA compression support */
 
 /*
@@ -79,7 +75,7 @@
 #undef CONFIG_LCD
 #define        CONFIG_CMD_IDE
 
-#ifdef CONFIG_ONENAND_U_BOOT
+#ifdef CONFIG_ONENAND
 #undef CONFIG_CMD_FLASH
 #define        CONFIG_CMD_ONENAND
 #else
@@ -97,9 +93,9 @@
 
 #define        CONFIG_NET_MULTI                1
 #define        CONFIG_DRIVER_DM9000            1
-#define CONFIG_DM9000_BASE             0x08000300      /* CS2 */
-#define DM9000_IO                      (CONFIG_DM9000_BASE)
-#define DM9000_DATA                    (CONFIG_DM9000_BASE + 4)
+#define        CONFIG_DM9000_BASE              0x08000300      /* CS2 */
+#define        DM9000_IO                       (CONFIG_DM9000_BASE)
+#define        DM9000_DATA                     (CONFIG_DM9000_BASE + 4)
 #define        CONFIG_NET_RETRY_COUNT          10
 
 #define        CONFIG_BOOTP_BOOTFILESIZE
 #define        CONFIG_PXA_MMC
 #define        CONFIG_SYS_MMC_BASE             0xF0000000
 #define        CONFIG_CMD_FAT
+#define        CONFIG_CMD_EXT2
 #define        CONFIG_DOS_PARTITION
 #endif
 
  * KGDB
  */
 #ifdef CONFIG_CMD_KGDB
-#define        CONFIG_KGDB_BAUDRATE            230400          /* speed to run kgdb serial port */
-#define        CONFIG_KGDB_SER_INDEX           2               /* which serial port to use */
+#define        CONFIG_KGDB_BAUDRATE            230400  /* kgdb serial port speed */
+#define        CONFIG_KGDB_SER_INDEX           2       /* which serial port to use */
 #endif
 
 /*
 #define        CONFIG_SYS_HUSH_PARSER          1
 #define        CONFIG_SYS_PROMPT_HUSH_PS2      "> "
 
-#define        CONFIG_SYS_LONGHELP                             /* undef to save memory */
+#define        CONFIG_SYS_LONGHELP
 #ifdef CONFIG_SYS_HUSH_PARSER
-#define        CONFIG_SYS_PROMPT               "$ "            /* Monitor Command Prompt */
+#define        CONFIG_SYS_PROMPT               "$ "
 #else
-#define        CONFIG_SYS_PROMPT               "=> "           /* Monitor Command Prompt */
+#define        CONFIG_SYS_PROMPT               "=> "
 #endif
-#define        CONFIG_SYS_CBSIZE               256             /* Console I/O Buffer Size */
-#define        CONFIG_SYS_PBSIZE               (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)        /* Print Buffer Size */
-#define        CONFIG_SYS_MAXARGS              16              /* max number of command args */
-#define        CONFIG_SYS_BARGSIZE             CONFIG_SYS_CBSIZE       /* Boot Argument Buffer Size */
+#define        CONFIG_SYS_CBSIZE               256
+#define        CONFIG_SYS_PBSIZE               \
+       (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
+#define        CONFIG_SYS_MAXARGS              16
+#define        CONFIG_SYS_BARGSIZE             CONFIG_SYS_CBSIZE
 #define        CONFIG_SYS_DEVICE_NULLDEV       1
 
 /*
  * Clock Configuration
  */
-#undef CONFIG_SYS_CLKS_IN_HZ
-#define        CONFIG_SYS_HZ                   3250000         /* Timer @ 3250000 Hz */
-#define CONFIG_SYS_CPUSPEED            0x190           /* standard setting for 312MHz; L=16, N=1.5, A=0, SDCLK!=SystemBus */
+#define        CONFIG_SYS_HZ                   1000            /* Timer @ 3250000 Hz */
+#define        CONFIG_SYS_CPUSPEED             0x190           /* 312MHz */
 
 /*
  * 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
 /*
  * DRAM Map
  */
-#define        CONFIG_NR_DRAM_BANKS            2               /* We have 2 banks of DRAM */
+#define        CONFIG_NR_DRAM_BANKS            2               /* 2 banks of DRAM */
 #define        PHYS_SDRAM_1                    0xa0000000      /* SDRAM Bank #1 */
 #define        PHYS_SDRAM_1_SIZE               0x08000000      /* 128 MB */
+
+#ifdef CONFIG_RAM_256M
 #define        PHYS_SDRAM_2                    0x80000000      /* SDRAM Bank #2 */
 #define        PHYS_SDRAM_2_SIZE               0x08000000      /* 128 MB */
+#endif
 
 #define        CONFIG_SYS_DRAM_BASE            0xa0000000      /* CS0 */
+#ifdef CONFIG_RAM_256M
 #define        CONFIG_SYS_DRAM_SIZE            0x10000000      /* 256 MB DRAM */
+#else
+#define        CONFIG_SYS_DRAM_SIZE            0x08000000      /* 128 MB DRAM */
+#endif
 
-#define CONFIG_SYS_MEMTEST_START       0xa0400000      /* memtest works on */
-#define CONFIG_SYS_MEMTEST_END         0xa0800000      /* 4 ... 8 MB in DRAM */
+#define        CONFIG_SYS_MEMTEST_START        0xa0400000      /* memtest works on */
+#define        CONFIG_SYS_MEMTEST_END          0xa0800000      /* 4 ... 8 MB in DRAM */
 
-#define        CONFIG_SYS_LOAD_ADDR            (0x5c000000)
+#define        CONFIG_SYS_LOAD_ADDR            PHYS_SDRAM_1
+#define        CONFIG_SYS_IPL_LOAD_ADDR        (0x5c000000)
+#define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM_1
+#define        CONFIG_SYS_INIT_SP_ADDR         \
+       (PHYS_SDRAM_1 + GENERATED_GBL_DATA_SIZE + 2048)
 
 /*
  * NOR FLASH
  */
+#define        CONFIG_SYS_MONITOR_BASE         0x0
+#define        CONFIG_SYS_MONITOR_LEN          0x40000
+#define        CONFIG_ENV_ADDR                 \
+                       (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
+#define        CONFIG_ENV_SIZE                 0x4000
+
 #if    defined(CONFIG_CMD_FLASH)       /* NOR */
 #define        PHYS_FLASH_1                    0x00000000      /* Flash Bank #1 */
+
+#ifdef CONFIG_RAM_256M
 #define        PHYS_FLASH_2                    0x02000000      /* Flash Bank #2 */
+#endif
 
 #define        CONFIG_SYS_FLASH_CFI
 #define        CONFIG_FLASH_CFI_DRIVER         1
 
 #define        CONFIG_SYS_MAX_FLASH_SECT       (4 + 255)
+#ifdef CONFIG_RAM_256M
 #define        CONFIG_SYS_MAX_FLASH_BANKS      2
 #define        CONFIG_SYS_FLASH_BANKS_LIST     { PHYS_FLASH_1, PHYS_FLASH_2 }
+#else
+#define        CONFIG_SYS_MAX_FLASH_BANKS      1
+#define        CONFIG_SYS_FLASH_BASE           PHYS_FLASH_1
+#endif
 
 #define        CONFIG_SYS_FLASH_ERASE_TOUT     (25*CONFIG_SYS_HZ)
 #define        CONFIG_SYS_FLASH_WRITE_TOUT     (25*CONFIG_SYS_HZ)
 #define        CONFIG_SYS_FLASH_USE_BUFFER_WRITE       1
 #define        CONFIG_SYS_FLASH_PROTECTION             1
 
-#define CONFIG_ENV_IS_IN_FLASH         1
+#define        CONFIG_ENV_IS_IN_FLASH          1
+
+/*
+ * The first four sectors of the NOR flash are 0x8000 bytes big, the rest of the
+ * flash consists of 0x20000 bytes big sectors.
+ */
+#if    (CONFIG_ENV_ADDR <= 0x18000)
+#define        CONFIG_ENV_SECT_SIZE            0x8000
+#else
+#define        CONFIG_ENV_SECT_SIZE            0x20000
+#endif
 
 #elif  defined(CONFIG_CMD_ONENAND)     /* OneNAND */
 #define        CONFIG_SYS_NO_FLASH
 #define        CONFIG_SYS_ONENAND_BASE         0x00000000
+
 #define        CONFIG_ENV_IS_IN_ONENAND        1
+#define        CONFIG_ENV_SECT_SIZE            0x20000
 
 #else  /* No flash */
 #define        CONFIG_SYS_NO_FLASH
 #define        CONFIG_SYS_ENV_IS_NOWHERE
 #endif
 
-#define        CONFIG_SYS_MONITOR_BASE         0x000000
-#define        CONFIG_SYS_MONITOR_LEN          0x40000
-
-#define CONFIG_ENV_ADDR                (CONFIG_SYS_MONITOR_LEN)
-#define CONFIG_ENV_SECT_SIZE   0x40000
-#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
-#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
-
 /*
  * IDE
  */
 
 #define        __io
 
-#define CONFIG_SYS_IDE_MAXBUS          1
-#define CONFIG_SYS_IDE_MAXDEVICE       1
+#define        CONFIG_SYS_IDE_MAXBUS           1
+#define        CONFIG_SYS_IDE_MAXDEVICE        1
 
-#define CONFIG_SYS_ATA_BASE_ADDR       0x0c000000
-#define CONFIG_SYS_ATA_IDE0_OFFSET     0x0
+#define        CONFIG_SYS_ATA_BASE_ADDR        0x0c000000
+#define        CONFIG_SYS_ATA_IDE0_OFFSET      0x0
 
-#define CONFIG_SYS_ATA_DATA_OFFSET     0x120
-#define CONFIG_SYS_ATA_REG_OFFSET      0x120
-#define CONFIG_SYS_ATA_ALT_OFFSET      0x120
+#define        CONFIG_SYS_ATA_DATA_OFFSET      0x120
+#define        CONFIG_SYS_ATA_REG_OFFSET       0x120
+#define        CONFIG_SYS_ATA_ALT_OFFSET       0x120
 
 #define        CONFIG_SYS_ATA_STRIDE           2
 #endif
 #define        CONFIG_SYS_MSC0_VAL     0x3ffc95fa
 #define        CONFIG_SYS_MSC1_VAL     0x02ccf974
 #define        CONFIG_SYS_MSC2_VAL     0x00000000
+#ifdef CONFIG_RAM_256M
 #define        CONFIG_SYS_MDCNFG_VAL   0x8ad30ad3
+#else
+#define        CONFIG_SYS_MDCNFG_VAL   0x88000ad3
+#endif
 #define        CONFIG_SYS_MDREFR_VAL   0x201fe01e
 #define        CONFIG_SYS_MDMRS_VAL    0x00000000
 #define        CONFIG_SYS_FLYCNFG_VAL  0x00000000
  * LCD
  */
 #ifdef CONFIG_LCD
-#define CONFIG_VOIPAC_LCD
+#define        CONFIG_VOIPAC_LCD
 #endif
 
 /*
  * USB
  */
-#ifdef CONFIG_CMD_USB
+#ifdef CONFIG_CMD_USB
 #define        CONFIG_USB_OHCI_NEW
 #define        CONFIG_SYS_USB_OHCI_CPU_INIT
 #define        CONFIG_SYS_USB_OHCI_BOARD_INIT
index 72ac4e33c2cde994b0f64374d1d7d44b9828620e..d10f74843d26c01665a7f19a84a8e4628d94e1e0 100644 (file)
 #define CONFIG_SYS_INIT_DCACHE_CS      4       /* use cs # 4 for data cache memory    */
 
 #define CONFIG_SYS_INIT_RAM_ADDR       0x40000000  /* inside of SDRAM                     */
-#define CONFIG_SYS_INIT_RAM_END        0x2000  /* End of used area in RAM             */
-#define CONFIG_SYS_GBL_DATA_SIZE      128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2000  /* Size of used area in RAM            */
+#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
diff --git a/include/configs/wepep250.h b/include/configs/wepep250.h
deleted file mode 100644 (file)
index 9a20cce..0000000
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Copyright (C) 2003 ETC s.r.o.
- *
- * 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
- *
- * Written by Peter Figuli <peposh@etc.sk>, 2003.
- *
- */
-
-#ifndef __CONFIG_H
-#define __CONFIG_H
-
-#define CONFIG_PXA250          1        /* this is an PXA250 CPU     */
-#define CONFIG_WEPEP250        1        /* config for wepep250 board */
-#undef  CONFIG_USE_IRQ                  /* don't need use IRQ/FIQ    */
-
-/* we will never enable dcache, because we have to setup MMU first */
-#define CONFIG_SYS_NO_DCACHE
-
-/*
- * Select serial console configuration
- */
-#define CONFIG_PXA_SERIAL
-#define CONFIG_BTUART          1       /* BTUART is default on WEP dev board */
-#define CONFIG_BAUDRATE   115200
-
-
-/*
- * BOOTP options
- */
-#define CONFIG_BOOTP_BOOTFILESIZE
-#define CONFIG_BOOTP_BOOTPATH
-#define CONFIG_BOOTP_GATEWAY
-#define CONFIG_BOOTP_HOSTNAME
-
-
-/*
- * Command line configuration.
- */
-#include <config_cmd_default.h>
-
-#undef CONFIG_CMD_CONSOLE
-#undef CONFIG_CMD_LOADS
-#undef CONFIG_CMD_NET
-#undef CONFIG_CMD_SOURCE
-
-
-/*
- * Boot options. Setting delay to -1 stops autostart count down.
- * NOTE: Sending parameters to kernel depends on kernel version and
- * 2.4.19-rmk6-pxa1 patch used while my u-boot coding didn't accept
- * parameters at all! Do not get confused by them so.
- */
-#define CONFIG_BOOTDELAY   -1
-#define CONFIG_BOOTARGS    "root=/dev/mtdblock2 mem=32m console=ttyS01,115200n8"
-#define CONFIG_BOOTCOMMAND "bootm 40000"
-
-
-/*
- * General options for u-boot. Modify to save memory foot print
- */
-#define CONFIG_SYS_LONGHELP                                  /* undef saves memory  */
-#define CONFIG_SYS_PROMPT              "WEP> "               /* prompt string       */
-#define CONFIG_SYS_CBSIZE              256                   /* console I/O buffer  */
-#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* print buffer size   */
-#define CONFIG_SYS_MAXARGS             16                    /* max command args    */
-#define CONFIG_SYS_BARGSIZE            CONFIG_SYS_CBSIZE            /* boot args buf size  */
-
-#define CONFIG_SYS_MEMTEST_START       0xa0400000            /* memtest test area   */
-#define CONFIG_SYS_MEMTEST_END         0xa0800000
-
-#define CONFIG_SYS_HZ                  1000
-#define CONFIG_SYS_CPUSPEED            0x141        /* core clock - register value  */
-
-#define CONFIG_SYS_BAUDRATE_TABLE      { 9600, 19200, 38400, 57600, 115200 }
-
-/*
- * Definitions related to passing arguments to kernel.
- */
-#define CONFIG_CMDLINE_TAG           1   /* send commandline to Kernel       */
-#define CONFIG_SETUP_MEMORY_TAGS     1   /* send memory definition to kernel */
-#undef  CONFIG_INITRD_TAG                /* do not send initrd params        */
-#undef  CONFIG_VFD                       /* do not send framebuffer setup    */
-
-
-/*
- * Malloc pool need to host env + 128 Kb reserve for other allocations.
- */
-#define CONFIG_SYS_MALLOC_LEN    (CONFIG_ENV_SIZE + (128<<10) )
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-
-#define CONFIG_STACKSIZE        (120<<10)      /* stack size */
-
-#ifdef CONFIG_USE_IRQ
-#define CONFIG_STACKSIZE_IRQ    (4<<10)        /* IRQ stack  */
-#define CONFIG_STACKSIZE_FIQ    (4<<10)        /* FIQ stack  */
-#endif
-
-/*
- * SDRAM Memory Map
- */
-#define CONFIG_NR_DRAM_BANKS    1                /* we have 1 bank of SDRAM */
-#define WEP_SDRAM_1            0xa0000000        /* SDRAM bank #1           */
-#define WEP_SDRAM_1_SIZE       0x02000000        /* 32 MB ( 2 chip )        */
-#define WEP_SDRAM_2            0xa2000000        /* SDRAM bank #2           */
-#define WEP_SDRAM_2_SIZE       0x00000000        /* 0 MB                    */
-#define WEP_SDRAM_3            0xa8000000        /* SDRAM bank #3           */
-#define WEP_SDRAM_3_SIZE       0x00000000        /* 0 MB                    */
-#define WEP_SDRAM_4            0xac000000        /* SDRAM bank #4           */
-#define WEP_SDRAM_4_SIZE       0x00000000        /* 0 MB                    */
-
-#define CONFIG_SYS_DRAM_BASE           0xa0000000
-#define CONFIG_SYS_DRAM_SIZE           0x02000000
-
-/* Uncomment used SDRAM chip */
-#define WEP_SDRAM_K4S281633
-/*#define WEP_SDRAM_K4S561633*/
-
-
-/*
- * Configuration for FLASH memory
- */
-#define CONFIG_SYS_MAX_FLASH_BANKS     1       /* FLASH banks count (not chip count)*/
-#define CONFIG_SYS_MAX_FLASH_SECT      128     /* number of sector in FLASH bank    */
-#define WEP_FLASH_BUS_WIDTH    4       /* we use 32 bit FLASH memory...     */
-#define WEP_FLASH_INTERLEAVE   2       /* ... made of 2 chips */
-#define WEP_FLASH_BANK_SIZE  0x2000000  /* size of one flash bank*/
-#define WEP_FLASH_SECT_SIZE  0x0040000  /* size of erase sector */
-#define WEP_FLASH_BASE       0x0000000  /* location of flash memory */
-#define WEP_FLASH_UNLOCK        1       /* perform hw unlock first */
-
-
-/* This should be defined if CFI FLASH device is present. Actually benefit
-   is not so clear to me. In other words we can provide more informations
-   to user, but this expects more complex flash handling we do not provide
-   now.*/
-#undef  CONFIG_SYS_FLASH_CFI
-
-#define CONFIG_SYS_FLASH_ERASE_TOUT    (2*CONFIG_SYS_HZ)    /* timeout for Erase operation */
-#define CONFIG_SYS_FLASH_WRITE_TOUT    (2*CONFIG_SYS_HZ)    /* timeout for Write operation */
-
-#define CONFIG_SYS_FLASH_BASE          WEP_FLASH_BASE
-
-/*
- * This is setting for JFFS2 support in u-boot.
- * Right now there is no gain for user, but later on booting kernel might be
- * possible. Consider using XIP kernel running from flash to save RAM
- * footprint.
- * NOTE: Enable CONFIG_CMD_JFFS2 for JFFS2 support.
- */
-#define CONFIG_SYS_JFFS2_FIRST_BANK            0
-#define CONFIG_SYS_JFFS2_FIRST_SECTOR          5
-#define CONFIG_SYS_JFFS2_NUM_BANKS             1
-
-/*
- * Environment setup. Definitions of monitor location and size with
- * definition of environment setup ends up in 2 possibilities.
- * 1. Embeded environment - in u-boot code is space for environment
- * 2. Environment is read from predefined sector of flash
- * Right now we support 2. possiblity, but expecting no env placed
- * on mentioned address right now. This also needs to provide whole
- * sector for it - for us 256Kb is really waste of memory. U-boot uses
- * default env. and until kernel parameters could be sent to kernel
- * env. has no sense to us.
- */
-
-#define CONFIG_SYS_MONITOR_BASE        PHYS_FLASH_1
-#define CONFIG_SYS_MONITOR_LEN         0x20000         /* 128kb ( 1 flash sector )  */
-#define CONFIG_ENV_IS_IN_FLASH 1
-#define CONFIG_ENV_ADDR                0x20000         /* absolute address for now  */
-#define CONFIG_ENV_SIZE                0x2000
-
-#undef  CONFIG_ENV_OVERWRITE                    /* env is not writable now   */
-
-/*
- * Well this has to be defined, but on the other hand it is used differently
- * one may expect. For instance loadb command do not cares :-)
- * So advice is - do not relay on this...
- */
-#define CONFIG_SYS_LOAD_ADDR        0x40000
-
-#endif  /* __CONFIG_H */
index 1329f0f3d85a1748162c4a3f0cd5e33e452ea50f..a75c426dfa21e32324bccafebb253a2bf5fae723 100644 (file)
@@ -42,6 +42,7 @@
  */
 #define CONFIG_PXA250          1       /* This is an PXA255 CPU    */
 #define CONFIG_XAENIAX         1       /* on a xaeniax board       */
+#define        CONFIG_SYS_TEXT_BASE    0x0
 
 
 #define BOARD_LATE_INIT                1
  * used for the RAM copy of the uboot code
  */
 #define CONFIG_SYS_MALLOC_LEN      (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * Miscellaneous configurable options
 
 #define CONFIG_SYS_FLASH_BASE          PHYS_FLASH_1
 
+#define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM_1
+#define        CONFIG_SYS_INIT_SP_ADDR         (GENERATED_GBL_DATA_SIZE + PHYS_SDRAM_1)
+
 /*
  * FLASH and environment organization
  */
  */
 #define CONFIG_SYS_PSSR_VAL            0x00000030
 
-#define CONFIG_SYS_CKEN_VAL            0x00000080  /*  */
-#define CONFIG_SYS_ICMR_VAL            0x00000000  /* No interrupts enabled        */
+#define CONFIG_SYS_CKEN                        0x00000080  /*  */
+#define CONFIG_SYS_ICMR                        0x00000000  /* No interrupts enabled        */
+#define        CONFIG_SYS_CCCR                 CCCR_L27|CCCR_M2|CCCR_N10
 
 
 /*
  */
 #define CONFIG_SYS_MDMRS_VAL           0x00320032
 
+#define        CONFIG_SYS_FLYCNFG_VAL          0x00000000
+#define        CONFIG_SYS_SXCNFG_VAL           0x00000000
+
 /*
  * PCMCIA and CF Interfaces
  */
index b4a96759355a2834562bcc6ae9cda39aebbe376c..2422c0b0c34b45ebf780d5b4eec2b73b1cafe9d7 100644 (file)
 
 /*Stack*/
 #define CONFIG_SYS_INIT_RAM_ADDR       0x800000/* Initial RAM address    */
-#define CONFIG_SYS_INIT_RAM_END                0x2000  /* End of used area in RAM  */
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* num bytes initial data   */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END \
-                               - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE               0x2000  /* Size of used area in RAM  */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE \
+                               - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 /*Speed*/
 #define CONFIG_SYS_CLK_FREQ    XPAR_CORE_CLOCK_FREQ_HZ
index cd56ce72e7c1ecd7cb3b9fe572a27e4fab7cdcad..497cb9198f8e7c33afdd1456572103ad9e39eed3 100644 (file)
@@ -35,6 +35,7 @@
 #define CONFIG_PXA250         1        /* This is an PXA250 CPU        */
 #define CONFIG_XM250          1        /* on a MicroSys XM250 Board    */
 #undef CONFIG_USE_IRQ                  /* we don't need IRQ/FIQ stuff  */
+#define        CONFIG_SYS_TEXT_BASE    0x0
 
 /* we will never enable dcache, because we have to setup MMU first */
 #define CONFIG_SYS_NO_DCACHE
@@ -45,7 +46,6 @@
  *
  */
 #define CONFIG_SYS_MALLOC_LEN          (256*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
 
 #define CONFIG_SYS_FLASH_BASE          PHYS_FLASH_1
 
+#define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM_1
+#define        CONFIG_SYS_INIT_SP_ADDR         (GENERATED_GBL_DATA_SIZE + PHYS_SDRAM_1)
+
 /*
  * FLASH and environment organization
  */
  * Clocks, power control and interrupts
  */
 #define CONFIG_SYS_PSSR_VAL        0x00000030
-#define CONFIG_SYS_CCCR_VAL        0x00000161  /* 100 MHz memory, 400 MHz CPU, 400 Turbo  */
-#define CONFIG_SYS_CKEN_VAL        0x000141ec  /* FFUART and STUART enabled    */
-#define CONFIG_SYS_ICMR_VAL        0x00000000  /* No interrupts enabled        */
+#define CONFIG_SYS_CCCR                    0x00000161  /* 100 MHz memory, 400 MHz CPU, 400 Turbo  */
+#define CONFIG_SYS_CKEN                    0x000141ec  /* FFUART and STUART enabled    */
+#define CONFIG_SYS_ICMR                    0x00000000  /* No interrupts enabled        */
 
 /* FIXME
  *
 #define CONFIG_SYS_MDCNFG_VAL      0x000009c9
 #define CONFIG_SYS_MDMRS_VAL       0x00220022
 #define CONFIG_SYS_MDREFR_VAL      0x000da018  /* Initial setting, individual bits set in lowlevel_init.S */
+#define        CONFIG_SYS_FLYCNFG_VAL          0x00000000
+#define        CONFIG_SYS_SXCNFG_VAL           0x00000000
 
 /*
  * PCMCIA and CF Interfaces (NOT USED, these values from lubbock init)
diff --git a/include/configs/xpedite1000.h b/include/configs/xpedite1000.h
new file mode 100644 (file)
index 0000000..cd7148d
--- /dev/null
@@ -0,0 +1,357 @@
+/*
+ * (C) Copyright 2002 Scott McNutt <smcnutt@artesyncp.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
+ */
+
+/*
+ * config for XPedite1000 from XES Inc.
+ * Ported from EBONY config by Travis B. Sawyer <tsawyer@sandburst.com>
+ * (C) Copyright 2003 Sandburst Corporation
+ * board/config_EBONY.h - configuration for AMCC 440GP Ref (Ebony)
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+/* High Level Configuration Options */
+#define CONFIG_XPEDITE1000     1
+#define CONFIG_SYS_BOARD_NAME  "XPedite1000"
+#define CONFIG_SYS_FORM_PMC    1
+#define CONFIG_4xx             1               /* ... PPC4xx family */
+#define CONFIG_440             1
+#define CONFIG_440GX           1               /* 440 GX */
+#define CONFIG_BOARD_EARLY_INIT_F 1            /* Call board_pre_init  */
+#define CONFIG_SYS_CLK_FREQ    33333333        /* external freq to pll */
+
+#define        CONFIG_SYS_TEXT_BASE    0xFFF80000
+
+/*
+ * DDR config
+ */
+#define CONFIG_SPD_EEPROM              /* Use SPD EEPROM for setup */
+#define SPD_EEPROM_ADDRESS     {0x54}  /* SPD i2c spd addresses */
+#define CONFIG_VERY_BIG_RAM    1
+
+/*
+ * Base addresses -- Note these are effective addresses where the
+ * actual resources get mapped (not physical addresses)
+ */
+#define CONFIG_SYS_SDRAM_BASE          0x00000000
+#define CONFIG_SYS_FLASH_BASE          0xff000000      /* start of FLASH */
+#define CONFIG_SYS_MONITOR_BASE                CONFIG_SYS_TEXT_BASE    /* start of monitor */
+#define CONFIG_SYS_PCI_MEMBASE         0x80000000      /* mapped pci memory */
+#define CONFIG_SYS_ISRAM_BASE          0xc0000000      /* internal SRAM */
+#define CONFIG_SYS_PCI_BASE            0xd0000000      /* internal PCI regs */
+#define CONFIG_SYS_NVRAM_BASE_ADDR     (CONFIG_SYS_PERIPHERAL_BASE + 0x08000000)
+#define CONFIG_SYS_GPIO_BASE           (CONFIG_SYS_PERIPHERAL_BASE + 0x00000700)
+
+/*
+ * Diagnostics
+ */
+#define CONFIG_SYS_ALT_MEMTEST
+#define CONFIG_SYS_MEMTEST_START       0x0400000
+#define CONFIG_SYS_MEMTEST_END         0x0C00000
+
+/* POST support */
+#define CONFIG_POST            (CONFIG_SYS_POST_RTC    | \
+                                CONFIG_SYS_POST_I2C)
+
+/*
+ * LED support
+ */
+#define USR_LED0       0x00000080
+#define USR_LED1       0x00000100
+#define USR_LED2       0x00000200
+#define USR_LED3       0x00000400
+
+#ifndef __ASSEMBLY__
+extern unsigned long in32(unsigned int);
+extern void out32(unsigned int, unsigned long);
+
+#define LED0_ON() out32(CONFIG_SYS_GPIO_BASE, (in32(CONFIG_SYS_GPIO_BASE) & ~USR_LED0))
+#define LED1_ON() out32(CONFIG_SYS_GPIO_BASE, (in32(CONFIG_SYS_GPIO_BASE) & ~USR_LED1))
+#define LED2_ON() out32(CONFIG_SYS_GPIO_BASE, (in32(CONFIG_SYS_GPIO_BASE) & ~USR_LED2))
+#define LED3_ON() out32(CONFIG_SYS_GPIO_BASE, (in32(CONFIG_SYS_GPIO_BASE) & ~USR_LED3))
+
+#define LED0_OFF() out32(CONFIG_SYS_GPIO_BASE, (in32(CONFIG_SYS_GPIO_BASE) | USR_LED0))
+#define LED1_OFF() out32(CONFIG_SYS_GPIO_BASE, (in32(CONFIG_SYS_GPIO_BASE) | USR_LED1))
+#define LED2_OFF() out32(CONFIG_SYS_GPIO_BASE, (in32(CONFIG_SYS_GPIO_BASE) | USR_LED2))
+#define LED3_OFF() out32(CONFIG_SYS_GPIO_BASE, (in32(CONFIG_SYS_GPIO_BASE) | USR_LED3))
+#endif
+
+/*
+ * Use internal SRAM for initial stack
+ */
+#define CONFIG_SYS_TEMP_STACK_OCM      1
+#define CONFIG_SYS_OCM_DATA_ADDR       CONFIG_SYS_ISRAM_BASE
+#define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_ISRAM_BASE   /* Initial RAM address */
+#define CONFIG_SYS_INIT_RAM_SIZE               0x2000  /* Size of used area in RAM */
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_SP_OFFSET      (CONFIG_SYS_GBL_DATA_OFFSET - 0x4)
+
+#define CONFIG_SYS_MONITOR_LEN (512 * 1024)    /* Reserve 512 KB for Mon */
+#define CONFIG_SYS_MALLOC_LEN  (1024 * 1024)   /* Reserved for malloc */
+
+/*
+ * Serial Port
+ */
+#define CONFIG_CONS_INDEX      1       /* Use UART0                    */
+#define CONFIG_SYS_NS16550
+#define CONFIG_SYS_NS16550_SERIAL
+#define CONFIG_SYS_NS16550_REG_SIZE    1
+#define CONFIG_SYS_NS16550_CLK         get_serial_clock()
+
+#define CONFIG_SYS_BAUDRATE_TABLE \
+       {300, 600, 1200, 2400, 4800, 9600, 19200, 38400}
+#define CONFIG_BAUDRATE                        115200
+#define CONFIG_LOADS_ECHO              1       /* echo on for serial download */
+#define CONFIG_SYS_LOADS_BAUD_CHANGE   1       /* allow baudrate change */
+
+/*
+ * Use the HUSH parser
+ */
+#define CONFIG_SYS_HUSH_PARSER
+#define CONFIG_SYS_PROMPT_HUSH_PS2     "> "
+
+/*
+ * NOR flash configuration
+ */
+#define CONFIG_SYS_MAX_FLASH_BANKS     3
+#define CONFIG_SYS_FLASH_BANKS_LIST    {CONFIG_SYS_FLASH_BASE, 0xf0000000, 0xf4000000 }
+#define CONFIG_SYS_MAX_FLASH_SECT      512     /* sectors per device */
+#define CONFIG_FLASH_CFI_DRIVER
+#define CONFIG_SYS_FLASH_CFI
+#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
+#define CONFIG_SYS_FLASH_QUIET_TEST            /* MirrorBit flashes are optional */
+#define CONFIG_SYS_FLASH_ERASE_TOUT    120000  /* Timeout for Flash Erase (in ms) */
+#define CONFIG_SYS_FLASH_WRITE_TOUT    500     /* Timeout for Flash Write (in ms) */
+
+/*
+ * I2C
+ */
+#define CONFIG_HARD_I2C                        1       /* I2C with hardware support */
+#define CONFIG_PPC4XX_I2C              /* use PPC4xx driver            */
+#define CONFIG_SYS_I2C_SPEED           400000  /* I2C speed and slave address */
+#define CONFIG_SYS_I2C_SLAVE           0x7f
+#define CONFIG_I2C_MULTI_BUS
+
+/* I2C EEPROM */
+#define CONFIG_SYS_I2C_EEPROM_ADDR             0x50
+#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN         1
+#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS      3
+#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS  10
+
+/* I2C RTC: STMicro M41T00 */
+#define CONFIG_RTC_M41T11              1
+#define CONFIG_SYS_I2C_RTC_ADDR                0x68
+#define CONFIG_SYS_M41T11_BASE_YEAR    2000
+
+/*
+ * PCI
+ */
+/* General PCI */
+#define CONFIG_PCI                             /* include pci support */
+#define CONFIG_PCI_PNP                         /* do pci plug-and-play */
+#define CONFIG_PCI_SCAN_SHOW                   /* show pci devices on startup */
+#define CONFIG_SYS_PCI_TARGBASE        0x80000000      /* PCIaddr mapped to CONFIG_SYS_PCI_MEMBASE */
+
+/* Board-specific PCI */
+#define CONFIG_SYS_PCI_TARGET_INIT             /* let board init pci target */
+#define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1014  /* IBM */
+#define CONFIG_SYS_PCI_SUBSYS_DEVICEID 0xcafe  /* Whatever */
+#define CONFIG_SYS_PCI_FORCE_PCI_CONV          /* Force PCI Conventional Mode */
+
+/*
+ * Networking options
+ */
+#define CONFIG_PPC4xx_EMAC
+#define CONFIG_PHY_GIGE                1       /* Include GbE speed/duplex detection */
+#define CONFIG_NET_MULTI       1
+#define CONFIG_MII             1       /* MII PHY management */
+#define CONFIG_PHY_RESET       1       /* reset phy upon startup */
+#define CONFIG_SYS_RX_ETH_BUFFER 32    /* Number of ethernet rx buffers & descriptors */
+#define CONFIG_ETHPRIME                "ppc_4xx_eth2"
+#define CONFIG_PHY_ADDR                4       /* PHY address phy0 not populated */
+#define CONFIG_PHY2_ADDR       4       /* PHY address phy2 */
+#define CONFIG_HAS_ETH2                1       /* add support for "eth2addr" */
+#define CONFIG_PHY3_ADDR       8       /* PHY address phy3 */
+#define CONFIG_HAS_ETH3                1       /* add support for "eth3addr" */
+
+/* BOOTP options */
+#define CONFIG_BOOTP_BOOTFILESIZE
+#define CONFIG_BOOTP_BOOTPATH
+#define CONFIG_BOOTP_GATEWAY
+#define CONFIG_BOOTP_HOSTNAME
+
+/*
+ * Command configuration
+ */
+#include <config_cmd_default.h>
+
+#define CONFIG_CMD_ASKENV
+#define CONFIG_CMD_DATE
+#define CONFIG_CMD_DHCP
+#define CONFIG_CMD_EEPROM
+#define CONFIG_CMD_ELF
+#define CONFIG_CMD_FLASH
+#define CONFIG_CMD_I2C
+#define CONFIG_CMD_IRQ
+#define CONFIG_CMD_JFFS2
+#define CONFIG_CMD_MII
+#define CONFIG_CMD_NET
+#define CONFIG_CMD_PCI
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_SAVEENV
+#define CONFIG_CMD_SNTP
+
+/*
+ * Miscellaneous configurable options
+ */
+#define CONFIG_SYS_LONGHELP                    /* undef to save memory */
+#define CONFIG_SYS_LOAD_ADDR   0x100000        /* default load address */
+#define CONFIG_SYS_PROMPT      "=> "           /* Monitor Command Prompt */
+#define CONFIG_SYS_CBSIZE      256             /* Console I/O Buffer Size */
+#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
+#define CONFIG_SYS_MAXARGS     16              /* max number of command args */
+#define CONFIG_SYS_BARGSIZE    CONFIG_SYS_CBSIZE       /* Boot Argument Buffer Size */
+#define CONFIG_SYS_HZ          1000            /* decrementer freq: 1 ms ticks */
+#define CONFIG_CMDLINE_EDITING 1               /* Command-line editing */
+#define CONFIG_BOOTDELAY       3               /* -1 disables auto-boot */
+#define CONFIG_PANIC_HANG                      /* do not reset board on panic */
+#define CONFIG_PREBOOT                         /* enable preboot variable */
+#define CONFIG_FIT             1
+#define CONFIG_FIT_VERBOSE     1
+#define CONFIG_INTEGRITY                       /* support booting INTEGRITY OS */
+#define CONFIG_SYS_EXTBDINFO   1               /* To use extended board_into (bd_t) */
+
+/*
+ * For booting Linux, the board info and command line data
+ * have to be in the first 8 MB of memory, since this is
+ * the maximum mapped by the Linux kernel during initialization.
+ */
+#define CONFIG_SYS_BOOTMAPSZ           (8 << 20)       /* Initial Memory map for Linux */
+
+/*
+ * Environment Configuration
+ */
+#define CONFIG_ENV_IS_IN_FLASH 1
+#define CONFIG_ENV_SECT_SIZE   0x20000 /* 128k (one sector) for env */
+#define CONFIG_ENV_SIZE                0x8000
+#define CONFIG_ENV_ADDR                (CONFIG_SYS_MONITOR_BASE - (256 * 1024))
+
+/*
+ * Flash memory map:
+ * fff80000 - ffffffff U-Boot (512 KB)
+ * fff40000 - fff7ffff U-Boot Environment (256 KB)
+ * fff00000 - fff3ffff FDT (256KB)
+ * ffc00000 - ffefffff OS image (3MB)
+ * ff000000 - ffbfffff OS Use/Filesystem (12MB)
+ */
+
+#define CONFIG_UBOOT_ENV_ADDR  MK_STR(CONFIG_SYS_TEXT_BASE)
+#define CONFIG_FDT_ENV_ADDR    MK_STR(0xfff00000)
+#define CONFIG_OS_ENV_ADDR     MK_STR(0xffc00000)
+
+#define CONFIG_PROG_UBOOT                                              \
+       "$download_cmd $loadaddr $ubootfile; "                          \
+       "if test $? -eq 0; then "                                       \
+               "protect off "CONFIG_UBOOT_ENV_ADDR" +80000; "          \
+               "erase "CONFIG_UBOOT_ENV_ADDR" +80000; "                \
+               "cp.w $loadaddr "CONFIG_UBOOT_ENV_ADDR" 40000; "        \
+               "protect on "CONFIG_UBOOT_ENV_ADDR" +80000; "           \
+               "cmp.b $loadaddr "CONFIG_UBOOT_ENV_ADDR" 80000; "       \
+               "if test $? -ne 0; then "                               \
+                       "echo PROGRAM FAILED; "                         \
+               "else; "                                                \
+                       "echo PROGRAM SUCCEEDED; "                      \
+               "fi; "                                                  \
+       "else; "                                                        \
+               "echo DOWNLOAD FAILED; "                                \
+       "fi;"
+
+#define CONFIG_BOOT_OS_NET                                             \
+       "$download_cmd $osaddr $osfile; "                               \
+       "if test $? -eq 0; then "                                       \
+               "if test -n $fdtaddr; then "                            \
+                       "$download_cmd $fdtaddr $fdtfile; "             \
+                       "if test $? -eq 0; then "                       \
+                               "bootm $osaddr - $fdtaddr; "            \
+                       "else; "                                        \
+                               "echo FDT DOWNLOAD FAILED; "            \
+                       "fi; "                                          \
+               "else; "                                                \
+                       "bootm $osaddr; "                               \
+               "fi; "                                                  \
+       "else; "                                                        \
+               "echo OS DOWNLOAD FAILED; "                             \
+       "fi;"
+
+#define CONFIG_PROG_OS                                                 \
+       "$download_cmd $osaddr $osfile; "                               \
+       "if test $? -eq 0; then "                                       \
+               "erase "CONFIG_OS_ENV_ADDR" +$filesize; "               \
+               "cp.b $osaddr "CONFIG_OS_ENV_ADDR" $filesize; "         \
+               "cmp.b $osaddr "CONFIG_OS_ENV_ADDR" $filesize; "        \
+               "if test $? -ne 0; then "                               \
+                       "echo OS PROGRAM FAILED; "                      \
+               "else; "                                                \
+                       "echo OS PROGRAM SUCCEEDED; "                   \
+               "fi; "                                                  \
+       "else; "                                                        \
+               "echo OS DOWNLOAD FAILED; "                             \
+       "fi;"
+
+#define CONFIG_PROG_FDT                                                        \
+       "$download_cmd $fdtaddr $fdtfile; "                             \
+       "if test $? -eq 0; then "                                       \
+               "erase "CONFIG_FDT_ENV_ADDR" +$filesize;"               \
+               "cp.b $fdtaddr "CONFIG_FDT_ENV_ADDR" $filesize; "       \
+               "cmp.b $fdtaddr "CONFIG_FDT_ENV_ADDR" $filesize; "      \
+               "if test $? -ne 0; then "                               \
+                       "echo FDT PROGRAM FAILED; "                     \
+               "else; "                                                \
+                       "echo FDT PROGRAM SUCCEEDED; "                  \
+               "fi; "                                                  \
+       "else; "                                                        \
+               "echo FDT DOWNLOAD FAILED; "                            \
+       "fi;"
+
+#define        CONFIG_EXTRA_ENV_SETTINGS                                       \
+       "autoload=yes\0"                                                \
+       "download_cmd=tftp\0"                                           \
+       "console_args=console=ttyS0,115200\0"                           \
+       "root_args=root=/dev/nfs rw\0"                                  \
+       "misc_args=ip=on\0"                                             \
+       "set_bootargs=setenv bootargs ${console_args} ${root_args} ${misc_args}\0" \
+       "bootfile=/home/user/file\0"                                    \
+       "osfile=/home/user/board.uImage\0"                              \
+       "fdtfile=/home/user/board.dtb\0"                                \
+       "ubootfile=/home/user/u-boot.bin\0"                             \
+       "fdtaddr=c00000\0"                                              \
+       "osaddr=0x1000000\0"                                            \
+       "loadaddr=0x1000000\0"                                          \
+       "prog_uboot="CONFIG_PROG_UBOOT"\0"                              \
+       "prog_os="CONFIG_PROG_OS"\0"                                    \
+       "prog_fdt="CONFIG_PROG_FDT"\0"                                  \
+       "bootcmd_net=run set_bootargs; "CONFIG_BOOT_OS_NET"\0"          \
+       "bootcmd_flash=run set_bootargs; "                              \
+               "bootm "CONFIG_OS_ENV_ADDR" - "CONFIG_FDT_ENV_ADDR"\0"  \
+       "bootcmd=run bootcmd_flash\0"
+#endif /* __CONFIG_H */
diff --git a/include/configs/xpedite517x.h b/include/configs/xpedite517x.h
new file mode 100644 (file)
index 0000000..cb83a64
--- /dev/null
@@ -0,0 +1,764 @@
+/*
+ * Copyright 2009 Extreme Engineering Solutions, Inc.
+ * Copyright 2007-2008 Freescale Semiconductor, Inc.
+ *
+ * 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
+ */
+
+/*
+ * xpedite517x board configuration file
+ */
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+/*
+ * High Level Configuration Options
+ */
+#define CONFIG_MPC86xx         1       /* MPC86xx */
+#define CONFIG_MPC8641         1       /* MPC8641 specific */
+#define CONFIG_XPEDITE5140     1       /* MPC8641HPCN board specific */
+#define CONFIG_SYS_BOARD_NAME  "XPedite5170"
+#define CONFIG_SYS_FORM_3U_VPX 1
+#define CONFIG_LINUX_RESET_VEC 0x100   /* Reset vector used by Linux */
+#define CONFIG_BOARD_EARLY_INIT_R      /* Call board_pre_init */
+#define CONFIG_BAT_RW          1       /* Use common BAT rw code */
+#define CONFIG_HIGH_BATS       1       /* High BATs supported and enabled */
+#define CONFIG_ALTIVEC         1
+
+#define        CONFIG_SYS_TEXT_BASE    0xfff00000
+
+#define CONFIG_PCI             1       /* Enable PCI/PCIE */
+#define CONFIG_PCI_PNP         1       /* do pci plug-and-play */
+#define CONFIG_PCI_SCAN_SHOW   1       /* show pci devices on startup */
+#define CONFIG_PCIE1           1       /* PCIE controler 1 */
+#define CONFIG_PCIE2           1       /* PCIE controler 2 */
+#define CONFIG_FSL_PCI_INIT    1       /* Use common FSL init code */
+#define CONFIG_SYS_PCI_64BIT   1       /* enable 64-bit PCI resources */
+#define CONFIG_FSL_LAW         1       /* Use common FSL init code */
+
+/*
+ * DDR config
+ */
+#define CONFIG_FSL_DDR2
+#define CONFIG_SPD_EEPROM              /* Use SPD EEPROM for DDR setup */
+#define CONFIG_DDR_SPD
+#define CONFIG_MEM_INIT_VALUE          0xdeadbeef
+#define SPD_EEPROM_ADDRESS1            0x54    /* Both channels use the */
+#define SPD_EEPROM_ADDRESS2            0x54    /* same SPD data         */
+#define SPD_EEPROM_OFFSET              0x200   /* OFFSET of SPD in EEPROM */
+#define CONFIG_NUM_DDR_CONTROLLERS     2
+#define CONFIG_DIMM_SLOTS_PER_CTLR     1
+#define CONFIG_CHIP_SELECTS_PER_CTRL   1
+#define CONFIG_DDR_ECC
+#define CONFIG_ECC_INIT_VIA_DDRCONTROLLER
+#define CONFIG_SYS_DDR_SDRAM_BASE      0x00000000      /* DDR is system memory*/
+#define CONFIG_SYS_SDRAM_BASE          CONFIG_SYS_DDR_SDRAM_BASE
+#define CONFIG_VERY_BIG_RAM
+#define CONFIG_SYS_MAX_DDR_BAT_SIZE    0x80000000      /* BAT mapping size */
+
+/*
+ * virtual address to be used for temporary mappings.  There
+ * should be 128k free at this VA.
+ */
+#define CONFIG_SYS_SCRATCH_VA  0xe0000000
+
+#ifndef __ASSEMBLY__
+extern unsigned long get_board_sys_clk(unsigned long dummy);
+#endif
+
+#define CONFIG_SYS_CLK_FREQ    get_board_sys_clk(0) /* sysclk for MPC86xx */
+
+/*
+ * L2CR setup
+ */
+#define CONFIG_SYS_L2
+#define L2_INIT                0
+#define L2_ENABLE      (L2CR_L2E)
+
+/*
+ * Base addresses -- Note these are effective addresses where the
+ * actual resources get mapped (not physical addresses)
+ */
+#define CONFIG_SYS_CCSRBAR_DEFAULT     0xff700000      /* CCSRBAR Default */
+#define CONFIG_SYS_CCSRBAR             0xef000000      /* relocated CCSRBAR */
+#define CONFIG_SYS_CCSRBAR_PHYS                CONFIG_SYS_CCSRBAR
+#define CONFIG_SYS_CCSRBAR_PHYS_LOW    CONFIG_SYS_CCSRBAR
+#define CONFIG_SYS_CCSRBAR_PHYS_HIGH   0x0
+#define CONFIG_SYS_IMMR                        CONFIG_SYS_CCSRBAR
+
+/*
+ * Diagnostics
+ */
+#define CONFIG_SYS_ALT_MEMTEST
+#define CONFIG_SYS_MEMTEST_START       0x10000000
+#define CONFIG_SYS_MEMTEST_END         0x20000000
+#define CONFIG_POST                    (CONFIG_SYS_POST_MEMORY |\
+                                        CONFIG_SYS_POST_I2C)
+#define I2C_ADDR_LIST                  {CONFIG_SYS_I2C_DS1621_ADDR,    \
+                                        CONFIG_SYS_I2C_DS4510_ADDR,    \
+                                        CONFIG_SYS_I2C_EEPROM_ADDR,    \
+                                        CONFIG_SYS_I2C_LM90_ADDR,      \
+                                        CONFIG_SYS_I2C_PCA9553_ADDR,   \
+                                        CONFIG_SYS_I2C_PCA953X_ADDR0,  \
+                                        CONFIG_SYS_I2C_PCA953X_ADDR1,  \
+                                        CONFIG_SYS_I2C_PCA953X_ADDR2,  \
+                                        CONFIG_SYS_I2C_PCA953X_ADDR3,  \
+                                        CONFIG_SYS_I2C_PEX8518_ADDR,   \
+                                        CONFIG_SYS_I2C_RTC_ADDR}
+/* The XPedite5170 can host an XMC which has an EEPROM at address 0x50 */
+#define I2C_ADDR_IGNORE_LIST           {0x50}
+
+/*
+ * Memory map
+ * 0x0000_0000 0x7fff_ffff     DDR                     2G Cacheable
+ * 0x8000_0000 0xbfff_ffff     PCIe1 Mem               1G non-cacheable
+ * 0xc000_0000 0xcfff_ffff     PCIe2 Mem               256M non-cacheable
+ * 0xe000_0000 0xe7ff_ffff     SRAM/SSRAM/L1 Cache     128M non-cacheable
+ * 0xe800_0000 0xe87f_ffff     PCIe1 IO                8M non-cacheable
+ * 0xe880_0000 0xe8ff_ffff     PCIe2 IO                8M non-cacheable
+ * 0xef00_0000 0xef0f_ffff     CCSR/IMMR               1M non-cacheable
+ * 0xef80_0000 0xef8f_ffff     NAND Flash              1M non-cacheable
+ * 0xf000_0000 0xf7ff_ffff     NOR Flash 2             128M non-cacheable
+ * 0xf800_0000 0xffff_ffff     NOR Flash 1             128M non-cacheable
+ */
+
+#define CONFIG_SYS_LBC_LCRR            (LCRR_CLKDIV_4 | LCRR_EADC_3)
+
+/*
+ * NAND flash configuration
+ */
+#define CONFIG_SYS_NAND_BASE           0xef800000
+#define CONFIG_SYS_NAND_BASE2          0xef840000      /* Unused at this time */
+#define CONFIG_SYS_NAND_BASE_LIST      {CONFIG_SYS_NAND_BASE, CONFIG_SYS_NAND_BASE2}
+#define CONFIG_SYS_MAX_NAND_DEVICE     2
+#define CONFIG_NAND_ACTL
+#define CONFIG_SYS_NAND_ACTL_ALE       (1 << 14)       /* C_LA14 */
+#define CONFIG_SYS_NAND_ACTL_CLE       (1 << 15)       /* C_LA15 */
+#define CONFIG_SYS_NAND_ACTL_NCE       0               /* NCE not controlled by ADDR */
+#define CONFIG_SYS_NAND_ACTL_DELAY     25
+#define CONFIG_SYS_NAND_QUIET_TEST
+#define CONFIG_JFFS2_NAND
+
+/*
+ * NOR flash configuration
+ */
+#define CONFIG_SYS_FLASH_BASE          0xf8000000
+#define CONFIG_SYS_FLASH_BASE2         0xf0000000
+#define CONFIG_SYS_FLASH_BANKS_LIST    {CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FLASH_BASE2}
+#define CONFIG_SYS_MAX_FLASH_BANKS     2               /* number of banks */
+#define CONFIG_SYS_MAX_FLASH_SECT      1024            /* sectors per device */
+#define CONFIG_SYS_FLASH_ERASE_TOUT    60000           /* Flash Erase Timeout (ms) */
+#define CONFIG_SYS_FLASH_WRITE_TOUT    500             /* Flash Write Timeout (ms) */
+#define CONFIG_FLASH_CFI_DRIVER
+#define CONFIG_SYS_FLASH_CFI
+#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
+#define CONFIG_SYS_FLASH_AUTOPROTECT_LIST      { {0xfff00000, 0xc0000}, \
+                                                 {0xf7f00000, 0xc0000} }
+#define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE    /* start of monitor */
+#define CONFIG_SYS_MONITOR_BASE_EARLY  0xfff00000      /* early monitor loc */
+
+/*
+ * Chip select configuration
+ */
+/* NOR Flash 0 on CS0 */
+#define CONFIG_SYS_BR0_PRELIM  (CONFIG_SYS_FLASH_BASE  |\
+                                BR_PS_16               |\
+                                BR_V)
+#define CONFIG_SYS_OR0_PRELIM  (OR_AM_128MB            |\
+                                OR_GPCM_CSNT           |\
+                                OR_GPCM_XACS           |\
+                                OR_GPCM_ACS_DIV2       |\
+                                OR_GPCM_SCY_8          |\
+                                OR_GPCM_TRLX           |\
+                                OR_GPCM_EHTR           |\
+                                OR_GPCM_EAD)
+
+/* NOR Flash 1 on CS1 */
+#define CONFIG_SYS_BR1_PRELIM  (CONFIG_SYS_FLASH_BASE2 |\
+                                BR_PS_16               |\
+                                BR_V)
+#define CONFIG_SYS_OR1_PRELIM  CONFIG_SYS_OR0_PRELIM
+
+/* NAND flash on CS2 */
+#define CONFIG_SYS_BR2_PRELIM  (CONFIG_SYS_NAND_BASE   |\
+                                BR_PS_8                |\
+                                BR_V)
+#define CONFIG_SYS_OR2_PRELIM  (OR_AM_256KB            |\
+                                OR_GPCM_BCTLD          |\
+                                OR_GPCM_CSNT           |\
+                                OR_GPCM_ACS_DIV4       |\
+                                OR_GPCM_SCY_4          |\
+                                OR_GPCM_TRLX           |\
+                                OR_GPCM_EHTR)
+
+/* Optional NAND flash on CS3 */
+#define CONFIG_SYS_BR3_PRELIM  (CONFIG_SYS_NAND_BASE2  |\
+                                BR_PS_8                |\
+                                BR_V)
+#define CONFIG_SYS_OR3_PRELIM  CONFIG_SYS_OR2_PRELIM
+
+/*
+ * Use L1 as initial stack
+ */
+#define CONFIG_SYS_INIT_RAM_LOCK       1
+#define CONFIG_SYS_INIT_RAM_ADDR       0xe0000000
+#define CONFIG_SYS_INIT_RAM_SIZE               0x00004000
+
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
+
+#define CONFIG_SYS_MONITOR_LEN         (512 * 1024)    /* Reserve 512 KB for Mon */
+#define CONFIG_SYS_MALLOC_LEN          (1024 * 1024)   /* Reserved for malloc */
+
+/*
+ * Serial Port
+ */
+#define CONFIG_CONS_INDEX              1
+#define CONFIG_SYS_NS16550
+#define CONFIG_SYS_NS16550_SERIAL
+#define CONFIG_SYS_NS16550_REG_SIZE    1
+#define CONFIG_SYS_NS16550_CLK         get_bus_freq(0)
+#define CONFIG_SYS_NS16550_COM1        (CONFIG_SYS_CCSRBAR+0x4500)
+#define CONFIG_SYS_NS16550_COM2        (CONFIG_SYS_CCSRBAR+0x4600)
+#define CONFIG_SYS_BAUDRATE_TABLE      \
+       {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200}
+#define CONFIG_BAUDRATE                        115200
+#define CONFIG_LOADS_ECHO              1       /* echo on for serial download */
+#define CONFIG_SYS_LOADS_BAUD_CHANGE   1       /* allow baudrate change */
+
+/*
+ * Use the HUSH parser
+ */
+#define CONFIG_SYS_HUSH_PARSER
+#define CONFIG_SYS_PROMPT_HUSH_PS2     "> "
+
+/*
+ * Pass open firmware flat tree
+ */
+#define CONFIG_OF_LIBFDT               1
+#define CONFIG_OF_BOARD_SETUP          1
+#define CONFIG_OF_STDOUT_VIA_ALIAS     1
+
+/*
+ * I2C
+ */
+#define CONFIG_FSL_I2C                         /* Use FSL common I2C driver */
+#define CONFIG_HARD_I2C                                /* I2C with hardware support */
+#define CONFIG_SYS_I2C_SPEED           100000  /* M41T00 only supports 100 KHz */
+#define CONFIG_SYS_I2C_SLAVE           0x7F
+#define CONFIG_SYS_I2C_OFFSET          0x3000
+#define CONFIG_SYS_I2C2_OFFSET         0x3100
+#define CONFIG_I2C_MULTI_BUS
+
+/* PEX8518 slave I2C interface */
+#define CONFIG_SYS_I2C_PEX8518_ADDR    0x70
+
+/* I2C DS1631 temperature sensor */
+#define CONFIG_SYS_I2C_DS1621_ADDR     0x48
+#define CONFIG_DTT_DS1621
+#define CONFIG_DTT_SENSORS             { 0 }
+#define CONFIG_SYS_I2C_LM90_ADDR       0x4c
+
+/* I2C EEPROM - AT24C128B */
+#define CONFIG_SYS_I2C_EEPROM_ADDR             0x54
+#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN         2
+#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS      6       /* 64 byte pages */
+#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS  10      /* take up to 10 msec */
+
+/* I2C RTC */
+#define CONFIG_RTC_M41T11              1
+#define CONFIG_SYS_I2C_RTC_ADDR                0x68
+#define CONFIG_SYS_M41T11_BASE_YEAR    2000
+
+/* GPIO/EEPROM/SRAM */
+#define CONFIG_DS4510
+#define CONFIG_SYS_I2C_DS4510_ADDR     0x51
+
+/* GPIO */
+#define CONFIG_PCA953X
+#define CONFIG_SYS_I2C_PCA953X_ADDR0   0x18
+#define CONFIG_SYS_I2C_PCA953X_ADDR1   0x1c
+#define CONFIG_SYS_I2C_PCA953X_ADDR2   0x1e
+#define CONFIG_SYS_I2C_PCA953X_ADDR3   0x1f
+#define CONFIG_SYS_I2C_PCA953X_ADDR    CONFIG_SYS_I2C_PCA953X_ADDR0
+#define CONFIG_SYS_I2C_PCA9553_ADDR    0x62
+
+/*
+ * PU = pulled high, PD = pulled low
+ * I = input, O = output, IO = input/output
+ */
+/* PCA9557 @ 0x18*/
+#define CONFIG_SYS_PCA953X_C0_SER0_EN          0x01 /* PU; UART0 enable (1: enabled) */
+#define CONFIG_SYS_PCA953X_C0_SER0_MODE                0x02 /* PU; UART0 serial mode select */
+#define CONFIG_SYS_PCA953X_C0_SER1_EN          0x04 /* PU; UART1 enable (1: enabled) */
+#define CONFIG_SYS_PCA953X_C0_SER1_MODE                0x08 /* PU; UART1 serial mode select */
+#define CONFIG_SYS_PCA953X_C0_FLASH_PASS_CS    0x10 /* PU; Boot flash CS select */
+#define CONFIG_SYS_PCA953X_NVM_WP              0x20 /* PU; Set to 0 to enable NVM writing */
+
+/* PCA9557 @ 0x1c*/
+#define CONFIG_SYS_PCA953X_XMC0_ROOT0          0x01 /* PU; Low if XMC is RC */
+#define CONFIG_SYS_PCA953X_PLUG_GPIO0          0x02 /* Samtec connector GPIO */
+#define CONFIG_SYS_PCA953X_XMC0_WAKE           0x04 /* PU; XMC wake */
+#define CONFIG_SYS_PCA953X_XMC0_BIST           0x08 /* PU; XMC built in self test */
+#define CONFIG_SYS_PCA953X_XMC_PRESENT         0x10 /* PU; Low if XMC module installed */
+#define CONFIG_SYS_PCA953X_PMC_PRESENT         0x20 /* PU; Low if PMC module installed */
+#define CONFIG_SYS_PCA953X_PMC0_MONARCH                0x40 /* PMC monarch mode enable */
+#define CONFIG_SYS_PCA953X_PMC0_EREADY         0x80 /* PU; PMC PCI eready */
+
+/* PCA9557 @ 0x1e*/
+#define CONFIG_SYS_PCA953X_P0_GA0              0x01 /* PU; VPX Geographical address */
+#define CONFIG_SYS_PCA953X_P0_GA1              0x02 /* PU; VPX Geographical address */
+#define CONFIG_SYS_PCA953X_P0_GA2              0x04 /* PU; VPX Geographical address */
+#define CONFIG_SYS_PCA953X_P0_GA3              0x08 /* PU; VPX Geographical address */
+#define CONFIG_SYS_PCA953X_P0_GA4              0x10 /* PU; VPX Geographical address */
+#define CONFIG_SYS_PCA953X_P0_GAP              0x20 /* PU; VPX Geographical address parity */
+#define CONFIG_SYS_PCA953X_P1_SYSEN            0x80 /* PU; VPX P1 SYSCON */
+
+/* PCA9557 @ 0x1f */
+#define CONFIG_SYS_PCA953X_VPX_GPIO0           0x01 /* PU; VPX P15 GPIO */
+#define CONFIG_SYS_PCA953X_VPX_GPIO1           0x02 /* PU; VPX P15 GPIO */
+#define CONFIG_SYS_PCA953X_VPX_GPIO2           0x04 /* PU; VPX P15 GPIO */
+#define CONFIG_SYS_PCA953X_VPX_GPIO3           0x08 /* PU; VPX P15 GPIO */
+
+/*
+ * General PCI
+ * Memory space is mapped 1-1, but I/O space must start from 0.
+ */
+/* PCIE1 - PEX8518 */
+#define CONFIG_SYS_PCIE1_MEM_BUS       0x80000000
+#define CONFIG_SYS_PCIE1_MEM_PHYS      CONFIG_SYS_PCIE1_MEM_BUS
+#define CONFIG_SYS_PCIE1_MEM_SIZE      0x40000000      /* 1G */
+#define CONFIG_SYS_PCIE1_IO_BUS                0x00000000
+#define CONFIG_SYS_PCIE1_IO_PHYS       0xe8000000
+#define CONFIG_SYS_PCIE1_IO_SIZE       0x00800000      /* 8M */
+
+/* PCIE2 - VPX P1 */
+#define CONFIG_SYS_PCIE2_MEM_BUS       0xc0000000
+#define CONFIG_SYS_PCIE2_MEM_PHYS      CONFIG_SYS_PCIE2_MEM_BUS
+#define CONFIG_SYS_PCIE2_MEM_SIZE      0x10000000      /* 256M */
+#define CONFIG_SYS_PCIE2_IO_BUS                0x00000000
+#define CONFIG_SYS_PCIE2_IO_PHYS       0xe8800000
+#define CONFIG_SYS_PCIE2_IO_SIZE       0x00800000      /* 8M */
+
+/*
+ * Networking options
+ */
+#define CONFIG_TSEC_ENET               /* tsec ethernet support */
+#define CONFIG_PHY_GIGE                1       /* Include GbE speed/duplex detection */
+#define CONFIG_NET_MULTI       1
+#define CONFIG_MII             1       /* MII PHY management */
+#define CONFIG_ETHPRIME                "eTSEC1"
+
+#define CONFIG_TSEC1           1
+#define CONFIG_TSEC1_NAME      "eTSEC1"
+#define TSEC1_FLAGS            (TSEC_GIGABIT | TSEC_REDUCED)
+#define TSEC1_PHY_ADDR         1
+#define TSEC1_PHYIDX           0
+#define CONFIG_HAS_ETH0
+
+#define CONFIG_TSEC2           1
+#define CONFIG_TSEC2_NAME      "eTSEC2"
+#define TSEC2_FLAGS            (TSEC_GIGABIT | TSEC_REDUCED)
+#define TSEC2_PHY_ADDR         2
+#define TSEC2_PHYIDX           0
+#define CONFIG_HAS_ETH1
+
+/*
+ * BAT mappings
+ */
+#if (CONFIG_SYS_CCSRBAR_DEFAULT != CONFIG_SYS_CCSRBAR)
+#define CONFIG_SYS_CCSR_DEFAULT_DBATL  (CONFIG_SYS_CCSRBAR_DEFAULT     |\
+                                        BATL_PP_RW                     |\
+                                        BATL_CACHEINHIBIT              |\
+                                        BATL_GUARDEDSTORAGE)
+#define CONFIG_SYS_CCSR_DEFAULT_DBATU  (CONFIG_SYS_CCSRBAR_DEFAULT     |\
+                                        BATU_BL_1M                     |\
+                                        BATU_VS                        |\
+                                        BATU_VP)
+#define CONFIG_SYS_CCSR_DEFAULT_IBATL  (CONFIG_SYS_CCSRBAR_DEFAULT     |\
+                                        BATL_PP_RW                     |\
+                                        BATL_CACHEINHIBIT)
+#define CONFIG_SYS_CCSR_DEFAULT_IBATU  CONFIG_SYS_CCSR_DEFAULT_DBATU
+#endif
+
+/*
+ * BAT0                2G      Cacheable, non-guarded
+ * 0x0000_0000 2G      DDR
+ */
+#define CONFIG_SYS_DBAT0L      (BATL_PP_RW | BATL_MEMCOHERENCE)
+#define CONFIG_SYS_DBAT0U      (BATU_BL_2G | BATU_VS | BATU_VP)
+#define CONFIG_SYS_IBAT0L      (BATL_PP_RW | BATL_MEMCOHERENCE)
+#define CONFIG_SYS_IBAT0U      CONFIG_SYS_DBAT0U
+
+/*
+ * BAT1                1G      Cache-inhibited, guarded
+ * 0x8000_0000 1G      PCI-Express 1 Memory
+ */
+#define CONFIG_SYS_DBAT1L      (CONFIG_SYS_PCIE1_MEM_PHYS      |\
+                                BATL_PP_RW                     |\
+                                BATL_CACHEINHIBIT              |\
+                                BATL_GUARDEDSTORAGE)
+#define CONFIG_SYS_DBAT1U      (CONFIG_SYS_PCIE1_MEM_PHYS      |\
+                                BATU_BL_1G                     |\
+                                BATU_VS                        |\
+                                BATU_VP)
+#define CONFIG_SYS_IBAT1L      (CONFIG_SYS_PCIE1_MEM_PHYS      |\
+                                BATL_PP_RW                     |\
+                                BATL_CACHEINHIBIT)
+#define CONFIG_SYS_IBAT1U      CONFIG_SYS_DBAT1U
+
+/*
+ * BAT2                512M    Cache-inhibited, guarded
+ * 0xc000_0000 512M    PCI-Express 2 Memory
+ */
+#define CONFIG_SYS_DBAT2L      (CONFIG_SYS_PCIE2_MEM_PHYS      |\
+                                BATL_PP_RW                     |\
+                                BATL_CACHEINHIBIT              |\
+                                BATL_GUARDEDSTORAGE)
+#define CONFIG_SYS_DBAT2U      (CONFIG_SYS_PCIE2_MEM_PHYS      |\
+                                BATU_BL_512M                   |\
+                                BATU_VS                        |\
+                                BATU_VP)
+#define CONFIG_SYS_IBAT2L      (CONFIG_SYS_PCIE2_MEM_PHYS      |\
+                                BATL_PP_RW                     |\
+                                BATL_CACHEINHIBIT)
+#define CONFIG_SYS_IBAT2U      CONFIG_SYS_DBAT2U
+
+/*
+ * BAT3                1M      Cache-inhibited, guarded
+ * 0xe000_0000 1M      CCSR
+ */
+#define CONFIG_SYS_DBAT3L      (CONFIG_SYS_CCSRBAR             |\
+                                BATL_PP_RW                     |\
+                                BATL_CACHEINHIBIT              |\
+                                BATL_GUARDEDSTORAGE)
+#define CONFIG_SYS_DBAT3U      (CONFIG_SYS_CCSRBAR             |\
+                                BATU_BL_1M                     |\
+                                BATU_VS                        |\
+                                BATU_VP)
+#define CONFIG_SYS_IBAT3L      (CONFIG_SYS_CCSRBAR             |\
+                                BATL_PP_RW                     |\
+                                BATL_CACHEINHIBIT)
+#define CONFIG_SYS_IBAT3U      CONFIG_SYS_DBAT3U
+
+/*
+ * BAT4                32M     Cache-inhibited, guarded
+ * 0xe200_0000 16M     PCI-Express 1 I/O
+ * 0xe300_0000 16M     PCI-Express 2 I/0
+ */
+#define CONFIG_SYS_DBAT4L      (CONFIG_SYS_PCIE1_IO_PHYS       |\
+                                BATL_PP_RW                     |\
+                                BATL_CACHEINHIBIT              |\
+                                BATL_GUARDEDSTORAGE)
+#define CONFIG_SYS_DBAT4U      (CONFIG_SYS_PCIE1_IO_PHYS       |\
+                                BATU_BL_32M                    |\
+                                BATU_VS                        |\
+                                BATU_VP)
+#define CONFIG_SYS_IBAT4L      (CONFIG_SYS_PCIE1_IO_PHYS       |\
+                                BATL_PP_RW                     |\
+                                BATL_CACHEINHIBIT)
+#define CONFIG_SYS_IBAT4U      CONFIG_SYS_DBAT4U
+
+/*
+ * BAT5                128K    Cacheable, non-guarded
+ * 0xe400_1000 128K    Init RAM for stack in the CPU DCache (no backing memory)
+ */
+#define CONFIG_SYS_DBAT5L      (CONFIG_SYS_INIT_RAM_ADDR       |\
+                                BATL_PP_RW                     |\
+                                BATL_MEMCOHERENCE)
+#define CONFIG_SYS_DBAT5U      (CONFIG_SYS_INIT_RAM_ADDR       |\
+                                BATU_BL_128K                   |\
+                                BATU_VS                        |\
+                                BATU_VP)
+#define CONFIG_SYS_IBAT5L      CONFIG_SYS_DBAT5L
+#define CONFIG_SYS_IBAT5U      CONFIG_SYS_DBAT5U
+
+/*
+ * BAT6                256M    Cache-inhibited, guarded
+ * 0xf000_0000 256M    FLASH
+ */
+#define CONFIG_SYS_DBAT6L      (CONFIG_SYS_FLASH_BASE2         |\
+                                BATL_PP_RW                     |\
+                                BATL_CACHEINHIBIT              |\
+                                BATL_GUARDEDSTORAGE)
+#define CONFIG_SYS_DBAT6U      (CONFIG_SYS_FLASH_BASE          |\
+                                BATU_BL_256M                   |\
+                                BATU_VS                        |\
+                                BATU_VP)
+#define CONFIG_SYS_IBAT6L      (CONFIG_SYS_FLASH_BASE          |\
+                                BATL_PP_RW                     |\
+                                BATL_MEMCOHERENCE)
+#define CONFIG_SYS_IBAT6U      CONFIG_SYS_DBAT6U
+
+/* Map the last 1M of flash where we're running from reset */
+#define CONFIG_SYS_DBAT6L_EARLY        (CONFIG_SYS_MONITOR_BASE_EARLY  |\
+                                BATL_PP_RW                     |\
+                                BATL_CACHEINHIBIT              |\
+                                BATL_GUARDEDSTORAGE)
+#define CONFIG_SYS_DBAT6U_EARLY        (CONFIG_SYS_TEXT_BASE                   |\
+                                BATU_BL_1M                     |\
+                                BATU_VS                        |\
+                                BATU_VP)
+#define CONFIG_SYS_IBAT6L_EARLY        (CONFIG_SYS_MONITOR_BASE_EARLY  |\
+                                BATL_PP_RW                     |\
+                                BATL_MEMCOHERENCE)
+#define CONFIG_SYS_IBAT6U_EARLY        CONFIG_SYS_DBAT6U_EARLY
+
+/*
+ * BAT7                64M     Cache-inhibited, guarded
+ * 0xe800_0000 64K     NAND FLASH
+ * 0xe804_0000 128K    DUART Registers
+ */
+#define CONFIG_SYS_DBAT7L      (CONFIG_SYS_NAND_BASE           |\
+                                BATL_PP_RW                     |\
+                                BATL_CACHEINHIBIT              |\
+                                BATL_GUARDEDSTORAGE)
+#define CONFIG_SYS_DBAT7U      (CONFIG_SYS_NAND_BASE           |\
+                                BATU_BL_512K                   |\
+                                BATU_VS                        |\
+                                BATU_VP)
+#define CONFIG_SYS_IBAT7L      (CONFIG_SYS_NAND_BASE           |\
+                                BATL_PP_RW                     |\
+                                BATL_CACHEINHIBIT)
+#define CONFIG_SYS_IBAT7U      CONFIG_SYS_DBAT7U
+
+/*
+ * Command configuration.
+ */
+#include <config_cmd_default.h>
+
+#define CONFIG_CMD_ASKENV
+#define CONFIG_CMD_DATE
+#define CONFIG_CMD_DHCP
+#define CONFIG_CMD_DS4510
+#define CONFIG_CMD_DS4510_INFO
+#define CONFIG_CMD_DTT
+#define CONFIG_CMD_EEPROM
+#define CONFIG_CMD_ELF
+#define CONFIG_CMD_SAVEENV
+#define CONFIG_CMD_FLASH
+#define CONFIG_CMD_I2C
+#define CONFIG_CMD_IRQ
+#define CONFIG_CMD_JFFS2
+#define CONFIG_CMD_MII
+#define CONFIG_CMD_NAND
+#define CONFIG_CMD_NET
+#define CONFIG_CMD_PCA953X
+#define CONFIG_CMD_PCA953X_INFO
+#define CONFIG_CMD_PCI
+#define CONFIG_CMD_PCI_ENUM
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_REGINFO
+#define CONFIG_CMD_SNTP
+
+/*
+ * Miscellaneous configurable options
+ */
+#define CONFIG_SYS_LONGHELP                    /* undef to save memory */
+#define CONFIG_SYS_LOAD_ADDR   0x2000000       /* default load address */
+#define CONFIG_SYS_PROMPT      "=> "           /* Monitor Command Prompt */
+#define CONFIG_SYS_CBSIZE      256             /* Console I/O Buffer Size */
+#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
+#define CONFIG_SYS_MAXARGS     16              /* max number of command args */
+#define CONFIG_SYS_BARGSIZE    CONFIG_SYS_CBSIZE       /* Boot Argument Buffer Size */
+#define CONFIG_SYS_HZ          1000            /* decrementer freq: 1ms ticks */
+#define CONFIG_CMDLINE_EDITING 1               /* Command-line editing */
+#define CONFIG_LOADADDR                0x1000000       /* default location for tftp and bootm */
+#define CONFIG_BOOTDELAY       3               /* -1 disables auto-boot */
+#define CONFIG_PANIC_HANG                      /* do not reset board on panic */
+#define CONFIG_PREBOOT                         /* enable preboot variable */
+#define CONFIG_FIT             1
+#define CONFIG_FIT_VERBOSE     1
+#define CONFIG_INTEGRITY                       /* support booting INTEGRITY OS */
+
+/*
+ * For booting Linux, the board info and command line data
+ * have to be in the first 16 MB of memory, since this is
+ * the maximum mapped by the Linux kernel during initialization.
+ */
+#define CONFIG_SYS_BOOTMAPSZ   (16 << 20)      /* Initial Memory map for Linux*/
+#define CONFIG_SYS_BOOTM_LEN   (16 << 20)      /* Increase max gunzip size */
+
+/*
+ * Environment Configuration
+ */
+#define CONFIG_ENV_IS_IN_FLASH 1
+#define CONFIG_ENV_SECT_SIZE   0x20000         /* 128k (one sector) for env */
+#define CONFIG_ENV_SIZE                0x8000
+#define CONFIG_ENV_ADDR                (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
+
+/*
+ * Flash memory map:
+ * fffc0000 - ffffffff Pri FDT (256KB)
+ * fff80000 - fffbffff Pri U-Boot Environment (256 KB)
+ * fff00000 - fff7ffff Pri U-Boot (512 KB)
+ * fef00000 - ffefffff Pri OS image (16MB)
+ * f8000000 - feefffff Pri OS Use/Filesystem (111MB)
+ *
+ * f7fc0000 - f7ffffff Sec FDT (256KB)
+ * f7f80000 - f7fbffff Sec U-Boot Environment (256 KB)
+ * f7f00000 - f7f7ffff Sec U-Boot (512 KB)
+ * f6f00000 - f7efffff Sec OS image (16MB)
+ * f0000000 - f6efffff Sec OS Use/Filesystem (111MB)
+ */
+#define CONFIG_UBOOT1_ENV_ADDR MK_STR(0xfff00000)
+#define CONFIG_UBOOT2_ENV_ADDR MK_STR(0xf7f00000)
+#define CONFIG_FDT1_ENV_ADDR   MK_STR(0xfffc0000)
+#define CONFIG_FDT2_ENV_ADDR   MK_STR(0xf7fc0000)
+#define CONFIG_OS1_ENV_ADDR    MK_STR(0xfef00000)
+#define CONFIG_OS2_ENV_ADDR    MK_STR(0xf6f00000)
+
+#define CONFIG_PROG_UBOOT1                                             \
+       "$download_cmd $loadaddr $ubootfile; "                          \
+       "if test $? -eq 0; then "                                       \
+               "protect off "CONFIG_UBOOT1_ENV_ADDR" +80000; "         \
+               "erase "CONFIG_UBOOT1_ENV_ADDR" +80000; "               \
+               "cp.w $loadaddr "CONFIG_UBOOT1_ENV_ADDR" 40000; "       \
+               "protect on "CONFIG_UBOOT1_ENV_ADDR" +80000; "          \
+               "cmp.b $loadaddr "CONFIG_UBOOT1_ENV_ADDR" 80000; "      \
+               "if test $? -ne 0; then "                               \
+                       "echo PROGRAM FAILED; "                         \
+               "else; "                                                \
+                       "echo PROGRAM SUCCEEDED; "                      \
+               "fi; "                                                  \
+       "else; "                                                        \
+               "echo DOWNLOAD FAILED; "                                \
+       "fi;"
+
+#define CONFIG_PROG_UBOOT2                                             \
+       "$download_cmd $loadaddr $ubootfile; "                          \
+       "if test $? -eq 0; then "                                       \
+               "protect off "CONFIG_UBOOT2_ENV_ADDR" +80000; "         \
+               "erase "CONFIG_UBOOT2_ENV_ADDR" +80000; "               \
+               "cp.w $loadaddr "CONFIG_UBOOT2_ENV_ADDR" 40000; "       \
+               "protect on "CONFIG_UBOOT2_ENV_ADDR" +80000; "          \
+               "cmp.b $loadaddr "CONFIG_UBOOT2_ENV_ADDR" 80000; "      \
+               "if test $? -ne 0; then "                               \
+                       "echo PROGRAM FAILED; "                         \
+               "else; "                                                \
+                       "echo PROGRAM SUCCEEDED; "                      \
+               "fi; "                                                  \
+       "else; "                                                        \
+               "echo DOWNLOAD FAILED; "                                \
+       "fi;"
+
+#define CONFIG_BOOT_OS_NET                                             \
+       "$download_cmd $osaddr $osfile; "                               \
+       "if test $? -eq 0; then "                                       \
+               "if test -n $fdtaddr; then "                            \
+                       "$download_cmd $fdtaddr $fdtfile; "             \
+                       "if test $? -eq 0; then "                       \
+                               "bootm $osaddr - $fdtaddr; "            \
+                       "else; "                                        \
+                               "echo FDT DOWNLOAD FAILED; "            \
+                       "fi; "                                          \
+               "else; "                                                \
+                       "bootm $osaddr; "                               \
+               "fi; "                                                  \
+       "else; "                                                        \
+               "echo OS DOWNLOAD FAILED; "                             \
+       "fi;"
+
+#define CONFIG_PROG_OS1                                                        \
+       "$download_cmd $osaddr $osfile; "                               \
+       "if test $? -eq 0; then "                                       \
+               "erase "CONFIG_OS1_ENV_ADDR" +$filesize; "              \
+               "cp.b $osaddr "CONFIG_OS1_ENV_ADDR" $filesize; "        \
+               "cmp.b $osaddr "CONFIG_OS1_ENV_ADDR" $filesize; "       \
+               "if test $? -ne 0; then "                               \
+                       "echo OS PROGRAM FAILED; "                      \
+               "else; "                                                \
+                       "echo OS PROGRAM SUCCEEDED; "                   \
+               "fi; "                                                  \
+       "else; "                                                        \
+               "echo OS DOWNLOAD FAILED; "                             \
+       "fi;"
+
+#define CONFIG_PROG_OS2                                                        \
+       "$download_cmd $osaddr $osfile; "                               \
+       "if test $? -eq 0; then "                                       \
+               "erase "CONFIG_OS2_ENV_ADDR" +$filesize; "              \
+               "cp.b $osaddr "CONFIG_OS2_ENV_ADDR" $filesize; "        \
+               "cmp.b $osaddr "CONFIG_OS2_ENV_ADDR" $filesize; "       \
+               "if test $? -ne 0; then "                               \
+                       "echo OS PROGRAM FAILED; "                      \
+               "else; "                                                \
+                       "echo OS PROGRAM SUCCEEDED; "                   \
+               "fi; "                                                  \
+       "else; "                                                        \
+               "echo OS DOWNLOAD FAILED; "                             \
+       "fi;"
+
+#define CONFIG_PROG_FDT1                                               \
+       "$download_cmd $fdtaddr $fdtfile; "                             \
+       "if test $? -eq 0; then "                                       \
+               "erase "CONFIG_FDT1_ENV_ADDR" +$filesize;"              \
+               "cp.b $fdtaddr "CONFIG_FDT1_ENV_ADDR" $filesize; "      \
+               "cmp.b $fdtaddr "CONFIG_FDT1_ENV_ADDR" $filesize; "     \
+               "if test $? -ne 0; then "                               \
+                       "echo FDT PROGRAM FAILED; "                     \
+               "else; "                                                \
+                       "echo FDT PROGRAM SUCCEEDED; "                  \
+               "fi; "                                                  \
+       "else; "                                                        \
+               "echo FDT DOWNLOAD FAILED; "                            \
+       "fi;"
+
+#define CONFIG_PROG_FDT2                                               \
+       "$download_cmd $fdtaddr $fdtfile; "                             \
+       "if test $? -eq 0; then "                                       \
+               "erase "CONFIG_FDT2_ENV_ADDR" +$filesize;"              \
+               "cp.b $fdtaddr "CONFIG_FDT2_ENV_ADDR" $filesize; "      \
+               "cmp.b $fdtaddr "CONFIG_FDT2_ENV_ADDR" $filesize; "     \
+               "if test $? -ne 0; then "                               \
+                       "echo FDT PROGRAM FAILED; "                     \
+               "else; "                                                \
+                       "echo FDT PROGRAM SUCCEEDED; "                  \
+               "fi; "                                                  \
+       "else; "                                                        \
+               "echo FDT DOWNLOAD FAILED; "                            \
+       "fi;"
+
+#define        CONFIG_EXTRA_ENV_SETTINGS                                       \
+       "autoload=yes\0"                                                \
+       "download_cmd=tftp\0"                                           \
+       "console_args=console=ttyS0,115200\0"                           \
+       "root_args=root=/dev/nfs rw\0"                                  \
+       "misc_args=ip=on\0"                                             \
+       "set_bootargs=setenv bootargs ${console_args} ${root_args} ${misc_args}\0" \
+       "bootfile=/home/user/file\0"                                    \
+       "osfile=/home/user/board.uImage\0"                              \
+       "fdtfile=/home/user/board.dtb\0"                                \
+       "ubootfile=/home/user/u-boot.bin\0"                             \
+       "fdtaddr=c00000\0"                                              \
+       "osaddr=0x1000000\0"                                            \
+       "loadaddr=0x1000000\0"                                          \
+       "prog_uboot1="CONFIG_PROG_UBOOT1"\0"                            \
+       "prog_uboot2="CONFIG_PROG_UBOOT2"\0"                            \
+       "prog_os1="CONFIG_PROG_OS1"\0"                                  \
+       "prog_os2="CONFIG_PROG_OS2"\0"                                  \
+       "prog_fdt1="CONFIG_PROG_FDT1"\0"                                \
+       "prog_fdt2="CONFIG_PROG_FDT2"\0"                                \
+       "bootcmd_net=run set_bootargs; "CONFIG_BOOT_OS_NET"\0"          \
+       "bootcmd_flash1=run set_bootargs; "                             \
+               "bootm "CONFIG_OS1_ENV_ADDR" - "CONFIG_FDT1_ENV_ADDR"\0"\
+       "bootcmd_flash2=run set_bootargs; "                             \
+               "bootm "CONFIG_OS2_ENV_ADDR" - "CONFIG_FDT2_ENV_ADDR"\0"\
+       "bootcmd=run bootcmd_flash1\0"
+#endif /* __CONFIG_H */
diff --git a/include/configs/xpedite520x.h b/include/configs/xpedite520x.h
new file mode 100644 (file)
index 0000000..b6b391f
--- /dev/null
@@ -0,0 +1,553 @@
+/*
+ * Copyright 2008 Extreme Engineering Solutions, Inc.
+ * Copyright 2004-2008 Freescale Semiconductor, Inc.
+ *
+ * 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
+ */
+
+/*
+ * xpedite520x board configuration file
+ */
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+/*
+ * High Level Configuration Options
+ */
+#define CONFIG_BOOKE           1       /* BOOKE */
+#define CONFIG_E500            1       /* BOOKE e500 family */
+#define CONFIG_MPC85xx         1       /* MPC8540/60/55/41/48 */
+#define CONFIG_MPC8548         1
+#define CONFIG_XPEDITE5200     1
+#define CONFIG_SYS_BOARD_NAME  "XPedite5200"
+#define CONFIG_SYS_FORM_PMC_XMC        1
+#define CONFIG_BOARD_EARLY_INIT_R      /* Call board_pre_init */
+
+#ifndef CONFIG_SYS_TEXT_BASE
+#define CONFIG_SYS_TEXT_BASE   0xfff80000
+#endif
+
+#define CONFIG_PCI             1       /* Enable PCI/PCIE */
+#define CONFIG_PCI_PNP         1       /* do pci plug-and-play */
+#define CONFIG_PCI_SCAN_SHOW   1       /* show pci devices on startup */
+#define CONFIG_PCI1            1       /* PCI controller 1 */
+#define CONFIG_FSL_PCI_INIT    1       /* Use common FSL init code */
+#define CONFIG_SYS_PCI_64BIT   1       /* enable 64-bit PCI resources */
+#define CONFIG_FSL_LAW         1       /* Use common FSL init code */
+
+/*
+ * DDR config
+ */
+#define CONFIG_FSL_DDR2
+#undef CONFIG_FSL_DDR_INTERACTIVE
+#define CONFIG_SPD_EEPROM              /* Use SPD EEPROM for DDR setup */
+#define CONFIG_DDR_SPD
+#define CONFIG_MEM_INIT_VALUE          0xdeadbeef
+#define SPD_EEPROM_ADDRESS             0x54
+#define CONFIG_NUM_DDR_CONTROLLERS     1
+#define CONFIG_DIMM_SLOTS_PER_CTLR     1
+#define CONFIG_CHIP_SELECTS_PER_CTRL   2
+#define CONFIG_DDR_ECC
+#define CONFIG_ECC_INIT_VIA_DDRCONTROLLER
+#define CONFIG_SYS_DDR_SDRAM_BASE      0x00000000
+#define CONFIG_SYS_SDRAM_BASE          CONFIG_SYS_DDR_SDRAM_BASE
+#define CONFIG_VERY_BIG_RAM
+
+#define CONFIG_SYS_CLK_FREQ    66666666
+
+/*
+ * These can be toggled for performance analysis, otherwise use default.
+ */
+#define CONFIG_L2_CACHE                        /* toggle L2 cache */
+#define CONFIG_BTB                     /* toggle branch predition */
+#define CONFIG_ENABLE_36BIT_PHYS       1
+
+/*
+ * Base addresses -- Note these are effective addresses where the
+ * actual resources get mapped (not physical addresses)
+ */
+#define CONFIG_SYS_CCSRBAR_DEFAULT     0xff700000      /* CCSRBAR Default */
+#define CONFIG_SYS_CCSRBAR             0xef000000      /* relocated CCSRBAR */
+#define CONFIG_SYS_CCSRBAR_PHYS        CONFIG_SYS_CCSRBAR      /* physical addr of CCSRBAR */
+#define CONFIG_SYS_IMMR                CONFIG_SYS_CCSRBAR      /* PQII uses CONFIG_SYS_IMMR */
+
+/*
+ * Diagnostics
+ */
+#define CONFIG_SYS_ALT_MEMTEST
+#define CONFIG_SYS_MEMTEST_START       0x10000000
+#define CONFIG_SYS_MEMTEST_END         0x20000000
+#define CONFIG_POST                    (CONFIG_SYS_POST_MEMORY | \
+                                        CONFIG_SYS_POST_I2C)
+#define I2C_ADDR_LIST                  {CONFIG_SYS_I2C_MAX1237_ADDR,   \
+                                        CONFIG_SYS_I2C_EEPROM_ADDR,    \
+                                        CONFIG_SYS_I2C_PCA953X_ADDR0,  \
+                                        CONFIG_SYS_I2C_PCA953X_ADDR1,  \
+                                        CONFIG_SYS_I2C_RTC_ADDR}
+
+/*
+ * Memory map
+ * 0x0000_0000 0x7fff_ffff     DDR                     2G Cacheable
+ * 0x8000_0000 0xbfff_ffff     PCI1 Mem                1G non-cacheable
+ * 0xe000_0000 0xe7ff_ffff     SRAM/SSRAM/L1 Cache     128M non-cacheable
+ * 0xe800_0000 0xe87f_ffff     PCI1 IO                 8M non-cacheable
+ * 0xef00_0000 0xef0f_ffff     CCSR/IMMR               1M non-cacheable
+ * 0xef80_0000 0xef8f_ffff     NAND Flash              1M non-cacheable
+ * 0xf800_0000 0xfbff_ffff     NOR Flash 2             64M non-cacheable
+ * 0xfc00_0000 0xffff_ffff     NOR Flash 1             64M non-cacheable
+ */
+
+#define CONFIG_SYS_LBC_LCRR    (LCRR_CLKDIV_8 | LCRR_EADC_3)
+
+/*
+ * NAND flash configuration
+ */
+#define CONFIG_SYS_NAND_BASE           0xef800000
+#define CONFIG_SYS_NAND_BASE2          0xef840000 /* Unused at this time */
+#define CONFIG_SYS_MAX_NAND_DEVICE     1
+#define CONFIG_NAND_ACTL
+#define CONFIG_SYS_NAND_ACTL_CLE       (1 << 3)        /* ADDR3 is CLE */
+#define CONFIG_SYS_NAND_ACTL_ALE       (1 << 4)        /* ADDR4 is ALE */
+#define CONFIG_SYS_NAND_ACTL_NCE       (0)             /* NCE not controlled by ADDR */
+#define CONFIG_SYS_NAND_ACTL_DELAY     25
+
+/*
+ * NOR flash configuration
+ */
+#define CONFIG_SYS_FLASH_BASE          0xfc000000
+#define CONFIG_SYS_FLASH_BASE2         0xf8000000
+#define CONFIG_SYS_FLASH_BANKS_LIST    {CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FLASH_BASE2}
+#define CONFIG_SYS_MAX_FLASH_BANKS     2               /* number of banks */
+#define CONFIG_SYS_MAX_FLASH_SECT      1024            /* sectors per device */
+#define CONFIG_SYS_FLASH_ERASE_TOUT    60000           /* Flash Erase Timeout (ms) */
+#define CONFIG_SYS_FLASH_WRITE_TOUT    500             /* Flash Write Timeout (ms) */
+#define CONFIG_FLASH_CFI_DRIVER
+#define CONFIG_SYS_FLASH_CFI
+#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
+#define CONFIG_SYS_FLASH_AUTOPROTECT_LIST      { {0xfff40000, 0xc0000}, \
+                                                 {0xfbf40000, 0xc0000} }
+#define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE    /* start of monitor */
+
+/*
+ * Chip select configuration
+ */
+/* NOR Flash 0 on CS0 */
+#define CONFIG_SYS_BR0_PRELIM  (CONFIG_SYS_FLASH_BASE  | \
+                                BR_PS_16               | \
+                                BR_V)
+#define CONFIG_SYS_OR0_PRELIM  (OR_AM_64MB             | \
+                                OR_GPCM_ACS_DIV4       | \
+                                OR_GPCM_SCY_8)
+
+/* NOR Flash 1 on CS1 */
+#define CONFIG_SYS_BR1_PRELIM  (CONFIG_SYS_FLASH_BASE2 | \
+                                BR_PS_16               | \
+                                BR_V)
+#define CONFIG_SYS_OR1_PRELIM  CONFIG_SYS_OR0_PRELIM
+
+/* NAND flash on CS2 */
+#define CONFIG_SYS_BR2_PRELIM  (CONFIG_SYS_NAND_BASE   | \
+                                BR_PS_8                | \
+                                BR_V)
+
+/* NAND flash on CS2 */
+#define CONFIG_SYS_OR2_PRELIM  (OR_AM_256KB            | \
+                                OR_GPCM_BCTLD          | \
+                                OR_GPCM_CSNT           | \
+                                OR_GPCM_ACS_DIV4       | \
+                                OR_GPCM_SCY_4          | \
+                                OR_GPCM_TRLX           | \
+                                OR_GPCM_EHTR)
+
+/* NAND flash on CS3 */
+#define CONFIG_SYS_BR3_PRELIM  (CONFIG_SYS_NAND_BASE2  | \
+                                BR_PS_8                | \
+                                BR_V)
+#define CONFIG_SYS_OR3_PRELIM  CONFIG_SYS_OR2_PRELIM
+
+/*
+ * Use L1 as initial stack
+ */
+#define CONFIG_SYS_INIT_RAM_LOCK       1
+#define CONFIG_SYS_INIT_RAM_ADDR       0xe0000000
+#define CONFIG_SYS_INIT_RAM_SIZE               0x4000
+
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
+
+#define CONFIG_SYS_MONITOR_LEN         (512 * 1024)    /* Reserve 512 KB for Mon */
+#define CONFIG_SYS_MALLOC_LEN          (1024 * 1024)   /* Reserved for malloc */
+
+/*
+ * Serial Port
+ */
+#define CONFIG_CONS_INDEX              1
+#define CONFIG_SYS_NS16550
+#define CONFIG_SYS_NS16550_SERIAL
+#define CONFIG_SYS_NS16550_REG_SIZE    1
+#define CONFIG_SYS_NS16550_CLK         get_bus_freq(0)
+#define CONFIG_SYS_NS16550_COM1        (CONFIG_SYS_CCSRBAR+0x4500)
+#define CONFIG_SYS_NS16550_COM2        (CONFIG_SYS_CCSRBAR+0x4600)
+#define CONFIG_SYS_BAUDRATE_TABLE      \
+       {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200}
+#define CONFIG_BAUDRATE                        115200
+#define CONFIG_LOADS_ECHO              1       /* echo on for serial download */
+#define CONFIG_SYS_LOADS_BAUD_CHANGE   1       /* allow baudrate change */
+
+/*
+ * Use the HUSH parser
+ */
+#define CONFIG_SYS_HUSH_PARSER
+#define CONFIG_SYS_PROMPT_HUSH_PS2     "> "
+
+/*
+ * Pass open firmware flat tree
+ */
+#define CONFIG_OF_LIBFDT               1
+#define CONFIG_OF_BOARD_SETUP          1
+#define CONFIG_OF_STDOUT_VIA_ALIAS     1
+
+/*
+ * I2C
+ */
+#define CONFIG_FSL_I2C                         /* Use FSL common I2C driver */
+#define CONFIG_HARD_I2C                                /* I2C with hardware support */
+#define CONFIG_SYS_I2C_SPEED           400000  /* I2C speed and slave address */
+#define CONFIG_SYS_I2C_SLAVE           0x7F
+#define CONFIG_SYS_I2C_OFFSET          0x3000
+#define CONFIG_SYS_I2C2_OFFSET         0x3100
+#define CONFIG_I2C_MULTI_BUS
+
+/* I2C EEPROM */
+#define CONFIG_SYS_I2C_EEPROM_ADDR             0x50
+#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN         1
+#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS      6       /* 64 byte pages */
+#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS  10      /* take up to 10 msec */
+
+/* I2C RTC */
+#define CONFIG_RTC_M41T11                      1
+#define CONFIG_SYS_I2C_RTC_ADDR                        0x68
+#define CONFIG_SYS_M41T11_BASE_YEAR            2000
+
+/* GPIO */
+#define CONFIG_PCA953X
+#define CONFIG_SYS_I2C_PCA953X_ADDR0           0x18
+#define CONFIG_SYS_I2C_PCA953X_ADDR1           0x19
+#define CONFIG_SYS_I2C_PCA953X_ADDR            CONFIG_SYS_I2C_PCA953X_ADDR0
+
+/* PCA957 @ 0x18 */
+#define CONFIG_SYS_PCA953X_BRD_CFG0            0x01
+#define CONFIG_SYS_PCA953X_BRD_CFG1            0x02
+#define CONFIG_SYS_PCA953X_BRD_CFG2            0x04
+#define CONFIG_SYS_PCA953X_XMC_ROOT0           0x08
+#define CONFIG_SYS_PCA953X_FLASH_PASS_CS       0x10
+#define CONFIG_SYS_PCA953X_NVM_WP              0x20
+#define CONFIG_SYS_PCA953X_MONARCH             0x40
+#define CONFIG_SYS_PCA953X_EREADY              0x80
+
+/* PCA957 @ 0x19 */
+#define CONFIG_SYS_PCA953X_P14_IO0             0x01
+#define CONFIG_SYS_PCA953X_P14_IO1             0x02
+#define CONFIG_SYS_PCA953X_P14_IO2             0x04
+#define CONFIG_SYS_PCA953X_P14_IO3             0x08
+#define CONFIG_SYS_PCA953X_P14_IO4             0x10
+#define CONFIG_SYS_PCA953X_P14_IO5             0x20
+#define CONFIG_SYS_PCA953X_P14_IO6             0x40
+#define CONFIG_SYS_PCA953X_P14_IO7             0x80
+
+/* 12-bit ADC used to measure CPU diode */
+#define CONFIG_SYS_I2C_MAX1237_ADDR            0x34
+
+/*
+ * General PCI
+ * Memory space is mapped 1-1, but I/O space must start from 0.
+ */
+#define CONFIG_SYS_PCI1_MEM_BUS                0x80000000
+#define CONFIG_SYS_PCI1_MEM_PHYS       CONFIG_SYS_PCI1_MEM_BUS
+#define CONFIG_SYS_PCI1_MEM_SIZE       0x40000000      /* 1G */
+#define CONFIG_SYS_PCI1_IO_BUS         0x00000000
+#define CONFIG_SYS_PCI1_IO_PHYS                0xe8000000
+#define CONFIG_SYS_PCI1_IO_SIZE                0x00800000      /* 1M */
+
+/*
+ * Networking options
+ */
+#define CONFIG_TSEC_ENET               /* tsec ethernet support */
+#define CONFIG_PHY_GIGE                1       /* Include GbE speed/duplex detection */
+#define CONFIG_NET_MULTI       1
+#define CONFIG_MII             1       /* MII PHY management */
+#define CONFIG_ETHPRIME                "eTSEC1"
+
+#define CONFIG_TSEC1           1
+#define CONFIG_TSEC1_NAME      "eTSEC1"
+#define TSEC1_FLAGS            TSEC_GIGABIT
+#define TSEC1_PHY_ADDR         1
+#define TSEC1_PHYIDX           0
+#define CONFIG_HAS_ETH0
+
+#define CONFIG_TSEC2           1
+#define CONFIG_TSEC2_NAME      "eTSEC2"
+#define TSEC2_FLAGS            TSEC_GIGABIT
+#define TSEC2_PHY_ADDR         2
+#define TSEC2_PHYIDX           0
+#define CONFIG_HAS_ETH1
+
+#define CONFIG_TSEC3   1
+#define CONFIG_TSEC3_NAME      "eTSEC3"
+#define TSEC3_FLAGS            TSEC_GIGABIT
+#define TSEC3_PHY_ADDR         3
+#define TSEC3_PHYIDX           0
+#define CONFIG_HAS_ETH2
+
+#define CONFIG_TSEC4   1
+#define CONFIG_TSEC4_NAME      "eTSEC4"
+#define TSEC4_FLAGS            TSEC_GIGABIT
+#define TSEC4_PHY_ADDR         4
+#define TSEC4_PHYIDX           0
+#define CONFIG_HAS_ETH3
+
+/*
+ * BOOTP options
+ */
+#define CONFIG_BOOTP_BOOTFILESIZE
+#define CONFIG_BOOTP_BOOTPATH
+#define CONFIG_BOOTP_GATEWAY
+
+/*
+ * Command configuration.
+ */
+#include <config_cmd_default.h>
+
+#define CONFIG_CMD_ASKENV
+#define CONFIG_CMD_DATE
+#define CONFIG_CMD_DHCP
+#define CONFIG_CMD_EEPROM
+#define CONFIG_CMD_ELF
+#define CONFIG_CMD_SAVEENV
+#define CONFIG_CMD_FLASH
+#define CONFIG_CMD_I2C
+#define CONFIG_CMD_JFFS2
+#define CONFIG_CMD_MII
+#define CONFIG_CMD_NAND
+#define CONFIG_CMD_NET
+#define CONFIG_CMD_PCA953X
+#define CONFIG_CMD_PCA953X_INFO
+#define CONFIG_CMD_PCI
+#define CONFIG_CMD_PCI_ENUM
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_SNTP
+#define CONFIG_CMD_REGINFO
+
+/*
+ * Miscellaneous configurable options
+ */
+#define CONFIG_SYS_LONGHELP                    /* undef to save memory */
+#define CONFIG_SYS_LOAD_ADDR   0x2000000       /* default load address */
+#define CONFIG_SYS_PROMPT      "=> "           /* Monitor Command Prompt */
+#define CONFIG_SYS_CBSIZE      256             /* Console I/O Buffer Size */
+#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
+#define CONFIG_SYS_MAXARGS     16              /* max number of command args */
+#define CONFIG_SYS_BARGSIZE    CONFIG_SYS_CBSIZE       /* Boot Argument Buffer Size */
+#define CONFIG_SYS_HZ          1000            /* decrementer freq: 1ms ticks */
+#define CONFIG_CMDLINE_EDITING 1               /* add command line history     */
+#define CONFIG_AUTO_COMPLETE   1               /* add autocompletion support */
+#define CONFIG_LOADADDR                0x1000000       /* default location for tftp and bootm */
+#define CONFIG_BOOTDELAY       3               /* -1 disables auto-boot */
+#define CONFIG_PANIC_HANG                      /* do not reset board on panic */
+#define CONFIG_PREBOOT                         /* enable preboot variable */
+#define CONFIG_FIT             1
+#define CONFIG_FIT_VERBOSE     1
+#define CONFIG_INTEGRITY                       /* support booting INTEGRITY OS */
+#define CONFIG_INTERRUPTS              /* enable pci, srio, ddr interrupts */
+
+/*
+ * For booting Linux, the board info and command line data
+ * have to be in the first 16 MB of memory, since this is
+ * the maximum mapped by the Linux kernel during initialization.
+ */
+#define CONFIG_SYS_BOOTMAPSZ   (16 << 20)      /* Initial Memory map for Linux*/
+#define CONFIG_SYS_BOOTM_LEN   (16 << 20)      /* Increase max gunzip size */
+
+/*
+ * Environment Configuration
+ */
+#define CONFIG_ENV_IS_IN_FLASH 1
+#define CONFIG_ENV_SECT_SIZE   0x20000         /* 128k (one sector) for env */
+#define CONFIG_ENV_SIZE                0x8000
+#define CONFIG_ENV_ADDR                (CONFIG_SYS_MONITOR_BASE - (256 * 1024))
+
+/*
+ * Flash memory map:
+ * fff80000 - ffffffff     Pri U-Boot (512 KB)
+ * fff40000 - fff7ffff     Pri U-Boot Environment (256 KB)
+ * fff00000 - fff3ffff     Pri FDT (256KB)
+ * fef00000 - ffefffff     Pri OS image (16MB)
+ * fc000000 - feefffff     Pri OS Use/Filesystem (47MB)
+ *
+ * fbf80000 - fbffffff     Sec U-Boot (512 KB)
+ * fbf40000 - fbf7ffff     Sec U-Boot Environment (256 KB)
+ * fbf00000 - fbf3ffff     Sec FDT (256KB)
+ * faf00000 - fbefffff     Sec OS image (16MB)
+ * f8000000 - faefffff     Sec OS Use/Filesystem (47MB)
+ */
+#define CONFIG_UBOOT1_ENV_ADDR MK_STR(0xfff80000)
+#define CONFIG_UBOOT2_ENV_ADDR MK_STR(0xfbf80000)
+#define CONFIG_FDT1_ENV_ADDR   MK_STR(0xfff00000)
+#define CONFIG_FDT2_ENV_ADDR   MK_STR(0xfbf00000)
+#define CONFIG_OS1_ENV_ADDR    MK_STR(0xfef00000)
+#define CONFIG_OS2_ENV_ADDR    MK_STR(0xfaf00000)
+
+#define CONFIG_PROG_UBOOT1                                             \
+       "$download_cmd $loadaddr $ubootfile; "                          \
+       "if test $? -eq 0; then "                                       \
+               "protect off "CONFIG_UBOOT1_ENV_ADDR" +80000; "         \
+               "erase "CONFIG_UBOOT1_ENV_ADDR" +80000; "               \
+               "cp.w $loadaddr "CONFIG_UBOOT1_ENV_ADDR" 40000; "       \
+               "protect on "CONFIG_UBOOT1_ENV_ADDR" +80000; "          \
+               "cmp.b $loadaddr "CONFIG_UBOOT1_ENV_ADDR" 80000; "      \
+               "if test $? -ne 0; then "                               \
+                       "echo PROGRAM FAILED; "                         \
+               "else; "                                                \
+                       "echo PROGRAM SUCCEEDED; "                      \
+               "fi; "                                                  \
+       "else; "                                                        \
+               "echo DOWNLOAD FAILED; "                                \
+       "fi;"
+
+#define CONFIG_PROG_UBOOT2                                             \
+       "$download_cmd $loadaddr $ubootfile; "                          \
+       "if test $? -eq 0; then "                                       \
+               "protect off "CONFIG_UBOOT2_ENV_ADDR" +80000; "         \
+               "erase "CONFIG_UBOOT2_ENV_ADDR" +80000; "               \
+               "cp.w $loadaddr "CONFIG_UBOOT2_ENV_ADDR" 40000; "       \
+               "protect on "CONFIG_UBOOT2_ENV_ADDR" +80000; "          \
+               "cmp.b $loadaddr "CONFIG_UBOOT2_ENV_ADDR" 80000; "      \
+               "if test $? -ne 0; then "                               \
+                       "echo PROGRAM FAILED; "                         \
+               "else; "                                                \
+                       "echo PROGRAM SUCCEEDED; "                      \
+               "fi; "                                                  \
+       "else; "                                                        \
+               "echo DOWNLOAD FAILED; "                                \
+       "fi;"
+
+#define CONFIG_BOOT_OS_NET                                             \
+       "$download_cmd $osaddr $osfile; "                               \
+       "if test $? -eq 0; then "                                       \
+               "if test -n $fdtaddr; then "                            \
+                       "$download_cmd $fdtaddr $fdtfile; "             \
+                       "if test $? -eq 0; then "                       \
+                               "bootm $osaddr - $fdtaddr; "            \
+                       "else; "                                        \
+                               "echo FDT DOWNLOAD FAILED; "            \
+                       "fi; "                                          \
+               "else; "                                                \
+                       "bootm $osaddr; "                               \
+               "fi; "                                                  \
+       "else; "                                                        \
+               "echo OS DOWNLOAD FAILED; "                             \
+       "fi;"
+
+#define CONFIG_PROG_OS1                                                        \
+       "$download_cmd $osaddr $osfile; "                               \
+       "if test $? -eq 0; then "                                       \
+               "erase "CONFIG_OS1_ENV_ADDR" +$filesize; "              \
+               "cp.b $osaddr "CONFIG_OS1_ENV_ADDR" $filesize; "        \
+               "cmp.b $osaddr "CONFIG_OS1_ENV_ADDR" $filesize; "       \
+               "if test $? -ne 0; then "                               \
+                       "echo OS PROGRAM FAILED; "                      \
+               "else; "                                                \
+                       "echo OS PROGRAM SUCCEEDED; "                   \
+               "fi; "                                                  \
+       "else; "                                                        \
+               "echo OS DOWNLOAD FAILED; "                             \
+       "fi;"
+
+#define CONFIG_PROG_OS2                                                        \
+       "$download_cmd $osaddr $osfile; "                               \
+       "if test $? -eq 0; then "                                       \
+               "erase "CONFIG_OS2_ENV_ADDR" +$filesize; "              \
+               "cp.b $osaddr "CONFIG_OS2_ENV_ADDR" $filesize; "        \
+               "cmp.b $osaddr "CONFIG_OS2_ENV_ADDR" $filesize; "       \
+               "if test $? -ne 0; then "                               \
+                       "echo OS PROGRAM FAILED; "                      \
+               "else; "                                                \
+                       "echo OS PROGRAM SUCCEEDED; "                   \
+               "fi; "                                                  \
+       "else; "                                                        \
+               "echo OS DOWNLOAD FAILED; "                             \
+       "fi;"
+
+#define CONFIG_PROG_FDT1                                               \
+       "$download_cmd $fdtaddr $fdtfile; "                             \
+       "if test $? -eq 0; then "                                       \
+               "erase "CONFIG_FDT1_ENV_ADDR" +$filesize;"              \
+               "cp.b $fdtaddr "CONFIG_FDT1_ENV_ADDR" $filesize; "      \
+               "cmp.b $fdtaddr "CONFIG_FDT1_ENV_ADDR" $filesize; "     \
+               "if test $? -ne 0; then "                               \
+                       "echo FDT PROGRAM FAILED; "                     \
+               "else; "                                                \
+                       "echo FDT PROGRAM SUCCEEDED; "                  \
+               "fi; "                                                  \
+       "else; "                                                        \
+               "echo FDT DOWNLOAD FAILED; "                            \
+       "fi;"
+
+#define CONFIG_PROG_FDT2                                               \
+       "$download_cmd $fdtaddr $fdtfile; "                             \
+       "if test $? -eq 0; then "                                       \
+               "erase "CONFIG_FDT2_ENV_ADDR" +$filesize;"              \
+               "cp.b $fdtaddr "CONFIG_FDT2_ENV_ADDR" $filesize; "      \
+               "cmp.b $fdtaddr "CONFIG_FDT2_ENV_ADDR" $filesize; "     \
+               "if test $? -ne 0; then "                               \
+                       "echo FDT PROGRAM FAILED; "                     \
+               "else; "                                                \
+                       "echo FDT PROGRAM SUCCEEDED; "                  \
+               "fi; "                                                  \
+       "else; "                                                        \
+               "echo FDT DOWNLOAD FAILED; "                            \
+       "fi;"
+
+#define        CONFIG_EXTRA_ENV_SETTINGS                                       \
+       "autoload=yes\0"                                                \
+       "download_cmd=tftp\0"                                           \
+       "console_args=console=ttyS0,115200\0"                           \
+       "root_args=root=/dev/nfs rw\0"                                  \
+       "misc_args=ip=on\0"                                             \
+       "set_bootargs=setenv bootargs ${console_args} ${root_args} ${misc_args}\0" \
+       "bootfile=/home/user/file\0"                                    \
+       "osfile=/home/user/board.uImage\0"                              \
+       "fdtfile=/home/user/board.dtb\0"                                \
+       "ubootfile=/home/user/u-boot.bin\0"                             \
+       "fdtaddr=c00000\0"                                              \
+       "osaddr=0x1000000\0"                                            \
+       "loadaddr=0x1000000\0"                                          \
+       "prog_uboot1="CONFIG_PROG_UBOOT1"\0"                            \
+       "prog_uboot2="CONFIG_PROG_UBOOT2"\0"                            \
+       "prog_os1="CONFIG_PROG_OS1"\0"                                  \
+       "prog_os2="CONFIG_PROG_OS2"\0"                                  \
+       "prog_fdt1="CONFIG_PROG_FDT1"\0"                                \
+       "prog_fdt2="CONFIG_PROG_FDT2"\0"                                \
+       "bootcmd_net=run set_bootargs; "CONFIG_BOOT_OS_NET"\0"          \
+       "bootcmd_flash1=run set_bootargs; "                             \
+               "bootm "CONFIG_OS1_ENV_ADDR" - "CONFIG_FDT1_ENV_ADDR"\0"\
+       "bootcmd_flash2=run set_bootargs; "                             \
+               "bootm "CONFIG_OS2_ENV_ADDR" - "CONFIG_FDT2_ENV_ADDR"\0"\
+       "bootcmd=run bootcmd_flash1\0"
+#endif /* __CONFIG_H */
diff --git a/include/configs/xpedite537x.h b/include/configs/xpedite537x.h
new file mode 100644 (file)
index 0000000..e0a1fa4
--- /dev/null
@@ -0,0 +1,615 @@
+/*
+ * Copyright 2008 Extreme Engineering Solutions, Inc.
+ * Copyright 2007-2008 Freescale Semiconductor, Inc.
+ *
+ * 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
+ */
+
+/*
+ * xpedite537x board configuration file
+ */
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+/*
+ * High Level Configuration Options
+ */
+#define CONFIG_BOOKE           1       /* BOOKE */
+#define CONFIG_E500            1       /* BOOKE e500 family */
+#define CONFIG_MPC85xx         1       /* MPC8540/60/55/41/48 */
+#define CONFIG_MPC8572         1
+#define CONFIG_XPEDITE5370     1
+#define CONFIG_SYS_BOARD_NAME  "XPedite5370"
+#define CONFIG_SYS_FORM_3U_VPX 1
+#define CONFIG_BOARD_EARLY_INIT_R      /* Call board_pre_init */
+
+#ifndef CONFIG_SYS_TEXT_BASE
+#define CONFIG_SYS_TEXT_BASE   0xfff80000
+#endif
+
+#define CONFIG_PCI             1       /* Enable PCI/PCIE */
+#define CONFIG_PCI_PNP         1       /* do pci plug-and-play */
+#define CONFIG_PCI_SCAN_SHOW   1       /* show pci devices on startup */
+#define CONFIG_PCIE1           1       /* PCIE controler 1 */
+#define CONFIG_PCIE2           1       /* PCIE controler 2 */
+#define CONFIG_FSL_PCI_INIT    1       /* Use common FSL init code */
+#define CONFIG_SYS_PCI_64BIT   1       /* enable 64-bit PCI resources */
+#define CONFIG_FSL_PCIE_RESET  1       /* need PCIe reset errata */
+#define CONFIG_FSL_LAW         1       /* Use common FSL init code */
+#define CONFIG_FSL_ELBC                1
+
+/*
+ * Multicore config
+ */
+#define CONFIG_MP
+#define CONFIG_BPTR_VIRT_ADDR  0xee000000      /* virt boot page address */
+#define CONFIG_MPC8xxx_DISABLE_BPTR            /* Don't leave BPTR enabled */
+
+/*
+ * DDR config
+ */
+#define CONFIG_FSL_DDR2
+#undef CONFIG_FSL_DDR_INTERACTIVE
+#define CONFIG_SPD_EEPROM              /* Use SPD EEPROM for DDR setup */
+#define CONFIG_DDR_SPD
+#define CONFIG_MEM_INIT_VALUE          0xdeadbeef
+#define SPD_EEPROM_ADDRESS1            0x54    /* Both channels use the */
+#define SPD_EEPROM_ADDRESS2            0x54    /* same SPD data         */
+#define SPD_EEPROM_OFFSET              0x200   /* OFFSET of SPD in EEPROM */
+#define CONFIG_NUM_DDR_CONTROLLERS     2
+#define CONFIG_DIMM_SLOTS_PER_CTLR     1
+#define CONFIG_CHIP_SELECTS_PER_CTRL   1
+#define CONFIG_DDR_ECC
+#define CONFIG_ECC_INIT_VIA_DDRCONTROLLER
+#define CONFIG_SYS_DDR_SDRAM_BASE      0x00000000 /* DDR is system memory*/
+#define CONFIG_SYS_SDRAM_BASE          CONFIG_SYS_DDR_SDRAM_BASE
+#define CONFIG_VERY_BIG_RAM
+
+#ifndef __ASSEMBLY__
+extern unsigned long get_board_sys_clk(unsigned long dummy);
+extern unsigned long get_board_ddr_clk(unsigned long dummy);
+#endif
+
+#define CONFIG_SYS_CLK_FREQ    get_board_sys_clk(0) /* sysclk for MPC85xx */
+#define CONFIG_DDR_CLK_FREQ    get_board_ddr_clk(0) /* ddrclk for MPC85xx */
+
+/*
+ * These can be toggled for performance analysis, otherwise use default.
+ */
+#define CONFIG_L2_CACHE                        /* toggle L2 cache */
+#define CONFIG_BTB                     /* toggle branch predition */
+#define CONFIG_ENABLE_36BIT_PHYS       1
+
+/*
+ * Base addresses -- Note these are effective addresses where the
+ * actual resources get mapped (not physical addresses)
+ */
+#define CONFIG_SYS_CCSRBAR_DEFAULT     0xff700000      /* CCSRBAR Default */
+#define CONFIG_SYS_CCSRBAR             0xef000000      /* relocated CCSRBAR */
+#define CONFIG_SYS_CCSRBAR_PHYS        CONFIG_SYS_CCSRBAR      /* physical addr of CCSRBAR */
+#define CONFIG_SYS_IMMR                CONFIG_SYS_CCSRBAR      /* PQII uses CONFIG_SYS_IMMR */
+
+/*
+ * Diagnostics
+ */
+#define CONFIG_SYS_ALT_MEMTEST
+#define CONFIG_SYS_MEMTEST_START       0x10000000
+#define CONFIG_SYS_MEMTEST_END         0x20000000
+#define CONFIG_POST                    (CONFIG_SYS_POST_MEMORY | \
+                                        CONFIG_SYS_POST_I2C)
+#define I2C_ADDR_LIST                  {CONFIG_SYS_I2C_DS1621_ADDR,    \
+                                        CONFIG_SYS_I2C_DS4510_ADDR,    \
+                                        CONFIG_SYS_I2C_EEPROM_ADDR,    \
+                                        CONFIG_SYS_I2C_LM90_ADDR,      \
+                                        CONFIG_SYS_I2C_PCA953X_ADDR0,  \
+                                        CONFIG_SYS_I2C_PCA953X_ADDR1,  \
+                                        CONFIG_SYS_I2C_PCA953X_ADDR2,  \
+                                        CONFIG_SYS_I2C_PCA953X_ADDR3,  \
+                                        CONFIG_SYS_I2C_PEX8518_ADDR,   \
+                                        CONFIG_SYS_I2C_RTC_ADDR}
+/* The XPedite5370 can host an XMC which has an EEPROM at address 0x50 */
+#define I2C_ADDR_IGNORE_LIST           {0x50}
+
+/*
+ * Memory map
+ * 0x0000_0000 0x7fff_ffff     DDR                     2G Cacheable
+ * 0x8000_0000 0xbfff_ffff     PCIe1 Mem               1G non-cacheable
+ * 0xc000_0000 0xcfff_ffff     PCIe2 Mem               256M non-cacheable
+ * 0xe000_0000 0xe7ff_ffff     SRAM/SSRAM/L1 Cache     128M non-cacheable
+ * 0xe800_0000 0xe87f_ffff     PCIe1 IO                8M non-cacheable
+ * 0xe880_0000 0xe8ff_ffff     PCIe2 IO                8M non-cacheable
+ * 0xee00_0000 0xee00_ffff     Boot page translation   4K non-cacheable
+ * 0xef00_0000 0xef0f_ffff     CCSR/IMMR               1M non-cacheable
+ * 0xef80_0000 0xef8f_ffff     NAND Flash              1M non-cacheable
+ * 0xf000_0000 0xf7ff_ffff     NOR Flash 2             128M non-cacheable
+ * 0xf800_0000 0xffff_ffff     NOR Flash 1             128M non-cacheable
+ */
+
+#define CONFIG_SYS_LBC_LCRR    (LCRR_CLKDIV_8 | LCRR_EADC_3)
+
+/*
+ * NAND flash configuration
+ */
+#define CONFIG_SYS_NAND_BASE           0xef800000
+#define CONFIG_SYS_NAND_BASE2          0xef840000 /* Unused at this time */
+#define CONFIG_SYS_NAND_BASE_LIST      {CONFIG_SYS_NAND_BASE, \
+                                        CONFIG_SYS_NAND_BASE2}
+#define CONFIG_SYS_MAX_NAND_DEVICE     2
+#define CONFIG_MTD_NAND_VERIFY_WRITE
+#define CONFIG_SYS_NAND_QUIET_TEST     /* 2nd NAND flash not always populated */
+#define CONFIG_NAND_FSL_ELBC
+
+/*
+ * NOR flash configuration
+ */
+#define CONFIG_SYS_FLASH_BASE          0xf8000000
+#define CONFIG_SYS_FLASH_BASE2         0xf0000000
+#define CONFIG_SYS_FLASH_BANKS_LIST    {CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FLASH_BASE2}
+#define CONFIG_SYS_MAX_FLASH_BANKS     2               /* number of banks */
+#define CONFIG_SYS_MAX_FLASH_SECT      1024            /* sectors per device */
+#define CONFIG_SYS_FLASH_ERASE_TOUT    60000           /* Flash Erase Timeout (ms) */
+#define CONFIG_SYS_FLASH_WRITE_TOUT    500             /* Flash Write Timeout (ms) */
+#define CONFIG_FLASH_CFI_DRIVER
+#define CONFIG_SYS_FLASH_CFI
+#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
+#define CONFIG_SYS_FLASH_AUTOPROTECT_LIST      { {0xfff40000, 0xc0000}, \
+                                                 {0xf7f40000, 0xc0000} }
+#define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE    /* start of monitor */
+
+/*
+ * Chip select configuration
+ */
+/* NOR Flash 0 on CS0 */
+#define CONFIG_SYS_BR0_PRELIM  (CONFIG_SYS_FLASH_BASE  | \
+                                BR_PS_16               | \
+                                BR_V)
+#define CONFIG_SYS_OR0_PRELIM  (OR_AM_128MB            | \
+                                OR_GPCM_CSNT           | \
+                                OR_GPCM_XACS           | \
+                                OR_GPCM_ACS_DIV2       | \
+                                OR_GPCM_SCY_8          | \
+                                OR_GPCM_TRLX           | \
+                                OR_GPCM_EHTR           | \
+                                OR_GPCM_EAD)
+
+/* NOR Flash 1 on CS1 */
+#define CONFIG_SYS_BR1_PRELIM  (CONFIG_SYS_FLASH_BASE2 | \
+                                BR_PS_16               | \
+                                BR_V)
+#define CONFIG_SYS_OR1_PRELIM  CONFIG_SYS_OR0_PRELIM
+
+/* NAND flash on CS2 */
+#define CONFIG_SYS_BR2_PRELIM  (CONFIG_SYS_NAND_BASE   | \
+                                (2<<BR_DECC_SHIFT)     | \
+                                BR_PS_8                | \
+                                BR_MS_FCM              | \
+                                BR_V)
+
+/* NAND flash on CS2 */
+#define CONFIG_SYS_OR2_PRELIM  (OR_AM_256KB    | \
+                                OR_FCM_PGS     | \
+                                OR_FCM_CSCT    | \
+                                OR_FCM_CST     | \
+                                OR_FCM_CHT     | \
+                                OR_FCM_SCY_1   | \
+                                OR_FCM_TRLX    | \
+                                OR_FCM_EHTR)
+
+/* NAND flash on CS3 */
+#define CONFIG_SYS_BR3_PRELIM  (CONFIG_SYS_NAND_BASE2  | \
+                                (2<<BR_DECC_SHIFT)     | \
+                                BR_PS_8                | \
+                                BR_MS_FCM              | \
+                                BR_V)
+#define CONFIG_SYS_OR3_PRELIM  CONFIG_SYS_OR2_PRELIM
+
+/*
+ * Use L1 as initial stack
+ */
+#define CONFIG_SYS_INIT_RAM_LOCK       1
+#define CONFIG_SYS_INIT_RAM_ADDR       0xe0000000
+#define CONFIG_SYS_INIT_RAM_SIZE               0x00004000
+
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
+
+#define CONFIG_SYS_MONITOR_LEN         (512 * 1024)    /* Reserve 512 KB for Mon */
+#define CONFIG_SYS_MALLOC_LEN          (1024 * 1024)   /* Reserved for malloc */
+
+/*
+ * Serial Port
+ */
+#define CONFIG_CONS_INDEX              1
+#define CONFIG_SYS_NS16550
+#define CONFIG_SYS_NS16550_SERIAL
+#define CONFIG_SYS_NS16550_REG_SIZE    1
+#define CONFIG_SYS_NS16550_CLK         get_bus_freq(0)
+#define CONFIG_SYS_NS16550_COM1        (CONFIG_SYS_CCSRBAR+0x4500)
+#define CONFIG_SYS_NS16550_COM2        (CONFIG_SYS_CCSRBAR+0x4600)
+#define CONFIG_SYS_BAUDRATE_TABLE      \
+       {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200}
+#define CONFIG_BAUDRATE                        115200
+#define CONFIG_LOADS_ECHO              1       /* echo on for serial download */
+#define CONFIG_SYS_LOADS_BAUD_CHANGE   1       /* allow baudrate change */
+
+/*
+ * Use the HUSH parser
+ */
+#define CONFIG_SYS_HUSH_PARSER
+#define CONFIG_SYS_PROMPT_HUSH_PS2     "> "
+
+/*
+ * Pass open firmware flat tree
+ */
+#define CONFIG_OF_LIBFDT               1
+#define CONFIG_OF_BOARD_SETUP          1
+#define CONFIG_OF_STDOUT_VIA_ALIAS     1
+
+/*
+ * I2C
+ */
+#define CONFIG_FSL_I2C                         /* Use FSL common I2C driver */
+#define CONFIG_HARD_I2C                                /* I2C with hardware support */
+#define CONFIG_SYS_I2C_SPEED           400000  /* I2C speed and slave address */
+#define CONFIG_SYS_I2C_SLAVE           0x7F
+#define CONFIG_SYS_I2C_OFFSET          0x3000
+#define CONFIG_SYS_I2C2_OFFSET         0x3100
+#define CONFIG_I2C_MULTI_BUS
+
+/* PEX8518 slave I2C interface */
+#define CONFIG_SYS_I2C_PEX8518_ADDR    0x70
+
+/* I2C DS1631 temperature sensor */
+#define CONFIG_SYS_I2C_DS1621_ADDR     0x48
+#define CONFIG_DTT_DS1621
+#define CONFIG_DTT_SENSORS             { 0 }
+#define CONFIG_SYS_I2C_LM90_ADDR       0x4c
+
+/* I2C EEPROM - AT24C128B */
+#define CONFIG_SYS_I2C_EEPROM_ADDR             0x54
+#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN         2
+#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS      6       /* 64 byte pages */
+#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS  10      /* take up to 10 msec */
+
+/* I2C RTC */
+#define CONFIG_RTC_M41T11              1
+#define CONFIG_SYS_I2C_RTC_ADDR                0x68
+#define CONFIG_SYS_M41T11_BASE_YEAR    2000
+
+/* GPIO/EEPROM/SRAM */
+#define CONFIG_DS4510
+#define CONFIG_SYS_I2C_DS4510_ADDR     0x51
+
+/* GPIO */
+#define CONFIG_PCA953X
+#define CONFIG_SYS_I2C_PCA953X_ADDR0   0x18
+#define CONFIG_SYS_I2C_PCA953X_ADDR1   0x1c
+#define CONFIG_SYS_I2C_PCA953X_ADDR2   0x1e
+#define CONFIG_SYS_I2C_PCA953X_ADDR3   0x1f
+#define CONFIG_SYS_I2C_PCA953X_ADDR    CONFIG_SYS_I2C_PCA953X_ADDR0
+
+/*
+ * PU = pulled high, PD = pulled low
+ * I = input, O = output, IO = input/output
+ */
+/* PCA9557 @ 0x18*/
+#define CONFIG_SYS_PCA953X_C0_SER0_EN          0x01 /* PU; UART0 enable (1: enabled) */
+#define CONFIG_SYS_PCA953X_C0_SER0_MODE                0x02 /* PU; UART0 serial mode select */
+#define CONFIG_SYS_PCA953X_C0_SER1_EN          0x04 /* PU; UART1 enable (1: enabled) */
+#define CONFIG_SYS_PCA953X_C0_SER1_MODE                0x08 /* PU; UART1 serial mode select */
+#define CONFIG_SYS_PCA953X_C0_FLASH_PASS_CS    0x10 /* PU; Boot flash CS select */
+#define CONFIG_SYS_PCA953X_NVM_WP              0x20 /* PU; Set to 0 to enable NVM writing */
+#define CONFIG_SYS_PCA953X_C0_VCORE_VID2       0x40 /* VID2 of ISL6262 */
+#define CONFIG_SYS_PCA953X_C0_VCORE_VID3       0x80 /* VID3 of ISL6262 */
+
+/* PCA9557 @ 0x1c*/
+#define CONFIG_SYS_PCA953X_XMC0_ROOT0          0x01 /* PU; Low if XMC is RC */
+#define CONFIG_SYS_PCA953X_XMC0_MVMR0          0x02 /* XMC EEPROM write protect */
+#define CONFIG_SYS_PCA953X_XMC0_WAKE           0x04 /* PU; XMC wake */
+#define CONFIG_SYS_PCA953X_XMC0_BIST           0x08 /* PU; XMC built in self test */
+#define CONFIG_SYS_PCA953X_XMC_PRESENT         0x10 /* PU; Low if XMC module installed */
+#define CONFIG_SYS_PCA953X_PMC_PRESENT         0x20 /* PU; Low if PMC module installed */
+#define CONFIG_SYS_PCA953X_PMC0_MONARCH                0x40 /* PMC monarch mode enable */
+#define CONFIG_SYS_PCA953X_PMC0_EREADY         0x80 /* PU; PMC PCI eready */
+
+/* PCA9557 @ 0x1e*/
+#define CONFIG_SYS_PCA953X_P0_GA0              0x01 /* PU; VPX Geographical address */
+#define CONFIG_SYS_PCA953X_P0_GA1              0x02 /* PU; VPX Geographical address */
+#define CONFIG_SYS_PCA953X_P0_GA2              0x04 /* PU; VPX Geographical address */
+#define CONFIG_SYS_PCA953X_P0_GA3              0x08 /* PU; VPX Geographical address */
+#define CONFIG_SYS_PCA953X_P0_GA4              0x10 /* PU; VPX Geographical address */
+#define CONFIG_SYS_PCA953X_P0_GAP              0x20 /* PU; tied to VPX P0.GAP */
+#define CONFIG_SYS_PCA953X_P1_SYSEN            0x80 /* PU; Pulled high; tied to VPX P1.SYSCON */
+
+/* PCA9557 @ 0x1f */
+#define CONFIG_SYS_PCA953X_GPIO_VPX0           0x01 /* PU */
+#define CONFIG_SYS_PCA953X_GPIO_VPX1           0x02 /* PU */
+#define CONFIG_SYS_PCA953X_GPIO_VPX2           0x04 /* PU */
+#define CONFIG_SYS_PCA953X_GPIO_VPX3           0x08 /* PU */
+#define CONFIG_SYS_PCA953X_VPX_FRU_WRCTL       0x10 /* PD; I2C master source for FRU SEEPROM */
+
+/*
+ * General PCI
+ * Memory space is mapped 1-1, but I/O space must start from 0.
+ */
+/* PCIE1 - VPX P1 */
+#define CONFIG_SYS_PCIE1_MEM_BUS       0x80000000
+#define CONFIG_SYS_PCIE1_MEM_PHYS      CONFIG_SYS_PCIE1_MEM_BUS
+#define CONFIG_SYS_PCIE1_MEM_SIZE      0x40000000      /* 1G */
+#define CONFIG_SYS_PCIE1_IO_BUS                0x00000000
+#define CONFIG_SYS_PCIE1_IO_PHYS       0xe8000000
+#define CONFIG_SYS_PCIE1_IO_SIZE       0x00800000      /* 8M */
+
+/* PCIE2 - PEX8518 */
+#define CONFIG_SYS_PCIE2_MEM_BUS       0xc0000000
+#define CONFIG_SYS_PCIE2_MEM_PHYS      CONFIG_SYS_PCIE2_MEM_BUS
+#define CONFIG_SYS_PCIE2_MEM_SIZE      0x10000000      /* 256M */
+#define CONFIG_SYS_PCIE2_IO_BUS                0x00000000
+#define CONFIG_SYS_PCIE2_IO_PHYS       0xe8800000
+#define CONFIG_SYS_PCIE2_IO_SIZE       0x00800000      /* 8M */
+
+/*
+ * Networking options
+ */
+#define CONFIG_TSEC_ENET               /* tsec ethernet support */
+#define CONFIG_PHY_GIGE                1       /* Include GbE speed/duplex detection */
+#define CONFIG_NET_MULTI       1
+#define CONFIG_TSEC_TBI
+#define CONFIG_MII             1       /* MII PHY management */
+#define CONFIG_MII_DEFAULT_TSEC        1       /* Allow unregistered phys */
+#define CONFIG_ETHPRIME                "eTSEC2"
+
+#define CONFIG_TSEC1           1
+#define CONFIG_TSEC1_NAME      "eTSEC1"
+#define TSEC1_FLAGS            (TSEC_GIGABIT | TSEC_REDUCED)
+#define TSEC1_PHY_ADDR         1
+#define TSEC1_PHYIDX           0
+#define CONFIG_HAS_ETH0
+
+#define CONFIG_TSEC2           1
+#define CONFIG_TSEC2_NAME      "eTSEC2"
+#define TSEC2_FLAGS            (TSEC_GIGABIT | TSEC_REDUCED)
+#define TSEC2_PHY_ADDR         2
+#define TSEC2_PHYIDX           0
+#define CONFIG_HAS_ETH1
+
+/*
+ * Command configuration.
+ */
+#include <config_cmd_default.h>
+
+#define CONFIG_CMD_ASKENV
+#define CONFIG_CMD_DATE
+#define CONFIG_CMD_DHCP
+#define CONFIG_CMD_DS4510
+#define CONFIG_CMD_DS4510_INFO
+#define CONFIG_CMD_DTT
+#define CONFIG_CMD_EEPROM
+#define CONFIG_CMD_ELF
+#define CONFIG_CMD_FLASH
+#define CONFIG_CMD_I2C
+#define CONFIG_CMD_JFFS2
+#define CONFIG_CMD_MII
+#define CONFIG_CMD_NAND
+#define CONFIG_CMD_NET
+#define CONFIG_CMD_PCA953X
+#define CONFIG_CMD_PCA953X_INFO
+#define CONFIG_CMD_PCI
+#define CONFIG_CMD_PCI_ENUM
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_SAVEENV
+#define CONFIG_CMD_SNTP
+#define CONFIG_CMD_REGINFO
+
+/*
+ * Miscellaneous configurable options
+ */
+#define CONFIG_SYS_LONGHELP                    /* undef to save memory */
+#define CONFIG_SYS_LOAD_ADDR   0x2000000       /* default load address */
+#define CONFIG_SYS_PROMPT      "=> "           /* Monitor Command Prompt */
+#define CONFIG_SYS_CBSIZE      256             /* Console I/O Buffer Size */
+#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
+#define CONFIG_SYS_MAXARGS     16              /* max number of command args */
+#define CONFIG_SYS_BARGSIZE    CONFIG_SYS_CBSIZE       /* Boot Argument Buffer Size */
+#define CONFIG_SYS_HZ          1000            /* decrementer freq: 1ms ticks */
+#define CONFIG_CMDLINE_EDITING 1               /* add command line history     */
+#define CONFIG_AUTO_COMPLETE   1               /* add autocompletion support */
+#define CONFIG_LOADADDR                0x1000000       /* default location for tftp and bootm */
+#define CONFIG_BOOTDELAY       3               /* -1 disables auto-boot */
+#define CONFIG_PANIC_HANG                      /* do not reset board on panic */
+#define CONFIG_PREBOOT                         /* enable preboot variable */
+#define CONFIG_FIT             1
+#define CONFIG_FIT_VERBOSE     1
+#define CONFIG_INTEGRITY                       /* support booting INTEGRITY OS */
+
+/*
+ * For booting Linux, the board info and command line data
+ * have to be in the first 16 MB of memory, since this is
+ * the maximum mapped by the Linux kernel during initialization.
+ */
+#define CONFIG_SYS_BOOTMAPSZ   (16 << 20)      /* Initial Memory map for Linux*/
+#define CONFIG_SYS_BOOTM_LEN   (16 << 20)      /* Increase max gunzip size */
+
+/*
+ * Environment Configuration
+ */
+#define CONFIG_ENV_IS_IN_FLASH 1
+#define CONFIG_ENV_SECT_SIZE   0x20000         /* 128k (one sector) for env */
+#define CONFIG_ENV_SIZE                0x8000
+#define CONFIG_ENV_ADDR                (CONFIG_SYS_MONITOR_BASE - (256 * 1024))
+
+/*
+ * Flash memory map:
+ * fff80000 - ffffffff     Pri U-Boot (512 KB)
+ * fff40000 - fff7ffff     Pri U-Boot Environment (256 KB)
+ * fff00000 - fff3ffff     Pri FDT (256KB)
+ * fef00000 - ffefffff     Pri OS image (16MB)
+ * f8000000 - feefffff     Pri OS Use/Filesystem (111MB)
+ *
+ * f7f80000 - f7ffffff     Sec U-Boot (512 KB)
+ * f7f40000 - f7f7ffff     Sec U-Boot Environment (256 KB)
+ * f7f00000 - f7f3ffff     Sec FDT (256KB)
+ * f6f00000 - f7efffff     Sec OS image (16MB)
+ * f0000000 - f6efffff     Sec OS Use/Filesystem (111MB)
+ */
+#define CONFIG_UBOOT1_ENV_ADDR MK_STR(0xfff80000)
+#define CONFIG_UBOOT2_ENV_ADDR MK_STR(0xf7f80000)
+#define CONFIG_FDT1_ENV_ADDR   MK_STR(0xfff00000)
+#define CONFIG_FDT2_ENV_ADDR   MK_STR(0xf7f00000)
+#define CONFIG_OS1_ENV_ADDR    MK_STR(0xfef00000)
+#define CONFIG_OS2_ENV_ADDR    MK_STR(0xf6f00000)
+
+#define CONFIG_PROG_UBOOT1                                             \
+       "$download_cmd $loadaddr $ubootfile; "                          \
+       "if test $? -eq 0; then "                                       \
+               "protect off "CONFIG_UBOOT1_ENV_ADDR" +80000; "         \
+               "erase "CONFIG_UBOOT1_ENV_ADDR" +80000; "               \
+               "cp.w $loadaddr "CONFIG_UBOOT1_ENV_ADDR" 40000; "       \
+               "protect on "CONFIG_UBOOT1_ENV_ADDR" +80000; "          \
+               "cmp.b $loadaddr "CONFIG_UBOOT1_ENV_ADDR" 80000; "      \
+               "if test $? -ne 0; then "                               \
+                       "echo PROGRAM FAILED; "                         \
+               "else; "                                                \
+                       "echo PROGRAM SUCCEEDED; "                      \
+               "fi; "                                                  \
+       "else; "                                                        \
+               "echo DOWNLOAD FAILED; "                                \
+       "fi;"
+
+#define CONFIG_PROG_UBOOT2                                             \
+       "$download_cmd $loadaddr $ubootfile; "                          \
+       "if test $? -eq 0; then "                                       \
+               "protect off "CONFIG_UBOOT2_ENV_ADDR" +80000; "         \
+               "erase "CONFIG_UBOOT2_ENV_ADDR" +80000; "               \
+               "cp.w $loadaddr "CONFIG_UBOOT2_ENV_ADDR" 40000; "       \
+               "protect on "CONFIG_UBOOT2_ENV_ADDR" +80000; "          \
+               "cmp.b $loadaddr "CONFIG_UBOOT2_ENV_ADDR" 80000; "      \
+               "if test $? -ne 0; then "                               \
+                       "echo PROGRAM FAILED; "                         \
+               "else; "                                                \
+                       "echo PROGRAM SUCCEEDED; "                      \
+               "fi; "                                                  \
+       "else; "                                                        \
+               "echo DOWNLOAD FAILED; "                                \
+       "fi;"
+
+#define CONFIG_BOOT_OS_NET                                             \
+       "$download_cmd $osaddr $osfile; "                               \
+       "if test $? -eq 0; then "                                       \
+               "if test -n $fdtaddr; then "                            \
+                       "$download_cmd $fdtaddr $fdtfile; "             \
+                       "if test $? -eq 0; then "                       \
+                               "bootm $osaddr - $fdtaddr; "            \
+                       "else; "                                        \
+                               "echo FDT DOWNLOAD FAILED; "            \
+                       "fi; "                                          \
+               "else; "                                                \
+                       "bootm $osaddr; "                               \
+               "fi; "                                                  \
+       "else; "                                                        \
+               "echo OS DOWNLOAD FAILED; "                             \
+       "fi;"
+
+#define CONFIG_PROG_OS1                                                        \
+       "$download_cmd $osaddr $osfile; "                               \
+       "if test $? -eq 0; then "                                       \
+               "erase "CONFIG_OS1_ENV_ADDR" +$filesize; "              \
+               "cp.b $osaddr "CONFIG_OS1_ENV_ADDR" $filesize; "        \
+               "cmp.b $osaddr "CONFIG_OS1_ENV_ADDR" $filesize; "       \
+               "if test $? -ne 0; then "                               \
+                       "echo OS PROGRAM FAILED; "                      \
+               "else; "                                                \
+                       "echo OS PROGRAM SUCCEEDED; "                   \
+               "fi; "                                                  \
+       "else; "                                                        \
+               "echo OS DOWNLOAD FAILED; "                             \
+       "fi;"
+
+#define CONFIG_PROG_OS2                                                        \
+       "$download_cmd $osaddr $osfile; "                               \
+       "if test $? -eq 0; then "                                       \
+               "erase "CONFIG_OS2_ENV_ADDR" +$filesize; "              \
+               "cp.b $osaddr "CONFIG_OS2_ENV_ADDR" $filesize; "        \
+               "cmp.b $osaddr "CONFIG_OS2_ENV_ADDR" $filesize; "       \
+               "if test $? -ne 0; then "                               \
+                       "echo OS PROGRAM FAILED; "                      \
+               "else; "                                                \
+                       "echo OS PROGRAM SUCCEEDED; "                   \
+               "fi; "                                                  \
+       "else; "                                                        \
+               "echo OS DOWNLOAD FAILED; "                             \
+       "fi;"
+
+#define CONFIG_PROG_FDT1                                               \
+       "$download_cmd $fdtaddr $fdtfile; "                             \
+       "if test $? -eq 0; then "                                       \
+               "erase "CONFIG_FDT1_ENV_ADDR" +$filesize;"              \
+               "cp.b $fdtaddr "CONFIG_FDT1_ENV_ADDR" $filesize; "      \
+               "cmp.b $fdtaddr "CONFIG_FDT1_ENV_ADDR" $filesize; "     \
+               "if test $? -ne 0; then "                               \
+                       "echo FDT PROGRAM FAILED; "                     \
+               "else; "                                                \
+                       "echo FDT PROGRAM SUCCEEDED; "                  \
+               "fi; "                                                  \
+       "else; "                                                        \
+               "echo FDT DOWNLOAD FAILED; "                            \
+       "fi;"
+
+#define CONFIG_PROG_FDT2                                               \
+       "$download_cmd $fdtaddr $fdtfile; "                             \
+       "if test $? -eq 0; then "                                       \
+               "erase "CONFIG_FDT2_ENV_ADDR" +$filesize;"              \
+               "cp.b $fdtaddr "CONFIG_FDT2_ENV_ADDR" $filesize; "      \
+               "cmp.b $fdtaddr "CONFIG_FDT2_ENV_ADDR" $filesize; "     \
+               "if test $? -ne 0; then "                               \
+                       "echo FDT PROGRAM FAILED; "                     \
+               "else; "                                                \
+                       "echo FDT PROGRAM SUCCEEDED; "                  \
+               "fi; "                                                  \
+       "else; "                                                        \
+               "echo FDT DOWNLOAD FAILED; "                            \
+       "fi;"
+
+#define        CONFIG_EXTRA_ENV_SETTINGS                                       \
+       "autoload=yes\0"                                                \
+       "download_cmd=tftp\0"                                           \
+       "console_args=console=ttyS0,115200\0"                           \
+       "root_args=root=/dev/nfs rw\0"                                  \
+       "misc_args=ip=on\0"                                             \
+       "set_bootargs=setenv bootargs ${console_args} ${root_args} ${misc_args}\0" \
+       "bootfile=/home/user/file\0"                                    \
+       "osfile=/home/user/board.uImage\0"                              \
+       "fdtfile=/home/user/board.dtb\0"                                \
+       "ubootfile=/home/user/u-boot.bin\0"                             \
+       "fdtaddr=c00000\0"                                              \
+       "osaddr=0x1000000\0"                                            \
+       "loadaddr=0x1000000\0"                                          \
+       "prog_uboot1="CONFIG_PROG_UBOOT1"\0"                            \
+       "prog_uboot2="CONFIG_PROG_UBOOT2"\0"                            \
+       "prog_os1="CONFIG_PROG_OS1"\0"                                  \
+       "prog_os2="CONFIG_PROG_OS2"\0"                                  \
+       "prog_fdt1="CONFIG_PROG_FDT1"\0"                                \
+       "prog_fdt2="CONFIG_PROG_FDT2"\0"                                \
+       "bootcmd_net=run set_bootargs; "CONFIG_BOOT_OS_NET"\0"          \
+       "bootcmd_flash1=run set_bootargs; "                             \
+               "bootm "CONFIG_OS1_ENV_ADDR" - "CONFIG_FDT1_ENV_ADDR"\0"\
+       "bootcmd_flash2=run set_bootargs; "                             \
+               "bootm "CONFIG_OS2_ENV_ADDR" - "CONFIG_FDT2_ENV_ADDR"\0"\
+       "bootcmd=run bootcmd_flash1\0"
+#endif /* __CONFIG_H */
diff --git a/include/configs/xpedite550x.h b/include/configs/xpedite550x.h
new file mode 100644 (file)
index 0000000..42d1f69
--- /dev/null
@@ -0,0 +1,606 @@
+/*
+ * Copyright 2010 Extreme Engineering Solutions, Inc.
+ * Copyright 2007-2008 Freescale Semiconductor, Inc.
+ *
+ * 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
+ */
+
+/*
+ * xpedite550x board configuration file
+ */
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+/*
+ * High Level Configuration Options
+ */
+#define CONFIG_BOOKE           1       /* BOOKE */
+#define CONFIG_E500            1       /* BOOKE e500 family */
+#define CONFIG_MPC85xx         1       /* MPC8540/60/55/41/48 */
+#define CONFIG_P2020           1
+#define CONFIG_XPEDITE550X     1
+#define CONFIG_SYS_BOARD_NAME  "XPedite5500"
+#define CONFIG_SYS_FORM_PMC_XMC        1
+#define CONFIG_PRPMC_PCI_ALIAS "pci0"  /* Processor PMC interface on pci0 */
+#define CONFIG_BOARD_EARLY_INIT_R      /* Call board_pre_init */
+
+#ifndef CONFIG_SYS_TEXT_BASE
+#define CONFIG_SYS_TEXT_BASE   0xfff80000
+#endif
+
+#define CONFIG_PCI             1       /* Enable PCI/PCIE */
+#define CONFIG_PCI_PNP         1       /* do pci plug-and-play */
+#define CONFIG_PCI_SCAN_SHOW   1       /* show pci devices on startup */
+#define CONFIG_PCIE1           1       /* PCIE controler 1 (PEX8112 or XMC) */
+#define CONFIG_FSL_PCI_INIT    1       /* Use common FSL init code */
+#define CONFIG_SYS_PCI_64BIT   1       /* enable 64-bit PCI resources */
+#define CONFIG_FSL_PCIE_RESET  1       /* need PCIe reset errata */
+#define CONFIG_FSL_LAW         1       /* Use common FSL init code */
+#define CONFIG_FSL_ELBC                1
+
+/*
+ * Multicore config
+ */
+#define CONFIG_MP
+#define CONFIG_BPTR_VIRT_ADDR  0xee000000      /* virt boot page address */
+#define CONFIG_MPC8xxx_DISABLE_BPTR            /* Don't leave BPTR enabled */
+
+/*
+ * DDR config
+ */
+#define CONFIG_FSL_DDR3
+#define CONFIG_SPD_EEPROM              /* Use SPD EEPROM for DDR setup */
+#define CONFIG_DDR_SPD
+#define CONFIG_MEM_INIT_VALUE          0xdeadbeef
+#define SPD_EEPROM_ADDRESS1                    0x54
+#define SPD_EEPROM_OFFSET              0x200   /* OFFSET of SPD in EEPROM */
+#define CONFIG_NUM_DDR_CONTROLLERS     1
+#define CONFIG_DIMM_SLOTS_PER_CTLR     1
+#define CONFIG_CHIP_SELECTS_PER_CTRL 2
+#define CONFIG_DDR_ECC
+#define CONFIG_ECC_INIT_VIA_DDRCONTROLLER
+#define CONFIG_SYS_DDR_SDRAM_BASE      0x00000000 /* DDR is system memory*/
+#define CONFIG_SYS_SDRAM_BASE          CONFIG_SYS_DDR_SDRAM_BASE
+#define CONFIG_VERY_BIG_RAM
+
+#ifndef __ASSEMBLY__
+extern unsigned long get_board_sys_clk(unsigned long dummy);
+extern unsigned long get_board_ddr_clk(unsigned long dummy);
+#endif
+
+#define CONFIG_SYS_CLK_FREQ    get_board_sys_clk(0) /* sysclk for MPC85xx */
+#define CONFIG_DDR_CLK_FREQ    get_board_ddr_clk(0) /* ddrclk for MPC85xx */
+
+/*
+ * These can be toggled for performance analysis, otherwise use default.
+ */
+#define CONFIG_L2_CACHE                        /* toggle L2 cache */
+#define CONFIG_BTB                     /* toggle branch predition */
+#define CONFIG_ENABLE_36BIT_PHYS       1
+
+/*
+ * Base addresses -- Note these are effective addresses where the
+ * actual resources get mapped (not physical addresses)
+ */
+#define CONFIG_SYS_CCSRBAR_DEFAULT     0xff700000      /* CCSRBAR Default */
+#define CONFIG_SYS_CCSRBAR             0xef000000      /* relocated CCSRBAR */
+#define CONFIG_SYS_CCSRBAR_PHYS        CONFIG_SYS_CCSRBAR      /* physical addr of CCSRBAR */
+#define CONFIG_SYS_IMMR                CONFIG_SYS_CCSRBAR      /* PQII uses CONFIG_SYS_IMMR */
+
+/*
+ * Diagnostics
+ */
+#define CONFIG_SYS_ALT_MEMTEST
+#define CONFIG_SYS_MEMTEST_START       0x10000000
+#define CONFIG_SYS_MEMTEST_END         0x20000000
+#define CONFIG_POST                    (CONFIG_SYS_POST_MEMORY | \
+                                        CONFIG_SYS_POST_I2C)
+#define I2C_ADDR_LIST                  {CONFIG_SYS_I2C_EEPROM_ADDR,    \
+                                        CONFIG_SYS_I2C_LM75_ADDR,      \
+                                        CONFIG_SYS_I2C_LM90_ADDR,      \
+                                        CONFIG_SYS_I2C_PCA953X_ADDR0,  \
+                                        CONFIG_SYS_I2C_PCA953X_ADDR2,  \
+                                        CONFIG_SYS_I2C_PCA953X_ADDR3,  \
+                                        CONFIG_SYS_I2C_RTC_ADDR}
+
+/*
+ * Memory map
+ * 0x0000_0000 0x7fff_ffff     DDR                     2G Cacheable
+ * 0x8000_0000 0xbfff_ffff     PCIe1 Mem               1G non-cacheable
+ * 0xe000_0000 0xe7ff_ffff     SRAM/SSRAM/L1 Cache     128M non-cacheable
+ * 0xe800_0000 0xe87f_ffff     PCIe1 IO                8M non-cacheable
+ * 0xee00_0000 0xee00_ffff     Boot page translation   4K non-cacheable
+ * 0xef00_0000 0xef0f_ffff     CCSR/IMMR               1M non-cacheable
+ * 0xef80_0000 0xef8f_ffff     NAND Flash              1M non-cacheable
+ * 0xf000_0000 0xf7ff_ffff     NOR Flash 2             128M non-cacheable
+ * 0xf800_0000 0xffff_ffff     NOR Flash 1             128M non-cacheable
+ */
+
+#define CONFIG_SYS_LBC_LCRR    (LCRR_CLKDIV_8 | LCRR_EADC_3)
+
+/*
+ * NAND flash configuration
+ */
+#define CONFIG_SYS_NAND_BASE           0xef800000
+#define CONFIG_SYS_NAND_BASE2          0xef840000 /* Unused at this time */
+#define CONFIG_SYS_NAND_BASE_LIST      {CONFIG_SYS_NAND_BASE, \
+                                        CONFIG_SYS_NAND_BASE2}
+#define CONFIG_SYS_MAX_NAND_DEVICE     2
+#define CONFIG_MTD_NAND_VERIFY_WRITE
+#define CONFIG_SYS_NAND_QUIET_TEST     /* 2nd NAND flash not always populated */
+#define CONFIG_NAND_FSL_ELBC
+
+/*
+ * NOR flash configuration
+ */
+#define CONFIG_SYS_FLASH_BASE          0xf8000000
+#define CONFIG_SYS_FLASH_BASE2         0xf0000000
+#define CONFIG_SYS_FLASH_BANKS_LIST    {CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FLASH_BASE2}
+#define CONFIG_SYS_MAX_FLASH_BANKS     2               /* number of banks */
+#define CONFIG_SYS_MAX_FLASH_SECT      1024            /* sectors per device */
+#define CONFIG_SYS_FLASH_ERASE_TOUT    60000           /* Flash Erase Timeout (ms) */
+#define CONFIG_SYS_FLASH_WRITE_TOUT    500             /* Flash Write Timeout (ms) */
+#define CONFIG_FLASH_CFI_DRIVER
+#define CONFIG_SYS_FLASH_CFI
+#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
+#define CONFIG_SYS_FLASH_AUTOPROTECT_LIST      { {0xfff40000, 0xc0000}, \
+                                                 {0xf7f40000, 0xc0000} }
+#define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE    /* start of monitor */
+
+/*
+ * Chip select configuration
+ */
+/* NOR Flash 0 on CS0 */
+#define CONFIG_SYS_BR0_PRELIM  (CONFIG_SYS_FLASH_BASE  | \
+                                BR_PS_16               | \
+                                BR_V)
+#define CONFIG_SYS_OR0_PRELIM  (OR_AM_128MB            | \
+                                OR_GPCM_CSNT           | \
+                                OR_GPCM_XACS           | \
+                                OR_GPCM_ACS_DIV2       | \
+                                OR_GPCM_SCY_8          | \
+                                OR_GPCM_TRLX           | \
+                                OR_GPCM_EHTR           | \
+                                OR_GPCM_EAD)
+
+/* NOR Flash 1 on CS1 */
+#define CONFIG_SYS_BR1_PRELIM  (CONFIG_SYS_FLASH_BASE2 | \
+                                BR_PS_16               | \
+                                BR_V)
+#define CONFIG_SYS_OR1_PRELIM  CONFIG_SYS_OR0_PRELIM
+
+/* NAND flash on CS2 */
+#define CONFIG_SYS_BR2_PRELIM  (CONFIG_SYS_NAND_BASE   | \
+                                (2<<BR_DECC_SHIFT)     | \
+                                BR_PS_8                | \
+                                BR_MS_FCM              | \
+                                BR_V)
+
+/* NAND flash on CS2 */
+#define CONFIG_SYS_OR2_PRELIM  (OR_AM_256KB    | \
+                                OR_FCM_PGS     | \
+                                OR_FCM_CSCT    | \
+                                OR_FCM_CST     | \
+                                OR_FCM_CHT     | \
+                                OR_FCM_SCY_1   | \
+                                OR_FCM_TRLX    | \
+                                OR_FCM_EHTR)
+
+/* NAND flash on CS3 */
+#define CONFIG_SYS_BR3_PRELIM  (CONFIG_SYS_NAND_BASE2  | \
+                                (2<<BR_DECC_SHIFT)     | \
+                                BR_PS_8                | \
+                                BR_MS_FCM              | \
+                                BR_V)
+#define CONFIG_SYS_OR3_PRELIM  CONFIG_SYS_OR2_PRELIM
+
+/*
+ * Use L1 as initial stack
+ */
+#define CONFIG_SYS_INIT_RAM_LOCK       1
+#define CONFIG_SYS_INIT_RAM_ADDR       0xe0000000
+#define CONFIG_SYS_INIT_RAM_SIZE               0x00004000
+
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
+
+#define CONFIG_SYS_MONITOR_LEN         (512 * 1024)    /* Reserve 512 KB for Mon */
+#define CONFIG_SYS_MALLOC_LEN          (1024 * 1024)   /* Reserved for malloc */
+
+/*
+ * Serial Port
+ */
+#define CONFIG_CONS_INDEX              1
+#define CONFIG_SYS_NS16550
+#define CONFIG_SYS_NS16550_SERIAL
+#define CONFIG_SYS_NS16550_REG_SIZE    1
+#define CONFIG_SYS_NS16550_CLK         get_bus_freq(0)
+#define CONFIG_SYS_NS16550_COM1        (CONFIG_SYS_CCSRBAR+0x4500)
+#define CONFIG_SYS_NS16550_COM2        (CONFIG_SYS_CCSRBAR+0x4600)
+#define CONFIG_SYS_BAUDRATE_TABLE      \
+       {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200}
+#define CONFIG_BAUDRATE                        115200
+#define CONFIG_LOADS_ECHO              1       /* echo on for serial download */
+#define CONFIG_SYS_LOADS_BAUD_CHANGE   1       /* allow baudrate change */
+
+/*
+ * Use the HUSH parser
+ */
+#define CONFIG_SYS_HUSH_PARSER
+#define CONFIG_SYS_PROMPT_HUSH_PS2     "> "
+
+/*
+ * Pass open firmware flat tree
+ */
+#define CONFIG_OF_LIBFDT               1
+#define CONFIG_OF_BOARD_SETUP          1
+#define CONFIG_OF_STDOUT_VIA_ALIAS     1
+#define CONFIG_FDT_FIXUP_PCI_IRQ       1
+
+/*
+ * I2C
+ */
+#define CONFIG_FSL_I2C                         /* Use FSL common I2C driver */
+#define CONFIG_HARD_I2C                                /* I2C with hardware support */
+#define CONFIG_SYS_I2C_SPEED           400000  /* I2C speed and slave address */
+#define CONFIG_SYS_I2C_SLAVE           0x7F
+#define CONFIG_SYS_I2C_OFFSET          0x3000
+#define CONFIG_SYS_I2C2_OFFSET         0x3100
+#define CONFIG_I2C_MULTI_BUS
+
+/* I2C DS7505 temperature sensor */
+#define CONFIG_DTT_LM75
+#define CONFIG_DTT_SENSORS             { 0 }
+#define CONFIG_SYS_I2C_LM75_ADDR       0x48
+
+/* I2C ADT7461 temperature sensor */
+#define CONFIG_SYS_I2C_LM90_ADDR       0x4C
+
+/* I2C EEPROM - AT24C128B */
+#define CONFIG_SYS_I2C_EEPROM_ADDR             0x54
+#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN         2
+#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS      6       /* 64 byte pages */
+#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS  10      /* take up to 10 msec */
+
+/* I2C RTC */
+#define CONFIG_RTC_M41T11              1
+#define CONFIG_SYS_I2C_RTC_ADDR                0x68
+#define CONFIG_SYS_M41T11_BASE_YEAR    2000
+
+/* GPIO */
+#define CONFIG_PCA953X
+#define CONFIG_SYS_I2C_PCA953X_ADDR0   0x18
+#define CONFIG_SYS_I2C_PCA953X_ADDR1   0x1c
+#define CONFIG_SYS_I2C_PCA953X_ADDR2   0x1e
+#define CONFIG_SYS_I2C_PCA953X_ADDR3   0x1f
+#define CONFIG_SYS_I2C_PCA953X_ADDR    CONFIG_SYS_I2C_PCA953X_ADDR0
+
+/*
+ * GPIO pin definitions, PU = pulled high, PD = pulled low
+ */
+/* PCA9557 @ 0x18*/
+#define CONFIG_SYS_PCA953X_C0_SER0_EN          0x01 /* PU; UART0 enable (1: enabled) */
+#define CONFIG_SYS_PCA953X_C0_SER0_MODE                0x02 /* PU; UART0 serial mode select (1: RS-485, 0: RS-232) */
+#define CONFIG_SYS_PCA953X_C0_SER1_EN          0x04 /* PU; UART1 enable (1: enabled) */
+#define CONFIG_SYS_PCA953X_C0_SER1_MODE                0x08 /* PU; UART1 serial mode select (1: RS-485, 0: RS-232) */
+#define CONFIG_SYS_PCA953X_C0_FLASH_PASS_CS    0x10 /* PU; Boot flash CS select */
+#define CONFIG_SYS_PCA953X_NVM_WP              0x20 /* PU; Write protection (0: disabled, 1: enabled) */
+
+/* PCA9557 @ 0x1e*/
+#define CONFIG_SYS_PCA953X_XMC_GA0             0x01 /* PU; */
+#define CONFIG_SYS_PCA953X_XMC_GA1             0x02 /* PU; */
+#define CONFIG_SYS_PCA953X_XMC_GA2             0x04 /* PU; */
+#define CONFIG_SYS_PCA953X_XMC_WAKE            0x10 /* PU; */
+#define CONFIG_SYS_PCA953X_XMC_BIST            0x20 /* Enable XMC BIST */
+#define CONFIG_SYS_PCA953X_PMC_EREADY          0x40 /* PU; PMC PCI eready */
+#define CONFIG_SYS_PCA953X_PMC_MONARCH         0x80 /* PMC monarch mode enable */
+
+/* PCA9557 @ 0x1f */
+#define CONFIG_SYS_PCA953X_MC_GPIO0            0x01 /* PU; */
+#define CONFIG_SYS_PCA953X_MC_GPIO1            0x02 /* PU; */
+#define CONFIG_SYS_PCA953X_MC_GPIO2            0x04 /* PU; */
+#define CONFIG_SYS_PCA953X_MC_GPIO3            0x08 /* PU; */
+#define CONFIG_SYS_PCA953X_MC_GPIO4            0x10 /* PU; */
+#define CONFIG_SYS_PCA953X_MC_GPIO5            0x20 /* PU; */
+#define CONFIG_SYS_PCA953X_MC_GPIO6            0x40 /* PU; */
+#define CONFIG_SYS_PCA953X_MC_GPIO7            0x80 /* PU; */
+
+/*
+ * General PCI
+ * Memory space is mapped 1-1, but I/O space must start from 0.
+ */
+
+/* controller 1 - PEX8112 or XMC, depending on build option */
+#define CONFIG_SYS_PCIE1_MEM_BUS       0x80000000
+#define CONFIG_SYS_PCIE1_MEM_PHYS      CONFIG_SYS_PCIE1_MEM_BUS
+#define CONFIG_SYS_PCIE1_MEM_SIZE      0x40000000      /* 1G */
+#define CONFIG_SYS_PCIE1_IO_BUS                0x00000000
+#define CONFIG_SYS_PCIE1_IO_PHYS       0xe8000000
+#define CONFIG_SYS_PCIE1_IO_SIZE       0x00800000      /* 8M */
+
+
+/*
+ * Networking options
+ */
+#define CONFIG_TSEC_ENET               /* tsec ethernet support */
+#define CONFIG_PHY_GIGE                1       /* Include GbE speed/duplex detection */
+#define CONFIG_NET_MULTI       1
+#define CONFIG_TSEC_TBI
+#define CONFIG_MII             1       /* MII PHY management */
+#define CONFIG_MII_DEFAULT_TSEC        1       /* Allow unregistered phys */
+#define CONFIG_ETHPRIME                "eTSEC2"
+
+#define CONFIG_TSEC1           1
+#define CONFIG_TSEC1_NAME      "eTSEC1"
+#define TSEC1_FLAGS            (TSEC_GIGABIT | TSEC_REDUCED)
+#define TSEC1_PHY_ADDR         1
+#define TSEC1_PHYIDX           0
+#define CONFIG_HAS_ETH0
+
+#define CONFIG_TSEC2           1
+#define CONFIG_TSEC2_NAME      "eTSEC2"
+#define TSEC2_FLAGS            (TSEC_GIGABIT | TSEC_REDUCED)
+#define TSEC2_PHY_ADDR         2
+#define TSEC2_PHYIDX           0
+#define CONFIG_HAS_ETH1
+
+#define CONFIG_TSEC3           1
+#define CONFIG_TSEC3_NAME      "eTSEC3"
+#define TSEC3_FLAGS            (TSEC_GIGABIT | TSEC_REDUCED)
+#define TSEC3_PHY_ADDR         3
+#define TSEC3_PHYIDX           0
+#define CONFIG_HAS_ETH2
+
+/*
+ * USB
+ */
+#define CONFIG_USB_STORAGE
+#define CONFIG_USB_EHCI
+#define CONFIG_USB_EHCI_FSL
+#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
+#define CONFIG_DOS_PARTITION
+
+/*
+ * Command configuration.
+ */
+#include <config_cmd_default.h>
+
+#define CONFIG_CMD_ASKENV
+#define CONFIG_CMD_DATE
+#define CONFIG_CMD_DHCP
+#define CONFIG_CMD_DTT
+#define CONFIG_CMD_EEPROM
+#define CONFIG_CMD_ELF
+#define CONFIG_CMD_FLASH
+#define CONFIG_CMD_I2C
+#define CONFIG_CMD_JFFS2
+#define CONFIG_CMD_MII
+#define CONFIG_CMD_NAND
+#define CONFIG_CMD_NET
+#define CONFIG_CMD_PCA953X
+#define CONFIG_CMD_PCA953X_INFO
+#define CONFIG_CMD_PCI
+#define CONFIG_CMD_PCI_ENUM
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_REGINFO
+#define CONFIG_CMD_SAVEENV
+#define CONFIG_CMD_SNTP
+#define CONFIG_CMD_USB
+
+/*
+ * Miscellaneous configurable options
+ */
+#define CONFIG_SYS_LONGHELP                    /* undef to save memory */
+#define CONFIG_SYS_LOAD_ADDR   0x2000000       /* default load address */
+#define CONFIG_SYS_PROMPT      "=> "           /* Monitor Command Prompt */
+#define CONFIG_SYS_CBSIZE      256             /* Console I/O Buffer Size */
+#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
+#define CONFIG_SYS_MAXARGS     16              /* max number of command args */
+#define CONFIG_SYS_BARGSIZE    CONFIG_SYS_CBSIZE       /* Boot Argument Buffer Size */
+#define CONFIG_SYS_HZ          1000            /* decrementer freq: 1ms ticks */
+#define CONFIG_CMDLINE_EDITING 1               /* add command line history     */
+#define CONFIG_AUTO_COMPLETE   1               /* add autocompletion support */
+#define CONFIG_LOADADDR                0x1000000       /* default location for tftp and bootm */
+#define CONFIG_BOOTDELAY       3               /* -1 disables auto-boot */
+#define CONFIG_PANIC_HANG                      /* do not reset board on panic */
+#define CONFIG_PREBOOT                         /* enable preboot variable */
+#define CONFIG_FIT             1
+#define CONFIG_FIT_VERBOSE     1
+#define CONFIG_INTEGRITY                       /* support booting INTEGRITY OS */
+
+/*
+ * For booting Linux, the board info and command line data
+ * have to be in the first 16 MB of memory, since this is
+ * the maximum mapped by the Linux kernel during initialization.
+ */
+#define CONFIG_SYS_BOOTMAPSZ   (16 << 20)      /* Initial Memory map for Linux*/
+#define CONFIG_SYS_BOOTM_LEN   (16 << 20)      /* Increase max gunzip size */
+
+/*
+ * Boot Flags
+ */
+#define BOOTFLAG_COLD          0x01            /* Normal Power-On: Boot from FLASH */
+#define BOOTFLAG_WARM          0x02            /* Software reboot */
+
+/*
+ * Environment Configuration
+ */
+#define CONFIG_ENV_IS_IN_FLASH 1
+#define CONFIG_ENV_SECT_SIZE   0x20000         /* 128k (one sector) for env */
+#define CONFIG_ENV_SIZE                0x8000
+#define CONFIG_ENV_ADDR                (CONFIG_SYS_MONITOR_BASE - (256 * 1024))
+
+/*
+ * Flash memory map:
+ * fff80000 - ffffffff     Pri U-Boot (512 KB)
+ * fff40000 - fff7ffff     Pri U-Boot Environment (256 KB)
+ * fff00000 - fff3ffff     Pri FDT (256KB)
+ * fef00000 - ffefffff     Pri OS image (16MB)
+ * f8000000 - feefffff     Pri OS Use/Filesystem (111MB)
+ *
+ * f7f80000 - f7ffffff     Sec U-Boot (512 KB)
+ * f7f40000 - f7f7ffff     Sec U-Boot Environment (256 KB)
+ * f7f00000 - f7f3ffff     Sec FDT (256KB)
+ * f6f00000 - f7efffff     Sec OS image (16MB)
+ * f0000000 - f6efffff     Sec OS Use/Filesystem (111MB)
+ */
+#define CONFIG_UBOOT1_ENV_ADDR MK_STR(0xfff80000)
+#define CONFIG_UBOOT2_ENV_ADDR MK_STR(0xf7f80000)
+#define CONFIG_FDT1_ENV_ADDR   MK_STR(0xfff00000)
+#define CONFIG_FDT2_ENV_ADDR   MK_STR(0xf7f00000)
+#define CONFIG_OS1_ENV_ADDR    MK_STR(0xfef00000)
+#define CONFIG_OS2_ENV_ADDR    MK_STR(0xf6f00000)
+
+#define CONFIG_PROG_UBOOT1                                             \
+       "$download_cmd $loadaddr $ubootfile; "                          \
+       "if test $? -eq 0; then "                                       \
+               "protect off "CONFIG_UBOOT1_ENV_ADDR" +80000; "         \
+               "erase "CONFIG_UBOOT1_ENV_ADDR" +80000; "               \
+               "cp.w $loadaddr "CONFIG_UBOOT1_ENV_ADDR" 40000; "       \
+               "protect on "CONFIG_UBOOT1_ENV_ADDR" +80000; "          \
+               "cmp.b $loadaddr "CONFIG_UBOOT1_ENV_ADDR" 80000; "      \
+               "if test $? -ne 0; then "                               \
+                       "echo PROGRAM FAILED; "                         \
+               "else; "                                                \
+                       "echo PROGRAM SUCCEEDED; "                      \
+               "fi; "                                                  \
+       "else; "                                                        \
+               "echo DOWNLOAD FAILED; "                                \
+       "fi;"
+
+#define CONFIG_PROG_UBOOT2                                             \
+       "$download_cmd $loadaddr $ubootfile; "                          \
+       "if test $? -eq 0; then "                                       \
+               "protect off "CONFIG_UBOOT2_ENV_ADDR" +80000; "         \
+               "erase "CONFIG_UBOOT2_ENV_ADDR" +80000; "               \
+               "cp.w $loadaddr "CONFIG_UBOOT2_ENV_ADDR" 40000; "       \
+               "protect on "CONFIG_UBOOT2_ENV_ADDR" +80000; "          \
+               "cmp.b $loadaddr "CONFIG_UBOOT2_ENV_ADDR" 80000; "      \
+               "if test $? -ne 0; then "                               \
+                       "echo PROGRAM FAILED; "                         \
+               "else; "                                                \
+                       "echo PROGRAM SUCCEEDED; "                      \
+               "fi; "                                                  \
+       "else; "                                                        \
+               "echo DOWNLOAD FAILED; "                                \
+       "fi;"
+
+#define CONFIG_BOOT_OS_NET                                             \
+       "$download_cmd $osaddr $osfile; "                               \
+       "if test $? -eq 0; then "                                       \
+               "if test -n $fdtaddr; then "                            \
+                       "$download_cmd $fdtaddr $fdtfile; "             \
+                       "if test $? -eq 0; then "                       \
+                               "bootm $osaddr - $fdtaddr; "            \
+                       "else; "                                        \
+                               "echo FDT DOWNLOAD FAILED; "            \
+                       "fi; "                                          \
+               "else; "                                                \
+                       "bootm $osaddr; "                               \
+               "fi; "                                                  \
+       "else; "                                                        \
+               "echo OS DOWNLOAD FAILED; "                             \
+       "fi;"
+
+#define CONFIG_PROG_OS1                                                        \
+       "$download_cmd $osaddr $osfile; "                               \
+       "if test $? -eq 0; then "                                       \
+               "erase "CONFIG_OS1_ENV_ADDR" +$filesize; "              \
+               "cp.b $osaddr "CONFIG_OS1_ENV_ADDR" $filesize; "        \
+               "cmp.b $osaddr "CONFIG_OS1_ENV_ADDR" $filesize; "       \
+               "if test $? -ne 0; then "                               \
+                       "echo OS PROGRAM FAILED; "                      \
+               "else; "                                                \
+                       "echo OS PROGRAM SUCCEEDED; "                   \
+               "fi; "                                                  \
+       "else; "                                                        \
+               "echo OS DOWNLOAD FAILED; "                             \
+       "fi;"
+
+#define CONFIG_PROG_OS2                                                        \
+       "$download_cmd $osaddr $osfile; "                               \
+       "if test $? -eq 0; then "                                       \
+               "erase "CONFIG_OS2_ENV_ADDR" +$filesize; "              \
+               "cp.b $osaddr "CONFIG_OS2_ENV_ADDR" $filesize; "        \
+               "cmp.b $osaddr "CONFIG_OS2_ENV_ADDR" $filesize; "       \
+               "if test $? -ne 0; then "                               \
+                       "echo OS PROGRAM FAILED; "                      \
+               "else; "                                                \
+                       "echo OS PROGRAM SUCCEEDED; "                   \
+               "fi; "                                                  \
+       "else; "                                                        \
+               "echo OS DOWNLOAD FAILED; "                             \
+       "fi;"
+
+#define CONFIG_PROG_FDT1                                               \
+       "$download_cmd $fdtaddr $fdtfile; "                             \
+       "if test $? -eq 0; then "                                       \
+               "erase "CONFIG_FDT1_ENV_ADDR" +$filesize;"              \
+               "cp.b $fdtaddr "CONFIG_FDT1_ENV_ADDR" $filesize; "      \
+               "cmp.b $fdtaddr "CONFIG_FDT1_ENV_ADDR" $filesize; "     \
+               "if test $? -ne 0; then "                               \
+                       "echo FDT PROGRAM FAILED; "                     \
+               "else; "                                                \
+                       "echo FDT PROGRAM SUCCEEDED; "                  \
+               "fi; "                                                  \
+       "else; "                                                        \
+               "echo FDT DOWNLOAD FAILED; "                            \
+       "fi;"
+
+#define CONFIG_PROG_FDT2                                               \
+       "$download_cmd $fdtaddr $fdtfile; "                             \
+       "if test $? -eq 0; then "                                       \
+               "erase "CONFIG_FDT2_ENV_ADDR" +$filesize;"              \
+               "cp.b $fdtaddr "CONFIG_FDT2_ENV_ADDR" $filesize; "      \
+               "cmp.b $fdtaddr "CONFIG_FDT2_ENV_ADDR" $filesize; "     \
+               "if test $? -ne 0; then "                               \
+                       "echo FDT PROGRAM FAILED; "                     \
+               "else; "                                                \
+                       "echo FDT PROGRAM SUCCEEDED; "                  \
+               "fi; "                                                  \
+       "else; "                                                        \
+               "echo FDT DOWNLOAD FAILED; "                            \
+       "fi;"
+
+#define CONFIG_EXTRA_ENV_SETTINGS                                      \
+       "autoload=yes\0"                                                \
+       "download_cmd=tftp\0"                                           \
+       "console_args=console=ttyS0,115200\0"                           \
+       "root_args=root=/dev/nfs rw\0"                                  \
+       "misc_args=ip=on\0"                                             \
+       "set_bootargs=setenv bootargs ${console_args} ${root_args} ${misc_args}\0" \
+       "bootfile=/home/user/file\0"                                    \
+       "osfile=/home/user/board.uImage\0"                              \
+       "fdtfile=/home/user/board.dtb\0"                                \
+       "ubootfile=/home/user/u-boot.bin\0"                             \
+       "fdtaddr=c00000\0"                                              \
+       "osaddr=0x1000000\0"                                            \
+       "loadaddr=0x1000000\0"                                          \
+       "prog_uboot1="CONFIG_PROG_UBOOT1"\0"                            \
+       "prog_uboot2="CONFIG_PROG_UBOOT2"\0"                            \
+       "prog_os1="CONFIG_PROG_OS1"\0"                                  \
+       "prog_os2="CONFIG_PROG_OS2"\0"                                  \
+       "prog_fdt1="CONFIG_PROG_FDT1"\0"                                \
+       "prog_fdt2="CONFIG_PROG_FDT2"\0"                                \
+       "bootcmd_net=run set_bootargs; "CONFIG_BOOT_OS_NET"\0"          \
+       "bootcmd_flash1=run set_bootargs; "                             \
+               "bootm "CONFIG_OS1_ENV_ADDR" - "CONFIG_FDT1_ENV_ADDR"\0"\
+       "bootcmd_flash2=run set_bootargs; "                             \
+               "bootm "CONFIG_OS2_ENV_ADDR" - "CONFIG_FDT2_ENV_ADDR"\0"\
+       "bootcmd=run bootcmd_flash1\0"
+#endif /* __CONFIG_H */
diff --git a/include/configs/xsengine.h b/include/configs/xsengine.h
deleted file mode 100644 (file)
index f68461b..0000000
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * (C) Copyright 2002
- * Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net
- *
- * (C) Copyright 2002
- * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
- * Marius Groeger <mgroeger@sysgo.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_PXA250                  1               /* This is an PXA250 CPU    */
-#define CONFIG_XSENGINE                        1
-#define CONFIG_MMC                     1
-#define CONFIG_DOS_PARTITION           1
-#define BOARD_LATE_INIT                        1
-#undef  CONFIG_USE_IRQ                                 /* we don't need IRQ/FIQ stuff */
-/* we will never enable dcache, because we have to setup MMU first */
-#define CONFIG_SYS_NO_DCACHE
-
-#define CONFIG_SYS_HZ                  1000
-#define CONFIG_SYS_CPUSPEED                    0x161           /* set core clock to 400/200/100 MHz */
-
-#define CONFIG_NR_DRAM_BANKS           1               /* we have 1 bank of DRAM */
-#define PHYS_SDRAM_1                   0xa0000000      /* SDRAM Bank #1 */
-#define PHYS_SDRAM_1_SIZE              0x04000000      /* 64 MB */
-#define PHYS_SDRAM_2                   0xa4000000      /* SDRAM Bank #2 */
-#define PHYS_SDRAM_2_SIZE              0x00000000      /* 0 MB */
-#define PHYS_SDRAM_3                   0xa8000000      /* SDRAM Bank #3 */
-#define PHYS_SDRAM_3_SIZE              0x00000000      /* 0 MB */
-#define PHYS_SDRAM_4                   0xac000000      /* SDRAM Bank #4 */
-#define PHYS_SDRAM_4_SIZE              0x00000000      /* 0 MB */
-#define CONFIG_SYS_DRAM_BASE                   0xa0000000
-#define CONFIG_SYS_DRAM_SIZE                   0x04000000
-
-/* FLASH organization */
-#define CONFIG_SYS_MAX_FLASH_BANKS             1               /* max number of memory banks           */
-#define CONFIG_SYS_MAX_FLASH_SECT              128             /* max number of sectors on one chip    */
-#define PHYS_FLASH_1                   0x00000000      /* Flash Bank #1 */
-#define PHYS_FLASH_2                   0x00000000      /* Flash Bank #2 */
-#define PHYS_FLASH_SECT_SIZE           0x00020000      /* 127 KB sectors */
-#define CONFIG_SYS_FLASH_BASE                  PHYS_FLASH_1
-
-/*
- * JFFS2 partitions
- */
-/* No command line, one static partition, whole device */
-#undef CONFIG_CMD_MTDPARTS
-#define CONFIG_JFFS2_DEV               "nor0"
-#define CONFIG_JFFS2_PART_SIZE         0xFFFFFFFF
-#define CONFIG_JFFS2_PART_OFFSET       0x00000000
-
-/* mtdparts command line support */
-/* Note: fake mtd_id used, no linux mtd map file */
-/*
-#define CONFIG_CMD_MTDPARTS
-#define MTDIDS_DEFAULT         "nor0=xsengine-0"
-#define MTDPARTS_DEFAULT       "mtdparts=xsengine-0:256k(uboot),1m(kernel1),8m(kernel2)"
-*/
-
-/* Environment settings */
-#define CONFIG_ENV_OVERWRITE
-#define CONFIG_ENV_IS_IN_FLASH             1
-#define CONFIG_ENV_ADDR                    (PHYS_FLASH_1 + 0x40000)    /* Addr of Environment Sector (after monitor)*/
-#define CONFIG_ENV_SECT_SIZE               PHYS_FLASH_SECT_SIZE                /* Size of the Environment Sector */
-#define CONFIG_ENV_SIZE                    0x4000                              /* 16kB Total Size of Environment Sector */
-
-/* timeout values are in ticks */
-#define CONFIG_SYS_FLASH_ERASE_TOUT            (75*CONFIG_SYS_HZ)      /* Timeout for Flash Erase */
-#define CONFIG_SYS_FLASH_WRITE_TOUT            (50*CONFIG_SYS_HZ)      /* Timeout for Flash Write */
-
-/* Size of malloc() pool */
-#define CONFIG_SYS_MALLOC_LEN                  (CONFIG_ENV_SIZE + 256*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE               128             /* size in bytes reserved for initial data */
-
-/* Hardware drivers */
-#define CONFIG_NET_MULTI
-#define CONFIG_SMC91111
-#define CONFIG_SMC91111_BASE           0x04000300
-#define CONFIG_SMC_USE_32_BIT          1
-
-/* select serial console configuration */
-#define CONFIG_PXA_SERIAL
-#define CONFIG_FFUART                  1
-
-/* allow to overwrite serial and ethaddr */
-#define CONFIG_BAUDRATE                        115200
-
-/*
- * BOOTP options
- */
-#define CONFIG_BOOTP_BOOTFILESIZE
-#define CONFIG_BOOTP_BOOTPATH
-#define CONFIG_BOOTP_GATEWAY
-#define CONFIG_BOOTP_HOSTNAME
-
-
-/*
- * Command line configuration.
- */
-#include <config_cmd_default.h>
-
-#define CONFIG_CMD_FAT
-#define CONFIG_CMD_PING
-#define CONFIG_CMD_JFFS2
-
-
-#define CONFIG_BOOTDELAY               3
-#define CONFIG_ETHADDR                 FF:FF:FF:FF:FF:FF
-#define CONFIG_NETMASK                 255.255.255.0
-#define CONFIG_IPADDR                  192.168.1.50
-#define CONFIG_SERVERIP                        192.168.1.2
-#define CONFIG_BOOTARGS                        "root=/dev/mtdblock2 rootfstype=jffs2 console=ttyS1,115200"
-#define CONFIG_CMDLINE_TAG
-
-/* Miscellaneous configurable options */
-#define CONFIG_SYS_HUSH_PARSER                 1
-#define CONFIG_SYS_PROMPT_HUSH_PS2             "> "
-#define CONFIG_SYS_LONGHELP                                                            /* undef to save memory */
-#define CONFIG_SYS_PROMPT                      "XS-Engine u-boot> "                    /* Monitor Command Prompt */
-#define CONFIG_SYS_CBSIZE                      256                                     /* Console I/O Buffer Size */
-#define CONFIG_SYS_PBSIZE                      (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)        /* Print Buffer Size */
-#define CONFIG_SYS_MAXARGS                     16                                      /* max number of command args */
-#define CONFIG_SYS_BARGSIZE                    CONFIG_SYS_CBSIZE                               /* Boot Argument Buffer Size */
-#define CONFIG_SYS_MEMTEST_START               0xA0400000                              /* memtest works on     */
-#define CONFIG_SYS_MEMTEST_END                 0xA0800000                              /* 4 ... 8 MB in DRAM   */
-#define CONFIG_SYS_BAUDRATE_TABLE              { 9600, 19200, 38400, 57600, 115200 }   /* valid baudrates */
-#define CONFIG_SYS_LOAD_ADDR                   0xA0000000                              /* load kernel to this address   */
-
-#ifdef CONFIG_MMC
-#define CONFIG_PXA_MMC
-#define CONFIG_CMD_MMC
-#define CONFIG_SYS_MMC_BASE                    0xF0000000
-#endif
-
-/* 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
-
-/* GP set register */
-#define CONFIG_SYS_GPSR0_VAL                   0x0000A000      /* CS1, PROG(FPGA) */
-#define CONFIG_SYS_GPSR1_VAL                   0x00020000      /* nPWE */
-#define CONFIG_SYS_GPSR2_VAL                   0x0000C000      /* CS2, CS3 */
-
-/* GP clear register */
-#define CONFIG_SYS_GPCR0_VAL                   0x00000000
-#define CONFIG_SYS_GPCR1_VAL                   0x00000000
-#define CONFIG_SYS_GPCR2_VAL                   0x00000000
-
-/* GP direction register */
-#define CONFIG_SYS_GPDR0_VAL                   0x0000A000      /* CS1, PROG(FPGA) */
-#define CONFIG_SYS_GPDR1_VAL                   0x00022A80      /* nPWE, FFUART + BTUART pins */
-#define CONFIG_SYS_GPDR2_VAL                   0x0000C000      /* CS2, CS3 */
-
-/* GP rising edge detect register */
-#define CONFIG_SYS_GRER0_VAL                   0x00000000
-#define CONFIG_SYS_GRER1_VAL                   0x00000000
-#define CONFIG_SYS_GRER2_VAL                   0x00000000
-
-/* GP falling edge detect register */
-#define CONFIG_SYS_GFER0_VAL                   0x00000000
-#define CONFIG_SYS_GFER1_VAL                   0x00000000
-#define CONFIG_SYS_GFER2_VAL                   0x00000000
-
-/* GP alternate function register */
-#define CONFIG_SYS_GAFR0_L_VAL                 0x80000000      /* CS1 */
-#define CONFIG_SYS_GAFR0_U_VAL                 0x00000010      /* RDY */
-#define CONFIG_SYS_GAFR1_L_VAL                 0x09988050      /* FFUART + BTUART pins */
-#define CONFIG_SYS_GAFR1_U_VAL                 0x00000008      /* nPWE */
-#define CONFIG_SYS_GAFR2_L_VAL                 0xA0000000      /* CS2, CS3 */
-#define CONFIG_SYS_GAFR2_U_VAL                 0x00000000
-
-#define CONFIG_SYS_PSSR_VAL                    0x00000020      /* Power manager sleep status */
-#define CONFIG_SYS_CCCR_VAL                    0x00000161      /* 100 MHz memory, 400 MHz CPU  */
-#define CONFIG_SYS_CKEN_VAL                    0x000000C0      /* BTUART and FFUART enabled    */
-#define CONFIG_SYS_ICMR_VAL                    0x00000000      /* No interrupts enabled        */
-
-/* Memory settings */
-#define CONFIG_SYS_MSC0_VAL                    0x25F425F0
-
-/* MDCNFG: SDRAM Configuration Register */
-#define CONFIG_SYS_MDCNFG_VAL                  0x000009C9
-
-/* MDREFR: SDRAM Refresh Control Register */
-#define CONFIG_SYS_MDREFR_VAL                  0x00018018
-
-/* MDMRS: Mode Register Set Configuration Register */
-#define CONFIG_SYS_MDMRS_VAL                   0x00220022
-
-#endif /* __CONFIG_H */
index 0d450f50d4a1cc1244f97f9deda5aa0868a20fa3..0cbef6f85f77eb47e8827213076e30ca2ebbb5e5 100644 (file)
@@ -77,9 +77,8 @@
  *----------------------------------------------------------------------*/
 #define CONFIG_SYS_INIT_RAM_DCACHE     1               /* d-cache as init ram  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x70000000              /* DCache       */
-#define CONFIG_SYS_INIT_RAM_END        (4 << 10)
-#define CONFIG_SYS_GBL_DATA_SIZE       256                     /* num bytes initial data*/
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE       (4 << 10)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
index 8d5d45fbc85e445e886925115aadff0ecab2b8dc..fb684b5e106f039865475937ce1dfd444509af20 100644 (file)
 #define CONFIG_SYS_TEMP_STACK_OCM      1
 #define CONFIG_SYS_OCM_DATA_ADDR       CONFIG_SYS_ISRAM_BASE
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_ISRAM_BASE   /* Initial RAM address  */
-#define CONFIG_SYS_INIT_RAM_END        0x2000          /* End of used area in RAM */
-#define CONFIG_SYS_GBL_DATA_SIZE       128             /* num bytes initial data */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x2000          /* Size of used area in RAM */
 
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      (CONFIG_SYS_GBL_DATA_OFFSET - 0x4)
 
 /*-----------------------------------------------------------------------
index 5ddec84c74cd8e7f958199abe09ea58aba2b4592..f9a6b9313f66eb72247de6b1bd282695b8c8d36f 100644 (file)
 #define CONFIG_SYS_OCM_DATA_ADDR       0xF8000000
 #define CONFIG_SYS_OCM_DATA_SIZE       0x1000
 #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_OCM_DATA_ADDR /* inside of OCM               */
-#define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE /* End of used area in RAM     */
+#define CONFIG_SYS_INIT_RAM_SIZE       CONFIG_SYS_OCM_DATA_SIZE /* Size of used area in RAM    */
 
-#define CONFIG_SYS_GBL_DATA_SIZE       128  /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 /* reserve some memory for POST and BOOT limit info */
 #define CONFIG_SYS_INIT_SP_OFFSET      (CONFIG_SYS_GBL_DATA_OFFSET - 16)
 
index a5a873ba3cff12b75bb2ebbe79f87f426958c3ab..615d5c1f75cf9076c87fb1e2ee9c83e0785d383e 100644 (file)
@@ -27,9 +27,9 @@
  */
 #define        CONFIG_PXA27X           1       /* Marvell PXA270 CPU */
 #define        CONFIG_ZIPITZ2          1       /* Zipit Z2 board */
+#define        CONFIG_SYS_TEXT_BASE    0x0
 
 #undef BOARD_LATE_INIT
-#undef CONFIG_SKIP_RELOCATE_UBOOT
 #undef CONFIG_USE_IRQ
 #undef CONFIG_SKIP_LOWLEVEL_INIT
 
@@ -41,8 +41,8 @@
 #define CONFIG_ENV_ADDR                        0x40000
 #define CONFIG_ENV_SIZE                        0x20000
 
-#define        CONFIG_SYS_MALLOC_LEN           (CONFIG_ENV_SIZE + CONFIG_STACKSIZE)
-#define        CONFIG_SYS_GBL_DATA_SIZE        512
+#define        CONFIG_SYS_MALLOC_LEN           (128*1024)
+#define        CONFIG_ARCH_CPU_INIT
 
 #define        CONFIG_BOOTCOMMAND                                              \
        "if mmc init && fatload mmc 0 0xa0000000 uboot.script ; then "  \
@@ -56,7 +56,7 @@
 #define        CONFIG_BOOTDELAY                2       /* Autoboot delay */
 #define        CONFIG_CMDLINE_TAG
 #define        CONFIG_SETUP_MEMORY_TAGS
-
+#define        CONFIG_SYS_TEXT_BASE            0x0
 #define        CONFIG_LZMA                     /* LZMA compression support */
 
 /*
@@ -175,6 +175,9 @@ unsigned char zipitz2_spi_read(void);
 
 #define        CONFIG_SYS_LOAD_ADDR            CONFIG_SYS_DRAM_BASE
 
+#define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM_1
+#define        CONFIG_SYS_INIT_SP_ADDR         (GENERATED_GBL_DATA_SIZE + PHYS_SDRAM_1 + 2048)
+
 /*
  * NOR FLASH
  */
@@ -218,7 +221,7 @@ unsigned char zipitz2_spi_read(void);
 #define CONFIG_SYS_GPCR3_VAL   0x00000000
 #define CONFIG_SYS_GPDR0_VAL   0xdafcee00
 #define CONFIG_SYS_GPDR1_VAL   0xffa3aaab
-#define CONFIG_SYS_GPDR2_VAL   0x8fe1ffff
+#define CONFIG_SYS_GPDR2_VAL   0x8fe9ffff
 #define CONFIG_SYS_GPDR3_VAL   0x001b1f8a
 #define CONFIG_SYS_GPSR0_VAL   0x06080400
 #define CONFIG_SYS_GPSR1_VAL   0x007f0000
index d0fc13888ec1b9d88b3adfa974fed5ebc8d4d438..1e03b0180d96c4417d5e0693ff525ae0830277f6 100644 (file)
@@ -35,6 +35,7 @@
  * (easy to change)
  */
 #define CONFIG_CPU_MONAHANS    1       /* Intel Monahan CPU    */
+#define        CONFIG_CPU_PXA320
 #define CONFIG_ZYLONITE                1       /* Zylonite board       */
 
 /* #define CONFIG_LCD          1 */
@@ -44,7 +45,6 @@
 #undef CONFIG_MMC
 #define BOARD_LATE_INIT                1
 
-#undef CONFIG_SKIP_RELOCATE_UBOOT
 #undef CONFIG_USE_IRQ                  /* we don't need IRQ/FIQ stuff */
 
 /* we will never enable dcache, because we have to setup MMU first */
@@ -54,7 +54,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN      (CONFIG_ENV_SIZE + 128*1024)
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
 
 #undef CONFIG_SYS_SKIP_DRAM_SCRUB
 
+#define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM_1
+#define        CONFIG_SYS_INIT_SP_ADDR         (GENERATED_GBL_DATA_SIZE + PHYS_SDRAM_1)
 
 /*
  * NAND Flash
index 33d2ac3df3e13034db004a7aa4637e68841a721f..e965663579e6919435327915bd0af23e27d9ffe3 100755 (executable)
@@ -308,6 +308,7 @@ int lattice_info(Lattice_desc *desc);
 
 void ispVMStart(void);
 void ispVMEnd(void);
+extern void ispVMFreeMem(void);
 signed char ispVMCode(void);
 void ispVMDelay(unsigned short int a_usMicroSecondDelay);
 void ispVMCalculateCRC32(unsigned char a_ucData);
@@ -316,4 +317,3 @@ void writePort(unsigned char pins, unsigned char value);
 unsigned char readPort(void);
 void sclock(void);
 #endif
-
index 41c37443452bc2ffdad092c06870b51a875e3850..eaa0f406406d5cbe0e8d6d004320432c866b0424 100644 (file)
@@ -29,7 +29,6 @@
 /* Display Commands */
 #define DISPLAY_CLEAR  0x1 /* Clear the display */
 #define DISPLAY_HOME   0x2 /* Set cursor at home position */
-#define DISPLAY_MARK   0x4 /* Enable the decimal point led, if implemented */
 
 void display_set(int cmd);
 int display_putc(char c);
diff --git a/include/linux/fb.h b/include/linux/fb.h
new file mode 100644 (file)
index 0000000..3858f8f
--- /dev/null
@@ -0,0 +1,616 @@
+#ifndef _LINUX_FB_H
+#define _LINUX_FB_H
+
+#include <linux/types.h>
+
+/* Definitions of frame buffers                                                */
+
+#define FB_MAX                 32      /* sufficient for now */
+
+#define FB_TYPE_PACKED_PIXELS          0       /* Packed Pixels        */
+
+#define FB_VISUAL_MONO01               0       /* Monochr. 1=Black 0=White */
+#define FB_VISUAL_MONO10               1       /* Monochr. 1=White 0=Black */
+#define FB_VISUAL_TRUECOLOR            2       /* True color   */
+#define FB_VISUAL_PSEUDOCOLOR          3       /* Pseudo color (like atari) */
+#define FB_VISUAL_DIRECTCOLOR          4       /* Direct color */
+#define FB_VISUAL_STATIC_PSEUDOCOLOR   5       /* Pseudo color readonly */
+
+#define FB_ACCEL_NONE          0       /* no hardware accelerator      */
+
+struct fb_fix_screeninfo {
+       char id[16];                    /* identification string eg "TT Builtin" */
+       unsigned long smem_start;       /* Start of frame buffer mem */
+                                       /* (physical address) */
+       __u32 smem_len;                 /* Length of frame buffer mem */
+       __u32 type;                     /* see FB_TYPE_*                */
+       __u32 type_aux;                 /* Interleave for interleaved Planes */
+       __u32 visual;                   /* see FB_VISUAL_*              */
+       __u16 xpanstep;                 /* zero if no hardware panning  */
+       __u16 ypanstep;                 /* zero if no hardware panning  */
+       __u16 ywrapstep;                /* zero if no hardware ywrap    */
+       __u32 line_length;              /* length of a line in bytes    */
+       unsigned long mmio_start;       /* Start of Memory Mapped I/O   */
+                                       /* (physical address) */
+       __u32 mmio_len;                 /* Length of Memory Mapped I/O  */
+       __u32 accel;                    /* Indicate to driver which     */
+                                       /*  specific chip/card we have  */
+       __u16 reserved[3];              /* Reserved for future compatibility */
+};
+
+/*
+ * Interpretation of offset for color fields: All offsets are from the right,
+ * inside a "pixel" value, which is exactly 'bits_per_pixel' wide (means: you
+ * can use the offset as right argument to <<). A pixel afterwards is a bit
+ * stream and is written to video memory as that unmodified.
+ *
+ * For pseudocolor: offset and length should be the same for all color
+ * components. Offset specifies the position of the least significant bit
+ * of the pallette index in a pixel value. Length indicates the number
+ * of available palette entries (i.e. # of entries = 1 << length).
+ */
+struct fb_bitfield {
+       __u32 offset;                   /* beginning of bitfield        */
+       __u32 length;                   /* length of bitfield           */
+       __u32 msb_right;
+
+};
+
+#define FB_NONSTD_HAM          1       /* Hold-And-Modify (HAM)        */
+#define FB_NONSTD_REV_PIX_IN_B 2       /* order of pixels in each byte is reversed */
+
+#define FB_ACTIVATE_NOW                0       /* set values immediately (or vbl)*/
+#define FB_ACTIVATE_NXTOPEN    1       /* activate on next open        */
+#define FB_ACTIVATE_TEST       2       /* don't set, round up impossible */
+#define FB_ACTIVATE_MASK       15
+                                       /* values                       */
+#define FB_ACTIVATE_VBL               16       /* activate values on next vbl  */
+#define FB_CHANGE_CMAP_VBL     32      /* change colormap on vbl       */
+#define FB_ACTIVATE_ALL               64       /* change all VCs on this fb    */
+#define FB_ACTIVATE_FORCE     128      /* force apply even when no change*/
+#define FB_ACTIVATE_INV_MODE  256      /* invalidate videomode */
+
+#define FB_SYNC_HOR_HIGH_ACT   1       /* horizontal sync high active  */
+#define FB_SYNC_VERT_HIGH_ACT  2       /* vertical sync high active    */
+#define FB_SYNC_EXT            4       /* external sync                */
+#define FB_SYNC_COMP_HIGH_ACT  8       /* composite sync high active   */
+#define FB_SYNC_BROADCAST      16      /* broadcast video timings      */
+                                       /* vtotal = 144d/288n/576i => PAL  */
+                                       /* vtotal = 121d/242n/484i => NTSC */
+#define FB_SYNC_ON_GREEN       32      /* sync on green */
+
+#define FB_VMODE_NONINTERLACED 0       /* non interlaced */
+#define FB_VMODE_INTERLACED    1       /* interlaced   */
+#define FB_VMODE_DOUBLE                2       /* double scan */
+#define FB_VMODE_ODD_FLD_FIRST 4       /* interlaced: top line first */
+#define FB_VMODE_MASK          255
+
+#define FB_VMODE_YWRAP         256     /* ywrap instead of panning     */
+#define FB_VMODE_SMOOTH_XPAN   512     /* smooth xpan possible (internally used) */
+#define FB_VMODE_CONUPDATE     512     /* don't update x/yoffset       */
+
+/*
+ * Display rotation support
+ */
+#define FB_ROTATE_UR     0
+#define FB_ROTATE_CW     1
+#define FB_ROTATE_UD     2
+#define FB_ROTATE_CCW    3
+
+#define PICOS2KHZ(a) (1000000000UL/(a))
+#define KHZ2PICOS(a) (1000000000UL/(a))
+
+struct fb_var_screeninfo {
+       __u32 xres;                     /* visible resolution           */
+       __u32 yres;
+       __u32 xres_virtual;             /* virtual resolution           */
+       __u32 yres_virtual;
+       __u32 xoffset;                  /* offset from virtual to visible */
+       __u32 yoffset;                  /* resolution                   */
+
+       __u32 bits_per_pixel;           /* guess what                   */
+       __u32 grayscale;                /* != 0 Graylevels instead of colors */
+
+       struct fb_bitfield red;         /* bitfield in fb mem if true color, */
+       struct fb_bitfield green;       /* else only length is significant */
+       struct fb_bitfield blue;
+       struct fb_bitfield transp;      /* transparency                 */
+
+       __u32 nonstd;                   /* != 0 Non standard pixel format */
+
+       __u32 activate;                 /* see FB_ACTIVATE_*            */
+
+       __u32 height;                   /* height of picture in mm    */
+       __u32 width;                    /* width of picture in mm     */
+
+       __u32 accel_flags;              /* (OBSOLETE) see fb_info.flags */
+
+       /* Timing: All values in pixclocks, except pixclock (of course) */
+       __u32 pixclock;                 /* pixel clock in ps (pico seconds) */
+       __u32 left_margin;              /* time from sync to picture    */
+       __u32 right_margin;             /* time from picture to sync    */
+       __u32 upper_margin;             /* time from sync to picture    */
+       __u32 lower_margin;
+       __u32 hsync_len;                /* length of horizontal sync    */
+       __u32 vsync_len;                /* length of vertical sync      */
+       __u32 sync;                     /* see FB_SYNC_*                */
+       __u32 vmode;                    /* see FB_VMODE_*               */
+       __u32 rotate;                   /* angle we rotate counter clockwise */
+       __u32 reserved[5];              /* Reserved for future compatibility */
+};
+
+struct fb_cmap {
+       __u32 start;                    /* First entry  */
+       __u32 len;                      /* Number of entries */
+       __u16 *red;                     /* Red values   */
+       __u16 *green;
+       __u16 *blue;
+       __u16 *transp;                  /* transparency, can be NULL */
+};
+
+struct fb_con2fbmap {
+       __u32 console;
+       __u32 framebuffer;
+};
+
+/* VESA Blanking Levels */
+#define VESA_NO_BLANKING       0
+#define VESA_VSYNC_SUSPEND     1
+#define VESA_HSYNC_SUSPEND     2
+#define VESA_POWERDOWN         3
+
+
+enum {
+       /* screen: unblanked, hsync: on,  vsync: on */
+       FB_BLANK_UNBLANK       = VESA_NO_BLANKING,
+
+       /* screen: blanked,   hsync: on,  vsync: on */
+       FB_BLANK_NORMAL        = VESA_NO_BLANKING + 1,
+
+       /* screen: blanked,   hsync: on,  vsync: off */
+       FB_BLANK_VSYNC_SUSPEND = VESA_VSYNC_SUSPEND + 1,
+
+       /* screen: blanked,   hsync: off, vsync: on */
+       FB_BLANK_HSYNC_SUSPEND = VESA_HSYNC_SUSPEND + 1,
+
+       /* screen: blanked,   hsync: off, vsync: off */
+       FB_BLANK_POWERDOWN     = VESA_POWERDOWN + 1
+};
+
+#define FB_VBLANK_VBLANKING    0x001   /* currently in a vertical blank */
+#define FB_VBLANK_HBLANKING    0x002   /* currently in a horizontal blank */
+#define FB_VBLANK_HAVE_VBLANK  0x004   /* vertical blanks can be detected */
+#define FB_VBLANK_HAVE_HBLANK  0x008   /* horizontal blanks can be detected */
+#define FB_VBLANK_HAVE_COUNT   0x010   /* global retrace counter is available */
+#define FB_VBLANK_HAVE_VCOUNT  0x020   /* the vcount field is valid */
+#define FB_VBLANK_HAVE_HCOUNT  0x040   /* the hcount field is valid */
+#define FB_VBLANK_VSYNCING     0x080   /* currently in a vsync */
+#define FB_VBLANK_HAVE_VSYNC   0x100   /* verical syncs can be detected */
+
+struct fb_vblank {
+       __u32 flags;                    /* FB_VBLANK flags */
+       __u32 count;                    /* counter of retraces since boot */
+       __u32 vcount;                   /* current scanline position */
+       __u32 hcount;                   /* current scandot position */
+       __u32 reserved[4];              /* reserved for future compatibility */
+};
+
+/* Internal HW accel */
+#define ROP_COPY 0
+#define ROP_XOR  1
+
+struct fb_copyarea {
+       __u32 dx;
+       __u32 dy;
+       __u32 width;
+       __u32 height;
+       __u32 sx;
+       __u32 sy;
+};
+
+struct fb_fillrect {
+       __u32 dx;       /* screen-relative */
+       __u32 dy;
+       __u32 width;
+       __u32 height;
+       __u32 color;
+       __u32 rop;
+};
+
+struct fb_image {
+       __u32 dx;               /* Where to place image */
+       __u32 dy;
+       __u32 width;            /* Size of image */
+       __u32 height;
+       __u32 fg_color;         /* Only used when a mono bitmap */
+       __u32 bg_color;
+       __u8  depth;            /* Depth of the image */
+       const char *data;       /* Pointer to image data */
+       struct fb_cmap cmap;    /* color map info */
+};
+
+/*
+ * hardware cursor control
+ */
+
+#define FB_CUR_SETIMAGE 0x01
+#define FB_CUR_SETPOS  0x02
+#define FB_CUR_SETHOT  0x04
+#define FB_CUR_SETCMAP 0x08
+#define FB_CUR_SETSHAPE 0x10
+#define FB_CUR_SETSIZE 0x20
+#define FB_CUR_SETALL  0xFF
+
+struct fbcurpos {
+       __u16 x, y;
+};
+
+struct fb_cursor {
+       __u16 set;              /* what to set */
+       __u16 enable;           /* cursor on/off */
+       __u16 rop;              /* bitop operation */
+       const char *mask;       /* cursor mask bits */
+       struct fbcurpos hot;    /* cursor hot spot */
+       struct fb_image image;  /* Cursor image */
+};
+
+#ifdef CONFIG_FB_BACKLIGHT
+/* Settings for the generic backlight code */
+#define FB_BACKLIGHT_LEVELS    128
+#define FB_BACKLIGHT_MAX       0xFF
+#endif
+
+#ifdef __KERNEL__
+
+struct vm_area_struct;
+struct fb_info;
+struct device;
+struct file;
+
+/* Definitions below are used in the parsed monitor specs */
+#define FB_DPMS_ACTIVE_OFF     1
+#define FB_DPMS_SUSPEND                2
+#define FB_DPMS_STANDBY                4
+
+#define FB_DISP_DDI            1
+#define FB_DISP_ANA_700_300    2
+#define FB_DISP_ANA_714_286    4
+#define FB_DISP_ANA_1000_400   8
+#define FB_DISP_ANA_700_000    16
+
+#define FB_DISP_MONO           32
+#define FB_DISP_RGB            64
+#define FB_DISP_MULTI          128
+#define FB_DISP_UNKNOWN                256
+
+#define FB_SIGNAL_NONE         0
+#define FB_SIGNAL_BLANK_BLANK  1
+#define FB_SIGNAL_SEPARATE     2
+#define FB_SIGNAL_COMPOSITE    4
+#define FB_SIGNAL_SYNC_ON_GREEN        8
+#define FB_SIGNAL_SERRATION_ON 16
+
+#define FB_MISC_PRIM_COLOR     1
+#define FB_MISC_1ST_DETAIL     2       /* First Detailed Timing is preferred */
+struct fb_chroma {
+       __u32 redx;     /* in fraction of 1024 */
+       __u32 greenx;
+       __u32 bluex;
+       __u32 whitex;
+       __u32 redy;
+       __u32 greeny;
+       __u32 bluey;
+       __u32 whitey;
+};
+
+struct fb_monspecs {
+       struct fb_chroma chroma;
+       struct fb_videomode *modedb;    /* mode database */
+       __u8  manufacturer[4];          /* Manufacturer */
+       __u8  monitor[14];              /* Monitor String */
+       __u8  serial_no[14];            /* Serial Number */
+       __u8  ascii[14];                /* ? */
+       __u32 modedb_len;               /* mode database length */
+       __u32 model;                    /* Monitor Model */
+       __u32 serial;                   /* Serial Number - Integer */
+       __u32 year;                     /* Year manufactured */
+       __u32 week;                     /* Week Manufactured */
+       __u32 hfmin;                    /* hfreq lower limit (Hz) */
+       __u32 hfmax;                    /* hfreq upper limit (Hz) */
+       __u32 dclkmin;                  /* pixelclock lower limit (Hz) */
+       __u32 dclkmax;                  /* pixelclock upper limit (Hz) */
+       __u16 input;                    /* display type - see FB_DISP_* */
+       __u16 dpms;                     /* DPMS support - see FB_DPMS_ */
+       __u16 signal;                   /* Signal Type - see FB_SIGNAL_* */
+       __u16 vfmin;                    /* vfreq lower limit (Hz) */
+       __u16 vfmax;                    /* vfreq upper limit (Hz) */
+       __u16 gamma;                    /* Gamma - in fractions of 100 */
+       __u16 gtf       : 1;            /* supports GTF */
+       __u16 misc;                     /* Misc flags - see FB_MISC_* */
+       __u8  version;                  /* EDID version... */
+       __u8  revision;                 /* ...and revision */
+       __u8  max_x;                    /* Maximum horizontal size (cm) */
+       __u8  max_y;                    /* Maximum vertical size (cm) */
+};
+
+struct fb_cmap_user {
+       __u32 start;                    /* First entry  */
+       __u32 len;                      /* Number of entries */
+       __u16 *red;             /* Red values   */
+       __u16 *green;
+       __u16 *blue;
+       __u16 *transp;          /* transparency, can be NULL */
+};
+
+struct fb_image_user {
+       __u32 dx;                       /* Where to place image */
+       __u32 dy;
+       __u32 width;                    /* Size of image */
+       __u32 height;
+       __u32 fg_color;                 /* Only used when a mono bitmap */
+       __u32 bg_color;
+       __u8  depth;                    /* Depth of the image */
+       const char *data;       /* Pointer to image data */
+       struct fb_cmap_user cmap;       /* color map info */
+};
+
+struct fb_cursor_user {
+       __u16 set;                      /* what to set */
+       __u16 enable;                   /* cursor on/off */
+       __u16 rop;                      /* bitop operation */
+       const char *mask;       /* cursor mask bits */
+       struct fbcurpos hot;            /* cursor hot spot */
+       struct fb_image_user image;     /* Cursor image */
+};
+
+/*
+ * Register/unregister for framebuffer events
+ */
+
+/*     The resolution of the passed in fb_info about to change */
+#define FB_EVENT_MODE_CHANGE           0x01
+/*     The display on this fb_info is beeing suspended, no access to the
+ *     framebuffer is allowed any more after that call returns
+ */
+#define FB_EVENT_SUSPEND               0x02
+/*     The display on this fb_info was resumed, you can restore the display
+ *     if you own it
+ */
+#define FB_EVENT_RESUME                        0x03
+/*     An entry from the modelist was removed */
+#define FB_EVENT_MODE_DELETE           0x04
+/*     A driver registered itself */
+#define FB_EVENT_FB_REGISTERED         0x05
+/*     A driver unregistered itself */
+#define FB_EVENT_FB_UNREGISTERED       0x06
+/*     CONSOLE-SPECIFIC: get console to framebuffer mapping */
+#define FB_EVENT_GET_CONSOLE_MAP       0x07
+/*     CONSOLE-SPECIFIC: set console to framebuffer mapping */
+#define FB_EVENT_SET_CONSOLE_MAP       0x08
+/*     A hardware display blank change occured */
+#define FB_EVENT_BLANK                 0x09
+/*     Private modelist is to be replaced */
+#define FB_EVENT_NEW_MODELIST          0x0A
+/*     The resolution of the passed in fb_info about to change and
+       all vc's should be changed         */
+#define FB_EVENT_MODE_CHANGE_ALL       0x0B
+/*     A software display blank change occured */
+#define FB_EVENT_CONBLANK              0x0C
+/*     Get drawing requirements        */
+#define FB_EVENT_GET_REQ               0x0D
+/*     Unbind from the console if possible */
+#define FB_EVENT_FB_UNBIND             0x0E
+
+struct fb_event {
+       struct fb_info *info;
+       void *data;
+};
+
+struct fb_blit_caps {
+       u32 x;
+       u32 y;
+       u32 len;
+       u32 flags;
+};
+
+/*
+ * Pixmap structure definition
+ *
+ * The purpose of this structure is to translate data
+ * from the hardware independent format of fbdev to what
+ * format the hardware needs.
+ */
+
+#define FB_PIXMAP_DEFAULT 1    /* used internally by fbcon */
+#define FB_PIXMAP_SYSTEM  2    /* memory is in system RAM  */
+#define FB_PIXMAP_IO     4     /* memory is iomapped       */
+#define FB_PIXMAP_SYNC   256   /* set if GPU can DMA       */
+
+struct fb_pixmap {
+       u8  *addr;              /* pointer to memory                    */
+       u32 size;               /* size of buffer in bytes              */
+       u32 offset;             /* current offset to buffer             */
+       u32 buf_align;          /* byte alignment of each bitmap        */
+       u32 scan_align;         /* alignment per scanline               */
+       u32 access_align;       /* alignment per read/write (bits)      */
+       u32 flags;              /* see FB_PIXMAP_*                      */
+       u32 blit_x;             /* supported bit block dimensions (1-32)*/
+       u32 blit_y;             /* Format: blit_x = 1 << (width - 1)    */
+                               /*         blit_y = 1 << (height - 1)   */
+                               /* if 0, will be set to 0xffffffff (all)*/
+       /* access methods */
+       void (*writeio)(struct fb_info *info, void *dst, void *src, unsigned int size);
+       void (*readio) (struct fb_info *info, void *dst, void *src, unsigned int size);
+};
+
+#ifdef CONFIG_FB_DEFERRED_IO
+struct fb_deferred_io {
+       /* delay between mkwrite and deferred handler */
+       unsigned long delay;
+       struct mutex lock; /* mutex that protects the page list */
+       struct list_head pagelist; /* list of touched pages */
+       /* callback */
+       void (*deferred_io)(struct fb_info *info, struct list_head *pagelist);
+};
+#endif
+
+/* FBINFO_* = fb_info.flags bit flags */
+#define FBINFO_MODULE          0x0001  /* Low-level driver is a module */
+#define FBINFO_HWACCEL_DISABLED        0x0002
+       /* When FBINFO_HWACCEL_DISABLED is set:
+        *  Hardware acceleration is turned off.  Software implementations
+        *  of required functions (copyarea(), fillrect(), and imageblit())
+        *  takes over; acceleration engine should be in a quiescent state */
+
+/* hints */
+#define FBINFO_PARTIAL_PAN_OK  0x0040 /* otw use pan only for double-buffering */
+#define FBINFO_READS_FAST      0x0080 /* soft-copy faster than rendering */
+
+/*
+ * A driver may set this flag to indicate that it does want a set_par to be
+ * called every time when fbcon_switch is executed. The advantage is that with
+ * this flag set you can really be sure that set_par is always called before
+ * any of the functions dependant on the correct hardware state or altering
+ * that state, even if you are using some broken X releases. The disadvantage
+ * is that it introduces unwanted delays to every console switch if set_par
+ * is slow. It is a good idea to try this flag in the drivers initialization
+ * code whenever there is a bug report related to switching between X and the
+ * framebuffer console.
+ */
+#define FBINFO_MISC_ALWAYS_SETPAR   0x40000
+
+/*
+ * Host and GPU endianness differ.
+ */
+#define FBINFO_FOREIGN_ENDIAN  0x100000
+/*
+ * Big endian math. This is the same flags as above, but with different
+ * meaning, it is set by the fb subsystem depending FOREIGN_ENDIAN flag
+ * and host endianness. Drivers should not use this flag.
+ */
+#define FBINFO_BE_MATH 0x100000
+
+struct fb_info {
+       int node;
+       int flags;
+       struct fb_var_screeninfo var;   /* Current var */
+       struct fb_fix_screeninfo fix;   /* Current fix */
+       struct fb_monspecs monspecs;    /* Current Monitor specs */
+       struct fb_pixmap pixmap;        /* Image hardware mapper */
+       struct fb_pixmap sprite;        /* Cursor hardware mapper */
+       struct fb_cmap cmap;            /* Current cmap */
+       struct list_head modelist;      /* mode list */
+       struct fb_videomode *mode;      /* current mode */
+
+       char *screen_base;      /* Virtual address */
+       unsigned long screen_size;      /* Amount of ioremapped VRAM or 0 */
+       void *pseudo_palette;           /* Fake palette of 16 colors */
+#define FBINFO_STATE_RUNNING   0
+#define FBINFO_STATE_SUSPENDED 1
+       u32 state;                      /* Hardware state i.e suspend */
+       void *fbcon_par;                /* fbcon use-only private area */
+       /* From here on everything is device dependent */
+       void *par;
+};
+
+#define FBINFO_DEFAULT 0
+
+#define FBINFO_FLAG_MODULE     FBINFO_MODULE
+#define FBINFO_FLAG_DEFAULT    FBINFO_DEFAULT
+
+/* This will go away */
+#if defined(__sparc__)
+
+/* We map all of our framebuffers such that big-endian accesses
+ * are what we want, so the following is sufficient.
+ */
+
+/* This will go away */
+#define fb_readb sbus_readb
+#define fb_readw sbus_readw
+#define fb_readl sbus_readl
+#define fb_readq sbus_readq
+#define fb_writeb sbus_writeb
+#define fb_writew sbus_writew
+#define fb_writel sbus_writel
+#define fb_writeq sbus_writeq
+#define fb_memset sbus_memset_io
+
+#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || defined(__sh__) || defined(__powerpc__) || defined(__avr32__) || defined(__bfin__)
+
+#define fb_readb __raw_readb
+#define fb_readw __raw_readw
+#define fb_readl __raw_readl
+#define fb_readq __raw_readq
+#define fb_writeb __raw_writeb
+#define fb_writew __raw_writew
+#define fb_writel __raw_writel
+#define fb_writeq __raw_writeq
+#define fb_memset memset_io
+
+#else
+
+#define fb_readb(addr) (*(volatile u8 *) (addr))
+#define fb_readw(addr) (*(volatile u16 *) (addr))
+#define fb_readl(addr) (*(volatile u32 *) (addr))
+#define fb_readq(addr) (*(volatile u64 *) (addr))
+#define fb_writeb(b,addr) (*(volatile u8 *) (addr) = (b))
+#define fb_writew(b,addr) (*(volatile u16 *) (addr) = (b))
+#define fb_writel(b,addr) (*(volatile u32 *) (addr) = (b))
+#define fb_writeq(b,addr) (*(volatile u64 *) (addr) = (b))
+#define fb_memset memset
+
+#endif
+
+#define FB_LEFT_POS(p, bpp)         (fb_be_math(p) ? (32 - (bpp)) : 0)
+#define FB_SHIFT_HIGH(p, val, bits)  (fb_be_math(p) ? (val) >> (bits) : \
+                                                     (val) << (bits))
+#define FB_SHIFT_LOW(p, val, bits)   (fb_be_math(p) ? (val) << (bits) : \
+                                                     (val) >> (bits))
+/* drivers/video/fbmon.c */
+#define FB_MAXTIMINGS          0
+#define FB_VSYNCTIMINGS                1
+#define FB_HSYNCTIMINGS                2
+#define FB_DCLKTIMINGS         3
+#define FB_IGNOREMON           0x100
+
+#define FB_MODE_IS_UNKNOWN     0
+#define FB_MODE_IS_DETAILED    1
+#define FB_MODE_IS_STANDARD    2
+#define FB_MODE_IS_VESA                4
+#define FB_MODE_IS_CALCULATED  8
+#define FB_MODE_IS_FIRST       16
+#define FB_MODE_IS_FROM_VAR    32
+
+
+/* drivers/video/fbcmap.c */
+
+extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp);
+extern void fb_dealloc_cmap(struct fb_cmap *cmap);
+extern int fb_copy_cmap(const struct fb_cmap *from, struct fb_cmap *to);
+extern int fb_cmap_to_user(const struct fb_cmap *from, struct fb_cmap_user *to);
+extern int fb_set_cmap(struct fb_cmap *cmap, struct fb_info *fb_info);
+extern int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *fb_info);
+extern const struct fb_cmap *fb_default_cmap(int len);
+extern void fb_invert_cmaps(void);
+
+struct fb_videomode {
+       const char *name;       /* optional */
+       u32 refresh;            /* optional */
+       u32 xres;
+       u32 yres;
+       u32 pixclock;
+       u32 left_margin;
+       u32 right_margin;
+       u32 upper_margin;
+       u32 lower_margin;
+       u32 hsync_len;
+       u32 vsync_len;
+       u32 sync;
+       u32 vmode;
+       u32 flag;
+};
+
+#endif /* __KERNEL__ */
+
+#endif /* _LINUX_FB_H */
diff --git a/include/linux/kbuild.h b/include/linux/kbuild.h
new file mode 100644 (file)
index 0000000..ab7805a
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * Copied from Linux:
+ * commit 37487a56523d402e25650da16c337acf4cecd13d
+ * Author: Christoph Lameter <clameter@sgi.com>
+ */
+#ifndef __LINUX_KBUILD_H
+#define __LINUX_KBUILD_H
+
+#define DEFINE(sym, val) \
+       asm volatile("\n->" #sym " %0 " #val : : "i" (val))
+
+#define BLANK() asm volatile("\n->" : : )
+
+#define OFFSET(sym, str, mem) \
+       DEFINE(sym, offsetof(struct str, mem))
+
+#define COMMENT(x) \
+       asm volatile("\n->#" x)
+
+#endif
index 03541cbf219be321a185efed402fe775142baadb..2967284274935aae238a834ca510669a34d5e37c 100644 (file)
@@ -9,8 +9,6 @@
  *                      Remy Bohmer <linux@bohmer.net>
  */
 
-
-
 #define USB_CDC_SUBCLASS_ACM                   0x02
 #define USB_CDC_SUBCLASS_ETHERNET              0x06
 #define USB_CDC_SUBCLASS_WHCM                  0x08
@@ -199,7 +197,6 @@ struct usb_cdc_line_coding {
 #define        USB_CDC_PACKET_TYPE_BROADCAST           (1 << 3)
 #define        USB_CDC_PACKET_TYPE_MULTICAST           (1 << 4) /* filtered */
 
-
 /*-------------------------------------------------------------------------*/
 
 /*
@@ -221,4 +218,3 @@ struct usb_cdc_notification {
        __le16  wIndex;
        __le16  wLength;
 } __attribute__ ((packed));
-
index 625da5593f71cefc3a227f3fb22a16480bcbdc66..957ce3b16161f351b0d132b6a617310de7dfe9f7 100644 (file)
 #define _POST_WORD_ADDR        (CONFIG_SYS_IMMR + CPM_POST_WORD_ADDR)
 
 #elif defined (CONFIG_MPC85xx)
-#include <asm/cpm_85xx.h>
-#define _POST_WORD_ADDR        (CONFIG_SYS_IMMR + CPM_POST_WORD_ADDR)
+#include <asm/immap_85xx.h>
+#define _POST_WORD_ADDR        (CONFIG_SYS_IMMR + offsetof(ccsr_pic_t, tfrr))
+
+#elif defined (CONFIG_MPC86xx)
+#include <asm/immap_86xx.h>
+#define _POST_WORD_ADDR        (CONFIG_SYS_IMMR + offsetof(ccsr_pic_t, tfrr))
 
 #elif defined (CONFIG_4xx)
 #define _POST_WORD_ADDR \
@@ -133,7 +137,7 @@ void post_output_backlog ( void );
 int post_run (char *name, int flags);
 int post_info (char *name);
 int post_log (char *format, ...);
-#ifndef CONFIG_RELOC_FIXUP_WORKS
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
 void post_reloc (void);
 #endif
 unsigned long post_time_ms (unsigned long base);
index 08691a0f2a123d3b833ba824fa7e36758defbd6b..67600ed522817f36ced4f29f2a577b2a140d754d 100644 (file)
 #define MPC83XX_SCCR_USB_DRCM_01       0x00100000
 #define MPC83XX_SCCR_USB_DRCM_10       0x00200000
 
-#if defined(CONFIG_MPC83XX)
+#if defined(CONFIG_MPC83xx)
 #define CONFIG_SYS_FSL_USB_ADDR CONFIG_SYS_MPC83xx_USB_ADDR
 #elif defined(CONFIG_MPC85xx)
 #define CONFIG_SYS_FSL_USB_ADDR CONFIG_SYS_MPC85xx_USB_ADDR
diff --git a/lib/asm-offsets.c b/lib/asm-offsets.c
new file mode 100644 (file)
index 0000000..2209561
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Adapted from Linux v2.6.36 kernel: arch/powerpc/kernel/asm-offsets.c
+ *
+ * This program is used to generate definitions needed by
+ * assembly language modules.
+ *
+ * We use the technique used in the OSF Mach kernel code:
+ * generate asm statements containing #defines,
+ * compile this file to assembler, and then extract the
+ * #defines from the assembly-language output.
+ *
+ * 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.
+ */
+
+#include <common.h>
+
+#include <linux/kbuild.h>
+
+int main(void)
+{
+       /* Round up to make sure size gives nice stack alignment */
+       DEFINE(GENERATED_GBL_DATA_SIZE,
+               (sizeof(struct global_data)+15) & ~15);
+
+       return 0;
+}
index 57802cfb6ded27e14490e601c1cc081d0829a368..7ac3dddda693897f2a08cfda4ea682e943ab3e39 100644 (file)
@@ -56,7 +56,7 @@
 
 /*
  * [Aho,Sethi,Ullman] Compilers: Principles, Techniques and Tools, 1986
- * [Knuth]            The Art of Computer Programming, part 3 (6.4)
+ * [Knuth]           The Art of Computer Programming, part 3 (6.4)
  */
 
 /*
@@ -252,7 +252,7 @@ int hsearch_r(ENTRY item, ACTION action, ENTRY ** retval,
 
        if (htab->table[idx].used) {
                /*
-                 * Further action might be required according to the
+                * Further action might be required according to the
                 * action value.
                 */
                unsigned hval2;
@@ -283,8 +283,8 @@ int hsearch_r(ENTRY item, ACTION action, ENTRY ** retval,
 
                do {
                        /*
-                         * Because SIZE is prime this guarantees to
-                         * step through all available indices.
+                        * Because SIZE is prime this guarantees to
+                        * step through all available indices.
                         */
                        if (idx <= hval2)
                                idx = htab->size + idx - hval2;
@@ -323,8 +323,8 @@ int hsearch_r(ENTRY item, ACTION action, ENTRY ** retval,
        /* An empty bucket has been found. */
        if (action == ENTER) {
                /*
-                 * If table is full and another entry should be
-                 * entered return with error.
+                * If table is full and another entry should be
+                * entered return with error.
                 */
                if (htab->filled == htab->size) {
                        __set_errno(ENOMEM);
index bb47319f8ba5b1dc30f1b51d3405209b07249414..e771dcfcf2756504bc53916cd0366643ff70a81d 100644 (file)
@@ -23,9 +23,9 @@
 #endif
 
 void qsort(void  *base,
-           size_t nel,
-           size_t width,
-           int (*comp)(const void *, const void *))
+          size_t nel,
+          size_t width,
+          int (*comp)(const void *, const void *))
 {
        size_t wgap, i, j, k;
        char tmp;
index c57255753555f48609d38921b6963445fd948cdd..5f95c874f6e972d117fa2d08a51434d058cb9e5a 100644 (file)
@@ -53,6 +53,11 @@ SECTIONS
                *(.data.rel.ro)
        }
 
+       . = ALIGN(4);
+       __rel_dyn_start = .;
+       __rel_dyn_end = .;
+       __dynsym_start = .;
+
        __got_start = .;
        . = ALIGN(4);
        .got : { *(.got) }
@@ -67,4 +72,12 @@ SECTIONS
        __bss_start = .;
        .bss : { *(.bss) }
        _end = .;
+       /DISCARD/ : { *(.bss*) }
+       /DISCARD/ : { *(.dynstr*) }
+       /DISCARD/ : { *(.dynsym*) }
+       /DISCARD/ : { *(.dynamic*) }
+       /DISCARD/ : { *(.hash*) }
+       /DISCARD/ : { *(.plt*) }
+       /DISCARD/ : { *(.interp*) }
+       /DISCARD/ : { *(.gnu*) }
 }
index 4d6db14abe562bb369a7a44c2aae0c2329f3533c..d6244183c83b279b5c555e9f88514885f7da5af5 100644 (file)
@@ -221,10 +221,11 @@ static int nand_load(struct mtd_info *mtd, unsigned int offs,
        return 0;
 }
 
-#if defined(CONFIG_ARM) && !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
+#if defined(CONFIG_ARM)
 void board_init_f (ulong bootflag)
 {
-       relocate_code (CONFIG_SYS_TEXT_BASE - TOTAL_MALLOC_LEN, NULL, TEXT_BASE);
+       relocate_code (CONFIG_SYS_TEXT_BASE - TOTAL_MALLOC_LEN, NULL,
+                      CONFIG_SYS_TEXT_BASE);
 }
 #endif
 
index 959f162324d1e57c5055c214530964d6194e3d4c..a3f0f6ba51add514801f9ed84f33fac484258f50 100644 (file)
@@ -263,10 +263,11 @@ static int nand_load(unsigned int from, unsigned int size, unsigned char *buf)
        return 0;
 }
 
-#if defined(CONFIG_ARM) && !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
+#if defined(CONFIG_ARM)
 void board_init_f (ulong bootflag)
 {
-       relocate_code (CONFIG_SYS_TEXT_BASE - TOTAL_MALLOC_LEN, NULL, TEXT_BASE);
+       relocate_code (CONFIG_SYS_TEXT_BASE - TOTAL_MALLOC_LEN, NULL,
+                      CONFIG_SYS_TEXT_BASE);
 }
 #endif
 
index ac7a8f05e6ce27551ab0e1334d66a7a9b279cfc7..7300692b77288c66878a98afe019c5fb97d24e4e 100644 (file)
@@ -1,5 +1,6 @@
-IPL    =onenand_ipl
+
 include $(TOPDIR)/config.mk
+include $(TOPDIR)/board/$(BOARDDIR)/config.mk
 
 LDSCRIPT= $(TOPDIR)/onenand_ipl/board/$(BOARDDIR)/u-boot.onenand.lds
 LDFLAGS        = -Bstatic -T $(onenandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(PLATFORM_LDFLAGS)
@@ -7,7 +8,6 @@ AFLAGS  += -DCONFIG_PRELOADER -DCONFIG_ONENAND_IPL
 CFLAGS += -DCONFIG_PRELOADER -DCONFIG_ONENAND_IPL
 OBJCFLAGS += --gap-fill=0x00
 
-SOBJS  := lowlevel_init.o
 SOBJS  += start.o
 COBJS  := vpac270.o
 COBJS  += onenand_read.o
@@ -25,7 +25,7 @@ ALL   = $(onenandobj)onenand-ipl $(onenandobj)onenand-ipl.bin $(onenandobj)onenand
 all:   $(obj).depend $(ALL)
 
 $(onenandobj)onenand-ipl-2k.bin:       $(onenandobj)onenand-ipl
-       $(OBJCOPY) ${OBJCFLAGS} --pad-to=0x5c040400 -O binary $< $@
+       $(OBJCOPY) ${OBJCFLAGS} --pad-to=0x0800 -O binary $< $@
 
 $(onenandobj)onenand-ipl.bin:  $(onenandobj)onenand-ipl
        $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
@@ -61,10 +61,6 @@ ifneq ($(OBJTREE), $(SRCTREE))
 $(obj)vpac270.c:
        @rm -f $@
        ln -s $(SRCTREE)/onenand_ipl/board/$(BOARDDIR)/vpac270.c $@
-
-$(obj)lowlevel_init.S:
-       @rm -f $@
-       ln -s $(SRCTREE)/onenand_ipl/board/$(BOARDDIR)/lowlevel_init.S $@
 endif
 
 #########################################################################
diff --git a/onenand_ipl/board/vpac270/lowlevel_init.S b/onenand_ipl/board/vpac270/lowlevel_init.S
deleted file mode 100644 (file)
index e79d8dd..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Voipac PXA270 Lowlevel Hardware Initialization
- *
- * Copyright (C) 2010 Marek Vasut <marek.vasut@gmail.com>
- *
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include <config.h>
-#include <version.h>
-#include <asm/arch/pxa-regs.h>
-#include <asm/arch/macro.h>
-
-.globl lowlevel_init
-lowlevel_init:
-       pxa_clock_setup
-       mov     pc, lr
index 3067548483980a2921b22e0ea966601050ca4b0b..501369b6a1c56fd4f5af97fb60e3181aa513ed4d 100644 (file)
@@ -227,8 +227,6 @@ static int fpga_mem_test(void)
        return ret;
 }
 
-
-
 /* Verify FPGA addresslines */
 static int fpga_post_addrline(ulong *address, ulong *base, ulong size)
 {
index b152deaf6abf52c91d164b49b0349b1b7795b004..4a1b1a49d17bd481e401070ad44b78d69779638b 100644 (file)
  * MA 02111-1307 USA
  */
 
-#include <common.h>
-
 /*
  * I2C test
  *
  * For verifying the I2C bus, a full I2C bus scanning is performed.
  *
- * #ifdef I2C_ADDR_LIST
- *   The test is considered as passed if all the devices and
- *   only the devices in the list are found.
- * #else [ ! I2C_ADDR_LIST ]
+ * #ifdef CONFIG_SYS_POST_I2C_ADDRS
+ *   The test is considered as passed if all the devices and only the devices
+ *   in the list are found.
+ *   #ifdef CONFIG_SYS_POST_I2C_IGNORES
+ *     Ignore devices listed in CONFIG_SYS_POST_I2C_IGNORES.  These devices
+ *     are optional or not vital to board functionality.
+ *   #endif
+ * #else [ ! CONFIG_SYS_POST_I2C_ADDRS ]
  *   The test is considered as passed if any I2C device is found.
  * #endif
  */
 
+#include <common.h>
 #include <post.h>
 #include <i2c.h>
 
 #if CONFIG_POST & CONFIG_SYS_POST_I2C
 
+static int i2c_ignore_device(unsigned int chip)
+{
+#ifdef CONFIG_SYS_POST_I2C_IGNORES
+       const unsigned char i2c_ignore_list[] = CONFIG_SYS_POST_I2C_IGNORES;
+       int i;
+
+       for (i = 0; i < sizeof(i2c_ignore_list); i++)
+               if (i2c_ignore_list[i] == chip)
+                       return 1;
+#endif
+
+       return 0;
+}
+
 int i2c_post_test (int flags)
 {
        unsigned int i;
-       unsigned int good = 0;
-#ifdef I2C_ADDR_LIST
-       unsigned int bad  = 0;
+#ifndef CONFIG_SYS_POST_I2C_ADDRS
+       /* Start at address 1, address 0 is the general call address */
+       for (i = 1; i < 128; i++)
+               if (i2c_ignore_device(i))
+                       continue;
+               if (i2c_probe (i) == 0)
+                       return 0;
+
+       /* No devices found */
+       return -1;
+#else
+       unsigned int ret  = 0;
        int j;
-       unsigned char i2c_addr_list[] = I2C_ADDR_LIST;
-       unsigned char i2c_miss_list[] = I2C_ADDR_LIST;
-#endif
+       unsigned char i2c_addr_list[] = CONFIG_SYS_POST_I2C_ADDRS;
 
-       for (i = 0; i < 128; i++) {
-               if (i2c_probe (i) == 0) {
-#ifndef        I2C_ADDR_LIST
-                       good++;
-#else  /* I2C_ADDR_LIST */
-                       for (j=0; j<sizeof(i2c_addr_list); ++j) {
-                               if (i == i2c_addr_list[j]) {
-                                       good++;
-                                       i2c_miss_list[j] = 0xFF;
-                                       break;
-                               }
-                       }
-                       if (j == sizeof(i2c_addr_list)) {
-                               bad++;
-                               post_log ("I2C: addr %02X not expected\n",
-                                               i);
+       /* Start at address 1, address 0 is the general call address */
+       for (i = 1; i < 128; i++) {
+               if (i2c_ignore_device(i))
+                       continue;
+               if (i2c_probe(i) != 0)
+                       continue;
+
+               for (j = 0; j < sizeof(i2c_addr_list); ++j) {
+                       if (i == i2c_addr_list[j]) {
+                               i2c_addr_list[j] = 0xff;
+                               break;
                        }
-#endif /* I2C_ADDR_LIST */
                }
-       }
 
-#ifndef        I2C_ADDR_LIST
-       return good > 0 ? 0 : -1;
-#else  /* I2C_ADDR_LIST */
-       if (good != sizeof(i2c_addr_list)) {
-               for (j=0; j<sizeof(i2c_miss_list); ++j) {
-                       if (i2c_miss_list[j] != 0xFF) {
-                               post_log ("I2C: addr %02X did not respond\n",
-                                               i2c_miss_list[j]);
-                       }
+               if (j == sizeof(i2c_addr_list)) {
+                       ret = -1;
+                       post_log("I2C: addr %02x not expected\n", i);
                }
        }
-       return ((good == sizeof(i2c_addr_list)) && (bad == 0)) ? 0 : -1;
+
+       for (i = 0; i < sizeof(i2c_addr_list); ++i) {
+               if (i2c_addr_list[i] == 0xff)
+                       continue;
+               post_log("I2C: addr %02x did not respond\n", i2c_addr_list[i]);
+               ret = -1;
+       }
+
+       return ret;
 #endif
 }
 
index 006236009917e7f912d8ddee0efca2e7c0759573..3f47449f198043f079d1fb29ba270a68e91f2e13 100644 (file)
@@ -452,30 +452,66 @@ static int memory_post_tests (unsigned long start, unsigned long size)
        return ret;
 }
 
-int memory_post_test (int flags)
+__attribute__((weak))
+int arch_memory_test_prepare(u32 *vstart, u32 *size, phys_addr_t *phys_offset)
 {
-       int ret = 0;
        bd_t *bd = gd->bd;
-       unsigned long memsize = (bd->bi_memsize >= 256 << 20 ?
-                                256 << 20 : bd->bi_memsize) - (1 << 20);
+       *vstart = CONFIG_SYS_SDRAM_BASE;
+       *size = (bd->bi_memsize >= 256 << 20 ?
+                       256 << 20 : bd->bi_memsize) - (1 << 20);
 
        /* Limit area to be tested with the board info struct */
-       if (CONFIG_SYS_SDRAM_BASE + memsize > (ulong)bd)
-               memsize = (ulong)bd - CONFIG_SYS_SDRAM_BASE;
+       if ((*vstart) + (*size) > (ulong)bd)
+               *size = (ulong)bd - *vstart;
+
+       return 0;
+}
 
-       if (flags & POST_SLOWTEST) {
-               ret = memory_post_tests (CONFIG_SYS_SDRAM_BASE, memsize);
-       } else {                        /* POST_NORMAL */
+__attribute__((weak))
+int arch_memory_test_advance(u32 *vstart, u32 *size, phys_addr_t *phys_offset)
+{
+       return 1;
+}
 
-               unsigned long i;
+__attribute__((weak))
+int arch_memory_test_cleanup(u32 *vstart, u32 *size, phys_addr_t *phys_offset)
+{
+       return 0;
+}
 
-               for (i = 0; i < (memsize >> 20) && ret == 0; i++) {
-                       if (ret == 0)
-                               ret = memory_post_tests (i << 20, 0x800);
-                       if (ret == 0)
-                               ret = memory_post_tests ((i << 20) + 0xff800, 0x800);
+__attribute__((weak))
+void arch_memory_failure_handle(void)
+{
+       return;
+}
+
+int memory_post_test(int flags)
+{
+       int ret = 0;
+       phys_addr_t phys_offset = 0;
+       u32 memsize, vstart;
+
+       arch_memory_test_prepare(&vstart, &memsize, &phys_offset);
+
+       do {
+               if (flags & POST_SLOWTEST) {
+                       ret = memory_post_tests(vstart, memsize);
+               } else {                        /* POST_NORMAL */
+                       unsigned long i;
+                       for (i = 0; i < (memsize >> 20) && ret == 0; i++) {
+                               if (ret == 0)
+                                       ret = memory_post_tests(i << 20, 0x800);
+                               if (ret == 0)
+                                       ret = memory_post_tests(
+                                               (i << 20) + 0xff800, 0x800);
+                       }
                }
-       }
+       } while (!ret &&
+               !arch_memory_test_advance(&vstart, &memsize, &phys_offset));
+
+       arch_memory_test_cleanup(&vstart, &memsize, &phys_offset);
+       if (ret)
+               arch_memory_failure_handle();
 
        return ret;
 }
index 8a9fd0d2ec10d9a4a8c15067587d3e3d562cae2f..1b7f2aa075e2ea0679857dd9be5e57eb4252c43a 100644 (file)
@@ -422,7 +422,7 @@ int post_log (char *format, ...)
        return 0;
 }
 
-#ifndef CONFIG_RELOC_FIXUP_WORKS
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
 void post_reloc (void)
 {
        unsigned int i;
index a4066f9f8b7a7974cef9bcd9dc529df6ee321921..5f59fbb27f81a1f54dee2d89c38b8dcbfd95b50d 100644 (file)
@@ -165,6 +165,9 @@ struct post_test post_list[] =
     },
 #endif
 #if CONFIG_POST & CONFIG_SYS_POST_UART
+#if defined(CONFIG_POST_UART)
+       CONFIG_POST_UART,
+#else
     {
        "UART test",
        "uart",
@@ -175,6 +178,7 @@ struct post_test post_list[] =
        NULL,
        CONFIG_SYS_POST_UART
     },
+#endif /* CONFIG_POST_UART */
 #endif
 #if CONFIG_POST & CONFIG_SYS_POST_ETHER
     {
diff --git a/tools/scripts/make-asm-offsets b/tools/scripts/make-asm-offsets
new file mode 100755 (executable)
index 0000000..4c33756
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# Adapted from Linux kernel's "Kbuild":
+# commit 1cdf25d704f7951d02a04064c97db547d6021872
+# Author: Christoph Lameter <clameter@sgi.com>
+
+mkdir -p $(dirname $2)
+
+# Default sed regexp - multiline due to syntax constraints
+SED_CMD="/^->/{s:->#\(.*\):/* \1 */:; \
+       s:^->\([^ ]*\) [\$#]*\([-0-9]*\) \(.*\):#define \1 (\2) /* \3 */:; \
+       s:^->\([^ ]*\) [\$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \
+       s:->::; p;}"
+
+(set -e
+ echo "#ifndef __ASM_OFFSETS_H__"
+ echo "#define __ASM_OFFSETS_H__"
+ echo "/*"
+ echo " * DO NOT MODIFY."
+ echo " *"
+ echo " * This file was generated by $(basename $0)"
+ echo " *"
+ echo " */"
+ echo ""
+ sed -ne "${SED_CMD}" $1 
+ echo ""
+ echo "#endif" ) > $2