]> git.sur5r.net Git - u-boot/commitdiff
Merge branch 'master' of git://git.denx.de/u-boot-nand-flash
authorWolfgang Denk <wd@denx.de>
Thu, 14 Aug 2008 09:26:22 +0000 (11:26 +0200)
committerWolfgang Denk <wd@denx.de>
Thu, 14 Aug 2008 09:26:22 +0000 (11:26 +0200)
366 files changed:
CREDITS
MAINTAINERS
MAKEALL
Makefile
README
board/amcc/katmai/katmai.c
board/amcc/ocotea/ocotea.c
board/amcc/redwood/Makefile [new file with mode: 0644]
board/amcc/redwood/config.mk [new file with mode: 0644]
board/amcc/redwood/init.S [new file with mode: 0644]
board/amcc/redwood/redwood.c [new file with mode: 0644]
board/amcc/redwood/redwood.h [new file with mode: 0644]
board/amcc/redwood/u-boot.lds [new file with mode: 0644]
board/amcc/sequoia/sequoia.c
board/amcc/taishan/taishan.c
board/amcc/yucca/yucca.c
board/delta/nand.c
board/esd/common/auto_update.c
board/freescale/mx31ads/Makefile [new file with mode: 0644]
board/freescale/mx31ads/config.mk [new file with mode: 0644]
board/freescale/mx31ads/lowlevel_init.S [new file with mode: 0644]
board/freescale/mx31ads/mx31ads.c [new file with mode: 0644]
board/freescale/mx31ads/u-boot.lds [new file with mode: 0644]
board/icecube/flash.c
board/korat/korat.c
board/mx31ads/Makefile [deleted file]
board/mx31ads/config.mk [deleted file]
board/mx31ads/lowlevel_init.S [deleted file]
board/mx31ads/mx31ads.c [deleted file]
board/mx31ads/u-boot.lds [deleted file]
board/netta/netta.c
board/prodrive/alpr/alpr.c
board/prodrive/pdnb3/flash.c
board/sandburst/karef/karef.c
board/sandburst/metrobox/metrobox.c
board/tqc/tqm8xx/flash.c
board/xilinx/ml507/Makefile [new file with mode: 0644]
board/xilinx/ml507/config.mk [new file with mode: 0644]
board/xilinx/ml507/init.S [new file with mode: 0644]
board/xilinx/ml507/ml507.c [new file with mode: 0644]
board/xilinx/ml507/u-boot-ram.lds [new file with mode: 0644]
board/xilinx/ml507/u-boot-rom.lds [new file with mode: 0644]
board/xilinx/ml507/xparameters.h [new file with mode: 0644]
board/xpedite1k/xpedite1k.c
common/ACEX1K.c
common/Makefile
common/altera.c
common/bedbug.c
common/cmd_jffs2.c
common/cmd_nand.c
common/cmd_onenand.c
common/cmd_reginfo.c
common/cyclon2.c
common/docecc.c
common/fpga.c
common/lcd.c
common/lynxkdi.c
common/miiphybb.c
common/soft_i2c.c
common/soft_spi.c
common/spartan2.c
common/spartan3.c
common/stratixII.c
common/usb.c
common/usb_kbd.c
common/usb_storage.c
common/virtex2.c
common/xilinx.c
cpu/arm920t/s3c24x0/nand.c
cpu/arm926ejs/davinci/nand.c
cpu/ppc4xx/44x_spd_ddr2.c
cpu/ppc4xx/4xx_enet.c
cpu/ppc4xx/4xx_uart.c
cpu/ppc4xx/Makefile
cpu/ppc4xx/cpu.c
cpu/ppc4xx/cpu_init.c
cpu/ppc4xx/interrupts.c
cpu/ppc4xx/iop480_uart.c
cpu/ppc4xx/ndfc.c
cpu/ppc4xx/speed.c
cpu/ppc4xx/start.S
cpu/ppc4xx/uic.c [new file with mode: 0644]
cpu/ppc4xx/usbdev.c
cpu/ppc4xx/xilinx_irq.c [new file with mode: 0644]
doc/README.nand
drivers/block/Makefile
drivers/block/ahci.c
drivers/block/ata_piix.c
drivers/block/sil680.c
drivers/block/sym53c8xx.c
drivers/block/systemace.c
drivers/dma/MCD_dmaApi.c
drivers/dma/MCD_tasks.c
drivers/dma/MCD_tasksInit.c
drivers/dma/Makefile
drivers/input/Makefile
drivers/input/i8042.c
drivers/input/keyboard.c
drivers/input/pc_keyb.c
drivers/input/ps2mult.c
drivers/input/ps2ser.c
drivers/misc/Makefile
drivers/misc/ali512x.c
drivers/misc/ns87308.c
drivers/misc/status_led.c
drivers/mtd/Makefile
drivers/mtd/at45.c
drivers/mtd/cfi_flash.c
drivers/mtd/mw_eeprom.c
drivers/mtd/nand/Makefile
drivers/mtd/nand/diskonchip.c
drivers/mtd/nand/fsl_upm.c
drivers/mtd/nand/nand.c
drivers/mtd/nand/nand_base.c
drivers/mtd/nand/nand_bbt.c
drivers/mtd/nand/nand_ecc.c
drivers/mtd/nand/nand_ids.c
drivers/mtd/nand/nand_util.c
drivers/mtd/nand_legacy/Makefile
drivers/mtd/nand_legacy/nand_legacy.c
drivers/mtd/onenand/Makefile
drivers/mtd/onenand/onenand_base.c
drivers/mtd/onenand/onenand_bbt.c
drivers/mtd/onenand/onenand_uboot.c
drivers/pci/Makefile
drivers/pci/fsl_pci_init.c
drivers/pci/pci.c
drivers/pci/pci_auto.c
drivers/pci/pci_indirect.c
drivers/pci/tsi108_pci.c
drivers/pci/w83c553f.c
drivers/qe/Makefile
drivers/qe/qe.c
drivers/qe/uccf.c
drivers/qe/uec.c
drivers/qe/uec_phy.c
drivers/serial/Makefile
drivers/serial/ns9750_serial.c
drivers/serial/serial.c
drivers/serial/serial_sh.c
fs/jffs2/jffs2_1pass.c
fs/jffs2/jffs2_nand_1pass.c
include/asm-ppc/interrupt.h [new file with mode: 0644]
include/asm-ppc/ppc4xx-ebc.h [new file with mode: 0644]
include/asm-ppc/ppc4xx-intvec.h [deleted file]
include/asm-ppc/ppc4xx-sdram.h
include/asm-ppc/ppc4xx-uic.h [new file with mode: 0644]
include/asm-ppc/processor.h
include/asm-ppc/xilinx_irq.h [new file with mode: 0644]
include/configs/APC405.h
include/configs/ATUM8548.h
include/configs/Adder.h
include/configs/BAB7xx.h
include/configs/BC3450.h
include/configs/BMW.h
include/configs/CPCI750.h
include/configs/CPU87.h
include/configs/DU440.h
include/configs/EP88x.h
include/configs/FPS850L.h
include/configs/FPS860L.h
include/configs/GEN860T.h
include/configs/HH405.h
include/configs/HIDDEN_DRAGON.h
include/configs/HMI10.h
include/configs/IDS8247.h
include/configs/ISPAN.h
include/configs/IceCube.h
include/configs/M52277EVB.h
include/configs/M5235EVB.h
include/configs/M5249EVB.h
include/configs/M5253EVBE.h
include/configs/M5271EVB.h
include/configs/M5275EVB.h
include/configs/M5282EVB.h
include/configs/M5329EVB.h
include/configs/M5373EVB.h
include/configs/M54455EVB.h
include/configs/M5475EVB.h
include/configs/M5485EVB.h
include/configs/MIP405.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/MPC8540ADS.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/MPC8610HPCD.h
include/configs/MPC8641HPCN.h
include/configs/MVBC_P.h
include/configs/MVBLM7.h
include/configs/MigoR.h
include/configs/NETPHONE.h
include/configs/NETTA.h
include/configs/NETTA2.h
include/configs/NETVIA.h
include/configs/NSCU.h
include/configs/PCIPPC2.h
include/configs/PCIPPC6.h
include/configs/PIP405.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/PMC440.h
include/configs/Rattler.h
include/configs/SBC8540.h
include/configs/SX1.h
include/configs/SXNI855T.h
include/configs/Sandpoint8240.h
include/configs/Sandpoint8245.h
include/configs/TB5200.h
include/configs/TK885D.h
include/configs/TQM5200.h
include/configs/TQM823L.h
include/configs/TQM823M.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/ZPC1900.h
include/configs/acadia.h
include/configs/actux1.h
include/configs/actux2.h
include/configs/actux3.h
include/configs/actux4.h
include/configs/ads5121.h
include/configs/aev.h
include/configs/alpr.h
include/configs/apollon.h
include/configs/assabet.h
include/configs/at91cap9adk.h
include/configs/at91rm9200dk.h
include/configs/at91sam9263ek.h
include/configs/atngw100.h
include/configs/atstk1002.h
include/configs/atstk1003.h
include/configs/atstk1004.h
include/configs/atstk1006.h
include/configs/bf533-stamp.h
include/configs/bf537-stamp.h
include/configs/bf561-ezkit.h
include/configs/canmb.h
include/configs/canyonlands.h
include/configs/cm5200.h
include/configs/csb272.h
include/configs/csb472.h
include/configs/csb637.h
include/configs/davinci_dvevm.h
include/configs/davinci_sonata.h
include/configs/dbau1x00.h
include/configs/delta.h
include/configs/eXalion.h
include/configs/ep8248.h
include/configs/ep82xxm.h
include/configs/gcplus.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/hcu4.h
include/configs/hcu5.h
include/configs/hmi1001.h
include/configs/imx31_litekit.h
include/configs/imx31_phycore.h
include/configs/inka4x0.h
include/configs/ixdp425.h
include/configs/ixdpg425.h
include/configs/jupiter.h
include/configs/katmai.h
include/configs/kb9202.h
include/configs/kilauea.h
include/configs/korat.h
include/configs/kvme080.h
include/configs/linkstation.h
include/configs/lwmon5.h
include/configs/m501sk.h
include/configs/makalu.h
include/configs/mcc200.h
include/configs/mcu25.h
include/configs/mecp5200.h
include/configs/mgcoge.h
include/configs/mgsuvd.h
include/configs/ml401.h
include/configs/ml507.h [new file with mode: 0644]
include/configs/motionpro.h
include/configs/mpc7448hpc2.h
include/configs/mpr2.h
include/configs/ms7720se.h
include/configs/ms7722se.h
include/configs/ms7750se.h
include/configs/munices.h
include/configs/mx31ads.h
include/configs/ns9750dev.h
include/configs/omap1510inn.h
include/configs/omap2420h4.h
include/configs/omap5912osk.h
include/configs/p3mx.h
include/configs/p3p440.h
include/configs/pdnb3.h
include/configs/ppmc8260.h
include/configs/pxa255_idp.h
include/configs/qemu-mips.h
include/configs/quad100hd.h
include/configs/quantum.h
include/configs/r2dplus.h
include/configs/r7780mp.h
include/configs/redwood.h [new file with mode: 0644]
include/configs/sbc8349.h
include/configs/sbc8548.h
include/configs/sbc8560.h
include/configs/sbc8641d.h
include/configs/sc3.h
include/configs/sc520_cdp.h
include/configs/sequoia.h
include/configs/sh7763rdp.h
include/configs/smmaco4.h
include/configs/socrates.h
include/configs/sorcery.h
include/configs/spc1920.h
include/configs/spieval.h
include/configs/stxssa.h
include/configs/stxxtc.h
include/configs/svm_sc8xx.h
include/configs/taishan.h
include/configs/trizepsiv.h
include/configs/uc100.h
include/configs/uc101.h
include/configs/v38b.h
include/configs/virtlab2.h
include/configs/voiceblue.h
include/configs/yosemite.h
include/configs/zeus.h
include/linux/mtd/nand_ids.h
include/linux/mtd/nand_legacy.h
include/nand.h
include/ppc405.h
include/ppc440.h
include/ppc4xx.h
include/ppc4xx_enet.h
lib_generic/crc32.c

diff --git a/CREDITS b/CREDITS
index 2b0dab7609b8069ccad97794a667f5a406d4f7cf..63b16a9ac2e014307dfa059d4c9da62cbce9b69b 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -399,6 +399,11 @@ N: Stelian Pop
 E: stelian.pop@leadtechdesign.com
 D: Atmel AT91CAP9ADK support
 
+N: Ricardo Ribalda Delgado
+E: ricardo.ribalda@uam.es
+D: PPC440x5 (Virtex5), ML507 Board, eeprom_simul, adt7460
+W: http://www.ii.uam.es/~rribalda
+
 N: Stefan Roese
 E: sr@denx.de
 D: AMCC PPC4xx Support
index 777d14186e81b79cb8e48a8def2bfc83ddb947cf..7efef6a3144f828a7fa8c5273c96e5a0a5902ace 100644 (file)
@@ -315,6 +315,10 @@ Daniel Poirot <dan.poirot@windriver.com>
        sbc8240         MPC8240
        sbc405          PPC405GP
 
+Ricardo Ribalda <ricardo.ribalda@uam.es>
+
+       ml507           PPC440x5
+
 Stefan Roese <sr@denx.de>
 
        P3M7448         MPC7448
@@ -424,6 +428,9 @@ John Zhan <zhanz@sinovee.com>
 
        svm_sc8xx       MPC8xx
 
+Feng Kan <fkan@amcc.com>
+
+       redwood                 PPC4xx
 -------------------------------------------------------------------------
 
 Unknown / orphaned boards:
diff --git a/MAKEALL b/MAKEALL
index ee83ccab48ba98b37cb5d131fb0530860fba22f6..ac4195f7d8f8e785a1d3f8f473909e6e1a11706c 100755 (executable)
--- a/MAKEALL
+++ b/MAKEALL
@@ -209,6 +209,8 @@ LIST_4xx="          \
        MIP405T         \
        ML2             \
        ml300           \
+       ml507           \
+       ml507_flash     \
        ocotea          \
        OCRTC           \
        ORSG            \
@@ -222,6 +224,7 @@ LIST_4xx="          \
        PPChameleonEVB  \
        quad100hd       \
        rainier         \
+       redwood         \
        sbc405          \
        sc3             \
        sequoia         \
index 6624370a889b4fc99b547833060e9dc9a5475971..a384d167722e10c7a44e8510667b48b8c18d28cb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1349,6 +1349,17 @@ ML2_config:      unconfig
 ml300_config:  unconfig
        @$(MKCONFIG) $(@:_config=) ppc ppc4xx ml300 xilinx
 
+ml507_flash_config:    unconfig
+       @mkdir -p $(obj)include $(obj)board/xilinx/ml507
+       @cp $(obj)board/xilinx/ml507/u-boot-rom.lds  $(obj)board/xilinx/ml507/u-boot.lds
+       @echo "TEXT_BASE = 0xFE360000" > $(obj)board/xilinx/ml507/config.tmp
+       @$(MKCONFIG) $(@:_flash_config=) ppc ppc4xx ml507 xilinx
+
+ml507_config:  unconfig
+       @mkdir -p $(obj)include $(obj)board/xilinx/ml507
+       @cp $(obj)board/xilinx/ml507/u-boot-ram.lds  $(obj)board/xilinx/ml507/u-boot.lds
+       @$(MKCONFIG) $(@:_config=) ppc ppc4xx ml507 xilinx
+
 ocotea_config: unconfig
        @$(MKCONFIG) $(@:_config=) ppc ppc4xx ocotea amcc
 
@@ -1410,6 +1421,9 @@ PPChameleonEVB_HI_33_config:      unconfig
 quad100hd_config:      unconfig
        @$(MKCONFIG) $(@:_config=) ppc ppc4xx quad100hd
 
+redwood_config: unconfig
+       @$(MKCONFIG) $(@:_config=) ppc ppc4xx redwood amcc
+
 sbc405_config: unconfig
        @$(MKCONFIG) $(@:_config=) ppc ppc4xx sbc405
 
@@ -2681,7 +2695,7 @@ imx31_phycore_config      : unconfig
        @$(MKCONFIG) $(@:_config=) arm arm1136 imx31_phycore NULL mx31
 
 mx31ads_config         : unconfig
-       @$(MKCONFIG) $(@:_config=) arm arm1136 mx31ads NULL mx31
+       @$(MKCONFIG) $(@:_config=) arm arm1136 mx31ads freescale mx31
 
 omap2420h4_config      : unconfig
        @$(MKCONFIG) $(@:_config=) arm arm1136 omap2420h4 NULL omap24xx
diff --git a/README b/README
index d4456e576b9eca2559125b44a00e50089302578c..37449d161014fe13d9a3c8b73f6b90768f94682e 100644 (file)
--- a/README
+++ b/README
@@ -2064,7 +2064,7 @@ Configuration Settings:
                Define if the flash driver uses extra elements in the
                common flash structure for storing flash geometry.
 
-- CFG_FLASH_CFI_DRIVER
+- CONFIG_FLASH_CFI_DRIVER
                This option also enables the building of the cfi_flash driver
                in the drivers directory
 
index f2bed5cd8a90a2edcb131de502a419380ea19ca8..08d89d7791135bb6fee300b4defe996b59a6298a 100644 (file)
@@ -349,7 +349,7 @@ int is_pci_host(struct pci_controller *hose)
        return 1;
 }
 
-int katmai_pcie_card_present(int port)
+static int katmai_pcie_card_present(int port)
 {
        u32 val;
 
@@ -437,76 +437,6 @@ void pcie_setup_hoses(int busno)
 }
 #endif /* defined(CONFIG_PCI) */
 
-int misc_init_f (void)
-{
-       uint reg;
-#if defined(CONFIG_STRESS)
-       uint i ;
-       uint disp;
-#endif
-
-       /* minimal init for PCIe */
-#if 0 /* test-only: test endpoint at some time, for now rootpoint only */
-       /* pci express 0 Endpoint Mode */
-       mfsdr(SDR0_PE0DLPSET, reg);
-       reg &= (~0x00400000);
-       mtsdr(SDR0_PE0DLPSET, reg);
-#else
-       /* pci express 0 Rootpoint  Mode */
-       mfsdr(SDR0_PE0DLPSET, reg);
-       reg |= 0x00400000;
-       mtsdr(SDR0_PE0DLPSET, reg);
-#endif
-       /* pci express 1 Rootpoint  Mode */
-       mfsdr(SDR0_PE1DLPSET, reg);
-       reg |= 0x00400000;
-       mtsdr(SDR0_PE1DLPSET, reg);
-       /* pci express 2 Rootpoint  Mode */
-       mfsdr(SDR0_PE2DLPSET, reg);
-       reg |= 0x00400000;
-       mtsdr(SDR0_PE2DLPSET, reg);
-
-#if defined(CONFIG_STRESS)
-       /*
-        * All this setting done by linux only needed by stress an charac. test
-        * procedure
-        * PCIe 1 Rootpoint PCIe2 Endpoint
-        * PCIe 0 FIR Pre-emphasis Filter Coefficients & Transmit Driver Power Level
-        */
-       for (i=0,disp=0; i<8; i++,disp+=3) {
-               mfsdr(SDR0_PE0HSSSET1L0+disp, reg);
-               reg |= 0x33000000;
-               mtsdr(SDR0_PE0HSSSET1L0+disp, reg);
-       }
-
-       /*PCIe 1 FIR Pre-emphasis Filter Coefficients & Transmit Driver Power Level */
-       for (i=0,disp=0; i<4; i++,disp+=3) {
-               mfsdr(SDR0_PE1HSSSET1L0+disp, reg);
-               reg |= 0x33000000;
-               mtsdr(SDR0_PE1HSSSET1L0+disp, reg);
-       }
-
-       /*PCIE 2 FIR Pre-emphasis Filter Coefficients & Transmit Driver Power Level */
-       for (i=0,disp=0; i<4; i++,disp+=3) {
-               mfsdr(SDR0_PE2HSSSET1L0+disp, reg);
-               reg |= 0x33000000;
-               mtsdr(SDR0_PE2HSSSET1L0+disp, reg);
-       }
-
-       reg = 0x21242222;
-       mtsdr(SDR0_PE2UTLSET1, reg);
-       reg = 0x11000000;
-       mtsdr(SDR0_PE2UTLSET2, reg);
-       /* pci express 1 Endpoint  Mode */
-       reg = 0x00004000;
-       mtsdr(SDR0_PE2DLPSET, reg);
-
-       mtsdr(SDR0_UART1, 0x2080005a);  /* patch for TG */
-#endif
-
-       return 0;
-}
-
 #ifdef CONFIG_POST
 /*
  * Returns 1 if keys pressed to start the power-on long-running tests
index eea1e1e177c350bffdba3707220984c1b4f15ac8..4d1d093219eb1972f1712ba733bdd8a06fae0c28 100644 (file)
@@ -147,36 +147,48 @@ int board_early_init_f (void)
        /*--------------------------------------------------------------------
         * Setup the interrupt controller polarities, triggers, etc.
         *-------------------------------------------------------------------*/
-       mtdcr (uic0sr, 0xffffffff);     /* clear all */
-       mtdcr (uic0er, 0x00000000);     /* disable all */
-       mtdcr (uic0cr, 0x00000009);     /* SMI & UIC1 crit are critical */
-       mtdcr (uic0pr, 0xfffffe13);     /* per ref-board manual */
-       mtdcr (uic0tr, 0x01c00008);     /* per ref-board manual */
-       mtdcr (uic0vr, 0x00000001);     /* int31 highest, base=0x000 */
-       mtdcr (uic0sr, 0xffffffff);     /* clear all */
-
+       /*
+        * Because of the interrupt handling rework to handle 440GX interrupts
+        * with the common code, we needed to change names of the UIC registers.
+        * Here the new relationship:
+        *
+        * U-Boot name  440GX name
+        * -----------------------
+        * UIC0         UICB0
+        * UIC1         UIC0
+        * UIC2         UIC1
+        * UIC3         UIC2
+        */
        mtdcr (uic1sr, 0xffffffff);     /* clear all */
        mtdcr (uic1er, 0x00000000);     /* disable all */
-       mtdcr (uic1cr, 0x00000000);     /* all non-critical */
-       mtdcr (uic1pr, 0xffffe0ff);     /* per ref-board manual */
-       mtdcr (uic1tr, 0x00ffc000);     /* per ref-board manual */
+       mtdcr (uic1cr, 0x00000009);     /* SMI & UIC1 crit are critical */
+       mtdcr (uic1pr, 0xfffffe13);     /* per ref-board manual */
+       mtdcr (uic1tr, 0x01c00008);     /* per ref-board manual */
        mtdcr (uic1vr, 0x00000001);     /* int31 highest, base=0x000 */
        mtdcr (uic1sr, 0xffffffff);     /* clear all */
 
        mtdcr (uic2sr, 0xffffffff);     /* clear all */
        mtdcr (uic2er, 0x00000000);     /* disable all */
        mtdcr (uic2cr, 0x00000000);     /* all non-critical */
-       mtdcr (uic2pr, 0xffffffff);     /* per ref-board manual */
-       mtdcr (uic2tr, 0x00ff8c0f);     /* per ref-board manual */
+       mtdcr (uic2pr, 0xffffe0ff);     /* per ref-board manual */
+       mtdcr (uic2tr, 0x00ffc000);     /* per ref-board manual */
        mtdcr (uic2vr, 0x00000001);     /* int31 highest, base=0x000 */
        mtdcr (uic2sr, 0xffffffff);     /* clear all */
 
-       mtdcr (uicb0sr, 0xfc000000); /* clear all */
-       mtdcr (uicb0er, 0x00000000); /* disable all */
-       mtdcr (uicb0cr, 0x00000000); /* all non-critical */
-       mtdcr (uicb0pr, 0xfc000000); /* */
-       mtdcr (uicb0tr, 0x00000000); /* */
-       mtdcr (uicb0vr, 0x00000001); /* */
+       mtdcr (uic3sr, 0xffffffff);     /* clear all */
+       mtdcr (uic3er, 0x00000000);     /* disable all */
+       mtdcr (uic3cr, 0x00000000);     /* all non-critical */
+       mtdcr (uic3pr, 0xffffffff);     /* per ref-board manual */
+       mtdcr (uic3tr, 0x00ff8c0f);     /* per ref-board manual */
+       mtdcr (uic3vr, 0x00000001);     /* int31 highest, base=0x000 */
+       mtdcr (uic3sr, 0xffffffff);     /* clear all */
+
+       mtdcr (uic0sr, 0xfc000000); /* clear all */
+       mtdcr (uic0er, 0x00000000); /* disable all */
+       mtdcr (uic0cr, 0x00000000); /* all non-critical */
+       mtdcr (uic0pr, 0xfc000000); /* */
+       mtdcr (uic0tr, 0x00000000); /* */
+       mtdcr (uic0vr, 0x00000001); /* */
        mfsdr (sdr_mfr, mfr);
        mfr &= ~SDR0_MFR_ECS_MASK;
 /*     mtsdr(sdr_mfr, mfr); */
diff --git a/board/amcc/redwood/Makefile b/board/amcc/redwood/Makefile
new file mode 100644 (file)
index 0000000..5793307
--- /dev/null
@@ -0,0 +1,50 @@
+#
+# (C) Copyright 2008
+# Feng Kan, Applied Micro Circuits Corp., fkan@amcc.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 $(TOPDIR)/config.mk
+
+LIB    = $(obj)lib$(BOARD).a
+
+COBJS  = $(BOARD).o
+SOBJS  = 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)
+
+clean:
+       rm -f $(SOBJS) $(OBJS)
+
+distclean:     clean
+       rm -f $(LIB) core *.bak .depend *~
+
+#########################################################################
+
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
diff --git a/board/amcc/redwood/config.mk b/board/amcc/redwood/config.mk
new file mode 100644 (file)
index 0000000..f33336d
--- /dev/null
@@ -0,0 +1,42 @@
+#
+# (C) Copyright 2008
+# Feng Kan, Applied Micro Circuits Corp., fkan@amcc.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
+#
+
+#
+# AMCC 460SX Reference Platform (redwood) board
+#
+
+ifeq ($(ramsym),1)
+TEXT_BASE = 0x07FD0000
+else
+TEXT_BASE = 0xfffb0000
+endif
+
+PLATFORM_CPPFLAGS += -DCONFIG_440=1
+
+ifeq ($(debug),1)
+PLATFORM_CPPFLAGS += -DDEBUG
+endif
+
+ifeq ($(dbcr),1)
+PLATFORM_CPPFLAGS += -DCFG_INIT_DBCR=0x8cff0000
+endif
diff --git a/board/amcc/redwood/init.S b/board/amcc/redwood/init.S
new file mode 100644 (file)
index 0000000..fcffada
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * (C) Copyright 2008
+ * Feng Kan, Applied Micro Circuits Corp., fkan@amcc.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 <ppc_asm.tmpl>
+#include <config.h>
+#include <asm-ppc/mmu.h>
+
+/**************************************************************************
+ * TLB TABLE
+ *
+ * This table is used by the cpu boot code to setup the initial tlb
+ * entries. Rather than make broad assumptions in the cpu source tree,
+ * this table lets each board set things up however they like.
+ *
+ *  Pointer to the table is returned in r1
+ *
+ *************************************************************************/
+
+       .section .bootpg,"ax"
+       .globl tlbtab
+tlbtab:
+       tlbtab_start
+
+       /*
+        * BOOT_CS (FLASH) must be first. Before relocation SA_I can be off to use the
+        * speed up boot process. It is patched after relocation to enable SA_I
+        */
+       tlbentry(0xff000000, SZ_16M, 0xff000000, 4, AC_R|AC_W|AC_X|SA_G)
+
+       /*
+        * TLB entries for SDRAM are not needed on this platform.
+        * They are dynamically generated in the SPD DDR(2) detection
+        * routine.
+        */
+
+       /* Although 512 KB, map 256k at a time */
+       tlbentry(CFG_ISRAM_BASE, SZ_256K, 0x00000000, 4, AC_R|AC_W|AC_X|SA_I)
+       tlbentry(CFG_ISRAM_BASE + 0x40000, SZ_256K, 0x00040000, 4, AC_R|AC_W|AC_X|SA_I)
+
+       tlbentry(CFG_OPER_FLASH, SZ_16M, 0xE7000000, 4,AC_R|AC_W|AC_X|SA_G|SA_I)
+
+       /*
+        * Peripheral base
+        */
+       tlbentry(CFG_PERIPHERAL_BASE, SZ_16K, 0xEF600000, 4, AC_R|AC_W|SA_G|SA_I)
+
+       tlbentry(CFG_PCIE0_XCFGBASE,SZ_16M, 0x00000000, 0xC, AC_R|AC_W|SA_G|SA_I)
+       tlbentry(CFG_PCIE1_XCFGBASE,SZ_16M, 0x10000000, 0xC, AC_R|AC_W|SA_G|SA_I)
+       tlbentry(CFG_PCIE2_XCFGBASE,SZ_16M, 0x20000000, 0xC, AC_R|AC_W|SA_G|SA_I)
+
+       tlbentry(CFG_PCIE0_MEMBASE, SZ_256M, 0x00000000, 0xD, AC_R|AC_W|SA_G|SA_I)
+       tlbentry(CFG_PCIE1_MEMBASE, SZ_256M, 0x00000000, 0xE, AC_R|AC_W|SA_G|SA_I)
+
+       tlbentry(CFG_PCIE0_REGBASE, SZ_64K, 0x30000000, 0xC, AC_R|AC_W|SA_G|SA_I)
+       tlbentry(CFG_PCIE1_REGBASE, SZ_64K, 0x30010000, 0xC, AC_R|AC_W|SA_G|SA_I)
+       tlbentry(CFG_PCIE2_REGBASE, SZ_64K, 0x30020000, 0xC, AC_R|AC_W|SA_G|SA_I)
+       tlbtab_end
diff --git a/board/amcc/redwood/redwood.c b/board/amcc/redwood/redwood.c
new file mode 100644 (file)
index 0000000..37a0c31
--- /dev/null
@@ -0,0 +1,456 @@
+/*
+ * This is the main board level file for the Redwood AMCC board.
+ *
+ * (C) Copyright 2008
+ * Feng Kan, Applied Micro Circuits Corp., fkan@amcc.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 "redwood.h"
+#include <ppc4xx.h>
+#include <asm/processor.h>
+#include <i2c.h>
+#include <asm-ppc/io.h>
+
+int compare_to_true(char *str);
+char *remove_l_w_space(char *in_str);
+char *remove_t_w_space(char *in_str);
+int get_console_port(void);
+
+static void early_init_EBC(void);
+static int bootdevice_selected(void);
+static void early_reinit_EBC(int);
+static void early_init_UIC(void);
+
+/*
+ * Define Boot devices
+ */
+#define BOOT_FROM_8BIT_SRAM                    0x00
+#define BOOT_FROM_16BIT_SRAM                   0x01
+#define BOOT_FROM_32BIT_SRAM                   0x02
+#define BOOT_FROM_8BIT_NAND                    0x03
+#define BOOT_FROM_16BIT_NOR                    0x04
+#define BOOT_DEVICE_UNKNOWN                    0xff
+
+/*
+ * EBC Devices Characteristics
+ *   Peripheral Bank Access Parameters       -   EBC_BxAP
+ *   Peripheral Bank Configuration Register  -   EBC_BxCR
+ */
+
+/*
+ * 8 bit width SRAM
+ * BU Value
+ * BxAP : 0x03800000  - 0 00000111 0 00 00 00 00 00 000 0 0 0 0 00000
+ * B0CR : 0xff098000  - BAS = ff0 - 100 11 00 0000000000000
+ * B2CR : 0xe7098000  - BAS = e70 - 100 11 00 0000000000000
+ */
+#define EBC_BXAP_8BIT_SRAM                                     \
+       EBC_BXAP_BME_DISABLED   | EBC_BXAP_TWT_ENCODE(7)  |     \
+       EBC_BXAP_BCE_DISABLE    | EBC_BXAP_BCT_2TRANS     |     \
+       EBC_BXAP_CSN_ENCODE(0)  | EBC_BXAP_OEN_ENCODE(0)  |     \
+       EBC_BXAP_WBN_ENCODE(0)  | EBC_BXAP_WBF_ENCODE(0)  |     \
+       EBC_BXAP_TH_ENCODE(0)   | EBC_BXAP_RE_DISABLED    |     \
+       EBC_BXAP_SOR_DELAYED    | EBC_BXAP_BEM_WRITEONLY  |     \
+       EBC_BXAP_PEN_DISABLED
+
+#define EBC_BXAP_16BIT_SRAM    EBC_BXAP_8BIT_SRAM
+#define EBC_BXAP_32BIT_SRAM    EBC_BXAP_8BIT_SRAM
+
+/*
+ * NAND flash
+ * BU Value
+ * BxAP : 0x048ff240  - 0 00000111 0 00 00 00 00 00 000 0 0 0 0 00000
+ * B0CR : 0xff09a000  - BAS = ff0 - 100 11 01 0000000000000
+ * B2CR : 0xe709a000  - BAS = e70 - 100 11 01 0000000000000
+*/
+#define EBC_BXAP_NAND                                          \
+       EBC_BXAP_BME_DISABLED   | EBC_BXAP_TWT_ENCODE(7)  |     \
+       EBC_BXAP_BCE_DISABLE    | EBC_BXAP_BCT_2TRANS     |     \
+       EBC_BXAP_CSN_ENCODE(0)  | EBC_BXAP_OEN_ENCODE(0)  |     \
+       EBC_BXAP_WBN_ENCODE(0)  | EBC_BXAP_WBF_ENCODE(0)  |     \
+       EBC_BXAP_TH_ENCODE(0)   | EBC_BXAP_RE_DISABLED    |     \
+       EBC_BXAP_SOR_DELAYED    | EBC_BXAP_BEM_WRITEONLY  |     \
+       EBC_BXAP_PEN_DISABLED
+
+/*
+ * NOR flash
+ * BU Value
+ * BxAP : 0x048ff240  - 0 00000111 0 00 00 00 00 00 000 0 0 0 0 00000
+ * B0CR : 0xff09a000  - BAS = ff0 - 100 11 01 0000000000000
+ * B2CR : 0xe709a000  - BAS = e70 - 100 11 01 0000000000000
+*/
+#define EBC_BXAP_NOR                                           \
+       EBC_BXAP_BME_DISABLED   | EBC_BXAP_TWT_ENCODE(7)  |     \
+       EBC_BXAP_BCE_DISABLE    | EBC_BXAP_BCT_2TRANS     |     \
+       EBC_BXAP_CSN_ENCODE(0)  | EBC_BXAP_OEN_ENCODE(0)  |     \
+       EBC_BXAP_WBN_ENCODE(0)  | EBC_BXAP_WBF_ENCODE(0)  |     \
+       EBC_BXAP_TH_ENCODE(0)   | EBC_BXAP_RE_DISABLED    |     \
+       EBC_BXAP_SOR_DELAYED    | EBC_BXAP_BEM_WRITEONLY  |     \
+       EBC_BXAP_PEN_DISABLED
+
+/*
+ * FPGA
+ * BU value :
+ * B1AP = 0x05895240  - 0 00001011 0 00 10 01 01 01 001 0 0 1 0 00000
+ * B1CR = 0xe201a000  - BAS = e20 - 000 11 01 00000000000000
+ */
+#define EBC_BXAP_FPGA                                          \
+       EBC_BXAP_BME_DISABLED   | EBC_BXAP_TWT_ENCODE(11) |     \
+       EBC_BXAP_BCE_DISABLE    | EBC_BXAP_BCT_2TRANS     |     \
+       EBC_BXAP_CSN_ENCODE(10) | EBC_BXAP_OEN_ENCODE(1)  |     \
+       EBC_BXAP_WBN_ENCODE(1)  | EBC_BXAP_WBF_ENCODE(1)  |     \
+       EBC_BXAP_TH_ENCODE(1)   | EBC_BXAP_RE_DISABLED    |     \
+       EBC_BXAP_SOR_DELAYED    | EBC_BXAP_BEM_RW         |     \
+       EBC_BXAP_PEN_DISABLED
+
+#define EBC_BXCR_8BIT_SRAM_CS0                                         \
+       EBC_BXCR_BAS_ENCODE(0xFFE00000) | EBC_BXCR_BS_1MB           |   \
+       EBC_BXCR_BU_RW                  | EBC_BXCR_BW_8BIT
+
+#define EBC_BXCR_32BIT_SRAM_CS0                                                \
+       EBC_BXCR_BAS_ENCODE(0xFFC00000) | EBC_BXCR_BS_1MB           |   \
+       EBC_BXCR_BU_RW                  | EBC_BXCR_BW_32BIT
+
+#define EBC_BXCR_NAND_CS0                                              \
+       EBC_BXCR_BAS_ENCODE(0xFF000000) | EBC_BXCR_BS_16MB          |   \
+       EBC_BXCR_BU_RW                  | EBC_BXCR_BW_8BIT
+
+#define EBC_BXCR_16BIT_SRAM_CS0                                                \
+       EBC_BXCR_BAS_ENCODE(0xFFE00000) | EBC_BXCR_BS_2MB           |   \
+       EBC_BXCR_BU_RW                  | EBC_BXCR_BW_16BIT
+
+#define EBC_BXCR_NOR_CS0                                               \
+       EBC_BXCR_BAS_ENCODE(0xFF000000) | EBC_BXCR_BS_16MB          |   \
+       EBC_BXCR_BU_RW                  | EBC_BXCR_BW_16BIT
+
+#define EBC_BXCR_NOR_CS1                                               \
+       EBC_BXCR_BAS_ENCODE(0xE0000000) | EBC_BXCR_BS_128MB         |   \
+       EBC_BXCR_BU_RW                  | EBC_BXCR_BW_16BIT
+
+#define EBC_BXCR_NAND_CS1                                              \
+       EBC_BXCR_BAS_ENCODE(0xE0000000) | EBC_BXCR_BS_128MB         |   \
+       EBC_BXCR_BU_RW                  | EBC_BXCR_BW_8BIT
+
+#define EBC_BXCR_NAND_CS2                                              \
+       EBC_BXCR_BAS_ENCODE(0xC0000000) | EBC_BXCR_BS_128MB         |   \
+       EBC_BXCR_BU_RW                  | EBC_BXCR_BW_8BIT
+
+#define EBC_BXCR_SRAM_CS2                                              \
+       EBC_BXCR_BAS_ENCODE(0xC0000000) | EBC_BXCR_BS_4MB           |   \
+       EBC_BXCR_BU_RW                  | EBC_BXCR_BW_32BIT
+
+#define EBC_BXCR_LARGE_FLASH_CS2                                       \
+       EBC_BXCR_BAS_ENCODE(0xE7000000) | EBC_BXCR_BS_16MB          |   \
+       EBC_BXCR_BU_RW                  | EBC_BXCR_BW_16BIT
+
+#define EBC_BXCR_FPGA_CS3                                              \
+       EBC_BXCR_BAS_ENCODE(0xE2000000) | EBC_BXCR_BS_1MB           |   \
+       EBC_BXCR_BU_RW                  | EBC_BXCR_BW_16BIT
+
+/*****************************************************************************
+ * UBOOT initiated board specific function calls
+ ****************************************************************************/
+
+int board_early_init_f(void)
+{
+       int computed_boot_device = BOOT_DEVICE_UNKNOWN;
+
+       /*
+        * Initialise EBC
+        */
+       early_init_EBC();
+
+       /*
+        * Determine which boot device was selected
+        */
+       computed_boot_device = bootdevice_selected();
+
+       /*
+        * Reinit EBC based on selected boot device
+        */
+       early_reinit_EBC(computed_boot_device);
+
+       /*
+        * Setup for UIC on 460SX redwood board
+        */
+       early_init_UIC();
+
+       return 0;
+}
+
+int checkboard(void)
+{
+       char *s = getenv("serial#");
+
+       printf("Board: Redwood - AMCC 460SX Reference Board");
+       if (s != NULL) {
+               puts(", serial# ");
+               puts(s);
+       }
+       putc('\n');
+
+       return 0;
+}
+
+static void early_init_EBC(void)
+{
+       /*
+        * Initialize EBC CONFIG -
+        * Keep the Default value, but the bit PDT which has to be set to 1 ?TBC
+        * default value :
+        *      0x07C00000 - 0 0 000 1 1 1 1 1 0000 0 00000 000000000000
+        */
+       mtebc(xbcfg, EBC_CFG_LE_UNLOCK |
+             EBC_CFG_PTD_ENABLE |
+             EBC_CFG_RTC_16PERCLK |
+             EBC_CFG_ATC_PREVIOUS |
+             EBC_CFG_DTC_PREVIOUS |
+             EBC_CFG_CTC_PREVIOUS |
+             EBC_CFG_OEO_PREVIOUS |
+             EBC_CFG_EMC_DEFAULT | EBC_CFG_PME_DISABLE | EBC_CFG_PR_16);
+
+       /*
+        * PART 1 : Initialize EBC Bank 3
+        * ==============================
+        * Bank1 is always associated to the EPLD.
+        * It has to be initialized prior to other banks settings computation
+        * since some board registers values may be needed to determine the
+        * boot type
+        */
+       mtebc(pb1ap, EBC_BXAP_FPGA);
+       mtebc(pb1cr, EBC_BXCR_FPGA_CS3);
+
+}
+
+static int bootdevice_selected(void)
+{
+       unsigned long sdr0_pinstp;
+       unsigned long bootstrap_settings;
+       int computed_boot_device = BOOT_DEVICE_UNKNOWN;
+
+       /*
+        *  Determine which boot device was selected
+        *  =================================================
+        *
+        *  Read Pin Strap Register in PPC460SX
+        *  Result can either be :
+        *   - Boot strap = boot from EBC 8bits     => Small Flash
+        *   - Boot strap = boot from PCI
+        *   - Boot strap = IIC
+        *  In case of boot from IIC, read Serial Device Strap Register1
+        *
+        *  Result can either be :
+        *   - Boot from EBC  - EBC Bus Width = 8bits    => Small Flash
+        *   - Boot from EBC  - EBC Bus Width = 16bits   => Large Flash or SRAM
+        *   - Boot from PCI
+        */
+
+       /* Read Pin Strap Register in PPC460SX */
+       mfsdr(SDR0_PINSTP, sdr0_pinstp);
+       bootstrap_settings = sdr0_pinstp & SDR0_PSTRP0_BOOTSTRAP_MASK;
+
+       switch (bootstrap_settings) {
+       case SDR0_PSTRP0_BOOTSTRAP_SETTINGS0:
+               /*
+                * Boot from SRAM, 8bit width
+                */
+               computed_boot_device = BOOT_FROM_8BIT_SRAM;
+               break;
+       case SDR0_PSTRP0_BOOTSTRAP_SETTINGS1:
+               /*
+                * Boot from SRAM, 32bit width
+                */
+               computed_boot_device = BOOT_FROM_32BIT_SRAM;
+               break;
+       case SDR0_PSTRP0_BOOTSTRAP_SETTINGS2:
+               /*
+                * Boot from NAND, 8bit width
+                */
+               computed_boot_device = BOOT_FROM_8BIT_NAND;
+               break;
+       case SDR0_PSTRP0_BOOTSTRAP_SETTINGS4:
+               /*
+                * Boot from SRAM, 16bit width
+                * Boot setting in IIC EEPROM 0x50
+                */
+               computed_boot_device = BOOT_FROM_16BIT_SRAM;
+               break;
+       case SDR0_PSTRP0_BOOTSTRAP_SETTINGS5:
+               /*
+                * Boot from NOR, 16bit width
+                * Boot setting in IIC EEPROM 0x54
+                */
+               computed_boot_device = BOOT_FROM_16BIT_NOR;
+               break;
+       default:
+               /* should not be */
+               computed_boot_device = BOOT_DEVICE_UNKNOWN;
+               break;
+       }
+
+       return computed_boot_device;
+}
+
+static void early_reinit_EBC(int computed_boot_device)
+{
+       /*
+        *  Compute EBC settings depending on selected boot device
+        *  ======================================================
+        *
+        * Resulting EBC init will be among following configurations :
+        *
+        *  - Boot from EBC 8bits => boot from Small Flash selected
+        *            EBC-CS0     = Small Flash
+        *            EBC-CS2     = Large Flash and SRAM
+        *
+        *  - Boot from EBC 16bits => boot from Large Flash or SRAM
+        *            EBC-CS0     = Large Flash or SRAM
+        *            EBC-CS2     = Small Flash
+        *
+        *  - Boot from PCI
+        *            EBC-CS0     = not initialized to avoid address contention
+        *            EBC-CS2     = same as boot from Small Flash selected
+        */
+
+       unsigned long ebc0_cs0_bxap_value = 0, ebc0_cs0_bxcr_value = 0;
+       unsigned long ebc0_cs1_bxap_value = 0, ebc0_cs1_bxcr_value = 0;
+       unsigned long ebc0_cs2_bxap_value = 0, ebc0_cs2_bxcr_value = 0;
+
+       switch (computed_boot_device) {
+               /*-------------------------------------------------------------------*/
+       case BOOT_FROM_8BIT_SRAM:
+               /*-------------------------------------------------------------------*/
+               ebc0_cs0_bxap_value = EBC_BXAP_8BIT_SRAM;
+               ebc0_cs0_bxcr_value = EBC_BXCR_8BIT_SRAM_CS0;
+               ebc0_cs1_bxap_value = EBC_BXAP_NOR;
+               ebc0_cs1_bxcr_value = EBC_BXCR_NOR_CS1;
+               ebc0_cs2_bxap_value = EBC_BXAP_NAND;
+               ebc0_cs2_bxcr_value = EBC_BXCR_NAND_CS2;
+               break;
+
+               /*-------------------------------------------------------------------*/
+       case BOOT_FROM_16BIT_SRAM:
+               /*-------------------------------------------------------------------*/
+               ebc0_cs0_bxap_value = EBC_BXAP_16BIT_SRAM;
+               ebc0_cs0_bxcr_value = EBC_BXCR_16BIT_SRAM_CS0;
+               ebc0_cs1_bxap_value = EBC_BXAP_NOR;
+               ebc0_cs1_bxcr_value = EBC_BXCR_NOR_CS1;
+               ebc0_cs2_bxap_value = EBC_BXAP_NAND;
+               ebc0_cs2_bxcr_value = EBC_BXCR_NAND_CS2;
+               break;
+
+               /*-------------------------------------------------------------------*/
+       case BOOT_FROM_32BIT_SRAM:
+               /*-------------------------------------------------------------------*/
+               ebc0_cs0_bxap_value = EBC_BXAP_32BIT_SRAM;
+               ebc0_cs0_bxcr_value = EBC_BXCR_32BIT_SRAM_CS0;
+               ebc0_cs1_bxap_value = EBC_BXAP_NOR;
+               ebc0_cs1_bxcr_value = EBC_BXCR_NOR_CS1;
+               ebc0_cs2_bxap_value = EBC_BXAP_NAND;
+               ebc0_cs2_bxcr_value = EBC_BXCR_NAND_CS2;
+               break;
+
+               /*-------------------------------------------------------------------*/
+       case BOOT_FROM_16BIT_NOR:
+               /*-------------------------------------------------------------------*/
+               ebc0_cs0_bxap_value = EBC_BXAP_NOR;
+               ebc0_cs0_bxcr_value = EBC_BXCR_NOR_CS0;
+               ebc0_cs1_bxap_value = EBC_BXAP_NAND;
+               ebc0_cs1_bxcr_value = EBC_BXCR_NAND_CS1;
+               ebc0_cs2_bxap_value = EBC_BXAP_32BIT_SRAM;
+               ebc0_cs2_bxcr_value = EBC_BXCR_SRAM_CS2;
+               break;
+
+               /*-------------------------------------------------------------------*/
+       case BOOT_FROM_8BIT_NAND:
+               /*-------------------------------------------------------------------*/
+               ebc0_cs0_bxap_value = EBC_BXAP_NAND;
+               ebc0_cs0_bxcr_value = EBC_BXCR_NAND_CS0;
+               ebc0_cs1_bxap_value = EBC_BXAP_NOR;
+               ebc0_cs1_bxcr_value = EBC_BXCR_NOR_CS1;
+               ebc0_cs2_bxap_value = EBC_BXAP_32BIT_SRAM;
+               ebc0_cs2_bxcr_value = EBC_BXCR_SRAM_CS2;
+               break;
+
+               /*-------------------------------------------------------------------*/
+       default:
+               /*-------------------------------------------------------------------*/
+               /* BOOT_DEVICE_UNKNOWN */
+               break;
+       }
+
+       mtebc(pb0ap, ebc0_cs0_bxap_value);
+       mtebc(pb0cr, ebc0_cs0_bxcr_value);
+       mtebc(pb1ap, ebc0_cs1_bxap_value);
+       mtebc(pb1cr, ebc0_cs1_bxcr_value);
+       mtebc(pb2ap, ebc0_cs2_bxap_value);
+       mtebc(pb2cr, ebc0_cs2_bxcr_value);
+}
+
+static void early_init_UIC(void)
+{
+       /*
+        * Initialise UIC registers.  Clear all interrupts.  Disable all
+        * interrupts.
+        * Set critical interrupt values.  Set interrupt polarities.  Set
+        * interrupt trigger levels.  Make bit 0 High  priority.  Clear all
+        * interrupts again.
+        */
+       mtdcr(uic3sr, 0xffffffff);      /* Clear all interrupts */
+       mtdcr(uic3er, 0x00000000);      /* disable all interrupts */
+       mtdcr(uic3cr, 0x00000000);      /* Set Critical / Non Critical
+                                        * interrupts */
+       mtdcr(uic3pr, 0xffffffff);      /* Set Interrupt Polarities */
+       mtdcr(uic3tr, 0x001fffff);      /* Set Interrupt Trigger Levels */
+       mtdcr(uic3vr, 0x00000000);      /* int31 highest, base=0x000 */
+       mtdcr(uic3sr, 0xffffffff);      /* clear all  interrupts */
+
+       mtdcr(uic2sr, 0xffffffff);      /* Clear all interrupts */
+       mtdcr(uic2er, 0x00000000);      /* disable all interrupts */
+       mtdcr(uic2cr, 0x00000000);      /* Set Critical / Non Critical
+                                        * interrupts */
+       mtdcr(uic2pr, 0xebebebff);      /* Set Interrupt Polarities */
+       mtdcr(uic2tr, 0x74747400);      /* Set Interrupt Trigger Levels */
+       mtdcr(uic2vr, 0x00000000);      /* int31 highest, base=0x000 */
+       mtdcr(uic2sr, 0xffffffff);      /* clear all interrupts */
+
+       mtdcr(uic1sr, 0xffffffff);      /* Clear all interrupts */
+       mtdcr(uic1er, 0x00000000);      /* disable all interrupts */
+       mtdcr(uic1cr, 0x00000000);      /* Set Critical / Non Critical
+                                        * interrupts */
+       mtdcr(uic1pr, 0xffffffff);      /* Set Interrupt Polarities */
+       mtdcr(uic1tr, 0x001fc0ff);      /* Set Interrupt Trigger Levels */
+       mtdcr(uic1vr, 0x00000000);      /* int31 highest, base=0x000 */
+       mtdcr(uic1sr, 0xffffffff);      /* clear all interrupts */
+
+       mtdcr(uic0sr, 0xffffffff);      /* Clear all interrupts */
+       mtdcr(uic0er, 0x00000000);      /* disable all interrupts excepted
+                                        * cascade to be checked */
+       mtdcr(uic0cr, 0x00104001);      /* Set Critical / Non Critical
+                                        * interrupts */
+       mtdcr(uic0pr, 0xffffffff);      /* Set Interrupt Polarities */
+       mtdcr(uic0tr, 0x000f003c);      /* Set Interrupt Trigger Levels */
+       mtdcr(uic0vr, 0x00000000);      /* int31 highest, base=0x000 */
+       mtdcr(uic0sr, 0xffffffff);      /* clear all interrupts */
+
+}
diff --git a/board/amcc/redwood/redwood.h b/board/amcc/redwood/redwood.h
new file mode 100644 (file)
index 0000000..89b87e6
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * (C) Copyright 2008
+ * Feng Kan, Applied Micro Circuit Corp., fkan@amcc.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 __REDWOOD_H_
+#define __REDWOOD_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*----------------------------------------------------------------------------+
+| Defines
++----------------------------------------------------------------------------*/
+/* Pin Straps Reg */
+#define SDR0_PSTRP0                    0x0040
+#define SDR0_PSTRP0_BOOTSTRAP_MASK     0xE0000000      /* Strap Bits */
+
+#define SDR0_PSTRP0_BOOTSTRAP_SETTINGS0        0x00000000      /* Default strap settings 0 */
+#define SDR0_PSTRP0_BOOTSTRAP_SETTINGS1        0x20000000      /* Default strap settings 1 */
+#define SDR0_PSTRP0_BOOTSTRAP_SETTINGS2        0x40000000      /* Default strap settings 2 */
+#define SDR0_PSTRP0_BOOTSTRAP_SETTINGS3        0x60000000      /* Default strap settings 3 */
+#define SDR0_PSTRP0_BOOTSTRAP_SETTINGS4        0x80000000      /* Default strap settings 4 */
+#define SDR0_PSTRP0_BOOTSTRAP_SETTINGS5        0xA0000000      /* Default strap settings 5 */
+#define SDR0_PSTRP0_BOOTSTRAP_SETTINGS6        0xC0000000      /* Default strap settings 6 */
+#define SDR0_PSTRP0_BOOTSTRAP_SETTINGS7        0xE0000000      /* Default strap settings 7 */
+
+#ifdef __cplusplus
+}
+#endif
+#endif                         /* __REDWOOD_H_ */
diff --git a/board/amcc/redwood/u-boot.lds b/board/amcc/redwood/u-boot.lds
new file mode 100644 (file)
index 0000000..2104cc2
--- /dev/null
@@ -0,0 +1,147 @@
+/*
+ * (C) Copyright 2004
+ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+OUTPUT_ARCH(powerpc)
+SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/local/powerpc-any-elf/lib);
+/* Do we need any of these for elf?
+   __DYNAMIC = 0;    */
+SECTIONS
+{
+  .resetvec 0xFFFFFFFC :
+  {
+    *(.resetvec)
+  } = 0xffff
+
+  .bootpg 0xFFFFF000 :
+  {
+    cpu/ppc4xx/start.o (.bootpg)
+  } = 0xffff
+
+  /* Read-only sections, merged into text segment: */
+  . = + SIZEOF_HEADERS;
+  .interp : { *(.interp) }
+  .hash          : { *(.hash)          }
+  .dynsym        : { *(.dynsym)                }
+  .dynstr        : { *(.dynstr)                }
+  .rel.text      : { *(.rel.text)      }
+  .rela.text     : { *(.rela.text)     }
+  .rel.data      : { *(.rel.data)      }
+  .rela.data     : { *(.rela.data)     }
+  .rel.rodata    : { *(.rel.rodata)    }
+  .rela.rodata   : { *(.rela.rodata)   }
+  .rel.got       : { *(.rel.got)       }
+  .rela.got      : { *(.rela.got)      }
+  .rel.ctors     : { *(.rel.ctors)     }
+  .rela.ctors    : { *(.rela.ctors)    }
+  .rel.dtors     : { *(.rel.dtors)     }
+  .rela.dtors    : { *(.rela.dtors)    }
+  .rel.bss       : { *(.rel.bss)       }
+  .rela.bss      : { *(.rela.bss)      }
+  .rel.plt       : { *(.rel.plt)       }
+  .rela.plt      : { *(.rela.plt)      }
+  .init          : { *(.init)          }
+  .plt : { *(.plt) }
+  .text      :
+  {
+    /* WARNING - the following is hand-optimized to fit within */
+    /* the sector layout of our flash chips!   XXX FIXME XXX   */
+
+    cpu/ppc4xx/start.o         (.text)
+    board/amcc/redwood/init.o  (.text)
+
+/*    . = env_offset;*/
+/*    common/environment.o(.text)*/
+
+    *(.text)
+    *(.fixup)
+    *(.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: */
+  . = (. + 0x00FF) & 0xFFFFFF00;
+  _erotext = .;
+  PROVIDE (erotext = .);
+  .reloc   :
+  {
+    *(.got)
+    _GOT2_TABLE_ = .;
+    *(.got2)
+    _FIXUP_TABLE_ = .;
+    *(.fixup)
+  }
+  __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
+  __fixup_entries = (. - _FIXUP_TABLE_)>>2;
+
+  .data    :
+  {
+    *(.data)
+    *(.data1)
+    *(.sdata)
+    *(.sdata2)
+    *(.dynamic)
+    CONSTRUCTORS
+  }
+  _edata  =  .;
+  PROVIDE (edata = .);
+
+  . = .;
+  __u_boot_cmd_start = .;
+  .u_boot_cmd : { *(.u_boot_cmd) }
+  __u_boot_cmd_end = .;
+
+
+  . = .;
+  __start___ex_table = .;
+  __ex_table : { *(__ex_table) }
+  __stop___ex_table = .;
+
+  . = ALIGN(256);
+  __init_begin = .;
+  .text.init : { *(.text.init) }
+  .data.init : { *(.data.init) }
+  . = ALIGN(256);
+  __init_end = .;
+
+  __bss_start = .;
+  .bss       :
+  {
+   *(.sbss) *(.scommon)
+   *(.dynbss)
+   *(.bss)
+   *(COMMON)
+  }
+  _end = . ;
+  PROVIDE (end = .);
+}
index 198db1a1d3bc0fac24f4a3c90f162145bb2f6b56..176d5cf0dc9dfa6baee58bfcae78654edd47e405 100644 (file)
 #include <common.h>
 #include <libfdt.h>
 #include <fdt_support.h>
-#include <ppc440.h>
+#include <ppc4xx.h>
 #include <asm/gpio.h>
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <asm/bitops.h>
-#include <asm/ppc4xx-intvec.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -340,7 +339,7 @@ int checkboard(void)
  */
 void sequoia_pci_fixup_irq(struct pci_controller *hose, pci_dev_t dev)
 {
-       pci_hose_write_config_byte(hose, dev, PCI_INTERRUPT_LINE, VECNUM_EIR2);
+       pci_hose_write_config_byte(hose, dev, PCI_INTERRUPT_LINE, VECNUM_EIRQ2);
 }
 #endif
 
index b6c306539e40752f6f2984102d08e528f768129f..fdd82e7ccad1b7db89bc3921216c7a8afe2fbbab 100644 (file)
@@ -119,36 +119,48 @@ int board_early_init_f (void)
        /*--------------------------------------------------------------------
         * Setup the interrupt controller polarities, triggers, etc.
         *-------------------------------------------------------------------*/
-       mtdcr (uic0sr, 0xffffffff);     /* clear all */
-       mtdcr (uic0er, 0x00000000);     /* disable all */
-       mtdcr (uic0cr, 0x00000009);     /* SMI & UIC1 crit are critical */
-       mtdcr (uic0pr, 0xfffffe13);     /* per ref-board manual */
-       mtdcr (uic0tr, 0x01c00008);     /* per ref-board manual */
-       mtdcr (uic0vr, 0x00000001);     /* int31 highest, base=0x000 */
-       mtdcr (uic0sr, 0xffffffff);     /* clear all */
-
+       /*
+        * Because of the interrupt handling rework to handle 440GX interrupts
+        * with the common code, we needed to change names of the UIC registers.
+        * Here the new relationship:
+        *
+        * U-Boot name  440GX name
+        * -----------------------
+        * UIC0         UICB0
+        * UIC1         UIC0
+        * UIC2         UIC1
+        * UIC3         UIC2
+        */
        mtdcr (uic1sr, 0xffffffff);     /* clear all */
        mtdcr (uic1er, 0x00000000);     /* disable all */
-       mtdcr (uic1cr, 0x00000000);     /* all non-critical */
-       mtdcr (uic1pr, 0xffffe0ff);     /* per ref-board manual */
-       mtdcr (uic1tr, 0x00ffc000);     /* per ref-board manual */
+       mtdcr (uic1cr, 0x00000009);     /* SMI & UIC1 crit are critical */
+       mtdcr (uic1pr, 0xfffffe13);     /* per ref-board manual */
+       mtdcr (uic1tr, 0x01c00008);     /* per ref-board manual */
        mtdcr (uic1vr, 0x00000001);     /* int31 highest, base=0x000 */
        mtdcr (uic1sr, 0xffffffff);     /* clear all */
 
        mtdcr (uic2sr, 0xffffffff);     /* clear all */
        mtdcr (uic2er, 0x00000000);     /* disable all */
        mtdcr (uic2cr, 0x00000000);     /* all non-critical */
-       mtdcr (uic2pr, 0xffffffff);     /* per ref-board manual */
-       mtdcr (uic2tr, 0x00ff8c0f);     /* per ref-board manual */
+       mtdcr (uic2pr, 0xffffe0ff);     /* per ref-board manual */
+       mtdcr (uic2tr, 0x00ffc000);     /* per ref-board manual */
        mtdcr (uic2vr, 0x00000001);     /* int31 highest, base=0x000 */
        mtdcr (uic2sr, 0xffffffff);     /* clear all */
 
-       mtdcr (uicb0sr, 0xfc000000);    /* clear all */
-       mtdcr (uicb0er, 0x00000000);    /* disable all */
-       mtdcr (uicb0cr, 0x00000000);    /* all non-critical */
-       mtdcr (uicb0pr, 0xfc000000);    /* */
-       mtdcr (uicb0tr, 0x00000000);    /* */
-       mtdcr (uicb0vr, 0x00000001);    /* */
+       mtdcr (uic3sr, 0xffffffff);     /* clear all */
+       mtdcr (uic3er, 0x00000000);     /* disable all */
+       mtdcr (uic3cr, 0x00000000);     /* all non-critical */
+       mtdcr (uic3pr, 0xffffffff);     /* per ref-board manual */
+       mtdcr (uic3tr, 0x00ff8c0f);     /* per ref-board manual */
+       mtdcr (uic3vr, 0x00000001);     /* int31 highest, base=0x000 */
+       mtdcr (uic3sr, 0xffffffff);     /* clear all */
+
+       mtdcr (uic0sr, 0xfc000000);     /* clear all */
+       mtdcr (uic0er, 0x00000000);     /* disable all */
+       mtdcr (uic0cr, 0x00000000);     /* all non-critical */
+       mtdcr (uic0pr, 0xfc000000);     /* */
+       mtdcr (uic0tr, 0x00000000);     /* */
+       mtdcr (uic0vr, 0x00000001);     /* */
 
        /* Enable two GPIO 10~11 and TraceA signal */
        mfsdr(sdr_pfc0,reg);
index 6608893651b22727b713b983d1f3d79268b527d8..84c3938d7d0a68533dc41e32e82513cb13f9815b 100644 (file)
@@ -677,7 +677,7 @@ int is_pci_host(struct pci_controller *hose)
        return 1;
 }
 
-int yucca_pcie_card_present(int port)
+static int yucca_pcie_card_present(int port)
 {
        u16 reg;
 
@@ -879,10 +879,6 @@ void pcie_setup_hoses(int busno)
 int misc_init_f (void)
 {
        uint reg;
-#if defined(CONFIG_STRESS)
-       uint i ;
-       uint disp;
-#endif
 
        out16(FPGA_REG10, (in16(FPGA_REG10) &
                        ~(FPGA_REG10_AUTO_NEG_DIS|FPGA_REG10_RESET_ETH)) |
@@ -897,67 +893,23 @@ int misc_init_f (void)
 
        /* minimal init for PCIe */
        /* pci express 0 Endpoint Mode */
-       mfsdr(SDR0_PE0DLPSET, reg);
+       mfsdr(SDRN_PESDR_DLPSET(0), reg);
        reg &= (~0x00400000);
-       mtsdr(SDR0_PE0DLPSET, reg);
+       mtsdr(SDRN_PESDR_DLPSET(0), reg);
        /* pci express 1 Rootpoint  Mode */
-       mfsdr(SDR0_PE1DLPSET, reg);
+       mfsdr(SDRN_PESDR_DLPSET(1), reg);
        reg |= 0x00400000;
-       mtsdr(SDR0_PE1DLPSET, reg);
+       mtsdr(SDRN_PESDR_DLPSET(1), reg);
        /* pci express 2 Rootpoint  Mode */
-       mfsdr(SDR0_PE2DLPSET, reg);
+       mfsdr(SDRN_PESDR_DLPSET(2), reg);
        reg |= 0x00400000;
-       mtsdr(SDR0_PE2DLPSET, reg);
+       mtsdr(SDRN_PESDR_DLPSET(2), reg);
 
        out16(FPGA_REG1C,(in16 (FPGA_REG1C) &
                                ~FPGA_REG1C_PE0_ROOTPOINT &
                                ~FPGA_REG1C_PE1_ENDPOINT  &
                                ~FPGA_REG1C_PE2_ENDPOINT));
 
-#if defined(CONFIG_STRESS)
-       /*
-        * all this setting done by linux only needed by stress an charac. test
-        * procedure
-        * PCIe 1 Rootpoint PCIe2 Endpoint
-        * PCIe 0 FIR Pre-emphasis Filter Coefficients & Transmit Driver
-        * Power Level
-        */
-       for (i = 0, disp = 0; i < 8; i++, disp += 3) {
-               mfsdr(SDR0_PE0HSSSET1L0 + disp, reg);
-               reg |= 0x33000000;
-               mtsdr(SDR0_PE0HSSSET1L0 + disp, reg);
-       }
-
-       /*
-        * PCIe 1 FIR Pre-emphasis Filter Coefficients & Transmit Driver
-        * Power Level
-        */
-       for (i = 0, disp = 0; i < 4; i++, disp += 3) {
-               mfsdr(SDR0_PE1HSSSET1L0 + disp, reg);
-               reg |= 0x33000000;
-               mtsdr(SDR0_PE1HSSSET1L0 + disp, reg);
-       }
-
-       /*
-        * PCIE 2 FIR Pre-emphasis Filter Coefficients & Transmit Driver
-        * Power Level
-        */
-       for (i = 0, disp = 0; i < 4; i++, disp += 3) {
-               mfsdr(SDR0_PE2HSSSET1L0 + disp, reg);
-               reg |= 0x33000000;
-               mtsdr(SDR0_PE2HSSSET1L0 + disp, reg);
-       }
-
-       reg = 0x21242222;
-       mtsdr(SDR0_PE2UTLSET1, reg);
-       reg = 0x11000000;
-       mtsdr(SDR0_PE2UTLSET2, reg);
-       /* pci express 1 Endpoint  Mode */
-       reg = 0x00004000;
-       mtsdr(SDR0_PE2DLPSET, reg);
-
-       mtsdr(SDR0_UART1, 0x2080005a);  /* patch for TG */
-#endif
        return 0;
 }
 
index b007b090d0556348f3761dfccc2a6c9d1c338d19..4ce78a1e1da8ce8dc4e4e1dfe7d7586366d72303 100644 (file)
@@ -23,7 +23,7 @@
 #include <common.h>
 
 #if defined(CONFIG_CMD_NAND)
-#if !defined(CFG_NAND_LEGACY)
+#if !defined(CONFIG_NAND_LEGACY)
 
 #include <nand.h>
 #include <asm/arch/pxa-regs.h>
index 7e6eea0f1c877c706566917c67812acb52d73996..a1e0ce5a27199b74ac804ea2c952f6cd0b5e2a3d 100644 (file)
@@ -27,7 +27,7 @@
 #include <command.h>
 #include <image.h>
 #include <asm/byteorder.h>
-#if defined(CFG_NAND_LEGACY)
+#if defined(CONFIG_NAND_LEGACY)
 #include <linux/mtd/nand_legacy.h>
 #endif
 #include <fat.h>
@@ -58,7 +58,7 @@ extern int flash_sect_erase(ulong, ulong);
 extern int flash_sect_protect (int, ulong, ulong);
 extern int flash_write (char *, ulong, ulong);
 
-#if defined(CONFIG_CMD_NAND) && defined(CFG_NAND_LEGACY)
+#if defined(CONFIG_CMD_NAND) && defined(CONFIG_NAND_LEGACY)
 /* references to names in cmd_nand.c */
 #define NANDRW_READ    0x01
 #define NANDRW_WRITE   0x00
@@ -158,7 +158,7 @@ int au_do_update(int i, long sz)
        int off, rc;
        uint nbytes;
        int k;
-#if defined(CONFIG_CMD_NAND) && defined(CFG_NAND_LEGACY)
+#if defined(CONFIG_CMD_NAND) && defined(CONFIG_NAND_LEGACY)
        int total;
 #endif
 
@@ -241,7 +241,7 @@ int au_do_update(int i, long sz)
                        debug ("flash_sect_erase(%lx, %lx);\n", start, end);
                        flash_sect_erase (start, end);
                } else {
-#if defined(CONFIG_CMD_NAND) && defined(CFG_NAND_LEGACY)
+#if defined(CONFIG_CMD_NAND) && defined(CONFIG_NAND_LEGACY)
                        printf ("Updating NAND FLASH with image %s\n",
                                au_image[i].name);
                        debug ("nand_legacy_erase(%lx, %lx);\n", start, end);
@@ -273,7 +273,7 @@ int au_do_update(int i, long sz)
                        rc = flash_write ((char *)addr, start,
                                          (nbytes + 1) & ~1);
                } else {
-#if defined(CONFIG_CMD_NAND) && defined(CFG_NAND_LEGACY)
+#if defined(CONFIG_CMD_NAND) && defined(CONFIG_NAND_LEGACY)
                        debug ("nand_legacy_rw(%p, %lx, %x)\n",
                               addr, start, nbytes);
                        rc = nand_legacy_rw (nand_dev_desc,
@@ -298,7 +298,7 @@ int au_do_update(int i, long sz)
                        rc = crc32 (0, (uchar *)(start + off),
                                    image_get_data_size (hdr));
                } else {
-#if defined(CONFIG_CMD_NAND) && defined(CFG_NAND_LEGACY)
+#if defined(CONFIG_CMD_NAND) && defined(CONFIG_NAND_LEGACY)
                        rc = nand_legacy_rw (nand_dev_desc,
                                             NANDRW_READ | NANDRW_JFFS2 |
                                             NANDRW_JFFS2_SKIP,
diff --git a/board/freescale/mx31ads/Makefile b/board/freescale/mx31ads/Makefile
new file mode 100644 (file)
index 0000000..a12f391
--- /dev/null
@@ -0,0 +1,47 @@
+#
+# Copyright (C) 2008, Guennadi Liakhovetski <lg@denx.de>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB    = $(obj)lib$(BOARD).a
+
+COBJS  := mx31ads.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/freescale/mx31ads/config.mk b/board/freescale/mx31ads/config.mk
new file mode 100644 (file)
index 0000000..d34dc02
--- /dev/null
@@ -0,0 +1 @@
+TEXT_BASE = 0x87f00000
diff --git a/board/freescale/mx31ads/lowlevel_init.S b/board/freescale/mx31ads/lowlevel_init.S
new file mode 100644 (file)
index 0000000..e166058
--- /dev/null
@@ -0,0 +1,281 @@
+/*
+ * Copyright (C) 2008, Guennadi Liakhovetski <lg@denx.de>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <asm/arch/mx31-regs.h>
+
+.macro REG reg, val
+       ldr r2, =\reg
+       ldr r3, =\val
+       str r3, [r2]
+.endm
+
+.macro REG8 reg, val
+       ldr r2, =\reg
+       ldr r3, =\val
+       strb r3, [r2]
+.endm
+
+.macro DELAY loops
+       ldr r2, =\loops
+1:
+       subs    r2, r2, #1
+       nop
+       bcs 1b
+.endm
+
+/* RedBoot: 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, =0x43F00000
+       ldr r1, =0x77777777
+       str r1, [r0, #0x00]
+       str r1, [r0, #0x04]
+       ldr r0, =0x53F00000
+       str r1, [r0, #0x00]
+       str r1, [r0, #0x04]
+
+       /*
+        * 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
+        */
+       ldr r0, =0x43F00000
+       ldr r1, =0x0
+       str r1, [r0, #0x40]
+       str r1, [r0, #0x44]
+       str r1, [r0, #0x48]
+       str r1, [r0, #0x4C]
+       ldr r1, [r0, #0x50]
+       and r1, r1, #0x00FFFFFF
+       str r1, [r0, #0x50]
+
+       ldr r0, =0x53F00000
+       ldr r1, =0x0
+       str r1, [r0, #0x40]
+       str r1, [r0, #0x44]
+       str r1, [r0, #0x48]
+       str r1, [r0, #0x4C]
+       ldr r1, [r0, #0x50]
+       and r1, r1, #0x00FFFFFF
+       str r1, [r0, #0x50]
+.endm /* init_aips */
+
+/* RedBoot: MAX (Multi-Layer AHB Crossbar Switch) setup */
+.macro init_max
+       ldr r0, =0x43F04000
+       /* MPR - priority is M4 > M2 > M3 > M5 > M0 > M1 */
+       ldr r1, =0x00302154
+       str r1, [r0, #0x000]        /* for S0 */
+       str r1, [r0, #0x100]        /* for S1 */
+       str r1, [r0, #0x200]        /* for S2 */
+       str r1, [r0, #0x300]        /* for S3 */
+       str r1, [r0, #0x400]        /* for S4 */
+       /* SGPCR - always park on last master */
+       ldr r1, =0x10
+       str r1, [r0, #0x010]        /* for S0 */
+       str r1, [r0, #0x110]        /* for S1 */
+       str r1, [r0, #0x210]        /* for S2 */
+       str r1, [r0, #0x310]        /* for S3 */
+       str r1, [r0, #0x410]        /* for S4 */
+       /* MGPCR - restore default values */
+       ldr r1, =0x0
+       str r1, [r0, #0x800]        /* for M0 */
+       str r1, [r0, #0x900]        /* for M1 */
+       str r1, [r0, #0xA00]        /* for M2 */
+       str r1, [r0, #0xB00]        /* for M3 */
+       str r1, [r0, #0xC00]        /* for M4 */
+       str r1, [r0, #0xD00]        /* for M5 */
+.endm /* init_max */
+
+/* RedBoot: M3IF setup */
+.macro init_m3if
+       /* Configure M3IF registers */
+       ldr r1, =0xB8003000
+       /*
+       * M3IF Control Register (M3IFCTL)
+       * MRRP[0] = L2CC0 not on priority list (0 << 0) = 0x00000000
+       * MRRP[1] = L2CC1 not on priority list (0 << 0) = 0x00000000
+       * MRRP[2] = MBX not on priority list (0 << 0)   = 0x00000000
+       * MRRP[3] = MAX1 not on priority list (0 << 0)  = 0x00000000
+       * MRRP[4] = SDMA not on priority list (0 << 0)  = 0x00000000
+       * MRRP[5] = MPEG4 not on priority list (0 << 0) = 0x00000000
+       * MRRP[6] = IPU1 on priority list (1 << 6)      = 0x00000040
+       * MRRP[7] = IPU2 not on priority list (0 << 0)  = 0x00000000
+       *                                               ------------
+       *                                                 0x00000040
+       */
+       ldr r0, =0x00000040
+       str r0, [r1]  /* M3IF control reg */
+.endm /* init_m3if */
+
+/* RedBoot: To support 133MHz DDR */
+.macro  init_drive_strength
+       /*
+        * Disable maximum drive strength SDRAM/DDR lines by clearing DSE1 bits
+        * in SW_PAD_CTL registers
+        */
+
+       /* SDCLK */
+       ldr r1, =0x43FAC200
+       ldr r0, [r1, #0x6C]
+       bic r0, r0, #(1 << 12)
+       str r0, [r1, #0x6C]
+
+       /* CAS */
+       ldr r0, [r1, #0x70]
+       bic r0, r0, #(1 << 22)
+       str r0, [r1, #0x70]
+
+       /* RAS */
+       ldr r0, [r1, #0x74]
+       bic r0, r0, #(1 << 2)
+       str r0, [r1, #0x74]
+
+       /* CS2 (CSD0) */
+       ldr r0, [r1, #0x7C]
+       bic r0, r0, #(1 << 22)
+       str r0, [r1, #0x7C]
+
+       /* DQM3 */
+       ldr r0, [r1, #0x84]
+       bic r0, r0, #(1 << 22)
+       str r0, [r1, #0x84]
+
+       /* DQM2, DQM1, DQM0, SD31-SD0, A25-A0, MA10 (0x288..0x2DC) */
+       ldr r2, =22     /* (0x2E0 - 0x288) / 4 = 22 */
+pad_loop:
+       ldr r0, [r1, #0x88]
+       bic r0, r0, #(1 << 22)
+       bic r0, r0, #(1 << 12)
+       bic r0, r0, #(1 << 2)
+       str r0, [r1, #0x88]
+       add r1, r1, #4
+       subs r2, r2, #0x1
+       bne pad_loop
+.endm /* init_drive_strength */
+
+/* CPLD on CS4 setup */
+.macro init_cs4
+       ldr r0, =WEIM_BASE
+       ldr r1, =0x0000D843
+       str r1, [r0, #0x40]
+       ldr r1, =0x22252521
+       str r1, [r0, #0x44]
+       ldr r1, =0x22220A00
+       str r1, [r0, #0x48]
+.endm /* init_cs4 */
+
+.globl lowlevel_init
+lowlevel_init:
+
+       /* Redboot initializes very early AIPS, what for?
+        * Then it also initializes Multi-Layer AHB Crossbar Switch,
+        * M3IF */
+       /* Also setup the Peripheral Port Remap register inside the core */
+       ldr r0, =0x40000015        /* start from AIPS 2GB region */
+       mcr p15, 0, r0, c15, c2, 4
+
+       init_aips
+
+       init_max
+
+       init_m3if
+
+       init_drive_strength
+
+       init_cs4
+
+       /* Image Processing Unit: */
+       /* Too early to switch display on? */
+       REG     IPU_CONF, IPU_CONF_DI_EN        /* Switch on Display Interface */
+       /* Clock Control Module: */
+       REG     CCM_CCMR, 0x074B0BF5            /* Use CKIH, MCU PLL off */
+
+       DELAY 0x40000
+
+       REG     CCM_CCMR, 0x074B0BF5 | CCMR_MPE                 /* MCU PLL on */
+       REG     CCM_CCMR, (0x074B0BF5 | CCMR_MPE) & ~CCMR_MDS   /* Switch to MCU PLL */
+
+       /* PBC CPLD on CS4 */
+       mov     r1, #CS4_BASE
+       ldrh    r1, [r1, #0x2]
+       /* Is 27MHz switch set? */
+       ands    r1, r1, #0x10
+
+       /* 532-133-66.5 */
+       ldr     r0, =CCM_BASE
+       ldr     r1, =0xFF871D58
+       /* PDR0 */
+       str     r1, [r0, #0x4]
+       ldreq   r1, MPCTL_PARAM_532
+       ldrne   r1, MPCTL_PARAM_532_27
+       /* MPCTL */
+       str     r1, [r0, #0x10]
+
+       /* Set UPLL=240MHz, USB=60MHz */
+       ldr     r1, =0x49FCFE7F
+       /* PDR1 */
+       str     r1, [r0, #0x8]
+       ldreq   r1, UPCTL_PARAM_240
+       ldrne   r1, UPCTL_PARAM_240_27
+       /* UPCTL */
+       str     r1, [r0, #0x14]
+       /* default CLKO to 1/8 of the ARM core */
+       mov     r1, #0x000002C0
+       add     r1, r1, #0x00000006
+       /* COSR */
+       str     r1, [r0, #0x1c]
+
+       /* RedBoot sets 0x1ff, 7, 3, 5, 1, 3, 0 */
+/*     REG     CCM_PDR0, PDR0_CSI_PODF(0x1ff) | PDR0_PER_PODF(7) | PDR0_HSP_PODF(2) | PDR0_NFC_PODF(6) | PDR0_IPG_PODF(1) | PDR0_MAX_PODF(2) | PDR0_MCU_PODF(0)*/
+
+       /* Redboot: 0, 51, 10, 12 / 0, 14, 9, 13 */
+/*     REG     CCM_MPCTL, PLL_PD(0) | PLL_MFD(0x33) | PLL_MFI(7) | PLL_MFN(0x23)*/
+       /* Default: 1, 4, 12, 1 */
+       REG     CCM_SPCTL, PLL_PD(1) | PLL_MFD(4) | PLL_MFI(12) | PLL_MFN(1)
+
+       /* B8xxxxxx - NAND, 8xxxxxxx - CSD0 RAM */
+       REG     0xB8001010, 0x00000004
+       REG     0xB8001004, 0x006ac73a
+       REG     0xB8001000, 0x92100000
+       REG     0x80000f00, 0x12344321
+       REG     0xB8001000, 0xa2100000
+       REG     0x80000000, 0x12344321
+       REG     0x80000000, 0x12344321
+       REG     0xB8001000, 0xb2100000
+       REG8    0x80000033, 0xda
+       REG8    0x81000000, 0xff
+       REG     0xB8001000, 0x82226080
+       REG     0x80000000, 0xDEADBEEF
+       REG     0xB8001010, 0x0000000c
+
+       mov     pc, lr
+
+MPCTL_PARAM_532:
+       .word (((1-1) << 26) + ((52-1) << 16) + (10 << 10) + (12 << 0))
+MPCTL_PARAM_532_27:
+       .word (((1-1) << 26) + ((15-1) << 16) + (9  << 10) + (13 << 0))
+UPCTL_PARAM_240:
+       .word (((2-1) << 26) + ((13-1) << 16) + (9  << 10) + (3  << 0))
+UPCTL_PARAM_240_27:
+       .word (((2-1) << 26) + ((9 -1) << 16) + (8  << 10) + (8  << 0))
diff --git a/board/freescale/mx31ads/mx31ads.c b/board/freescale/mx31ads/mx31ads.c
new file mode 100644 (file)
index 0000000..c24c47c
--- /dev/null
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2008, Guennadi Liakhovetski <lg@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/io.h>
+#include <asm/arch/mx31.h>
+#include <asm/arch/mx31-regs.h>
+
+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;
+
+       return 0;
+}
+
+int board_init (void)
+{
+       int i;
+
+       /* CS0: Nor Flash */
+       /*
+        * CS0L and CS0A values are from the RedBoot sources by Freescale
+        * and are also equal to those used by Sascha Hauer for the Phytec
+        * i.MX31 board. CS0U is just a slightly optimized hardware default:
+        * the only non-zero field "Wait State Control" is set to half the
+        * default value.
+        */
+       __REG(CSCR_U(0)) = 0x00000f00;
+       __REG(CSCR_L(0)) = 0x10000D03;
+       __REG(CSCR_A(0)) = 0x00720900;
+
+       /* setup pins for UART1 */
+       mx31_gpio_mux(MUX_RXD1__UART1_RXD_MUX);
+       mx31_gpio_mux(MUX_TXD1__UART1_TXD_MUX);
+       mx31_gpio_mux(MUX_RTS1__UART1_RTS_B);
+       mx31_gpio_mux(MUX_CTS1__UART1_CTS_B);
+
+       /* SPI2 */
+       mx31_gpio_mux(MUX_CSPI2_SS2__CSPI2_SS2_B);
+       mx31_gpio_mux(MUX_CSPI2_SCLK__CSPI2_CLK);
+       mx31_gpio_mux(MUX_CSPI2_SPI_RDY__CSPI2_DATAREADY_B);
+       mx31_gpio_mux(MUX_CSPI2_MOSI__CSPI2_MOSI);
+       mx31_gpio_mux(MUX_CSPI2_MISO__CSPI2_MISO);
+       mx31_gpio_mux(MUX_CSPI2_SS0__CSPI2_SS0_B);
+       mx31_gpio_mux(MUX_CSPI2_SS1__CSPI2_SS1_B);
+
+       /* start SPI2 clock */
+       __REG(CCM_CGR2) = __REG(CCM_CGR2) | (3 << 4);
+
+       /* PBC setup */
+       /* Enable UART transceivers also reset the Ethernet/external UART */
+       readw(CS4_BASE + 4);
+
+       writew(0x8023, CS4_BASE + 4);
+
+       /* RedBoot also has an empty loop with 100000 iterations here -
+        * clock doesn't run yet */
+       for (i = 0; i < 100000; i++)
+               ;
+
+       /* Clear the reset, toggle the LEDs */
+       writew(0xDF, CS4_BASE + 6);
+
+       /* clock still doesn't run */
+       for (i = 0; i < 100000; i++)
+               ;
+
+       /* See 1.5.4 in IMX31ADSE_PERI_BUS_CNTRL_CPLD_RM.pdf */
+       readb(CS4_BASE + 8);
+       readb(CS4_BASE + 7);
+       readb(CS4_BASE + 8);
+       readb(CS4_BASE + 7);
+
+       gd->bd->bi_arch_number = MACH_TYPE_MX31ADS;     /* board id for linux */
+       gd->bd->bi_boot_params = 0x80000100;    /* adress of boot parameters */
+
+       return 0;
+}
+
+int checkboard (void)
+{
+       printf("Board: MX31ADS\n");
+       return 0;
+}
diff --git a/board/freescale/mx31ads/u-boot.lds b/board/freescale/mx31ads/u-boot.lds
new file mode 100644 (file)
index 0000000..c379460
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * January 2004 - Changed to support H4 device
+ * Copyright (c) 2004 Texas Instruments
+ *
+ * (C) Copyright 2002
+ * Gary Jennejohn, DENX Software Engineering, <gj@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      :
+       {
+         /* WARNING - the following is hand-optimized to fit within    */
+         /* the sector layout of our flash chips!      XXX FIXME XXX   */
+
+         cpu/arm1136/start.o                   (.text)
+         board/freescale/mx31ads/libmx31ads.a  (.text)
+         lib_arm/libarm.a                      (.text)
+         net/libnet.a                          (.text)
+         drivers/mtd/libmtd.a                  (.text)
+
+         . = DEFINED(env_offset) ? env_offset : .;
+         common/environment.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 15e86d34f394446925b786a05ea8f10c43cd9288..2d4026a9de7c92798d708bf29d300e84bda96ec7 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <common.h>
 
-#ifndef CFG_FLASH_CFI_DRIVER
+#ifndef CONFIG_FLASH_CFI_DRIVER
 flash_info_t   flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips        */
 
 /* NOTE - CONFIG_FLASH_16BIT means the CPU interface is 16-bit, it
@@ -490,4 +490,4 @@ static int write_word_amd (flash_info_t *info, FPWV *dest, FPW data)
 
        return (res);
 }
-#endif /*CFG_FLASH_CFI_DRIVER*/
+#endif /*CONFIG_FLASH_CFI_DRIVER*/
index 51874ea8db2668248a136b075db3861e2810718e..0d90fb31dadb34bf763abeec235d38bdda0c41cf 100644 (file)
@@ -33,7 +33,7 @@
 #include <asm/bitops.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
-#include <asm/ppc4xx-intvec.h>
+#include <asm/ppc4xx-uic.h>
 #include <asm/processor.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -575,7 +575,7 @@ int checkboard(void)
  */
 void korat_pci_fixup_irq(struct pci_controller *hose, pci_dev_t dev)
 {
-       pci_hose_write_config_byte(hose, dev, PCI_INTERRUPT_LINE, VECNUM_EIR2);
+       pci_hose_write_config_byte(hose, dev, PCI_INTERRUPT_LINE, VECNUM_EIRQ2);
 }
 #endif
 
diff --git a/board/mx31ads/Makefile b/board/mx31ads/Makefile
deleted file mode 100644 (file)
index a12f391..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# Copyright (C) 2008, Guennadi Liakhovetski <lg@denx.de>
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-# MA 02111-1307 USA
-#
-
-include $(TOPDIR)/config.mk
-
-LIB    = $(obj)lib$(BOARD).a
-
-COBJS  := mx31ads.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/mx31ads/config.mk b/board/mx31ads/config.mk
deleted file mode 100644 (file)
index d34dc02..0000000
+++ /dev/null
@@ -1 +0,0 @@
-TEXT_BASE = 0x87f00000
diff --git a/board/mx31ads/lowlevel_init.S b/board/mx31ads/lowlevel_init.S
deleted file mode 100644 (file)
index e166058..0000000
+++ /dev/null
@@ -1,281 +0,0 @@
-/*
- * Copyright (C) 2008, Guennadi Liakhovetski <lg@denx.de>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include <asm/arch/mx31-regs.h>
-
-.macro REG reg, val
-       ldr r2, =\reg
-       ldr r3, =\val
-       str r3, [r2]
-.endm
-
-.macro REG8 reg, val
-       ldr r2, =\reg
-       ldr r3, =\val
-       strb r3, [r2]
-.endm
-
-.macro DELAY loops
-       ldr r2, =\loops
-1:
-       subs    r2, r2, #1
-       nop
-       bcs 1b
-.endm
-
-/* RedBoot: 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, =0x43F00000
-       ldr r1, =0x77777777
-       str r1, [r0, #0x00]
-       str r1, [r0, #0x04]
-       ldr r0, =0x53F00000
-       str r1, [r0, #0x00]
-       str r1, [r0, #0x04]
-
-       /*
-        * 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
-        */
-       ldr r0, =0x43F00000
-       ldr r1, =0x0
-       str r1, [r0, #0x40]
-       str r1, [r0, #0x44]
-       str r1, [r0, #0x48]
-       str r1, [r0, #0x4C]
-       ldr r1, [r0, #0x50]
-       and r1, r1, #0x00FFFFFF
-       str r1, [r0, #0x50]
-
-       ldr r0, =0x53F00000
-       ldr r1, =0x0
-       str r1, [r0, #0x40]
-       str r1, [r0, #0x44]
-       str r1, [r0, #0x48]
-       str r1, [r0, #0x4C]
-       ldr r1, [r0, #0x50]
-       and r1, r1, #0x00FFFFFF
-       str r1, [r0, #0x50]
-.endm /* init_aips */
-
-/* RedBoot: MAX (Multi-Layer AHB Crossbar Switch) setup */
-.macro init_max
-       ldr r0, =0x43F04000
-       /* MPR - priority is M4 > M2 > M3 > M5 > M0 > M1 */
-       ldr r1, =0x00302154
-       str r1, [r0, #0x000]        /* for S0 */
-       str r1, [r0, #0x100]        /* for S1 */
-       str r1, [r0, #0x200]        /* for S2 */
-       str r1, [r0, #0x300]        /* for S3 */
-       str r1, [r0, #0x400]        /* for S4 */
-       /* SGPCR - always park on last master */
-       ldr r1, =0x10
-       str r1, [r0, #0x010]        /* for S0 */
-       str r1, [r0, #0x110]        /* for S1 */
-       str r1, [r0, #0x210]        /* for S2 */
-       str r1, [r0, #0x310]        /* for S3 */
-       str r1, [r0, #0x410]        /* for S4 */
-       /* MGPCR - restore default values */
-       ldr r1, =0x0
-       str r1, [r0, #0x800]        /* for M0 */
-       str r1, [r0, #0x900]        /* for M1 */
-       str r1, [r0, #0xA00]        /* for M2 */
-       str r1, [r0, #0xB00]        /* for M3 */
-       str r1, [r0, #0xC00]        /* for M4 */
-       str r1, [r0, #0xD00]        /* for M5 */
-.endm /* init_max */
-
-/* RedBoot: M3IF setup */
-.macro init_m3if
-       /* Configure M3IF registers */
-       ldr r1, =0xB8003000
-       /*
-       * M3IF Control Register (M3IFCTL)
-       * MRRP[0] = L2CC0 not on priority list (0 << 0) = 0x00000000
-       * MRRP[1] = L2CC1 not on priority list (0 << 0) = 0x00000000
-       * MRRP[2] = MBX not on priority list (0 << 0)   = 0x00000000
-       * MRRP[3] = MAX1 not on priority list (0 << 0)  = 0x00000000
-       * MRRP[4] = SDMA not on priority list (0 << 0)  = 0x00000000
-       * MRRP[5] = MPEG4 not on priority list (0 << 0) = 0x00000000
-       * MRRP[6] = IPU1 on priority list (1 << 6)      = 0x00000040
-       * MRRP[7] = IPU2 not on priority list (0 << 0)  = 0x00000000
-       *                                               ------------
-       *                                                 0x00000040
-       */
-       ldr r0, =0x00000040
-       str r0, [r1]  /* M3IF control reg */
-.endm /* init_m3if */
-
-/* RedBoot: To support 133MHz DDR */
-.macro  init_drive_strength
-       /*
-        * Disable maximum drive strength SDRAM/DDR lines by clearing DSE1 bits
-        * in SW_PAD_CTL registers
-        */
-
-       /* SDCLK */
-       ldr r1, =0x43FAC200
-       ldr r0, [r1, #0x6C]
-       bic r0, r0, #(1 << 12)
-       str r0, [r1, #0x6C]
-
-       /* CAS */
-       ldr r0, [r1, #0x70]
-       bic r0, r0, #(1 << 22)
-       str r0, [r1, #0x70]
-
-       /* RAS */
-       ldr r0, [r1, #0x74]
-       bic r0, r0, #(1 << 2)
-       str r0, [r1, #0x74]
-
-       /* CS2 (CSD0) */
-       ldr r0, [r1, #0x7C]
-       bic r0, r0, #(1 << 22)
-       str r0, [r1, #0x7C]
-
-       /* DQM3 */
-       ldr r0, [r1, #0x84]
-       bic r0, r0, #(1 << 22)
-       str r0, [r1, #0x84]
-
-       /* DQM2, DQM1, DQM0, SD31-SD0, A25-A0, MA10 (0x288..0x2DC) */
-       ldr r2, =22     /* (0x2E0 - 0x288) / 4 = 22 */
-pad_loop:
-       ldr r0, [r1, #0x88]
-       bic r0, r0, #(1 << 22)
-       bic r0, r0, #(1 << 12)
-       bic r0, r0, #(1 << 2)
-       str r0, [r1, #0x88]
-       add r1, r1, #4
-       subs r2, r2, #0x1
-       bne pad_loop
-.endm /* init_drive_strength */
-
-/* CPLD on CS4 setup */
-.macro init_cs4
-       ldr r0, =WEIM_BASE
-       ldr r1, =0x0000D843
-       str r1, [r0, #0x40]
-       ldr r1, =0x22252521
-       str r1, [r0, #0x44]
-       ldr r1, =0x22220A00
-       str r1, [r0, #0x48]
-.endm /* init_cs4 */
-
-.globl lowlevel_init
-lowlevel_init:
-
-       /* Redboot initializes very early AIPS, what for?
-        * Then it also initializes Multi-Layer AHB Crossbar Switch,
-        * M3IF */
-       /* Also setup the Peripheral Port Remap register inside the core */
-       ldr r0, =0x40000015        /* start from AIPS 2GB region */
-       mcr p15, 0, r0, c15, c2, 4
-
-       init_aips
-
-       init_max
-
-       init_m3if
-
-       init_drive_strength
-
-       init_cs4
-
-       /* Image Processing Unit: */
-       /* Too early to switch display on? */
-       REG     IPU_CONF, IPU_CONF_DI_EN        /* Switch on Display Interface */
-       /* Clock Control Module: */
-       REG     CCM_CCMR, 0x074B0BF5            /* Use CKIH, MCU PLL off */
-
-       DELAY 0x40000
-
-       REG     CCM_CCMR, 0x074B0BF5 | CCMR_MPE                 /* MCU PLL on */
-       REG     CCM_CCMR, (0x074B0BF5 | CCMR_MPE) & ~CCMR_MDS   /* Switch to MCU PLL */
-
-       /* PBC CPLD on CS4 */
-       mov     r1, #CS4_BASE
-       ldrh    r1, [r1, #0x2]
-       /* Is 27MHz switch set? */
-       ands    r1, r1, #0x10
-
-       /* 532-133-66.5 */
-       ldr     r0, =CCM_BASE
-       ldr     r1, =0xFF871D58
-       /* PDR0 */
-       str     r1, [r0, #0x4]
-       ldreq   r1, MPCTL_PARAM_532
-       ldrne   r1, MPCTL_PARAM_532_27
-       /* MPCTL */
-       str     r1, [r0, #0x10]
-
-       /* Set UPLL=240MHz, USB=60MHz */
-       ldr     r1, =0x49FCFE7F
-       /* PDR1 */
-       str     r1, [r0, #0x8]
-       ldreq   r1, UPCTL_PARAM_240
-       ldrne   r1, UPCTL_PARAM_240_27
-       /* UPCTL */
-       str     r1, [r0, #0x14]
-       /* default CLKO to 1/8 of the ARM core */
-       mov     r1, #0x000002C0
-       add     r1, r1, #0x00000006
-       /* COSR */
-       str     r1, [r0, #0x1c]
-
-       /* RedBoot sets 0x1ff, 7, 3, 5, 1, 3, 0 */
-/*     REG     CCM_PDR0, PDR0_CSI_PODF(0x1ff) | PDR0_PER_PODF(7) | PDR0_HSP_PODF(2) | PDR0_NFC_PODF(6) | PDR0_IPG_PODF(1) | PDR0_MAX_PODF(2) | PDR0_MCU_PODF(0)*/
-
-       /* Redboot: 0, 51, 10, 12 / 0, 14, 9, 13 */
-/*     REG     CCM_MPCTL, PLL_PD(0) | PLL_MFD(0x33) | PLL_MFI(7) | PLL_MFN(0x23)*/
-       /* Default: 1, 4, 12, 1 */
-       REG     CCM_SPCTL, PLL_PD(1) | PLL_MFD(4) | PLL_MFI(12) | PLL_MFN(1)
-
-       /* B8xxxxxx - NAND, 8xxxxxxx - CSD0 RAM */
-       REG     0xB8001010, 0x00000004
-       REG     0xB8001004, 0x006ac73a
-       REG     0xB8001000, 0x92100000
-       REG     0x80000f00, 0x12344321
-       REG     0xB8001000, 0xa2100000
-       REG     0x80000000, 0x12344321
-       REG     0x80000000, 0x12344321
-       REG     0xB8001000, 0xb2100000
-       REG8    0x80000033, 0xda
-       REG8    0x81000000, 0xff
-       REG     0xB8001000, 0x82226080
-       REG     0x80000000, 0xDEADBEEF
-       REG     0xB8001010, 0x0000000c
-
-       mov     pc, lr
-
-MPCTL_PARAM_532:
-       .word (((1-1) << 26) + ((52-1) << 16) + (10 << 10) + (12 << 0))
-MPCTL_PARAM_532_27:
-       .word (((1-1) << 26) + ((15-1) << 16) + (9  << 10) + (13 << 0))
-UPCTL_PARAM_240:
-       .word (((2-1) << 26) + ((13-1) << 16) + (9  << 10) + (3  << 0))
-UPCTL_PARAM_240_27:
-       .word (((2-1) << 26) + ((9 -1) << 16) + (8  << 10) + (8  << 0))
diff --git a/board/mx31ads/mx31ads.c b/board/mx31ads/mx31ads.c
deleted file mode 100644 (file)
index c24c47c..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (C) 2008, Guennadi Liakhovetski <lg@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/io.h>
-#include <asm/arch/mx31.h>
-#include <asm/arch/mx31-regs.h>
-
-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;
-
-       return 0;
-}
-
-int board_init (void)
-{
-       int i;
-
-       /* CS0: Nor Flash */
-       /*
-        * CS0L and CS0A values are from the RedBoot sources by Freescale
-        * and are also equal to those used by Sascha Hauer for the Phytec
-        * i.MX31 board. CS0U is just a slightly optimized hardware default:
-        * the only non-zero field "Wait State Control" is set to half the
-        * default value.
-        */
-       __REG(CSCR_U(0)) = 0x00000f00;
-       __REG(CSCR_L(0)) = 0x10000D03;
-       __REG(CSCR_A(0)) = 0x00720900;
-
-       /* setup pins for UART1 */
-       mx31_gpio_mux(MUX_RXD1__UART1_RXD_MUX);
-       mx31_gpio_mux(MUX_TXD1__UART1_TXD_MUX);
-       mx31_gpio_mux(MUX_RTS1__UART1_RTS_B);
-       mx31_gpio_mux(MUX_CTS1__UART1_CTS_B);
-
-       /* SPI2 */
-       mx31_gpio_mux(MUX_CSPI2_SS2__CSPI2_SS2_B);
-       mx31_gpio_mux(MUX_CSPI2_SCLK__CSPI2_CLK);
-       mx31_gpio_mux(MUX_CSPI2_SPI_RDY__CSPI2_DATAREADY_B);
-       mx31_gpio_mux(MUX_CSPI2_MOSI__CSPI2_MOSI);
-       mx31_gpio_mux(MUX_CSPI2_MISO__CSPI2_MISO);
-       mx31_gpio_mux(MUX_CSPI2_SS0__CSPI2_SS0_B);
-       mx31_gpio_mux(MUX_CSPI2_SS1__CSPI2_SS1_B);
-
-       /* start SPI2 clock */
-       __REG(CCM_CGR2) = __REG(CCM_CGR2) | (3 << 4);
-
-       /* PBC setup */
-       /* Enable UART transceivers also reset the Ethernet/external UART */
-       readw(CS4_BASE + 4);
-
-       writew(0x8023, CS4_BASE + 4);
-
-       /* RedBoot also has an empty loop with 100000 iterations here -
-        * clock doesn't run yet */
-       for (i = 0; i < 100000; i++)
-               ;
-
-       /* Clear the reset, toggle the LEDs */
-       writew(0xDF, CS4_BASE + 6);
-
-       /* clock still doesn't run */
-       for (i = 0; i < 100000; i++)
-               ;
-
-       /* See 1.5.4 in IMX31ADSE_PERI_BUS_CNTRL_CPLD_RM.pdf */
-       readb(CS4_BASE + 8);
-       readb(CS4_BASE + 7);
-       readb(CS4_BASE + 8);
-       readb(CS4_BASE + 7);
-
-       gd->bd->bi_arch_number = MACH_TYPE_MX31ADS;     /* board id for linux */
-       gd->bd->bi_boot_params = 0x80000100;    /* adress of boot parameters */
-
-       return 0;
-}
-
-int checkboard (void)
-{
-       printf("Board: MX31ADS\n");
-       return 0;
-}
diff --git a/board/mx31ads/u-boot.lds b/board/mx31ads/u-boot.lds
deleted file mode 100644 (file)
index 49713d4..0000000
+++ /dev/null
@@ -1,70 +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>
- *
- * 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      :
-       {
-         /* WARNING - the following is hand-optimized to fit within    */
-         /* the sector layout of our flash chips!      XXX FIXME XXX   */
-
-         cpu/arm1136/start.o           (.text)
-         board/mx31ads/libmx31ads.a    (.text)
-         lib_arm/libarm.a              (.text)
-         net/libnet.a                  (.text)
-         drivers/mtd/libmtd.a          (.text)
-
-         . = DEFINED(env_offset) ? env_offset : .;
-         common/environment.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 1183f33ef8c776cfffdc14419eef402ba087ea44..bc31386ec7e6874806d7bd645197b5ced6cf35c1 100644 (file)
@@ -555,7 +555,7 @@ int board_early_init_f(void)
        return 0;
 }
 
-#if defined(CONFIG_CMD_NAND) && defined(CFG_NAND_LEGACY)
+#if defined(CONFIG_CMD_NAND) && defined(CONFIG_NAND_LEGACY)
 
 #include <linux/mtd/nand_legacy.h>
 
index 131a62dd649b7903fe8a39d0c2cc89d0dd7f40c5..cc491d05b14bc18278f158d9bce27c291ff046fb 100644 (file)
@@ -48,36 +48,48 @@ int board_early_init_f (void)
        /*--------------------------------------------------------------------
         * Setup the interrupt controller polarities, triggers, etc.
         *-------------------------------------------------------------------*/
-       mtdcr (uic0sr, 0xffffffff);     /* clear all */
-       mtdcr (uic0er, 0x00000000);     /* disable all */
-       mtdcr (uic0cr, 0x00000009);     /* SMI & UIC1 crit are critical */
-       mtdcr (uic0pr, 0xfffffe03);     /* per manual */
-       mtdcr (uic0tr, 0x01c00000);     /* per manual */
-       mtdcr (uic0vr, 0x00000001);     /* int31 highest, base=0x000 */
-       mtdcr (uic0sr, 0xffffffff);     /* clear all */
-
+       /*
+        * Because of the interrupt handling rework to handle 440GX interrupts
+        * with the common code, we needed to change names of the UIC registers.
+        * Here the new relationship:
+        *
+        * U-Boot name  440GX name
+        * -----------------------
+        * UIC0         UICB0
+        * UIC1         UIC0
+        * UIC2         UIC1
+        * UIC3         UIC2
+        */
        mtdcr (uic1sr, 0xffffffff);     /* clear all */
        mtdcr (uic1er, 0x00000000);     /* disable all */
-       mtdcr (uic1cr, 0x00000000);     /* all non-critical */
-       mtdcr (uic1pr, 0xffffe0ff);     /* per ref-board manual */
-       mtdcr (uic1tr, 0x00ffc000);     /* per ref-board manual */
+       mtdcr (uic1cr, 0x00000009);     /* SMI & UIC1 crit are critical */
+       mtdcr (uic1pr, 0xfffffe03);     /* per manual */
+       mtdcr (uic1tr, 0x01c00000);     /* per manual */
        mtdcr (uic1vr, 0x00000001);     /* int31 highest, base=0x000 */
        mtdcr (uic1sr, 0xffffffff);     /* clear all */
 
        mtdcr (uic2sr, 0xffffffff);     /* clear all */
        mtdcr (uic2er, 0x00000000);     /* disable all */
        mtdcr (uic2cr, 0x00000000);     /* all non-critical */
-       mtdcr (uic2pr, 0xffffffff);     /* per ref-board manual */
-       mtdcr (uic2tr, 0x00ff8c0f);     /* per ref-board manual */
+       mtdcr (uic2pr, 0xffffe0ff);     /* per ref-board manual */
+       mtdcr (uic2tr, 0x00ffc000);     /* per ref-board manual */
        mtdcr (uic2vr, 0x00000001);     /* int31 highest, base=0x000 */
        mtdcr (uic2sr, 0xffffffff);     /* clear all */
 
-       mtdcr (uicb0sr, 0xfc000000); /* clear all */
-       mtdcr (uicb0er, 0x00000000); /* disable all */
-       mtdcr (uicb0cr, 0x00000000); /* all non-critical */
-       mtdcr (uicb0pr, 0xfc000000); /* */
-       mtdcr (uicb0tr, 0x00000000); /* */
-       mtdcr (uicb0vr, 0x00000001); /* */
+       mtdcr (uic3sr, 0xffffffff);     /* clear all */
+       mtdcr (uic3er, 0x00000000);     /* disable all */
+       mtdcr (uic3cr, 0x00000000);     /* all non-critical */
+       mtdcr (uic3pr, 0xffffffff);     /* per ref-board manual */
+       mtdcr (uic3tr, 0x00ff8c0f);     /* per ref-board manual */
+       mtdcr (uic3vr, 0x00000001);     /* int31 highest, base=0x000 */
+       mtdcr (uic3sr, 0xffffffff);     /* clear all */
+
+       mtdcr (uic0sr, 0xfc000000); /* clear all */
+       mtdcr (uic0er, 0x00000000); /* disable all */
+       mtdcr (uic0cr, 0x00000000); /* all non-critical */
+       mtdcr (uic0pr, 0xfc000000); /* */
+       mtdcr (uic0tr, 0x00000000); /* */
+       mtdcr (uic0vr, 0x00000001); /* */
 
        /* Setup shutdown/SSD empty interrupt as inputs */
        out32(GPIO0_TCR, in32(GPIO0_TCR) & ~(CFG_GPIO_SHUTDOWN | CFG_GPIO_SSD_EMPTY));
index 518ea9c03148e78fc16c114f3f292fb6b2b631bb..0786324fba6ac7620dff84090c6d79c298b7ebfb 100644 (file)
@@ -24,7 +24,7 @@
 #include <common.h>
 #include <asm/arch/ixp425.h>
 
-#if !defined(CFG_FLASH_CFI_DRIVER)
+#if !defined(CONFIG_FLASH_CFI_DRIVER)
 
 /*
  * include common flash code (for esd boards)
@@ -86,4 +86,4 @@ unsigned long flash_init(void)
        return size;
 }
 
-#endif /* CFG_FLASH_CFI_DRIVER */
+#endif /* CONFIG_FLASH_CFI_DRIVER */
index 2d71d3b2cc7280bb93ca25047b3726a0ce6c8e2d..72ce976350e47b23e8fe0b2b9f236a762a608e53 100644 (file)
@@ -195,36 +195,48 @@ int board_early_init_f (void)
        /*--------------------------------------------------------------------+
         * Setup the interrupt controller polarities, triggers, etc.
         +-------------------------------------------------------------------*/
-       mtdcr (uic0sr, 0xffffffff);     /* clear all */
-       mtdcr (uic0er, 0x00000000);     /* disable all */
-       mtdcr (uic0cr, 0x00000000);     /* all non- critical */
-       mtdcr (uic0pr, 0xfffffe03);     /* polarity */
-       mtdcr (uic0tr, 0x01c00000);     /* trigger edge vs level */
-       mtdcr (uic0vr, 0x00000001);     /* int31 highest, base=0x000 */
-       mtdcr (uic0sr, 0xffffffff);     /* clear all */
-
+       /*
+        * Because of the interrupt handling rework to handle 440GX interrupts
+        * with the common code, we needed to change names of the UIC registers.
+        * Here the new relationship:
+        *
+        * U-Boot name  440GX name
+        * -----------------------
+        * UIC0         UICB0
+        * UIC1         UIC0
+        * UIC2         UIC1
+        * UIC3         UIC2
+        */
        mtdcr (uic1sr, 0xffffffff);     /* clear all */
        mtdcr (uic1er, 0x00000000);     /* disable all */
-       mtdcr (uic1cr, 0x00000000);     /* all non-critical */
-       mtdcr (uic1pr, 0xffffc8ff);     /* polarity */
-       mtdcr (uic1tr, 0x00ff0000);     /* trigger edge vs level */
+       mtdcr (uic1cr, 0x00000000);     /* all non- critical */
+       mtdcr (uic1pr, 0xfffffe03);     /* polarity */
+       mtdcr (uic1tr, 0x01c00000);     /* trigger edge vs level */
        mtdcr (uic1vr, 0x00000001);     /* int31 highest, base=0x000 */
        mtdcr (uic1sr, 0xffffffff);     /* clear all */
 
        mtdcr (uic2sr, 0xffffffff);     /* clear all */
        mtdcr (uic2er, 0x00000000);     /* disable all */
        mtdcr (uic2cr, 0x00000000);     /* all non-critical */
-       mtdcr (uic2pr, 0xffff83ff);     /* polarity */
-       mtdcr (uic2tr, 0x00ff8c0f);     /* trigger edge vs level */
+       mtdcr (uic2pr, 0xffffc8ff);     /* polarity */
+       mtdcr (uic2tr, 0x00ff0000);     /* trigger edge vs level */
        mtdcr (uic2vr, 0x00000001);     /* int31 highest, base=0x000 */
        mtdcr (uic2sr, 0xffffffff);     /* clear all */
 
-       mtdcr (uicb0sr, 0xfc000000);    /* clear all */
-       mtdcr (uicb0er, 0x00000000);    /* disable all */
-       mtdcr (uicb0cr, 0x00000000);    /* all non-critical */
-       mtdcr (uicb0pr, 0xfc000000);
-       mtdcr (uicb0tr, 0x00000000);
-       mtdcr (uicb0vr, 0x00000001);
+       mtdcr (uic3sr, 0xffffffff);     /* clear all */
+       mtdcr (uic3er, 0x00000000);     /* disable all */
+       mtdcr (uic3cr, 0x00000000);     /* all non-critical */
+       mtdcr (uic3pr, 0xffff83ff);     /* polarity */
+       mtdcr (uic3tr, 0x00ff8c0f);     /* trigger edge vs level */
+       mtdcr (uic3vr, 0x00000001);     /* int31 highest, base=0x000 */
+       mtdcr (uic3sr, 0xffffffff);     /* clear all */
+
+       mtdcr (uic0sr, 0xfc000000);     /* clear all */
+       mtdcr (uic0er, 0x00000000);     /* disable all */
+       mtdcr (uic0cr, 0x00000000);     /* all non-critical */
+       mtdcr (uic0pr, 0xfc000000);
+       mtdcr (uic0tr, 0x00000000);
+       mtdcr (uic0vr, 0x00000001);
 
        fpga_init();
 
index 66cdfb1562cca9c347d1957a7e59f54fb4f62265..c38850d6c740078a9ed37a8ab0712573bc2e9af6 100644 (file)
@@ -185,36 +185,48 @@ int board_early_init_f (void)
        /*--------------------------------------------------------------------+
         * Setup the interrupt controller polarities, triggers, etc.
         +-------------------------------------------------------------------*/
-       mtdcr (uic0sr, 0xffffffff);     /* clear all */
-       mtdcr (uic0er, 0x00000000);     /* disable all */
-       mtdcr (uic0cr, 0x00000000);     /* all non- critical */
-       mtdcr (uic0pr, 0xfffffe03);     /* polarity */
-       mtdcr (uic0tr, 0x01c00000);     /* trigger edge vs level */
-       mtdcr (uic0vr, 0x00000001);     /* int31 highest, base=0x000 */
-       mtdcr (uic0sr, 0xffffffff);     /* clear all */
-
+       /*
+        * Because of the interrupt handling rework to handle 440GX interrupts
+        * with the common code, we needed to change names of the UIC registers.
+        * Here the new relationship:
+        *
+        * U-Boot name  440GX name
+        * -----------------------
+        * UIC0         UICB0
+        * UIC1         UIC0
+        * UIC2         UIC1
+        * UIC3         UIC2
+        */
        mtdcr (uic1sr, 0xffffffff);     /* clear all */
        mtdcr (uic1er, 0x00000000);     /* disable all */
-       mtdcr (uic1cr, 0x00000000);     /* all non-critical */
-       mtdcr (uic1pr, 0xffffc8ff);     /* polarity */
-       mtdcr (uic1tr, 0x00ff0000);     /* trigger edge vs level */
+       mtdcr (uic1cr, 0x00000000);     /* all non- critical */
+       mtdcr (uic1pr, 0xfffffe03);     /* polarity */
+       mtdcr (uic1tr, 0x01c00000);     /* trigger edge vs level */
        mtdcr (uic1vr, 0x00000001);     /* int31 highest, base=0x000 */
        mtdcr (uic1sr, 0xffffffff);     /* clear all */
 
        mtdcr (uic2sr, 0xffffffff);     /* clear all */
        mtdcr (uic2er, 0x00000000);     /* disable all */
        mtdcr (uic2cr, 0x00000000);     /* all non-critical */
-       mtdcr (uic2pr, 0xffff83ff);     /* polarity */
-       mtdcr (uic2tr, 0x00ff8c0f);     /* trigger edge vs level */
+       mtdcr (uic2pr, 0xffffc8ff);     /* polarity */
+       mtdcr (uic2tr, 0x00ff0000);     /* trigger edge vs level */
        mtdcr (uic2vr, 0x00000001);     /* int31 highest, base=0x000 */
        mtdcr (uic2sr, 0xffffffff);     /* clear all */
 
-       mtdcr (uicb0sr, 0xfc000000);    /* clear all */
-       mtdcr (uicb0er, 0x00000000);    /* disable all */
-       mtdcr (uicb0cr, 0x00000000);    /* all non-critical */
-       mtdcr (uicb0pr, 0xfc000000);
-       mtdcr (uicb0tr, 0x00000000);
-       mtdcr (uicb0vr, 0x00000001);
+       mtdcr (uic3sr, 0xffffffff);     /* clear all */
+       mtdcr (uic3er, 0x00000000);     /* disable all */
+       mtdcr (uic3cr, 0x00000000);     /* all non-critical */
+       mtdcr (uic3pr, 0xffff83ff);     /* polarity */
+       mtdcr (uic3tr, 0x00ff8c0f);     /* trigger edge vs level */
+       mtdcr (uic3vr, 0x00000001);     /* int31 highest, base=0x000 */
+       mtdcr (uic3sr, 0xffffffff);     /* clear all */
+
+       mtdcr (uic0sr, 0xfc000000);     /* clear all */
+       mtdcr (uic0er, 0x00000000);     /* disable all */
+       mtdcr (uic0cr, 0x00000000);     /* all non-critical */
+       mtdcr (uic0pr, 0xfc000000);
+       mtdcr (uic0tr, 0x00000000);
+       mtdcr (uic0vr, 0x00000001);
 
        fpga_init();
 
index 4342ebc8419321af0f821bb69d0c40aa932b91ec..1231c7c6f9347aa2598f94db1aa852cd88a94036 100644 (file)
@@ -33,7 +33,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#if !defined(CFG_FLASH_CFI_DRIVER) /* do not use if CFI driver is configured */
+#if !defined(CONFIG_FLASH_CFI_DRIVER) /* do not use if CFI driver is configured */
 
 #if defined(CONFIG_TQM8xxL) && !defined(CONFIG_TQM866M) \
     && !defined(CONFIG_TQM885D)
@@ -831,4 +831,4 @@ static int write_word (flash_info_t *info, ulong dest, ulong data)
 /*-----------------------------------------------------------------------
  */
 
-#endif /* !defined(CFG_FLASH_CFI_DRIVER) */
+#endif /* !defined(CONFIG_FLASH_CFI_DRIVER) */
diff --git a/board/xilinx/ml507/Makefile b/board/xilinx/ml507/Makefile
new file mode 100644 (file)
index 0000000..7283704
--- /dev/null
@@ -0,0 +1,58 @@
+#
+# (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
+ifneq ($(OBJTREE),$(SRCTREE))
+endif
+
+INCS           :=
+CFLAGS         += $(INCS)
+HOST_CFLAGS    += $(INCS)
+
+LIB    = $(obj)lib$(BOARD).a
+
+COBJS  = $(BOARD).o
+
+SOBJS  = init.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):        $(OBJS) $(SOBJS)
+       $(AR) $(ARFLAGS) $@ $^
+
+clean:
+       rm -f $(SOBJS) $(OBJS)
+
+distclean:     clean
+       rm -f $(LIB) core *.bak .depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
diff --git a/board/xilinx/ml507/config.mk b/board/xilinx/ml507/config.mk
new file mode 100644 (file)
index 0000000..e827e8a
--- /dev/null
@@ -0,0 +1,27 @@
+#
+# (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
+#
+sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp
+
+ifndef TEXT_BASE
+TEXT_BASE = 0x04000000
+endif
diff --git a/board/xilinx/ml507/init.S b/board/xilinx/ml507/init.S
new file mode 100644 (file)
index 0000000..3228a65
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ *  (C) Copyright 2008
+ *  Ricado Ribalda-Universidad Autonoma de Madrid-ricardo.ribalda@uam.es
+ *  This work has been supported by: QTechnology  http://qtec.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, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <ppc_asm.tmpl>
+#include <config.h>
+#include <asm-ppc/mmu.h>
+
+.section .bootpg,"ax"
+.globl tlbtab
+
+tlbtab:
+tlbtab_start
+       /* SDRAM */
+tlbentry(XPAR_DDR2_SDRAM_MEM_BASEADDR, SZ_256M, CFG_SDRAM_BASE, 0,
+        AC_R | AC_W | AC_X | SA_G | SA_I)
+       /* UART */
+tlbentry(XPAR_UARTLITE_0_BASEADDR, SZ_64K, XPAR_UARTLITE_0_BASEADDR, 0,
+        AC_R | AC_W | SA_G | SA_I)
+       /* PIC */
+tlbentry(XPAR_INTC_0_BASEADDR, SZ_64K, XPAR_INTC_0_BASEADDR, 0,
+        AC_R | AC_W | SA_G | SA_I)
+#ifdef XPAR_IIC_EEPROM_BASEADDR
+       /* I2C */
+tlbentry(XPAR_IIC_EEPROM_BASEADDR, SZ_64K, XPAR_IIC_EEPROM_BASEADDR, 0,
+        AC_R | AC_W | SA_G | SA_I)
+#endif
+#ifdef XPAR_LLTEMAC_0_BASEADDR
+       /* Net */
+tlbentry(XPAR_LLTEMAC_0_BASEADDR, SZ_64K, XPAR_LLTEMAC_0_BASEADDR, 0,
+        AC_R | AC_W | SA_G | SA_I)
+#endif
+#ifdef XPAR_FLASH_MEM0_BASEADDR
+       /*Flash*/
+tlbentry(XPAR_FLASH_MEM0_BASEADDR, SZ_256M, XPAR_FLASH_MEM0_BASEADDR, 0,
+        AC_R | AC_W | AC_X | SA_G | SA_I)
+#endif
+tlbtab_end
diff --git a/board/xilinx/ml507/ml507.c b/board/xilinx/ml507/ml507.c
new file mode 100644 (file)
index 0000000..d499303
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * (C) Copyright 2008
+ * Ricado Ribalda-Universidad Autonoma de Madrid-ricardo.ribalda@uam.es
+ * This work has been supported by: QTechnology  http://qtec.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, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+#include <common.h>
+#include <asm/processor.h>
+
+int board_pre_init(void)
+{
+       return 0;
+}
+
+int checkboard(void)
+{
+       puts("ML507 Board\n");
+       return 0;
+}
+
+phys_size_t initdram(int board_type)
+{
+       return get_ram_size(XPAR_DDR2_SDRAM_MEM_BASEADDR,
+                           CFG_SDRAM_SIZE_MB * 1024 * 1024);
+}
+
+void get_sys_info(sys_info_t * sysInfo)
+{
+       sysInfo->freqProcessor = XPAR_CORE_CLOCK_FREQ_HZ;
+       sysInfo->freqPLB = XPAR_PLB_CLOCK_FREQ_HZ;
+       sysInfo->freqPCI = 0;
+
+       return;
+}
diff --git a/board/xilinx/ml507/u-boot-ram.lds b/board/xilinx/ml507/u-boot-ram.lds
new file mode 100644 (file)
index 0000000..2c98d27
--- /dev/null
@@ -0,0 +1,134 @@
+/*
+ * (C) Copyright 2000-2004
+ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+OUTPUT_ARCH(powerpc)
+ENTRY(_start_440)
+
+SECTIONS
+{
+  /* Read-only sections, merged into text segment: */
+  . = + SIZEOF_HEADERS;
+  .interp : { *(.interp) }
+  .hash          : { *(.hash)          }
+  .dynsym        : { *(.dynsym)                }
+  .dynstr        : { *(.dynstr)                }
+  .rel.text      : { *(.rel.text)              }
+  .rela.text     : { *(.rela.text)     }
+  .rel.data      : { *(.rel.data)              }
+  .rela.data     : { *(.rela.data)     }
+  .rel.rodata    : { *(.rel.rodata)    }
+  .rela.rodata   : { *(.rela.rodata)   }
+  .rel.got       : { *(.rel.got)               }
+  .rela.got      : { *(.rela.got)              }
+  .rel.ctors     : { *(.rel.ctors)     }
+  .rela.ctors    : { *(.rela.ctors)    }
+  .rel.dtors     : { *(.rel.dtors)     }
+  .rela.dtors    : { *(.rela.dtors)    }
+  .rel.bss       : { *(.rel.bss)               }
+  .rela.bss      : { *(.rela.bss)              }
+  .rel.plt       : { *(.rel.plt)               }
+  .rela.plt      : { *(.rela.plt)              }
+  .init          : { *(.init)  }
+  .plt : { *(.plt) }
+  .text      :
+  {
+    /* WARNING - the following is hand-optimized to fit within */
+    /* the sector layout of our flash chips!   XXX FIXME XXX   */
+
+
+    *(.text)
+    *(.fixup)
+    *(.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: */
+  . = (. + 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)
+  }
+
+  ppcenv_assert = ASSERT(. < 0xFFFFB000, ".bss section too big, overlaps .ppcenv section. Please update your confguration: CFG_MONITOR_BASE, CFG_MONITOR_LEN and TEXT_BASE may need to be modified.");
+
+  _end = . ;
+  PROVIDE (end = .);
+}
diff --git a/board/xilinx/ml507/u-boot-rom.lds b/board/xilinx/ml507/u-boot-rom.lds
new file mode 100644 (file)
index 0000000..d5da018
--- /dev/null
@@ -0,0 +1,144 @@
+/*
+ * (C) Copyright 2000-2004
+ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+OUTPUT_ARCH(powerpc)
+ENTRY(_start_440)
+
+SECTIONS
+{
+  .resetvec 0xFFFFFFFC :
+  {
+    *(.resetvec)
+  } = 0xffff
+
+  .bootpg 0xFFFFF000 :
+  {
+    cpu/ppc4xx/start.o (.bootpg)
+  } = 0xffff
+
+  /* Read-only sections, merged into text segment: */
+  . = + SIZEOF_HEADERS;
+  .interp : { *(.interp) }
+  .hash          : { *(.hash)          }
+  .dynsym        : { *(.dynsym)                }
+  .dynstr        : { *(.dynstr)                }
+  .rel.text      : { *(.rel.text)              }
+  .rela.text     : { *(.rela.text)     }
+  .rel.data      : { *(.rel.data)              }
+  .rela.data     : { *(.rela.data)     }
+  .rel.rodata    : { *(.rel.rodata)    }
+  .rela.rodata   : { *(.rela.rodata)   }
+  .rel.got       : { *(.rel.got)               }
+  .rela.got      : { *(.rela.got)              }
+  .rel.ctors     : { *(.rel.ctors)     }
+  .rela.ctors    : { *(.rela.ctors)    }
+  .rel.dtors     : { *(.rel.dtors)     }
+  .rela.dtors    : { *(.rela.dtors)    }
+  .rel.bss       : { *(.rel.bss)               }
+  .rela.bss      : { *(.rela.bss)              }
+  .rel.plt       : { *(.rel.plt)               }
+  .rela.plt      : { *(.rela.plt)              }
+  .init          : { *(.init)  }
+  .plt : { *(.plt) }
+  .text      :
+  {
+    /* WARNING - the following is hand-optimized to fit within */
+    /* the sector layout of our flash chips!   XXX FIXME XXX   */
+
+
+    *(.text)
+    *(.fixup)
+    *(.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: */
+  . = (. + 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)
+  }
+
+  ppcenv_assert = ASSERT(. < 0xFFFFB000, ".bss section too big, overlaps .ppcenv section. Please update your confguration: CFG_MONITOR_BASE, CFG_MONITOR_LEN and TEXT_BASE may need to be modified.");
+
+  _end = . ;
+  PROVIDE (end = .);
+}
diff --git a/board/xilinx/ml507/xparameters.h b/board/xilinx/ml507/xparameters.h
new file mode 100644 (file)
index 0000000..77d2ddf
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * (C) Copyright 2008
+ * Ricado Ribalda-Universidad Autonoma de Madrid-ricardo.ribalda@uam.es
+ * This work has been supported by: QTechnology  http://qtec.com/
+ * based on xparameters-ml507.h by Xilinx
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef XPARAMETER_H
+#define XPARAMETER_H
+
+#define XPAR_DDR2_SDRAM_MEM_BASEADDR   0x00000000
+#define XPAR_IIC_EEPROM_BASEADDR       0x81600000
+#define XPAR_INTC_0_BASEADDR           0x81800000
+#define XPAR_LLTEMAC_0_BASEADDR        0x81C00000
+#define XPAR_UARTLITE_0_BASEADDR       0x84000000
+#define XPAR_FLASH_MEM0_BASEADDR       0xFE000000
+#define XPAR_PLB_CLOCK_FREQ_HZ                 100000000
+#define XPAR_CORE_CLOCK_FREQ_HZ        400000000
+#define XPAR_INTC_MAX_NUM_INTR_INPUTS  13
+#define XPAR_UARTLITE_0_BAUDRATE       9600
+
+#endif
index bc7e3bd17cbedd9c27a73a2d6dbcde802d7fc216..c94a345d90d7e4333c860d31d88e9c4a670d60fc 100644 (file)
@@ -59,36 +59,48 @@ int board_early_init_f(void)
        /*--------------------------------------------------------------------
         * Setup the interrupt controller polarities, triggers, etc.
         *-------------------------------------------------------------------*/
-       mtdcr (uic0sr, 0xffffffff);     /* clear all */
-       mtdcr (uic0er, 0x00000000);     /* disable all */
-       mtdcr (uic0cr, 0x00000003);     /* SMI & UIC1 crit are critical */
-       mtdcr (uic0pr, 0xfffffe00);     /* per ref-board manual */
-       mtdcr (uic0tr, 0x01c00000);     /* per ref-board manual */
-       mtdcr (uic0vr, 0x00000001);     /* int31 highest, base=0x000 */
-       mtdcr (uic0sr, 0xffffffff);     /* clear all */
-
+       /*
+        * Because of the interrupt handling rework to handle 440GX interrupts
+        * with the common code, we needed to change names of the UIC registers.
+        * Here the new relationship:
+        *
+        * U-Boot name  440GX name
+        * -----------------------
+        * UIC0         UICB0
+        * UIC1         UIC0
+        * UIC2         UIC1
+        * UIC3         UIC2
+        */
        mtdcr (uic1sr, 0xffffffff);     /* clear all */
        mtdcr (uic1er, 0x00000000);     /* disable all */
-       mtdcr (uic1cr, 0x00000000);     /* all non-critical */
-       mtdcr (uic1pr, 0xffffc0ff);     /* per ref-board manual */
-       mtdcr (uic1tr, 0x00ff8000);     /* per ref-board manual */
+       mtdcr (uic1cr, 0x00000003);     /* SMI & UIC1 crit are critical */
+       mtdcr (uic1pr, 0xfffffe00);     /* per ref-board manual */
+       mtdcr (uic1tr, 0x01c00000);     /* per ref-board manual */
        mtdcr (uic1vr, 0x00000001);     /* int31 highest, base=0x000 */
        mtdcr (uic1sr, 0xffffffff);     /* clear all */
 
        mtdcr (uic2sr, 0xffffffff);     /* clear all */
        mtdcr (uic2er, 0x00000000);     /* disable all */
        mtdcr (uic2cr, 0x00000000);     /* all non-critical */
-       mtdcr (uic2pr, 0xffffffff);     /* per ref-board manual */
-       mtdcr (uic2tr, 0x00ff8c0f);     /* per ref-board manual */
+       mtdcr (uic2pr, 0xffffc0ff);     /* per ref-board manual */
+       mtdcr (uic2tr, 0x00ff8000);     /* per ref-board manual */
        mtdcr (uic2vr, 0x00000001);     /* int31 highest, base=0x000 */
        mtdcr (uic2sr, 0xffffffff);     /* clear all */
 
-       mtdcr (uicb0sr, 0xfc000000); /* clear all */
-       mtdcr (uicb0er, 0x00000000); /* disable all */
-       mtdcr (uicb0cr, 0x00000000); /* all non-critical */
-       mtdcr (uicb0pr, 0xfc000000); /* */
-       mtdcr (uicb0tr, 0x00000000); /* */
-       mtdcr (uicb0vr, 0x00000001); /* */
+       mtdcr (uic3sr, 0xffffffff);     /* clear all */
+       mtdcr (uic3er, 0x00000000);     /* disable all */
+       mtdcr (uic3cr, 0x00000000);     /* all non-critical */
+       mtdcr (uic3pr, 0xffffffff);     /* per ref-board manual */
+       mtdcr (uic3tr, 0x00ff8c0f);     /* per ref-board manual */
+       mtdcr (uic3vr, 0x00000001);     /* int31 highest, base=0x000 */
+       mtdcr (uic3sr, 0xffffffff);     /* clear all */
+
+       mtdcr (uic0sr, 0xfc000000); /* clear all */
+       mtdcr (uic0er, 0x00000000); /* disable all */
+       mtdcr (uic0cr, 0x00000000); /* all non-critical */
+       mtdcr (uic0pr, 0xfc000000); /* */
+       mtdcr (uic0tr, 0x00000000); /* */
+       mtdcr (uic0vr, 0x00000001); /* */
 
        LED0_ON();
 
index 76dc1664385b8ea9da322101adfa082706fc2762..53677b861a8d762a114ffbbde3c7be49e823467a 100644 (file)
@@ -28,8 +28,6 @@
 #include <common.h>            /* core U-Boot definitions */
 #include <ACEX1K.h>            /* ACEX device family */
 
-#if defined(CONFIG_FPGA) && defined(CONFIG_FPGA_ALTERA) && defined(CONFIG_FPGA_ACEX1K)
-
 /* Define FPGA_DEBUG to get debug printf's */
 #ifdef FPGA_DEBUG
 #define PRINTF(fmt,args...)    printf (fmt ,##args)
@@ -362,5 +360,3 @@ static int ACEX1K_ps_reloc (Altera_desc * desc, ulong reloc_offset)
        return ret_val;
 
 }
-
-#endif /* CONFIG_FPGA && CONFIG_FPGA_ALTERA && CONFIG_FPGA_ACEX1K */
index ecf755f3f2b3d23d16836b88b44412aecd5c801e..c2b381b4c457192ce302e36aba89274dbaf2640e 100644 (file)
@@ -28,9 +28,7 @@ LIB   = $(obj)libcommon.a
 AOBJS  =
 
 COBJS-y += main.o
-COBJS-y += ACEX1K.o
-COBJS-y += altera.o
-COBJS-y += bedbug.o
+COBJS-$(CONFIG_CMD_BEDBUG) += bedbug.o
 COBJS-y += circbuf.o
 COBJS-$(CONFIG_CMD_AMBAPP) += cmd_ambapp.o
 COBJS-y += cmd_autoscript.o
@@ -64,7 +62,18 @@ COBJS-$(CONFIG_OF_LIBFDT) += cmd_fdt.o fdt_support.o
 COBJS-$(CONFIG_CMD_FDOS) += cmd_fdos.o
 COBJS-$(CONFIG_CMD_FLASH) += cmd_flash.o
 ifdef CONFIG_FPGA
+COBJS-y += fpga.o
 COBJS-$(CONFIG_CMD_FPGA) += cmd_fpga.o
+COBJS-$(CONFIG_FPGA_SPARTAN2) += spartan2.o
+COBJS-$(CONFIG_FPGA_SPARTAN3) += spartan3.o
+COBJS-$(CONFIG_FPGA_VIRTEX2) += virtex2.o
+COBJS-$(CONFIG_FPGA_XILINX) += xilinx.o
+ifdef CONFIG_FPGA_ALTERA
+COBJS-y += altera.o
+COBJS-$(CONFIG_FPGA_ACEX1K) += ACEX1K.o
+COBJS-$(CONFIG_FPGA_CYCLON2) += cyclon2.o
+COBJS-$(CONFIG_FPGA_STRATIX_II) += stratixII.o
+endif
 endif
 COBJS-$(CONFIG_CMD_I2C) += cmd_i2c.o
 COBJS-$(CONFIG_CMD_IDE) += cmd_ide.o
@@ -80,7 +89,7 @@ COBJS-$(CONFIG_CMD_MMC) += cmd_mmc.o
 COBJS-y += cmd_nand.o
 COBJS-$(CONFIG_CMD_NET) += cmd_net.o
 COBJS-y += cmd_nvedit.o
-COBJS-y += cmd_onenand.o
+COBJS-$(CONFIG_CMD_ONENAND) += cmd_onenand.o
 COBJS-$(CONFIG_CMD_OTP) += cmd_otp.o
 ifdef CONFIG_PCI
 COBJS-$(CONFIG_CMD_PCI) += cmd_pci.o
@@ -102,11 +111,9 @@ COBJS-$(CONFIG_YAFFS2) += cmd_yaffs2.o
 COBJS-y += cmd_vfd.o
 COBJS-y += command.o
 COBJS-y += console.o
-COBJS-y += cyclon2.o
-COBJS-y += stratixII.o
 COBJS-y += devices.o
 COBJS-y += dlmalloc.o
-COBJS-y += docecc.o
+COBJS-$(CONFIG_CMD_DOC) += docecc.o
 COBJS-y += environment.o
 COBJS-y += env_common.o
 COBJS-y += env_nand.o
@@ -119,26 +126,23 @@ COBJS-y += env_nvram.o
 COBJS-y += env_nowhere.o
 COBJS-y += exports.o
 COBJS-y += flash.o
-COBJS-y += fpga.o
 COBJS-y += hush.o
 COBJS-y += kgdb.o
-COBJS-y += lcd.o
+COBJS-$(CONFIG_LCD) += lcd.o
 COBJS-y += lists.o
-COBJS-y += lynxkdi.o
+COBJS-$(CONFIG_LYNXKDI) += lynxkdi.o
 COBJS-y += memsize.o
-COBJS-y += miiphybb.o
+COBJS-$(CONFIG_BITBANGMII) += miiphybb.o
 COBJS-y += miiphyutil.o
 COBJS-y += s_record.o
 COBJS-y += serial.o
-COBJS-y += soft_i2c.o
-COBJS-y += soft_spi.o
-COBJS-y += spartan2.o
-COBJS-y += spartan3.o
+COBJS-$(CONFIG_SOFT_I2C) += soft_i2c.o
+COBJS-$(CONFIG_SOFT_SPI) += soft_spi.o
+ifdef CONFIG_CMD_USB
 COBJS-y += usb.o
-COBJS-y += usb_kbd.o
-COBJS-y += usb_storage.o
-COBJS-y += virtex2.o
-COBJS-y += xilinx.o
+COBJS-$(CONFIG_USB_STORAGE) += usb_storage.o
+endif
+COBJS-$(CONFIG_USB_KEYBOARD) += usb_kbd.o
 COBJS-y += crc16.o
 COBJS-y += xyzModem.o
 COBJS-y += cmd_mac.o
index a2b5967ec92cbedd0a22b6144a8f2dd198b86e33..09dc0b22e1b4a92124536c1c24ebe88948a34035 100644 (file)
@@ -41,8 +41,6 @@
 #define PRINTF(fmt,args...)
 #endif
 
-#if defined(CONFIG_FPGA) && defined(CONFIG_FPGA_ALTERA)
-
 /* Local Static Functions */
 static int altera_validate (Altera_desc * desc, const char *fn);
 
@@ -283,5 +281,3 @@ static int altera_validate (Altera_desc * desc, const char *fn)
 }
 
 /* ------------------------------------------------------------------------- */
-
-#endif /* CONFIG_FPGA & CONFIG_FPGA_ALTERA */
index 3bf1fc3cc7f06e11d20226a2640b6d4b1ddca548..60109cf827d25f451e0f408217d60d02ec417e8a 100644 (file)
@@ -2,8 +2,6 @@
 
 #include <common.h>
 
-#if defined(CONFIG_CMD_BEDBUG)
-
 #include <linux/ctype.h>
 #include <bedbug/bedbug.h>
 #include <bedbug/ppc.h>
@@ -1252,5 +1250,3 @@ int find_next_address (unsigned char *nextaddr, int step_over,
  * warranties of merchantability and fitness for a particular
  * purpose.
  */
-
-#endif
index b4698bee47888a3e352551e32a1b41164aa209ce..c031d8034919ee9a7e902ca258e64ddf42b113da 100644 (file)
 #include <cramfs/cramfs_fs.h>
 
 #if defined(CONFIG_CMD_NAND)
-#ifdef CFG_NAND_LEGACY
+#ifdef CONFIG_NAND_LEGACY
 #include <linux/mtd/nand_legacy.h>
-#else /* !CFG_NAND_LEGACY */
+#else /* !CONFIG_NAND_LEGACY */
 #include <linux/mtd/nand.h>
 #include <nand.h>
-#endif /* !CFG_NAND_LEGACY */
+#endif /* !CONFIG_NAND_LEGACY */
 #endif
 /* enable/disable debugging messages */
 #define        DEBUG_JFFS
@@ -476,7 +476,7 @@ static int part_del(struct mtd_device *dev, struct part_info *part)
                }
        }
 
-#ifdef CFG_NAND_LEGACY
+#ifdef CONFIG_NAND_LEGACY
        jffs2_free_cache(part);
 #endif
        list_del(&part->link);
@@ -505,7 +505,7 @@ static void part_delall(struct list_head *head)
        list_for_each_safe(entry, n, head) {
                part_tmp = list_entry(entry, struct part_info, link);
 
-#ifdef CFG_NAND_LEGACY
+#ifdef CONFIG_NAND_LEGACY
                jffs2_free_cache(part_tmp);
 #endif
                list_del(entry);
@@ -741,7 +741,7 @@ static int device_validate(u8 type, u8 num, u32 *size)
        } else if (type == MTD_DEV_TYPE_NAND) {
 #if defined(CONFIG_JFFS2_NAND) && defined(CONFIG_CMD_NAND)
                if (num < CFG_MAX_NAND_DEVICE) {
-#ifndef CFG_NAND_LEGACY
+#ifndef CONFIG_NAND_LEGACY
                        *size = nand_info[num].size;
 #else
                        extern struct nand_chip nand_dev_desc[CFG_MAX_NAND_DEVICE];
index 520c15217c2085a21dc0aac444ac6c3c5395ac88..fa7a438b5ffe3f4e0e150e65144a614e5749e1a7 100644 (file)
@@ -11,7 +11,7 @@
 #include <common.h>
 
 
-#ifndef CFG_NAND_LEGACY
+#ifndef CONFIG_NAND_LEGACY
 /*
  *
  * New NAND support
@@ -667,7 +667,7 @@ U_BOOT_CMD(nboot, 4, 1, do_nandboot,
 
 #endif
 
-#else /* CFG_NAND_LEGACY */
+#else /* CONFIG_NAND_LEGACY */
 /*
  *
  * Legacy NAND support - to be phased out
@@ -1077,4 +1077,4 @@ U_BOOT_CMD(
 
 #endif
 
-#endif /* CFG_NAND_LEGACY */
+#endif /* CONFIG_NAND_LEGACY */
index 419bf70988f96e01e008ec5b97c20ef4558bb94e..5e2062b5a2f1f8fd332e80611b7cdb5d8ee1a033 100644 (file)
@@ -12,8 +12,6 @@
 #include <common.h>
 #include <command.h>
 
-#ifdef CONFIG_CMD_ONENAND
-
 #include <linux/mtd/compat.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/onenand.h>
@@ -159,5 +157,3 @@ U_BOOT_CMD(
        "onenand block[.oob] addr block [page] [len] - "
                "read data with (block [, page]) to addr"
 );
-
-#endif /* CONFIG_CMD_ONENAND */
index 0657e4b1f101bc0bd10588ec4945b80076de281a..c0a145991d1c90f384f2b9cabab8960e0ce84e08 100644 (file)
@@ -93,11 +93,10 @@ int do_reginfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 #elif defined (CONFIG_405GP)
        printf ("\n405GP registers; MSR=%08x\n",mfmsr());
        printf ("\nUniversal Interrupt Controller Regs\n"
-           "uicsr    uicsrs   uicer    uiccr    uicpr    uictr    uicmsr   uicvr    uicvcr"
+           "uicsr    uicer    uiccr    uicpr    uictr    uicmsr   uicvr    uicvcr"
            "\n"
-           "%08x %08x %08x %08x %08x %08x %08x %08x %08x\n",
+           "%08x %08x %08x %08x %08x %08x %08x %08x\n",
        mfdcr(uicsr),
-       mfdcr(uicsrs),
        mfdcr(uicer),
        mfdcr(uiccr),
        mfdcr(uicpr),
index 06f5e8aeaec5477ea6b8d191e23f2ef8538a5855..479bebbe427dca063195ad007eb8b54f4ec907df 100644 (file)
@@ -27,8 +27,6 @@
 #include <altera.h>
 #include <ACEX1K.h>            /* ACEX device family */
 
-#if defined(CONFIG_FPGA) && defined(CONFIG_FPGA_ALTERA) && defined(CONFIG_FPGA_CYCLON2)
-
 /* Define FPGA_DEBUG to get debug printf's */
 #ifdef FPGA_DEBUG
 #define PRINTF(fmt,args...)    printf (fmt ,##args)
@@ -301,5 +299,3 @@ static int CYC2_ps_reloc (Altera_desc * desc, ulong reloc_offset)
 
        return ret_val;
 }
-
-#endif /* CONFIG_FPGA && CONFIG_FPGA_ALTERA && CONFIG_FPGA_CYCLON2 */
index 5daa6fc4054854ebd2b1ac456c084c5e0e223fca..3412affc795a6b0d319553a4982f8f5991a819b5 100644 (file)
@@ -31,8 +31,6 @@
 #undef ECC_DEBUG
 #undef PSYCHO_DEBUG
 
-#if defined(CONFIG_CMD_DOC)
-
 #include <linux/mtd/doc2000.h>
 
 /* need to undef it (from asm/termbits.h) */
@@ -513,5 +511,3 @@ int doc_decode_ecc(unsigned char sector[SECTOR_SIZE], unsigned char ecc1[6])
     free(Index_of);
     return nb_errors;
 }
-
-#endif
index d16a92d70b051b2cdd53ca4713161f8ab9240d9e..67a6c300c788a2e96eff924bdf9996d275463c1a 100644 (file)
@@ -29,8 +29,6 @@
 #include <xilinx.h>             /* xilinx specific definitions */
 #include <altera.h>             /* altera specific definitions */
 
-#if defined(CONFIG_FPGA)
-
 #if 0
 #define FPGA_DEBUG              /* define FPGA_DEBUG to get debug messages */
 #endif
@@ -335,5 +333,3 @@ int fpga_info( int devnum )
 }
 
 /* ------------------------------------------------------------------------- */
-
-#endif  /* CONFIG_FPGA */
index 8d770f3e720deb596a6034a3694d47e81bf953a3..25f8664343d02642721b0b0a5b19214db430ccad 100644 (file)
@@ -55,8 +55,6 @@
 #include <nand.h>
 #endif
 
-#ifdef CONFIG_LCD
-
 /************************************************************************/
 /* ** FONT DATA                                                                */
 /************************************************************************/
@@ -867,5 +865,3 @@ static void *lcd_logo (void)
 
 /************************************************************************/
 /************************************************************************/
-
-#endif /* CONFIG_LCD */
index a5dc88769f161bdc63ed64656ec388b63790dd27..5f12b0dc176854ba54f144dcd92b2cc14c62d8a7 100644 (file)
@@ -17,7 +17,6 @@
 #include <asm/processor.h>
 #include <image.h>
 
-#if defined(CONFIG_LYNXKDI)
 #include <lynxkdi.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -66,5 +65,3 @@ void lynxkdi_boot (image_header_t *hdr)
 #else
 #error "Lynx KDI support not implemented for configured CPU"
 #endif
-
-#endif /* CONFIG_LYNXKDI */
index 537c15d29b85e8bb226c050a3bbab10c70692ce0..6446012f95e34361a8c1f86bb991666df3a1f2ef 100644 (file)
@@ -30,9 +30,6 @@
 #include <ioports.h>
 #include <ppc_asm.tmpl>
 
-#ifdef CONFIG_BITBANGMII
-
-
 /*****************************************************************************
  *
  * Utility to send the preamble, address, and register (common to read
@@ -236,5 +233,3 @@ int bb_miiphy_write (char *devname, unsigned char addr,
 
        return 0;
 }
-
-#endif /* CONFIG_BITBANGMII */
index 5ef7f303b8435d52a5ccb8151d316b8e79141ada..23db2ee8ff4375be62c0800ca87edfa39bee601c 100644 (file)
@@ -41,8 +41,6 @@
 #endif
 #include <i2c.h>
 
-#if defined(CONFIG_SOFT_I2C)
-
 /* #define     DEBUG_I2C       */
 
 #ifdef DEBUG_I2C
@@ -423,6 +421,3 @@ void i2c_reg_write(uchar i2c_addr, uchar reg, uchar val)
 {
        i2c_write(i2c_addr, reg, 1, &val, 1);
 }
-
-
-#endif /* CONFIG_SOFT_I2C */
index c13165030db6e5edb71ef78491039977d3ef0ae0..25b589ad7c604dc280c33050c6db4119de1440b6 100644 (file)
@@ -27,8 +27,6 @@
 #include <common.h>
 #include <spi.h>
 
-#if defined(CONFIG_SOFT_SPI)
-
 #include <malloc.h>
 
 /*-----------------------------------------------------------------------
@@ -193,5 +191,3 @@ int  spi_xfer(struct spi_slave *slave, unsigned int bitlen,
 
        return(0);
 }
-
-#endif /* CONFIG_SOFT_SPI */
index 2f1ea2c099e7be6025871f0b5a1f50e5c2ad7f31..ebac388b18ed1e77f8d6112a1ed6c1f9e2150085 100644 (file)
@@ -25,8 +25,6 @@
 #include <common.h>            /* core U-Boot definitions */
 #include <spartan2.h>          /* Spartan-II device family */
 
-#if defined(CONFIG_FPGA) && defined(CONFIG_FPGA_SPARTAN2)
-
 /* Define FPGA_DEBUG to get debug printf's */
 #ifdef FPGA_DEBUG
 #define PRINTF(fmt,args...)    printf (fmt ,##args)
@@ -663,5 +661,3 @@ static int Spartan2_ss_reloc (Xilinx_desc * desc, ulong reloc_offset)
        return ret_val;
 
 }
-
-#endif
index d329e70cf736a5550cd7a1ee50b6aa0b52c14f90..8f1ab80b74b17633bcbcb1861920bdf5e2517cf9 100644 (file)
@@ -30,8 +30,6 @@
 #include <common.h>            /* core U-Boot definitions */
 #include <spartan3.h>          /* Spartan-II device family */
 
-#if defined(CONFIG_FPGA) && defined(CONFIG_FPGA_SPARTAN3)
-
 /* Define FPGA_DEBUG to get debug printf's */
 #ifdef FPGA_DEBUG
 #define PRINTF(fmt,args...)    printf (fmt ,##args)
@@ -668,5 +666,3 @@ static int Spartan3_ss_reloc (Xilinx_desc * desc, ulong reloc_offset)
        return ret_val;
 
 }
-
-#endif
index 85c461cdd7d0e0b2b2273eaa6b401b8f31ad491f..7556dbfb3d776144ab6393644a43526d801119e1 100644 (file)
@@ -25,8 +25,6 @@
 #include <common.h>            /* core U-Boot definitions */
 #include <altera.h>
 
-#if defined(CONFIG_FPGA) && defined(CONFIG_FPGA_ALTERA) && defined(CONFIG_FPGA_STRATIX_II)
-
 int StratixII_ps_fpp_load (Altera_desc * desc, void *buf, size_t bsize,
                           int isSerial, int isSecure);
 int StratixII_ps_fpp_dump (Altera_desc * desc, void *buf, size_t bsize);
@@ -231,5 +229,3 @@ int StratixII_ps_fpp_load (Altera_desc * desc, void *buf, size_t bsize,
 
        return FPGA_SUCCESS;
 }
-
-#endif                         /* defined(CONFIG_FPGA) && defined(CONFIG_FPGA_ALTERA) && defined(CONFIG_FPGA_STRATIX_II) */
index a45d113a74fb8ab89022883a0568077d3913be19..9502f39038b1637149d2804c9e7ede2405a76e77 100644 (file)
@@ -50,8 +50,6 @@
 #include <linux/ctype.h>
 #include <asm/byteorder.h>
 
-#if defined(CONFIG_CMD_USB)
-
 #include <usb.h>
 #ifdef CONFIG_4xx
 #include <asm/4xx_pci.h>
@@ -1247,6 +1245,4 @@ int usb_hub_probe(struct usb_device *dev, int ifnum)
        return ret;
 }
 
-#endif
-
 /* EOF */
index c8764952ecc0733ff9fc35ba63fee745fac54899..04d9730e6f73103ca6508eafbba69b10cd26bc6b 100644 (file)
@@ -28,8 +28,6 @@
 #include <devices.h>
 #include <asm/byteorder.h>
 
-#ifdef CONFIG_USB_KEYBOARD
-
 #include <usb.h>
 
 #undef USB_KBD_DEBUG
@@ -746,7 +744,4 @@ static int usb_kbd_get_hid_desc(struct usb_device *dev)
 
 }
 
-
 #endif
-
-#endif /* CONFIG_USB_KEYBOARD */
index d8fbb69a369b495a198755cbf588db2b819fa482..94f659fd31d6097f8f347a769350ed0f5e806ff3 100644 (file)
 #include <asm/byteorder.h>
 #include <asm/processor.h>
 
-
-#if defined(CONFIG_CMD_USB)
 #include <part.h>
 #include <usb.h>
 
-#ifdef CONFIG_USB_STORAGE
-
 #undef USB_STOR_DEBUG
 #undef BBB_COMDAT_TRACE
 #undef BBB_XPORT_TRACE
@@ -1242,6 +1238,3 @@ int usb_stor_get_info(struct usb_device *dev,struct us_data *ss,block_dev_desc_t
        USB_STOR_PRINTF("partype: %d\n",dev_desc->part_type);
        return 1;
 }
-
-#endif /* CONFIG_USB_STORAGE */
-#endif
index 665a503ec71a2fccab6ac808124945ae2524cfb9..52da1b2ca33f95404fbd5b23f6ad5ebf764ff244 100644 (file)
@@ -31,8 +31,6 @@
 #include <common.h>
 #include <virtex2.h>
 
-#if defined(CONFIG_FPGA) && defined(CONFIG_FPGA_VIRTEX2)
-
 #if 0
 #define FPGA_DEBUG
 #endif
@@ -552,6 +550,5 @@ static int Virtex2_ss_reloc (Xilinx_desc * desc, ulong reloc_offset)
        }
        return ret_val;
 }
-#endif
 
 /* vim: set ts=4 tw=78: */
index c898238682416a5bb77ef0b9ec0279405ffb1f61..7b5e8c5bbd3a48c0dc0048fa75396f44cccac6b9 100644 (file)
@@ -32,8 +32,6 @@
 #include <spartan2.h>
 #include <spartan3.h>
 
-#if defined(CONFIG_FPGA) && defined(CONFIG_FPGA_XILINX)
-
 #if 0
 #define FPGA_DEBUG
 #endif
@@ -307,5 +305,3 @@ static int xilinx_validate (Xilinx_desc * desc, char *fn)
 
        return ret_val;
 }
-
-#endif /* CONFIG_FPGA && CONFIG_FPGA_XILINX */
index 9d63243223a4b39c77de8845d5c508842753def2..60174fb4d2b8716f2ca45f2c3064000fb1f9ad6a 100644 (file)
@@ -27,7 +27,7 @@
 #endif
 
 #if defined(CONFIG_CMD_NAND)
-#if !defined(CFG_NAND_LEGACY)
+#if !defined(CONFIG_NAND_LEGACY)
 
 #include <nand.h>
 #include <s3c2410.h>
index 8fd784e7906011ae86796eecbea2f295b1627c0a..2aa01d6f78e708b669a10a2f482b310996d8b236 100644 (file)
@@ -45,7 +45,7 @@
 #include <asm/io.h>
 
 #ifdef CFG_USE_NAND
-#if !defined(CFG_NAND_LEGACY)
+#if !defined(CONFIG_NAND_LEGACY)
 
 #include <nand.h>
 #include <asm/arch/nand_defs.h>
index e9940e8e5b50e8a7ed7f2bbc9c144fcfae64923c..1c3632428cada5c58f552fd28362940512b9ea91 100644 (file)
 
 #include "ecc.h"
 
-#if defined(CONFIG_SPD_EEPROM) &&                              \
-       (defined(CONFIG_440SP) || defined(CONFIG_440SPE) || \
-        defined(CONFIG_460EX) || defined(CONFIG_460GT))
+#if defined(CONFIG_SDRAM_PPC4xx_IBM_DDR2)
+
+#define PPC4xx_IBM_DDR2_DUMP_REGISTER(mnemonic)                                \
+       do {                                                            \
+               u32 data;                                               \
+               mfsdram(SDRAM_##mnemonic, data);                        \
+               printf("%20s[%02x] = 0x%08X\n",                         \
+                      "SDRAM_" #mnemonic, SDRAM_##mnemonic, data);     \
+       } while (0)
+
+static inline void ppc4xx_ibm_ddr2_register_dump(void);
+
+#if defined(CONFIG_SPD_EEPROM)
 
 /*-----------------------------------------------------------------------------+
  * Defines
@@ -257,7 +267,6 @@ static void test(void);
 #else
 static void    DQS_calibration_process(void);
 #endif
-static void ppc440sp_sdram_register_dump(void);
 int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
 void dcbz_area(u32 start_address, u32 num_bytes);
 
@@ -607,7 +616,7 @@ phys_size_t initdram(int board_type)
        remove_tlb(0, dram_size);
        program_tlb(0, 0, dram_size, MY_TLB_WORD2_I_ENABLE);
 
-       ppc440sp_sdram_register_dump();
+       ppc4xx_ibm_ddr2_register_dump();
 
        /*
         * Clear potential errors resulting from auto-calibration.
@@ -2760,7 +2769,7 @@ calibration_loop:
                printf("\nERROR: Cannot determine a common read delay for the "
                       "DIMM(s) installed.\n");
                debug("%s[%d] ERROR : \n", __FUNCTION__,__LINE__);
-               ppc440sp_sdram_register_dump();
+               ppc4xx_ibm_ddr2_register_dump();
                spd_ddr_init_hang ();
        }
 
@@ -2946,169 +2955,8 @@ static void test(void)
 }
 #endif
 
-#if defined(DEBUG)
-static void ppc440sp_sdram_register_dump(void)
-{
-       unsigned int sdram_reg;
-       unsigned int sdram_data;
-       unsigned int dcr_data;
-
-       printf("\n  Register Dump:\n");
-       sdram_reg = SDRAM_MCSTAT;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_MCSTAT    = 0x%08X", sdram_data);
-       sdram_reg = SDRAM_MCOPT1;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_MCOPT1    = 0x%08X\n", sdram_data);
-       sdram_reg = SDRAM_MCOPT2;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_MCOPT2    = 0x%08X", sdram_data);
-       sdram_reg = SDRAM_MODT0;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_MODT0     = 0x%08X\n", sdram_data);
-       sdram_reg = SDRAM_MODT1;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_MODT1     = 0x%08X", sdram_data);
-       sdram_reg = SDRAM_MODT2;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_MODT2     = 0x%08X\n", sdram_data);
-       sdram_reg = SDRAM_MODT3;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_MODT3     = 0x%08X", sdram_data);
-       sdram_reg = SDRAM_CODT;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_CODT      = 0x%08X\n", sdram_data);
-       sdram_reg = SDRAM_VVPR;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_VVPR      = 0x%08X", sdram_data);
-       sdram_reg = SDRAM_OPARS;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_OPARS     = 0x%08X\n", sdram_data);
-       /*
-        * OPAR2 is only used as a trigger register.
-        * No data is contained in this register, and reading or writing
-        * to is can cause bad things to happen (hangs).  Just skip it
-        * and report NA
-        * sdram_reg = SDRAM_OPAR2;
-        * mfsdram(sdram_reg, sdram_data);
-        * printf("        SDRAM_OPAR2     = 0x%08X\n", sdram_data);
-        */
-       printf("        SDRAM_OPART     = N/A       ");
-       sdram_reg = SDRAM_RTR;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_RTR       = 0x%08X\n", sdram_data);
-       sdram_reg = SDRAM_MB0CF;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_MB0CF     = 0x%08X", sdram_data);
-       sdram_reg = SDRAM_MB1CF;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_MB1CF     = 0x%08X\n", sdram_data);
-       sdram_reg = SDRAM_MB2CF;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_MB2CF     = 0x%08X", sdram_data);
-       sdram_reg = SDRAM_MB3CF;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_MB3CF     = 0x%08X\n", sdram_data);
-       sdram_reg = SDRAM_INITPLR0;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_INITPLR0  = 0x%08X", sdram_data);
-       sdram_reg = SDRAM_INITPLR1;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_INITPLR1  = 0x%08X\n", sdram_data);
-       sdram_reg = SDRAM_INITPLR2;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_INITPLR2  = 0x%08X", sdram_data);
-       sdram_reg = SDRAM_INITPLR3;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_INITPLR3  = 0x%08X\n", sdram_data);
-       sdram_reg = SDRAM_INITPLR4;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_INITPLR4  = 0x%08X", sdram_data);
-       sdram_reg = SDRAM_INITPLR5;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_INITPLR5  = 0x%08X\n", sdram_data);
-       sdram_reg = SDRAM_INITPLR6;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_INITPLR6  = 0x%08X", sdram_data);
-       sdram_reg = SDRAM_INITPLR7;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_INITPLR7  = 0x%08X\n", sdram_data);
-       sdram_reg = SDRAM_INITPLR8;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_INITPLR8  = 0x%08X", sdram_data);
-       sdram_reg = SDRAM_INITPLR9;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_INITPLR9  = 0x%08X\n", sdram_data);
-       sdram_reg = SDRAM_INITPLR10;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_INITPLR10 = 0x%08X", sdram_data);
-       sdram_reg = SDRAM_INITPLR11;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_INITPLR11 = 0x%08X\n", sdram_data);
-       sdram_reg = SDRAM_INITPLR12;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_INITPLR12 = 0x%08X", sdram_data);
-       sdram_reg = SDRAM_INITPLR13;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_INITPLR13 = 0x%08X\n", sdram_data);
-       sdram_reg = SDRAM_INITPLR14;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_INITPLR14 = 0x%08X", sdram_data);
-       sdram_reg = SDRAM_INITPLR15;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_INITPLR15 = 0x%08X\n", sdram_data);
-       sdram_reg = SDRAM_RQDC;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_RQDC      = 0x%08X", sdram_data);
-       sdram_reg = SDRAM_RFDC;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_RFDC      = 0x%08X\n", sdram_data);
-       sdram_reg = SDRAM_RDCC;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_RDCC      = 0x%08X", sdram_data);
-       sdram_reg = SDRAM_DLCR;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_DLCR      = 0x%08X\n", sdram_data);
-       sdram_reg = SDRAM_CLKTR;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_CLKTR     = 0x%08X", sdram_data);
-       sdram_reg = SDRAM_WRDTR;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_WRDTR     = 0x%08X\n", sdram_data);
-       sdram_reg = SDRAM_SDTR1;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_SDTR1     = 0x%08X", sdram_data);
-       sdram_reg = SDRAM_SDTR2;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_SDTR2     = 0x%08X\n", sdram_data);
-       sdram_reg = SDRAM_SDTR3;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_SDTR3     = 0x%08X", sdram_data);
-       sdram_reg = SDRAM_MMODE;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_MMODE     = 0x%08X\n", sdram_data);
-       sdram_reg = SDRAM_MEMODE;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_MEMODE    = 0x%08X", sdram_data);
-       sdram_reg = SDRAM_ECCCR;
-       mfsdram(sdram_reg, sdram_data);
-       printf("        SDRAM_ECCCR     = 0x%08X\n\n", sdram_data);
-
-       dcr_data = mfdcr(SDRAM_R0BAS);
-       printf("        MQ0_B0BAS       = 0x%08X", dcr_data);
-       dcr_data = mfdcr(SDRAM_R1BAS);
-       printf("        MQ1_B0BAS       = 0x%08X\n", dcr_data);
-       dcr_data = mfdcr(SDRAM_R2BAS);
-       printf("        MQ2_B0BAS       = 0x%08X", dcr_data);
-       dcr_data = mfdcr(SDRAM_R3BAS);
-       printf("        MQ3_B0BAS       = 0x%08X\n", dcr_data);
-}
-#else /* !defined(DEBUG) */
-static void ppc440sp_sdram_register_dump(void)
-{
-}
-#endif /* defined(DEBUG) */
-#elif defined(CONFIG_405EX)
+#else /* CONFIG_SPD_EEPROM */
+
 /*-----------------------------------------------------------------------------
  * Function:   initdram
  * Description: Configures the PPC405EX(r) DDR1/DDR2 SDRAM memory
@@ -3222,8 +3070,96 @@ phys_size_t initdram(int board_type)
 #if defined(CONFIG_DDR_ECC)
        ecc_init(CFG_SDRAM_BASE, CFG_MBYTES_SDRAM << 20);
 #endif /* defined(CONFIG_DDR_ECC) */
+
+       ppc4xx_ibm_ddr2_register_dump();
 #endif /* !defined(CONFIG_NAND_U_BOOT) || defined(CONFIG_NAND_SPL) */
 
        return (CFG_MBYTES_SDRAM << 20);
 }
-#endif /* defined(CONFIG_SPD_EEPROM) && defined(CONFIG_440SP) || ... */
+#endif /* CONFIG_SPD_EEPROM */
+
+static inline void ppc4xx_ibm_ddr2_register_dump(void)
+{
+#if defined(DEBUG)
+       printf("\nPPC4xx IBM DDR2 Register Dump:\n");
+
+#if (defined(CONFIG_440SP) || defined(CONFIG_440SPE) || \
+     defined(CONFIG_460EX) || defined(CONFIG_460GT))
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(R0BAS);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(R1BAS);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(R2BAS);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(R3BAS);
+#endif /* (defined(CONFIG_440SP) || ... */
+#if defined(CONFIG_405EX)
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(BESR);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(BEARL);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(BEARH);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(WMIRQ);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(PLBOPT);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(PUABA);
+#endif /* defined(CONFIG_405EX) */
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(MB0CF);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(MB1CF);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(MB2CF);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(MB3CF);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(MCSTAT);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(MCOPT1);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(MCOPT2);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(MODT0);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(MODT1);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(MODT2);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(MODT3);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(CODT);
+#if (defined(CONFIG_440SP) || defined(CONFIG_440SPE) ||        \
+     defined(CONFIG_460EX) || defined(CONFIG_460GT))
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(VVPR);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(OPARS);
+       /*
+        * OPART is only used as a trigger register.
+        *
+        * No data is contained in this register, and reading or writing
+        * to is can cause bad things to happen (hangs). Just skip it and
+        * report "N/A".
+        */
+       printf("%20s = N/A\n", "SDRAM_OPART");
+#endif /* defined(CONFIG_440SP) || ... */
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(RTR);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(INITPLR0);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(INITPLR1);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(INITPLR2);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(INITPLR3);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(INITPLR4);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(INITPLR5);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(INITPLR6);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(INITPLR7);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(INITPLR8);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(INITPLR9);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(INITPLR10);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(INITPLR11);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(INITPLR12);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(INITPLR13);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(INITPLR14);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(INITPLR15);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(RQDC);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(RFDC);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(RDCC);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(DLCR);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(CLKTR);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(WRDTR);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(SDTR1);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(SDTR2);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(SDTR3);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(MMODE);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(MEMODE);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(ECCCR);
+#if (defined(CONFIG_440SP) || defined(CONFIG_440SPE) || \
+     defined(CONFIG_460EX) || defined(CONFIG_460GT))
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(CID);
+#endif /* defined(CONFIG_440SP) || ... */
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(RID);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(FCSR);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(RTSR);
+#endif /* defined(DEBUG) */
+}
+
+#endif /* CONFIG_SDRAM_PPC4xx_IBM_DDR2 */
index 4e863dc91187433155c19ff1624e496b00812cf6..8a3833513e2b21512814a8f872190da66840cb1c 100644 (file)
@@ -90,7 +90,6 @@
 #include <405_mal.h>
 #include <miiphy.h>
 #include <malloc.h>
-#include <asm/ppc4xx-intvec.h>
 
 /*
  * Only compile for platform with AMCC EMAC ethernet controller and
  * Defines for MAL/EMAC interrupt conditions as reported in the UIC (Universal
  * Interrupt Controller).
  *-----------------------------------------------------------------------------*/
-#define MAL_UIC_ERR ( UIC_MAL_SERR | UIC_MAL_TXDE  | UIC_MAL_RXDE)
-#define MAL_UIC_DEF  (UIC_MAL_RXEOB | MAL_UIC_ERR)
-#define EMAC_UIC_DEF UIC_ENET
-#define EMAC_UIC_DEF1 UIC_ENET1
-#define SEL_UIC_DEF(p) (p ? UIC_ENET1 : UIC_ENET )
+#define ETH_IRQ_NUM(dev)       (VECNUM_ETH0 + ((dev) * VECNUM_ETH1_OFFS))
+
+#if defined(CONFIG_HAS_ETH3)
+#if !defined(CONFIG_440GX)
+#define UIC_ETHx       (UIC_MASK(ETH_IRQ_NUM(0)) || UIC_MASK(ETH_IRQ_NUM(1)) || \
+                        UIC_MASK(ETH_IRQ_NUM(2)) || UIC_MASK(ETH_IRQ_NUM(3)))
+#else
+/* Unfortunately 440GX spreads EMAC interrupts on multiple UIC's */
+#define UIC_ETHx       (UIC_MASK(ETH_IRQ_NUM(0)) || UIC_MASK(ETH_IRQ_NUM(1)))
+#define UIC_ETHxB      (UIC_MASK(ETH_IRQ_NUM(2)) || UIC_MASK(ETH_IRQ_NUM(3)))
+#endif /* !defined(CONFIG_440GX) */
+#elif defined(CONFIG_HAS_ETH2)
+#define UIC_ETHx       (UIC_MASK(ETH_IRQ_NUM(0)) || UIC_MASK(ETH_IRQ_NUM(1)) || \
+                        UIC_MASK(ETH_IRQ_NUM(2)))
+#elif defined(CONFIG_HAS_ETH1)
+#define UIC_ETHx       (UIC_MASK(ETH_IRQ_NUM(0)) || UIC_MASK(ETH_IRQ_NUM(1)))
+#else
+#define UIC_ETHx       UIC_MASK(ETH_IRQ_NUM(0))
+#endif
+
+/*
+ * Define a default version for UIC_ETHxB for non 440GX so that we can
+ * use common code for all 4xx variants
+ */
+#if !defined(UIC_ETHxB)
+#define UIC_ETHxB      0
+#endif
+
+#define UIC_MAL_SERR   UIC_MASK(VECNUM_MAL_SERR)
+#define UIC_MAL_TXDE   UIC_MASK(VECNUM_MAL_TXDE)
+#define UIC_MAL_RXDE   UIC_MASK(VECNUM_MAL_RXDE)
+#define UIC_MAL_TXEOB  UIC_MASK(VECNUM_MAL_TXEOB)
+#define UIC_MAL_RXEOB  UIC_MASK(VECNUM_MAL_RXEOB)
+
+#define MAL_UIC_ERR    (UIC_MAL_SERR | UIC_MAL_TXDE | UIC_MAL_RXDE)
+#define MAL_UIC_DEF    (UIC_MAL_RXEOB | MAL_UIC_ERR)
+
+/*
+ * We have 3 different interrupt types:
+ * - MAL interrupts indicating successful transfer
+ * - MAL error interrupts indicating MAL related errors
+ * - EMAC interrupts indicating EMAC related errors
+ *
+ * All those interrupts can be on different UIC's, but since
+ * now at least all interrupts from one type are on the same
+ * UIC. Only exception is 440GX where the EMAC interrupts are
+ * spread over two UIC's!
+ */
+#if defined(CONFIG_440GX)
+#define UIC_BASE_MAL   UIC1_DCR_BASE
+#define UIC_BASE_MAL_ERR UIC2_DCR_BASE
+#define UIC_BASE_EMAC  UIC2_DCR_BASE
+#define UIC_BASE_EMAC_B        UIC3_DCR_BASE
+#else
+#define UIC_BASE_MAL   (UIC0_DCR_BASE + (UIC_NR(VECNUM_MAL_TXEOB) * 0x10))
+#define UIC_BASE_MAL_ERR (UIC0_DCR_BASE + (UIC_NR(VECNUM_MAL_SERR) * 0x10))
+#define UIC_BASE_EMAC  (UIC0_DCR_BASE + (UIC_NR(ETH_IRQ_NUM(0)) * 0x10))
+#define UIC_BASE_EMAC_B        (UIC0_DCR_BASE + (UIC_NR(ETH_IRQ_NUM(0)) * 0x10))
+#endif
 
 #undef INFO_4XX_ENET
 
 /*-----------------------------------------------------------------------------+
  * Global variables. TX and RX descriptors and buffers.
  *-----------------------------------------------------------------------------*/
-/* IER globals */
-static uint32_t mal_ier;
-
 #if !defined(CONFIG_NET_MULTI)
 struct eth_device *emac0_dev = NULL;
 #endif
@@ -200,12 +250,6 @@ struct eth_device *emac0_dev = NULL;
 #define CONFIG_EMAC_NR_START   0
 #endif
 
-#if defined(CONFIG_405EX) || defined(CONFIG_440EPX)
-#define ETH_IRQ_NUM(dev)       (VECNUM_ETH0 + ((dev)))
-#else
-#define ETH_IRQ_NUM(dev)       (VECNUM_ETH0 + ((dev) * 2))
-#endif
-
 #define MAL_RX_DESC_SIZE       2048
 #define MAL_TX_DESC_SIZE       2048
 #define MAL_ALLOC_SIZE         (MAL_TX_DESC_SIZE + MAL_RX_DESC_SIZE)
@@ -465,30 +509,88 @@ int ppc_4xx_eth_setup_bridge(int devnum, bd_t * bis)
 #if defined(CONFIG_405EX)
 int ppc_4xx_eth_setup_bridge(int devnum, bd_t * bis)
 {
-       u32 gmiifer = 0;
+       u32 rgmiifer = 0;
 
        /*
-        * Right now only 2*RGMII is supported. Please extend when needed.
-        * sr - 2007-09-19
+        * The 405EX(r)'s RGMII bridge can operate in one of several
+        * modes, only one of which (2 x RGMII) allows the
+        * simultaneous use of both EMACs on the 405EX.
         */
-       switch (1) {
-       case 1:
+
+       switch (CONFIG_EMAC_PHY_MODE) {
+
+       case EMAC_PHY_MODE_NONE:
+               /* No ports */
+               rgmiifer |= RGMII_FER_DIS       << 0;
+               rgmiifer |= RGMII_FER_DIS       << 4;
+               out_be32((void *)RGMII_FER, rgmiifer);
+               bis->bi_phymode[0] = BI_PHYMODE_NONE;
+               bis->bi_phymode[1] = BI_PHYMODE_NONE;
+               break;
+       case EMAC_PHY_MODE_NONE_RGMII:
+               /* 1 x RGMII port on channel 0 */
+               rgmiifer |= RGMII_FER_RGMII     << 0;
+               rgmiifer |= RGMII_FER_DIS       << 4;
+               out_be32((void *)RGMII_FER, rgmiifer);
+               bis->bi_phymode[0] = BI_PHYMODE_RGMII;
+               bis->bi_phymode[1] = BI_PHYMODE_NONE;
+               break;
+       case EMAC_PHY_MODE_RGMII_NONE:
+               /* 1 x RGMII port on channel 1 */
+               rgmiifer |= RGMII_FER_DIS       << 0;
+               rgmiifer |= RGMII_FER_RGMII     << 4;
+               out_be32((void *)RGMII_FER, rgmiifer);
+               bis->bi_phymode[0] = BI_PHYMODE_NONE;
+               bis->bi_phymode[1] = BI_PHYMODE_RGMII;
+               break;
+       case EMAC_PHY_MODE_RGMII_RGMII:
                /* 2 x RGMII ports */
-               out_be32((void *)RGMII_FER, 0x00000055);
+               rgmiifer |= RGMII_FER_RGMII     << 0;
+               rgmiifer |= RGMII_FER_RGMII     << 4;
+               out_be32((void *)RGMII_FER, rgmiifer);
                bis->bi_phymode[0] = BI_PHYMODE_RGMII;
                bis->bi_phymode[1] = BI_PHYMODE_RGMII;
                break;
-       case 2:
-               /* 2 x SMII ports */
+       case EMAC_PHY_MODE_NONE_GMII:
+               /* 1 x GMII port on channel 0 */
+               rgmiifer |= RGMII_FER_GMII      << 0;
+               rgmiifer |= RGMII_FER_DIS       << 4;
+               out_be32((void *)RGMII_FER, rgmiifer);
+               bis->bi_phymode[0] = BI_PHYMODE_GMII;
+               bis->bi_phymode[1] = BI_PHYMODE_NONE;
+               break;
+       case EMAC_PHY_MODE_NONE_MII:
+               /* 1 x MII port on channel 0 */
+               rgmiifer |= RGMII_FER_MII       << 0;
+               rgmiifer |= RGMII_FER_DIS       << 4;
+               out_be32((void *)RGMII_FER, rgmiifer);
+               bis->bi_phymode[0] = BI_PHYMODE_MII;
+               bis->bi_phymode[1] = BI_PHYMODE_NONE;
+               break;
+       case EMAC_PHY_MODE_GMII_NONE:
+               /* 1 x GMII port on channel 1 */
+               rgmiifer |= RGMII_FER_DIS       << 0;
+               rgmiifer |= RGMII_FER_GMII      << 4;
+               out_be32((void *)RGMII_FER, rgmiifer);
+               bis->bi_phymode[0] = BI_PHYMODE_NONE;
+               bis->bi_phymode[1] = BI_PHYMODE_GMII;
+               break;
+       case EMAC_PHY_MODE_MII_NONE:
+               /* 1 x MII port on channel 1 */
+               rgmiifer |= RGMII_FER_DIS       << 0;
+               rgmiifer |= RGMII_FER_MII       << 4;
+               out_be32((void *)RGMII_FER, rgmiifer);
+               bis->bi_phymode[0] = BI_PHYMODE_NONE;
+               bis->bi_phymode[1] = BI_PHYMODE_MII;
                break;
        default:
                break;
        }
 
        /* Ensure we setup mdio for this devnum and ONLY this devnum */
-       gmiifer = in_be32((void *)RGMII_FER);
-       gmiifer |= (1 << (19-devnum));
-       out_be32((void *)RGMII_FER, gmiifer);
+       rgmiifer = in_be32((void *)RGMII_FER);
+       rgmiifer |= (1 << (19-devnum));
+       out_be32((void *)RGMII_FER, rgmiifer);
 
        return ((int)0x0);
 }
@@ -1377,59 +1479,17 @@ static int ppc_4xx_eth_send (struct eth_device *dev, volatile void *ptr,
        }
 }
 
-
-#if defined (CONFIG_440) || defined(CONFIG_405EX)
-
-#if defined(CONFIG_440SP) || defined(CONFIG_440SPE)
-/*
- * Hack: On 440SP all enet irq sources are located on UIC1
- * Needs some cleanup. --sr
- */
-#define UIC0MSR                uic1msr
-#define UIC0SR         uic1sr
-#define UIC1MSR                uic1msr
-#define UIC1SR         uic1sr
-#elif defined(CONFIG_460EX) || defined(CONFIG_460GT)
-/*
- * Hack: On 460EX/GT all enet irq sources are located on UIC2
- * Needs some cleanup. --ag
- */
-#define UIC0MSR                uic2msr
-#define UIC0SR         uic2sr
-#define UIC1MSR                uic2msr
-#define UIC1SR         uic2sr
-#else
-#define UIC0MSR                uic0msr
-#define UIC0SR         uic0sr
-#define UIC1MSR                uic1msr
-#define UIC1SR         uic1sr
-#endif
-
-#if defined(CONFIG_440EPX) || defined(CONFIG_440GRX) || \
-    defined(CONFIG_405EX)
-#define UICMSR_ETHX    uic0msr
-#define UICSR_ETHX     uic0sr
-#elif defined(CONFIG_460EX) || defined(CONFIG_460GT)
-#define UICMSR_ETHX    uic2msr
-#define UICSR_ETHX     uic2sr
-#else
-#define UICMSR_ETHX    uic1msr
-#define UICSR_ETHX     uic1sr
-#endif
-
 int enetInt (struct eth_device *dev)
 {
        int serviced;
        int rc = -1;            /* default to not us */
-       unsigned long mal_isr;
-       unsigned long emac_isr = 0;
-       unsigned long mal_rx_eob;
-       unsigned long my_uic0msr, my_uic1msr;
-       unsigned long my_uicmsr_ethx;
-
-#if defined(CONFIG_440GX)
-       unsigned long my_uic2msr;
-#endif
+       u32 mal_isr;
+       u32 emac_isr = 0;
+       u32 mal_eob;
+       u32 uic_mal;
+       u32 uic_mal_err;
+       u32 uic_emac;
+       u32 uic_emac_b;
        EMAC_4XX_HW_PST hw_p;
 
        /*
@@ -1448,256 +1508,79 @@ int enetInt (struct eth_device *dev)
        do {
                serviced = 0;
 
-               my_uic0msr = mfdcr (UIC0MSR);
-               my_uic1msr = mfdcr (UIC1MSR);
-#if defined(CONFIG_440GX)
-               my_uic2msr = mfdcr (uic2msr);
-#endif
-               my_uicmsr_ethx = mfdcr (UICMSR_ETHX);
+               uic_mal = mfdcr(UIC_BASE_MAL + UIC_MSR);
+               uic_mal_err = mfdcr(UIC_BASE_MAL_ERR + UIC_MSR);
+               uic_emac = mfdcr(UIC_BASE_EMAC + UIC_MSR);
+               uic_emac_b = mfdcr(UIC_BASE_EMAC_B + UIC_MSR);
 
-               if (!(my_uic0msr & (UIC_MRE | UIC_MTE))
-                   && !(my_uic1msr & (UIC_MS | UIC_MTDE | UIC_MRDE))
-                   && !(my_uicmsr_ethx & (UIC_ETH0 | UIC_ETH1))) {
-                       /* not for us */
-                       return (rc);
-               }
-#if defined (CONFIG_440GX)
-               if (!(my_uic0msr & (UIC_MRE | UIC_MTE))
-                   && !(my_uic2msr & (UIC_ETH2 | UIC_ETH3))) {
+               if (!(uic_mal & (UIC_MAL_RXEOB | UIC_MAL_TXEOB))
+                   && !(uic_mal_err & (UIC_MAL_SERR | UIC_MAL_TXDE | UIC_MAL_RXDE))
+                   && !(uic_emac & UIC_ETHx) && !(uic_emac_b & UIC_ETHxB)) {
                        /* not for us */
                        return (rc);
                }
-#endif
+
                /* get and clear controller status interrupts */
-               /* look at Mal and EMAC interrupts */
-               if ((my_uic0msr & (UIC_MRE | UIC_MTE))
-                   || (my_uic1msr & (UIC_MS | UIC_MTDE | UIC_MRDE))) {
-                       /* we have a MAL interrupt */
-                       mal_isr = mfdcr (malesr);
-                       /* look for mal error */
-                       if (my_uic1msr & (UIC_MS | UIC_MTDE | UIC_MRDE)) {
-                               mal_err (dev, mal_isr, my_uic1msr, MAL_UIC_DEF, MAL_UIC_ERR);
-                               serviced = 1;
-                               rc = 0;
-                       }
-               }
+               /* look at MAL and EMAC error interrupts */
+               if (uic_mal_err & (UIC_MAL_SERR | UIC_MAL_TXDE | UIC_MAL_RXDE)) {
+                       /* we have a MAL error interrupt */
+                       mal_isr = mfdcr(malesr);
+                       mal_err(dev, mal_isr, uic_mal_err,
+                                MAL_UIC_DEF, MAL_UIC_ERR);
 
-               /* port by port dispatch of emac interrupts */
-               if (hw_p->devnum == 0) {
-                       if (UIC_ETH0 & my_uicmsr_ethx) {        /* look for EMAC errors */
-                               emac_isr = in_be32((void *)EMAC_ISR + hw_p->hw_addr);
-                               if ((hw_p->emac_ier & emac_isr) != 0) {
-                                       emac_err (dev, emac_isr);
-                                       serviced = 1;
-                                       rc = 0;
-                               }
-                       }
-                       if ((hw_p->emac_ier & emac_isr)
-                           || (my_uic1msr & (UIC_MS | UIC_MTDE | UIC_MRDE))) {
-                               mtdcr (UIC0SR, UIC_MRE | UIC_MTE);      /* Clear */
-                               mtdcr (UIC1SR, UIC_MS | UIC_MTDE | UIC_MRDE);   /* Clear */
-                               mtdcr (UICSR_ETHX, UIC_ETH0); /* Clear */
-                               return (rc);    /* we had errors so get out */
-                       }
-               }
+                       /* clear MAL error interrupt status bits */
+                       mtdcr(UIC_BASE_MAL_ERR + UIC_SR,
+                             UIC_MAL_SERR | UIC_MAL_TXDE | UIC_MAL_RXDE);
 
-#if !defined(CONFIG_440SP)
-               if (hw_p->devnum == 1) {
-                       if (UIC_ETH1 & my_uicmsr_ethx) {        /* look for EMAC errors */
-                               emac_isr = in_be32((void *)EMAC_ISR + hw_p->hw_addr);
-                               if ((hw_p->emac_ier & emac_isr) != 0) {
-                                       emac_err (dev, emac_isr);
-                                       serviced = 1;
-                                       rc = 0;
-                               }
-                       }
-                       if ((hw_p->emac_ier & emac_isr)
-                           || (my_uic1msr & (UIC_MS | UIC_MTDE | UIC_MRDE))) {
-                               mtdcr (UIC0SR, UIC_MRE | UIC_MTE);      /* Clear */
-                               mtdcr (UIC1SR, UIC_MS | UIC_MTDE | UIC_MRDE); /* Clear */
-                               mtdcr (UICSR_ETHX, UIC_ETH1); /* Clear */
-                               return (rc);    /* we had errors so get out */
-                       }
-               }
-#if defined (CONFIG_440GX)
-               if (hw_p->devnum == 2) {
-                       if (UIC_ETH2 & my_uic2msr) {    /* look for EMAC errors */
-                               emac_isr = in_be32((void *)EMAC_ISR + hw_p->hw_addr);
-                               if ((hw_p->emac_ier & emac_isr) != 0) {
-                                       emac_err (dev, emac_isr);
-                                       serviced = 1;
-                                       rc = 0;
-                               }
-                       }
-                       if ((hw_p->emac_ier & emac_isr)
-                           || (my_uic1msr & (UIC_MS | UIC_MTDE | UIC_MRDE))) {
-                               mtdcr (UIC0SR, UIC_MRE | UIC_MTE);      /* Clear */
-                               mtdcr (UIC1SR, UIC_MS | UIC_MTDE | UIC_MRDE);   /* Clear */
-                               mtdcr (uic2sr, UIC_ETH2);
-                               return (rc);    /* we had errors so get out */
-                       }
+                       return -1;
                }
 
-               if (hw_p->devnum == 3) {
-                       if (UIC_ETH3 & my_uic2msr) {    /* look for EMAC errors */
-                               emac_isr = in_be32((void *)EMAC_ISR + hw_p->hw_addr);
-                               if ((hw_p->emac_ier & emac_isr) != 0) {
-                                       emac_err (dev, emac_isr);
-                                       serviced = 1;
-                                       rc = 0;
-                               }
-                       }
-                       if ((hw_p->emac_ier & emac_isr)
-                           || (my_uic1msr & (UIC_MS | UIC_MTDE | UIC_MRDE))) {
-                               mtdcr (UIC0SR, UIC_MRE | UIC_MTE);      /* Clear */
-                               mtdcr (UIC1SR, UIC_MS | UIC_MTDE | UIC_MRDE);   /* Clear */
-                               mtdcr (uic2sr, UIC_ETH3);
-                               return (rc);    /* we had errors so get out */
-                       }
-               }
-#endif /* CONFIG_440GX */
-#endif /* !CONFIG_440SP */
+               /* look for EMAC errors */
+               if ((uic_emac & UIC_ETHx) || (uic_emac_b & UIC_ETHxB)) {
+                       emac_isr = in_be32((void *)EMAC_ISR + hw_p->hw_addr);
+                       emac_err(dev, emac_isr);
 
-               /* handle MAX TX EOB interrupt from a tx */
-               if (my_uic0msr & UIC_MTE) {
-                       mal_rx_eob = mfdcr (maltxeobisr);
-                       mtdcr (maltxeobisr, mal_rx_eob);
-                       mtdcr (UIC0SR, UIC_MTE);
-               }
-               /* handle MAL RX EOB  interupt from a receive */
-               /* check for EOB on valid channels            */
-               if (my_uic0msr & UIC_MRE) {
-                       mal_rx_eob = mfdcr (malrxeobisr);
-                       if ((mal_rx_eob &
-                            (0x80000000 >> (hw_p->devnum * MAL_RX_CHAN_MUL)))
-                           != 0) { /* call emac routine for channel x */
-                               /* clear EOB
-                                  mtdcr(malrxeobisr, mal_rx_eob); */
-                               enet_rcv (dev, emac_isr);
-                               /* indicate that we serviced an interrupt */
-                               serviced = 1;
-                               rc = 0;
-                       }
-               }
+                       /* clear EMAC error interrupt status bits */
+                       mtdcr(UIC_BASE_EMAC + UIC_SR, UIC_ETHx);
+                       mtdcr(UIC_BASE_EMAC_B + UIC_SR, UIC_ETHxB);
 
-               mtdcr (UIC0SR, UIC_MRE);        /* Clear */
-               mtdcr (UIC1SR, UIC_MS | UIC_MTDE | UIC_MRDE);   /* Clear */
-               switch (hw_p->devnum) {
-               case 0:
-                       mtdcr (UICSR_ETHX, UIC_ETH0);
-                       break;
-               case 1:
-                       mtdcr (UICSR_ETHX, UIC_ETH1);
-                       break;
-#if defined (CONFIG_440GX)
-               case 2:
-                       mtdcr (uic2sr, UIC_ETH2);
-                       break;
-               case 3:
-                       mtdcr (uic2sr, UIC_ETH3);
-                       break;
-#endif /* CONFIG_440GX */
-               default:
-                       break;
+                       return -1;
                }
-       } while (serviced);
-
-       return (rc);
-}
-
-#else /* CONFIG_440 */
-
-int enetInt (struct eth_device *dev)
-{
-       int serviced;
-       int rc = -1;            /* default to not us */
-       unsigned long mal_isr;
-       unsigned long emac_isr = 0;
-       unsigned long mal_rx_eob;
-       unsigned long my_uicmsr;
-
-       EMAC_4XX_HW_PST hw_p;
-
-       /*
-        * Because the mal is generic, we need to get the current
-        * eth device
-        */
-#if defined(CONFIG_NET_MULTI)
-       dev = eth_get_dev();
-#else
-       dev = emac0_dev;
-#endif
-
-       hw_p = dev->priv;
-
-       /* enter loop that stays in interrupt code until nothing to service */
-       do {
-               serviced = 0;
 
-               my_uicmsr = mfdcr (uicmsr);
-
-               if ((my_uicmsr & (MAL_UIC_DEF | EMAC_UIC_DEF)) == 0) {  /* not for us */
-                       return (rc);
-               }
-               /* get and clear controller status interrupts */
-               /* look at Mal and EMAC interrupts */
-               if ((MAL_UIC_DEF & my_uicmsr) != 0) {   /* we have a MAL interrupt */
-                       mal_isr = mfdcr (malesr);
-                       /* look for mal error */
-                       if ((my_uicmsr & MAL_UIC_ERR) != 0) {
-                               mal_err (dev, mal_isr, my_uicmsr, MAL_UIC_DEF, MAL_UIC_ERR);
-                               serviced = 1;
-                               rc = 0;
-                       }
+               /* handle MAX TX EOB interrupt from a tx */
+               if (uic_mal & UIC_MAL_TXEOB) {
+                       /* clear MAL interrupt status bits */
+                       mal_eob = mfdcr(maltxeobisr);
+                       mtdcr(maltxeobisr, mal_eob);
+                       mtdcr(UIC_BASE_MAL + UIC_SR, UIC_MAL_TXEOB);
+
+                       /* indicate that we serviced an interrupt */
+                       serviced = 1;
+                       rc = 0;
                }
 
-               /* port by port dispatch of emac interrupts */
+               /* handle MAL RX EOB interupt from a receive */
+               /* check for EOB on valid channels           */
+               if (uic_mal & UIC_MAL_RXEOB) {
+                       mal_eob = mfdcr(malrxeobisr);
+                       if (mal_eob &
+                           (0x80000000 >> (hw_p->devnum * MAL_RX_CHAN_MUL))) {
+                               /* push packet to upper layer */
+                               enet_rcv(dev, emac_isr);
 
-               if ((SEL_UIC_DEF(hw_p->devnum) & my_uicmsr) != 0) {     /* look for EMAC errors */
-                       emac_isr = in_be32((void *)EMAC_ISR + hw_p->hw_addr);
-                       if ((hw_p->emac_ier & emac_isr) != 0) {
-                               emac_err (dev, emac_isr);
-                               serviced = 1;
-                               rc = 0;
-                       }
-               }
-               if (((hw_p->emac_ier & emac_isr) != 0) || ((MAL_UIC_ERR & my_uicmsr) != 0)) {
-                       mtdcr (uicsr, MAL_UIC_DEF | SEL_UIC_DEF(hw_p->devnum)); /* Clear */
-                       return (rc);            /* we had errors so get out */
-               }
+                               /* clear MAL interrupt status bits */
+                               mtdcr(UIC_BASE_MAL + UIC_SR, UIC_MAL_RXEOB);
 
-               /* handle MAX TX EOB interrupt from a tx */
-               if (my_uicmsr & UIC_MAL_TXEOB) {
-                       mal_rx_eob = mfdcr (maltxeobisr);
-                       mtdcr (maltxeobisr, mal_rx_eob);
-                       mtdcr (uicsr, UIC_MAL_TXEOB);
-               }
-               /* handle MAL RX EOB  interupt from a receive */
-               /* check for EOB on valid channels            */
-               if (my_uicmsr & UIC_MAL_RXEOB)
-               {
-                       mal_rx_eob = mfdcr (malrxeobisr);
-                       if ((mal_rx_eob & (0x80000000 >> hw_p->devnum)) != 0) { /* call emac routine for channel x */
-                               /* clear EOB
-                                mtdcr(malrxeobisr, mal_rx_eob); */
-                               enet_rcv (dev, emac_isr);
                                /* indicate that we serviced an interrupt */
                                serviced = 1;
                                rc = 0;
                        }
                }
-               mtdcr (uicsr, MAL_UIC_DEF|EMAC_UIC_DEF|EMAC_UIC_DEF1);  /* Clear */
-#if defined(CONFIG_405EZ)
-               mtsdr (sdricintstat, SDR_ICRX_STAT | SDR_ICTX0_STAT | SDR_ICTX1_STAT);
-#endif /* defined(CONFIG_405EZ) */
-       }
-       while (serviced);
+       } while (serviced);
 
        return (rc);
 }
 
-#endif /* CONFIG_440 */
-
 /*-----------------------------------------------------------------------------+
  *  MAL Error Routine
  *-----------------------------------------------------------------------------*/
@@ -1883,6 +1766,7 @@ int ppc_4xx_eth_initialize (bd_t * bis)
        EMAC_4XX_HW_PST hw = NULL;
        u8 ethaddr[4 + CONFIG_EMAC_NR_START][6];
        u32 hw_addr[4];
+       u32 mal_ier;
 
 #if defined(CONFIG_440GX)
        unsigned long pfc1;
@@ -2020,19 +1904,19 @@ int ppc_4xx_eth_initialize (bd_t * bis)
                        mtdcr (malier, mal_ier);
 
                        /* install MAL interrupt handler */
-                       irq_install_handler (VECNUM_MS,
+                       irq_install_handler (VECNUM_MAL_SERR,
                                             (interrupt_handler_t *) enetInt,
                                             dev);
-                       irq_install_handler (VECNUM_MTE,
+                       irq_install_handler (VECNUM_MAL_TXEOB,
                                             (interrupt_handler_t *) enetInt,
                                             dev);
-                       irq_install_handler (VECNUM_MRE,
+                       irq_install_handler (VECNUM_MAL_RXEOB,
                                             (interrupt_handler_t *) enetInt,
                                             dev);
-                       irq_install_handler (VECNUM_TXDE,
+                       irq_install_handler (VECNUM_MAL_TXDE,
                                             (interrupt_handler_t *) enetInt,
                                             dev);
-                       irq_install_handler (VECNUM_RXDE,
+                       irq_install_handler (VECNUM_MAL_RXDE,
                                             (interrupt_handler_t *) enetInt,
                                             dev);
                        virgin = 1;
index a7587d4351fa1773926006827ef707d9214166f2..766e586808b69fab138472b0c4c313492d05e9db 100644 (file)
@@ -46,7 +46,7 @@
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <watchdog.h>
-#include <asm/ppc4xx-intvec.h>
+#include <ppc4xx.h>
 
 #ifdef CONFIG_SERIAL_MULTI
 #include <serial.h>
index 800bb41d01463b1ae4956debcf80f118c57408e8..c773400a5deb996a208596f63371215b55f5ba82 100644 (file)
@@ -35,10 +35,8 @@ SOBJS        += kgdb.o
 COBJS  := 40x_spd_sdram.o
 COBJS  += 44x_spd_ddr.o
 COBJS  += 44x_spd_ddr2.o
-COBJS  += 4xx_enet.o
 COBJS  += 4xx_pci.o
 COBJS  += 4xx_pcie.o
-COBJS  += 4xx_uart.o
 COBJS  += bedbug_405.o
 COBJS  += commproc.o
 COBJS  += cpu.o
@@ -47,11 +45,9 @@ COBJS        += denali_data_eye.o
 COBJS  += denali_spd_ddr2.o
 COBJS  += ecc.o
 COBJS  += fdt.o
-COBJS  += gpio.o
 COBJS  += i2c.o
 COBJS  += interrupts.o
 COBJS  += iop480_uart.o
-COBJS  += miiphy.o
 COBJS  += ndfc.o
 COBJS  += sdram.o
 COBJS  += speed.o
@@ -60,6 +56,15 @@ COBJS        += traps.o
 COBJS  += usb.o
 COBJS  += usb_ohci.o
 COBJS  += usbdev.o
+ifndef CONFIG_XILINX_440
+COBJS  += 4xx_enet.o
+COBJS  += 4xx_uart.o
+COBJS  += gpio.o
+COBJS  += miiphy.o
+COBJS  += uic.o
+else
+COBJS  += xilinx_irq.o
+endif
 
 SRCS   := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS))
index 39f439df9881dabc3d85196bc9892cf87c919009..bc9335a05ea71a617c4bce2b6d163b4a79416625 100644 (file)
@@ -184,6 +184,19 @@ static char *bootstrap_str[] = {
 static char bootstrap_char[] = { 'A', 'B', 'C', 'D', 'E', 'G', 'F', 'H' };
 #endif
 
+#if defined(CONFIG_460SX)
+#define SDR0_PINSTP_SHIFT      29
+static char *bootstrap_str[] = {
+       "EBC (8 bits)",
+       "EBC (16 bits)",
+       "EBC (32 bits)",
+       "NAND (8 bits)",
+       "I2C (Addr 0x54)",      /* A8 */
+       "I2C (Addr 0x52)",      /* A4 */
+};
+static char bootstrap_char[] = { 'A', 'B', 'C', 'D', 'E', 'G' };
+#endif
+
 #if defined(CONFIG_405EZ)
 #define SDR0_PINSTP_SHIFT      28
 static char *bootstrap_str[] = {
@@ -266,7 +279,11 @@ int checkcpu (void)
 
        get_sys_info(&sys_info);
 
+#if defined(CONFIG_XILINX_440)
+       puts("IBM PowerPC 4");
+#else
        puts("AMCC PowerPC 4");
+#endif
 
 #if defined(CONFIG_405GP) || defined(CONFIG_405CR) || \
     defined(CONFIG_405EP) || defined(CONFIG_405EZ) || \
@@ -509,6 +526,30 @@ int checkcpu (void)
                strcpy(addstr, "Security/Kasumi support");
                break;
 
+       case PVR_460SX_RA:
+               puts("SX Rev. A");
+               strcpy(addstr, "Security support");
+               break;
+
+       case PVR_460SX_RA_V1:
+               puts("SX Rev. A");
+               strcpy(addstr, "No Security support");
+               break;
+
+       case PVR_460GX_RA:
+               puts("GX Rev. A");
+               strcpy(addstr, "Security support");
+               break;
+
+       case PVR_460GX_RA_V1:
+               puts("GX Rev. A");
+               strcpy(addstr, "No Security support");
+               break;
+
+       case PVR_VIRTEX5:
+               puts("x5 VIRTEX5");
+               break;
+
        default:
                printf (" UNKNOWN (PVR=%08x)", pvr);
                break;
index ac6427905161809ca8b733cbfc13cccc0c3d5695..e2d04027815a8e44b430ce2f17764ad78bb8ddd7 100644 (file)
@@ -138,9 +138,10 @@ void reconfigure_pll(u32 new_cpu_freq)
 void
 cpu_init_f (void)
 {
-#if defined(CONFIG_WATCHDOG) || defined(CONFIG_460EX)
+#if defined(CONFIG_WATCHDOG) || defined(CONFIG_440GX) || defined(CONFIG_460EX)
        u32 val;
 #endif
+
        reconfigure_pll(CFG_PLL_RECONFIG);
 
 #if (defined(CONFIG_405EP) || defined (CONFIG_405EX)) && !defined(CFG_4xx_GPIO_TABLE)
@@ -273,6 +274,18 @@ cpu_init_f (void)
        reset_4xx_watchdog();
 #endif /* CONFIG_WATCHDOG */
 
+#if defined(CONFIG_440GX)
+       /* Take the GX out of compatibility mode
+        * Travis Sawyer, 9 Mar 2004
+        * NOTE: 440gx user manual inconsistency here
+        *       Compatibility mode and Ethernet Clock select are not
+        *       correct in the manual
+        */
+       mfsdr(sdr_mfr, val);
+       val &= ~0x10000000;
+       mtsdr(sdr_mfr,val);
+#endif /* CONFIG_440GX */
+
 #if defined(CONFIG_460EX)
        /*
         * Set SDR0_AHB_CFG[A2P_INCR4] (bit 24) and
index 8620e2b48476da48b2ad97f905f1ef9cd562f2a7..494bd8c9ef9573b8319a9be3c308c5d8112d23df 100644 (file)
@@ -8,6 +8,10 @@
  * (C) Copyright 2003 (440GX port)
  * Travis B. Sawyer, Sandburst Corporation, tsawyer@sandburst.com
  *
+ * (C) Copyright 2008 (PPC440X05 port for Virtex 5 FX)
+ * Ricardo Ribalda-Universidad Autonoma de Madrid-ricardo.ribalda@uam.es
+ * Work supported by Qtechnology (htpp://qtec.com)
+ *
  * See file CREDITS for list of people who contributed to this
  * project.
  *
 #include <watchdog.h>
 #include <command.h>
 #include <asm/processor.h>
+#include <asm/interrupt.h>
 #include <ppc4xx.h>
 #include <ppc_asm.tmpl>
 #include <commproc.h>
-#include <asm/ppc4xx-intvec.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
-/*
- * Define the number of UIC's
- */
-#if defined(CONFIG_440SPE) || \
-    defined(CONFIG_460EX) || defined(CONFIG_460GT)
-#define UIC_MAX                4
-#elif defined(CONFIG_440GX) || \
-    defined(CONFIG_440EPX) || defined(CONFIG_440GRX) || \
-    defined(CONFIG_405EX)
-#define UIC_MAX                3
-#elif defined(CONFIG_440GP) || defined(CONFIG_440SP) || \
-    defined(CONFIG_440EP) || defined(CONFIG_440GR)
-#define UIC_MAX                2
-#else
-#define UIC_MAX                1
-#endif
-
 /*
  * CPM interrupt vector functions.
  */
@@ -63,15 +50,7 @@ struct       irq_action {
        void *arg;
        int count;
 };
-
-static struct irq_action irq_vecs[UIC_MAX * 32];
-
-u32 get_dcr(u16);
-void set_dcr(u16, u32);
-
-#if (UIC_MAX > 1) && !defined(CONFIG_440GX)
-static void uic_cascade_interrupt(void *para);
-#endif
+static struct irq_action irq_vecs[IRQ_MAX];
 
 #if defined(CONFIG_440)
 
@@ -112,7 +91,7 @@ int interrupt_init_cpu (unsigned *decrementer_count)
        /*
         * Mark all irqs as free
         */
-       for (vec = 0; vec < (UIC_MAX * 32); vec++) {
+       for (vec = 0; vec < IRQ_MAX; vec++) {
                irq_vecs[vec].handler = NULL;
                irq_vecs[vec].arg = NULL;
                irq_vecs[vec].count = 0;
@@ -156,160 +135,38 @@ int interrupt_init_cpu (unsigned *decrementer_count)
         */
        set_evpr(0x00000000);
 
-#if !defined(CONFIG_440GX)
-#if (UIC_MAX > 1)
-       /* Install the UIC1 handlers */
-       irq_install_handler(VECNUM_UIC1NC, uic_cascade_interrupt, 0);
-       irq_install_handler(VECNUM_UIC1C, uic_cascade_interrupt, 0);
-#endif
-#if (UIC_MAX > 2)
-       irq_install_handler(VECNUM_UIC2NC, uic_cascade_interrupt, 0);
-       irq_install_handler(VECNUM_UIC2C, uic_cascade_interrupt, 0);
-#endif
-#if (UIC_MAX > 3)
-       irq_install_handler(VECNUM_UIC3NC, uic_cascade_interrupt, 0);
-       irq_install_handler(VECNUM_UIC3C, uic_cascade_interrupt, 0);
-#endif
-#else /* !defined(CONFIG_440GX) */
-       /* Take the GX out of compatibility mode
-        * Travis Sawyer, 9 Mar 2004
-        * NOTE: 440gx user manual inconsistency here
-        *       Compatibility mode and Ethernet Clock select are not
-        *       correct in the manual
+       /*
+        * Call uic or xilinx_irq pic_enable
         */
-       mfsdr(sdr_mfr, val);
-       val &= ~0x10000000;
-       mtsdr(sdr_mfr,val);
-
-       /* Enable UIC interrupts via UIC Base Enable Register */
-       mtdcr(uicb0sr, UICB0_ALL);
-       mtdcr(uicb0er, 0x54000000);
-       /* None are critical */
-       mtdcr(uicb0cr, 0);
-#endif /* !defined(CONFIG_440GX) */
+       pic_enable();
 
        return (0);
 }
 
-/* Handler for UIC interrupt */
-static void uic_interrupt(u32 uic_base, int vec_base)
+void timer_interrupt_cpu(struct pt_regs *regs)
 {
-       u32 uic_msr;
-       u32 msr_shift;
-       int vec;
-
-       /*
-        * Read masked interrupt status register to determine interrupt source
-        */
-       uic_msr = get_dcr(uic_base + UIC_MSR);
-       msr_shift = uic_msr;
-       vec = vec_base;
-
-       while (msr_shift != 0) {
-               if (msr_shift & 0x80000000) {
-                       /*
-                        * Increment irq counter (for debug purpose only)
-                        */
-                       irq_vecs[vec].count++;
-
-                       if (irq_vecs[vec].handler != NULL) {
-                               /* call isr */
-                               (*irq_vecs[vec].handler)(irq_vecs[vec].arg);
-                       } else {
-                               set_dcr(uic_base + UIC_ER,
-                                       get_dcr(uic_base + UIC_ER) &
-                                       ~(0x80000000 >> (vec & 0x1f)));
-                               printf("Masking bogus interrupt vector %d"
-                                      " (UIC_BASE=0x%x)\n", vec, uic_base);
-                       }
-
-                       /*
-                        * After servicing the interrupt, we have to remove the
-                        * status indicator
-                        */
-                       set_dcr(uic_base + UIC_SR, (0x80000000 >> (vec & 0x1f)));
-               }
-
-               /*
-                * Shift msr to next position and increment vector
-                */
-               msr_shift <<= 1;
-               vec++;
-       }
+       /* nothing to do here */
+       return;
 }
 
-#if (UIC_MAX > 1) && !defined(CONFIG_440GX)
-static void uic_cascade_interrupt(void *para)
+void interrupt_run_handler(int vec)
 {
-       external_interrupt(para);
-}
-#endif
-
-#if defined(CONFIG_440)
-#if defined(CONFIG_440GX)
-/* 440GX uses base uic register */
-#define UIC_BMSR       uicb0msr
-#define UIC_BSR                uicb0sr
-#else
-#define UIC_BMSR       uic0msr
-#define UIC_BSR                uic0sr
-#endif
-#else /* CONFIG_440 */
-#define UIC_BMSR       uicmsr
-#define UIC_BSR                uicsr
-#endif /* CONFIG_440 */
-
-/*
- * Handle external interrupts
- */
-void external_interrupt(struct pt_regs *regs)
-{
-       u32 uic_msr;
-
-       /*
-        * Read masked interrupt status register to determine interrupt source
-        */
-       uic_msr = mfdcr(UIC_BMSR);
-
-#if (UIC_MAX > 1)
-       if ((UICB0_UIC1CI & uic_msr) || (UICB0_UIC1NCI & uic_msr))
-               uic_interrupt(UIC1_DCR_BASE, 32);
-#endif
-
-#if (UIC_MAX > 2)
-       if ((UICB0_UIC2CI & uic_msr) || (UICB0_UIC2NCI & uic_msr))
-               uic_interrupt(UIC2_DCR_BASE, 64);
-#endif
-
-#if (UIC_MAX > 3)
-       if ((UICB0_UIC3CI & uic_msr) || (UICB0_UIC3NCI & uic_msr))
-               uic_interrupt(UIC3_DCR_BASE, 96);
-#endif
-
-#if defined(CONFIG_440)
-#if !defined(CONFIG_440GX)
-       if (uic_msr & ~(UICB0_ALL))
-               uic_interrupt(UIC0_DCR_BASE, 0);
-#else
-       if ((UICB0_UIC0CI & uic_msr) || (UICB0_UIC0NCI & uic_msr))
-               uic_interrupt(UIC0_DCR_BASE, 0);
-#endif
-#else /* CONFIG_440 */
-       uic_interrupt(UIC0_DCR_BASE, 0);
-#endif /* CONFIG_440 */
-
-       mtdcr(UIC_BSR, uic_msr);
+       irq_vecs[vec].count++;
+
+       if (irq_vecs[vec].handler != NULL) {
+               /* call isr */
+               (*irq_vecs[vec].handler) (irq_vecs[vec].arg);
+       } else {
+               pic_irq_disable(vec);
+               printf("Masking bogus interrupt vector %d\n", vec);
+       }
 
+       pic_irq_ack(vec);
        return;
 }
 
-/*
- * Install and free a interrupt handler.
- */
 void irq_install_handler(int vec, interrupt_handler_t * handler, void *arg)
 {
-       int i;
-
        /*
         * Print warning when replacing with a different irq vector
         */
@@ -320,55 +177,19 @@ void irq_install_handler(int vec, interrupt_handler_t * handler, void *arg)
        irq_vecs[vec].handler = handler;
        irq_vecs[vec].arg = arg;
 
-       i = vec & 0x1f;
-       if ((vec >= 0) && (vec < 32))
-               mtdcr(uicer, mfdcr(uicer) | (0x80000000 >> i));
-#if (UIC_MAX > 1)
-       else if ((vec >= 32) && (vec < 64))
-               mtdcr(uic1er, mfdcr(uic1er) | (0x80000000 >> i));
-#endif
-#if (UIC_MAX > 2)
-       else if ((vec >= 64) && (vec < 96))
-               mtdcr(uic2er, mfdcr(uic2er) | (0x80000000 >> i));
-#endif
-#if (UIC_MAX > 3)
-       else if (vec >= 96)
-               mtdcr(uic3er, mfdcr(uic3er) | (0x80000000 >> i));
-#endif
-
-       debug("Install interrupt for vector %d ==> %p\n", vec, handler);
+       pic_irq_enable(vec);
+       return;
 }
 
-void irq_free_handler (int vec)
+void irq_free_handler(int vec)
 {
-       int i;
-
        debug("Free interrupt for vector %d ==> %p\n",
              vec, irq_vecs[vec].handler);
 
-       i = vec & 0x1f;
-       if ((vec >= 0) && (vec < 32))
-               mtdcr(uicer, mfdcr(uicer) & ~(0x80000000 >> i));
-#if (UIC_MAX > 1)
-       else if ((vec >= 32) && (vec < 64))
-               mtdcr(uic1er, mfdcr(uic1er) & ~(0x80000000 >> i));
-#endif
-#if (UIC_MAX > 2)
-       else if ((vec >= 64) && (vec < 96))
-               mtdcr(uic2er, mfdcr(uic2er) & ~(0x80000000 >> i));
-#endif
-#if (UIC_MAX > 3)
-       else if (vec >= 96)
-               mtdcr(uic3er, mfdcr(uic3er) & ~(0x80000000 >> i));
-#endif
+       pic_irq_disable(vec);
 
        irq_vecs[vec].handler = NULL;
        irq_vecs[vec].arg = NULL;
-}
-
-void timer_interrupt_cpu (struct pt_regs *regs)
-{
-       /* nothing to do here */
        return;
 }
 
@@ -380,7 +201,7 @@ int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        printf ("Interrupt-Information:\n");
        printf ("Nr  Routine   Arg       Count\n");
 
-       for (vec = 0; vec < (UIC_MAX * 32); vec++) {
+       for (vec = 0; vec < IRQ_MAX; vec++) {
                if (irq_vecs[vec].handler != NULL) {
                        printf ("%02d  %08lx  %08lx  %d\n",
                                vec,
index 3af0767c552c47a63bac663c84ff1418ad566b45..0e3423f7abba2a9015cc4c0ebc49b32063795211 100644 (file)
@@ -26,7 +26,6 @@
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <watchdog.h>
-#include <asm/ppc4xx-intvec.h>
 
 #ifdef CONFIG_SERIAL_MULTI
 #include <serial.h>
index 4f083d95bc10e63ea67e545866f932105f35fb19..72acfd01b5e6f685fc02fdfbfd5ebcad1a241605 100644 (file)
@@ -31,7 +31,7 @@
 
 #include <common.h>
 
-#if defined(CONFIG_CMD_NAND) && !defined(CFG_NAND_LEGACY) && \
+#if defined(CONFIG_CMD_NAND) && !defined(CONFIG_NAND_LEGACY) && \
        (defined(CONFIG_440EP) || defined(CONFIG_440GR) ||           \
         defined(CONFIG_440EPX) || defined(CONFIG_440GRX) ||         \
         defined(CONFIG_405EZ) || defined(CONFIG_405EX) ||           \
index 34bd7214e727e89db6ed3d15bcf1f19e8ec09598..d21bd82dc6f43abf0bcbe0d68dda90131cb979da 100644 (file)
@@ -205,7 +205,8 @@ ulong get_PCI_freq (void)
 
 #elif defined(CONFIG_440)
 
-#if defined(CONFIG_460EX) || defined(CONFIG_460GT)
+#if defined(CONFIG_460EX) || defined(CONFIG_460GT) || \
+    defined(CONFIG_460SX)
 static u8 pll_fwdv_multi_bits[] = {
        /* values for:  1 - 16 */
        0x00, 0x01, 0x0f, 0x04, 0x09, 0x0a, 0x0d, 0x0e, 0x03, 0x0c,
@@ -415,7 +416,8 @@ ulong get_PCI_freq (void)
        return sys_info.freqPCI;
 }
 
-#elif !defined(CONFIG_440GX) && !defined(CONFIG_440SP) && !defined(CONFIG_440SPE)
+#elif !defined(CONFIG_440GX) && !defined(CONFIG_440SP) && !defined(CONFIG_440SPE) \
+       && !defined(CONFIG_XILINX_440)
 void get_sys_info (sys_info_t * sysInfo)
 {
        unsigned long strp0;
@@ -448,6 +450,8 @@ void get_sys_info (sys_info_t * sysInfo)
        sysInfo->freqUART = sysInfo->freqPLB;
 }
 #else
+
+#if !defined(CONFIG_XILINX_440)
 void get_sys_info (sys_info_t * sysInfo)
 {
        unsigned long strp0;
@@ -534,6 +538,7 @@ void get_sys_info (sys_info_t * sysInfo)
 }
 
 #endif
+#endif /* CONFIG_XILINX_440 */
 
 #if defined(CONFIG_YUCCA)
 unsigned long determine_sysper(void)
index 426bf3c6f9a966b21917e4d2348b56dfc5b3c9cf..97411bdb9d13a1127d0215f1f21ca2dc196d38a8 100644 (file)
@@ -677,7 +677,8 @@ _start:
        /* not all PPC's have internal SRAM usable as L2-cache */
 #if defined(CONFIG_440GX) || \
     defined(CONFIG_440SP) || defined(CONFIG_440SPE) || \
-    defined(CONFIG_460EX) || defined(CONFIG_460GT)
+    defined(CONFIG_460EX) || defined(CONFIG_460GT) || \
+    defined(CONFIG_460SX)
        mtdcr   l2_cache_cfg,r0         /* Ensure L2 Cache is off */
 #endif
 
@@ -720,6 +721,19 @@ _start:
        lis     r1,0x4000               /* BAS = 8000_0000 */
        ori     r1,r1,0x4580            /* 16k */
        mtdcr   isram0_sb0cr,r1
+#elif defined(CONFIG_460SX)
+       lis     r1,0x0000               /* BAS = 0000_0000 */
+       ori     r1,r1,0x0B84            /* first 128k */
+       mtdcr   isram0_sb0cr,r1
+       lis     r1,0x0001
+       ori     r1,r1,0x0B84            /* second 128k */
+       mtdcr   isram0_sb1cr,r1
+       lis     r1, 0x0002
+       ori     r1,r1, 0x0B84           /* third 128k */
+       mtdcr   isram0_sb2cr,r1
+       lis     r1, 0x0003
+       ori     r1,r1, 0x0B84           /* fourth 128k */
+       mtdcr   isram0_sb3cr,r1
 #elif defined(CONFIG_440GP)
        ori     r1,r1,0x0380            /* 8k rw */
        mtdcr   isram0_sb0cr,r1
@@ -1415,7 +1429,8 @@ relocate_code:
 #if defined(CONFIG_440EP) || defined(CONFIG_440GR) || \
     defined(CONFIG_440EPX) || defined(CONFIG_440GRX) || \
     defined(CONFIG_440SP) || defined(CONFIG_440SPE) || \
-    defined(CONFIG_460EX) || defined(CONFIG_460GT)
+    defined(CONFIG_460EX) || defined(CONFIG_460GT) || \
+    defined(CONFIG_460SX)
        /*
         * On some 440er platforms the cache is enabled in the first TLB (Boot-CS)
         * to speed up the boot process. Now this cache needs to be disabled.
diff --git a/cpu/ppc4xx/uic.c b/cpu/ppc4xx/uic.c
new file mode 100644 (file)
index 0000000..7944c6c
--- /dev/null
@@ -0,0 +1,180 @@
+/*
+ * (C) Copyright 2000-2002
+ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+ *
+ * (C) Copyright 2002 (440 port)
+ * Scott McNutt, Artesyn Communication Producs, smcnutt@artsyncp.com
+ *
+ * (C) Copyright 2003 (440GX port)
+ * Travis B. Sawyer, Sandburst Corporation, tsawyer@sandburst.com
+ *
+ * (C) Copyright 2008 (PPC440X05 port for Virtex 5 FX)
+ * Ricardo Ribalda-Universidad Autonoma de Madrid-ricardo.ribalda@uam.es
+ * Work supported by Qtechnology (htpp://qtec.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 <watchdog.h>
+#include <command.h>
+#include <asm/processor.h>
+#include <asm/interrupt.h>
+#include <ppc4xx.h>
+#include <ppc_asm.tmpl>
+#include <commproc.h>
+
+#if (UIC_MAX > 3)
+#define UICB0_ALL      (UIC_MASK(VECNUM_UIC1CI) | UIC_MASK(VECNUM_UIC1NCI) | \
+                        UIC_MASK(VECNUM_UIC2CI) | UIC_MASK(VECNUM_UIC2NCI) | \
+                        UIC_MASK(VECNUM_UIC3CI) | UIC_MASK(VECNUM_UIC3NCI))
+#elif (UIC_MAX > 2)
+#define UICB0_ALL      (UIC_MASK(VECNUM_UIC1CI) | UIC_MASK(VECNUM_UIC1NCI) | \
+                        UIC_MASK(VECNUM_UIC2CI) | UIC_MASK(VECNUM_UIC2NCI))
+#elif (UIC_MAX > 1)
+#define UICB0_ALL      (UIC_MASK(VECNUM_UIC1CI) | UIC_MASK(VECNUM_UIC1NCI))
+#else
+#define UICB0_ALL      0
+#endif
+
+u32 get_dcr(u16);
+
+DECLARE_GLOBAL_DATA_PTR;
+
+void pic_enable(void)
+{
+#if (UIC_MAX > 1)
+       /* Install the UIC1 handlers */
+       irq_install_handler(VECNUM_UIC1NCI, (void *)(void *)external_interrupt, 0);
+       irq_install_handler(VECNUM_UIC1CI, (void *)(void *)external_interrupt, 0);
+#endif
+#if (UIC_MAX > 2)
+       irq_install_handler(VECNUM_UIC2NCI, (void *)(void *)external_interrupt, 0);
+       irq_install_handler(VECNUM_UIC2CI, (void *)(void *)external_interrupt, 0);
+#endif
+#if (UIC_MAX > 3)
+       irq_install_handler(VECNUM_UIC3NCI, (void *)(void *)external_interrupt, 0);
+       irq_install_handler(VECNUM_UIC3CI, (void *)(void *)external_interrupt, 0);
+#endif
+}
+
+/* Handler for UIC interrupt */
+static void uic_interrupt(u32 uic_base, int vec_base)
+{
+       u32 uic_msr;
+       u32 msr_shift;
+       int vec;
+
+       /*
+        * Read masked interrupt status register to determine interrupt source
+        */
+       uic_msr = get_dcr(uic_base + UIC_MSR);
+       msr_shift = uic_msr;
+       vec = vec_base;
+
+       while (msr_shift != 0) {
+               if (msr_shift & 0x80000000)
+                       interrupt_run_handler(vec);
+               /*
+                * Shift msr to next position and increment vector
+                */
+               msr_shift <<= 1;
+               vec++;
+       }
+}
+
+/*
+ * Handle external interrupts
+ */
+void external_interrupt(struct pt_regs *regs)
+{
+       u32 uic_msr;
+
+       /*
+        * Read masked interrupt status register to determine interrupt source
+        */
+       uic_msr = mfdcr(uic0msr);
+
+#if (UIC_MAX > 1)
+       if ((UIC_MASK(VECNUM_UIC1CI) & uic_msr) ||
+           (UIC_MASK(VECNUM_UIC1NCI) & uic_msr))
+               uic_interrupt(UIC1_DCR_BASE, 32);
+#endif
+
+#if (UIC_MAX > 2)
+       if ((UIC_MASK(VECNUM_UIC2CI) & uic_msr) ||
+           (UIC_MASK(VECNUM_UIC2NCI) & uic_msr))
+               uic_interrupt(UIC2_DCR_BASE, 64);
+#endif
+
+#if (UIC_MAX > 3)
+       if ((UIC_MASK(VECNUM_UIC3CI) & uic_msr) ||
+           (UIC_MASK(VECNUM_UIC3NCI) & uic_msr))
+               uic_interrupt(UIC3_DCR_BASE, 96);
+#endif
+
+       if (uic_msr & ~(UICB0_ALL))
+               uic_interrupt(UIC0_DCR_BASE, 0);
+
+       mtdcr(uic0sr, uic_msr);
+
+       return;
+}
+
+void pic_irq_ack(unsigned int vec)
+{
+       if ((vec >= 0) && (vec < 32))
+               mtdcr(uicsr, UIC_MASK(vec));
+       else if ((vec >= 32) && (vec < 64))
+               mtdcr(uic1sr, UIC_MASK(vec));
+       else if ((vec >= 64) && (vec < 96))
+               mtdcr(uic2sr, UIC_MASK(vec));
+       else if (vec >= 96)
+               mtdcr(uic3sr, UIC_MASK(vec));
+}
+
+/*
+ * Install and free a interrupt handler.
+ */
+void pic_irq_enable(unsigned int vec)
+{
+
+       if ((vec >= 0) && (vec < 32))
+               mtdcr(uicer, mfdcr(uicer) | UIC_MASK(vec));
+       else if ((vec >= 32) && (vec < 64))
+               mtdcr(uic1er, mfdcr(uic1er) | UIC_MASK(vec));
+       else if ((vec >= 64) && (vec < 96))
+               mtdcr(uic2er, mfdcr(uic2er) | UIC_MASK(vec));
+       else if (vec >= 96)
+               mtdcr(uic3er, mfdcr(uic3er) | UIC_MASK(vec));
+
+       debug("Install interrupt for vector %d ==> %p\n", vec, handler);
+}
+
+void pic_irq_disable(unsigned int vec)
+{
+       if ((vec >= 0) && (vec < 32))
+               mtdcr(uicer, mfdcr(uicer) & ~UIC_MASK(vec));
+       else if ((vec >= 32) && (vec < 64))
+               mtdcr(uic1er, mfdcr(uic1er) & ~UIC_MASK(vec));
+       else if ((vec >= 64) && (vec < 96))
+               mtdcr(uic2er, mfdcr(uic2er) & ~UIC_MASK(vec));
+       else if (vec >= 96)
+               mtdcr(uic3er, mfdcr(uic3er) & ~UIC_MASK(vec));
+}
index d71ba7710a0e54df87560f0be66ce773021a4376..faf7f0878ff150f70184eff5ac4d18e37dcf9665 100644 (file)
@@ -6,8 +6,8 @@
 #if (defined(CONFIG_440EP) || defined(CONFIG_440EPX)) && defined(CONFIG_CMD_USB)
 
 #include <usb.h>
+#include <asm/ppc4xx-uic.h>
 #include "usbdev.h"
-#include <asm/ppc4xx-intvec.h>
 
 #define USB_DT_DEVICE        0x01
 #define USB_DT_CONFIG        0x02
@@ -197,7 +197,7 @@ void usb_dev_init()
        /*enable interrupts */
        *(unsigned char *)USB2D0_INTRUSBE_8 = 0x0f;
 
-       irq_install_handler(VECNUM_HSB2D, (interrupt_handler_t *) usbInt,
+       irq_install_handler(VECNUM_USBDEV, (interrupt_handler_t *) usbInt,
                            NULL);
 }
 #else
diff --git a/cpu/ppc4xx/xilinx_irq.c b/cpu/ppc4xx/xilinx_irq.c
new file mode 100644 (file)
index 0000000..7108777
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * (C) Copyright 2008
+ * Ricado Ribalda-Universidad Autonoma de Madrid-ricardo.ribalda@uam.es
+ * This work has been supported by: QTechnology  http://qtec.com/
+ * Based on interrupts.c Wolfgang Denk-DENX Software Engineering-wd@denx.de
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+#include <common.h>
+#include <watchdog.h>
+#include <command.h>
+#include <asm/processor.h>
+#include <asm/interrupt.h>
+#include <ppc4xx.h>
+#include <ppc_asm.tmpl>
+#include <commproc.h>
+#include <asm/io.h>
+#include <asm/xilinx_irq.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+void pic_enable(void)
+{
+       debug("Xilinx PIC at 0x%8x\n", intc);
+
+       /*
+        * Disable all external interrupts until they are
+        * explicitly requested.
+        */
+       out_be32((u32 *) IER, 0);
+
+       /* Acknowledge any pending interrupts just in case. */
+       out_be32((u32 *) IAR, 0xffffffff);
+
+       /* Turn on the Master Enable. */
+       out_be32((u32 *) MER, 0x3UL);
+
+       return;
+}
+
+int xilinx_pic_irq_get(void)
+{
+       u32 irq;
+       irq = in_be32((u32 *) IVR);
+
+       /* If no interrupt is pending then all bits of the IVR are set to 1. As
+        * the IVR is as many bits wide as numbers of inputs are available.
+        * Therefore, if all bits of the IVR are set to one, its content will
+        * be bigger than XPAR_INTC_MAX_NUM_INTR_INPUTS.
+        */
+       if (irq >= XPAR_INTC_MAX_NUM_INTR_INPUTS)
+               irq = -1;       /* report no pending interrupt. */
+
+       debug("get_irq: %d\n", irq);
+       return (irq);
+}
+
+void pic_irq_enable(unsigned int irq)
+{
+       u32 mask = IRQ_MASK(irq);
+       debug("enable: %d\n", irq);
+       out_be32((u32 *) SIE, mask);
+}
+
+void pic_irq_disable(unsigned int irq)
+{
+       u32 mask = IRQ_MASK(irq);
+       debug("disable: %d\n", irq);
+       out_be32((u32 *) CIE, mask);
+}
+
+void pic_irq_ack(unsigned int irq)
+{
+       u32 mask = IRQ_MASK(irq);
+       debug("ack: %d\n", irq);
+       out_be32((u32 *) IAR, mask);
+}
+
+void external_interrupt(struct pt_regs *regs)
+{
+       int irq;
+
+       irq = xilinx_pic_irq_get();
+       if (irq < 0)
+               return;
+
+       interrupt_run_handler(irq);
+
+       return;
+}
index 0ad5e18dd396bd85877ea4140d59c344a57b93b1..171380e274fa4a2784a150de29ff9b3fc17598d9 100644 (file)
@@ -184,7 +184,7 @@ We now use a complete rewrite of the NAND code based on what is in
 The old NAND handling code has been re-factored and is now confined
 to only board-specific files and - unfortunately - to the DoC code
 (see below). A new configuration variable has been introduced:
-CFG_NAND_LEGACY, which has to be defined in the board config file if
+CONFIG_NAND_LEGACY, which has to be defined in the board config file if
 that board uses legacy code.
 
 The necessary changes have been made to all affected boards, and no
index a09cd2a603b1661b7a4f625c9e8d83a69542526c..642582b08819dd6629a6290b5f248d11d032eeba 100644 (file)
@@ -25,14 +25,14 @@ include $(TOPDIR)/config.mk
 
 LIB    := $(obj)libblock.a
 
-COBJS-y += ahci.o
-COBJS-y += ata_piix.o
+COBJS-$(CONFIG_SCSI_AHCI) += ahci.o
+COBJS-$(CONFIG_ATA_PIIX) += ata_piix.o
 COBJS-$(CONFIG_FSL_SATA) += fsl_sata.o
 COBJS-$(CONFIG_LIBATA) += libata.o
 COBJS-$(CONFIG_SATA_SIL3114) += sata_sil3114.o
-COBJS-y += sil680.o
-COBJS-y += sym53c8xx.o
-COBJS-y += systemace.o
+COBJS-$(CONFIG_IDE_SIL680) += sil680.o
+COBJS-$(CONFIG_SCSI_SYM53C8XX) += sym53c8xx.o
+COBJS-$(CONFIG_SYSTEMACE) += systemace.o
 
 COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
index 3d82c625a353dfc36ec8bddeb6856cca5e9a5317..52fd1080e61d8a61dd9079b01e40d39a243b7899 100644 (file)
@@ -26,8 +26,6 @@
  */
 #include <common.h>
 
-#ifdef CONFIG_SCSI_AHCI
-
 #include <command.h>
 #include <pci.h>
 #include <asm/processor.h>
@@ -700,4 +698,3 @@ void scsi_print_error(ccb * pccb)
 {
        /*The ahci error info can be read in the ahci driver*/
 }
-#endif
index 441a4dcd8d652f1aface989268f72bacaf39360c..4c26b36f5ab2e52b59e4c1551982309a9ebbfa07 100644 (file)
@@ -35,8 +35,6 @@
 #include <ide.h>
 #include <ata.h>
 
-#ifdef CFG_ATA_PIIX            /*ata_piix driver */
-
 extern block_dev_desc_t sata_dev_desc[CFG_SATA_MAX_DEVICE];
 extern int curr_device;
 
@@ -756,5 +754,3 @@ int scan_sata(int dev)
 {
        return 0;
 }
-
-#endif
index a6143df4c063df9333f42304d67f8359ff82ffad..052c3d3671a865b5dcd18e9b063b18a2f8bae8c8 100644 (file)
@@ -27,7 +27,7 @@
  * The following parameters must be defined in the configuration file
  * of the target board:
  *
- * #define CFG_IDE_SIL680
+ * #define CONFIG_IDE_SIL680
  *
  * #define CONFIG_PCI_PNP
  * NOTE it may also be necessary to define this if the default of 8 is
@@ -54,7 +54,6 @@
  */
 
 #include <common.h>
-#if defined(CFG_IDE_SIL680)
 #include <ata.h>
 #include <ide.h>
 #include <pci.h>
@@ -106,5 +105,3 @@ int ide_preinit (void)
 void ide_set_reset (int flag) {
        return;
 }
-
-#endif /* CFG_IDE_SIL680 */
index b880435f1ecf1d170cb226c195c6bbdbc45bcd22..44e998b55644ca9b1a671a7f152f2d85b46eb1df 100644 (file)
@@ -35,8 +35,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_SCSI_SYM53C8XX
-
 #include <command.h>
 #include <pci.h>
 #include <asm/processor.h>
@@ -870,6 +868,3 @@ void scsi_chip_init(void)
 #endif
 }
 #endif
-
-
-#endif /* CONFIG_SCSI_SYM53C8XX */
index 7d82c27c6edd7d35c9b15fc3ec6f62dce4f035bb..dfaab528bf4cb914087fbe59173adb86022c376d 100644 (file)
@@ -44,8 +44,6 @@
 #include <part.h>
 #include <asm/io.h>
 
-#ifdef CONFIG_SYSTEMACE
-
 /*
  * The ace_readw and writew functions read/write 16bit words, but the
  * offset value is the BYTE offset as most used in the Xilinx
@@ -255,4 +253,3 @@ static unsigned long systemace_read(int dev, unsigned long start,
 
        return blkcnt;
 }
-#endif /* CONFIG_SYSTEMACE */
index b0062b77329618ad3401240d41321cc102891fd0..5c95651d5805fc562cb665e53ae504bc1dcf1a1f 100644 (file)
@@ -24,8 +24,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_FSLDMAFEC
-
 #include <MCD_dma.h>
 #include <MCD_tasksInit.h>
 #include <MCD_progCheck.h>
@@ -1023,4 +1021,3 @@ static void MCD_memcpy(int *dest, int *src, u32 size)
        for (i = 0; i < size; i += sizeof(int), dest++, src++)
                *dest = *src;
 }
-#endif                         /* CONFIG_FSLDMAFEC */
index 06a2d532648b2aced52581edf9788ea0073d1d99..4f6e3462614f018cc661676680fb9d2941e162c9 100644 (file)
@@ -24,8 +24,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_FSLDMAFEC
-
 #include <MCD_dma.h>
 
 u32 MCD_varTab0[];
@@ -2430,5 +2428,3 @@ u32 MCD_ENetXmit_TDT[] = {
 #ifdef MCD_INCLUDE_EU
 MCD_bufDesc MCD_singleBufDescs[NCHANNELS];
 #endif
-
-#endif                          /* CONFIG_FSLDMAFEC */
index cf567db5a0bd22ccc6bf432e1673bfa723f22cab..2f198754e585382f5c19a03db4270036cba7d2a8 100644 (file)
@@ -28,8 +28,6 @@
  * Do not edit!
  */
 
-#ifdef CONFIG_FSLDMAFEC
-
 #include <MCD_dma.h>
 
 extern dmaRegs *MCD_dmaBar;
@@ -242,5 +240,3 @@ void MCD_startDmaENetXmit(char *bDBase, char *currBD, char *xmitFifoPtr,
        /* Set the task's Enable bit in its Task Control Register */
        MCD_dmaBar->taskControl[channel] |= (u16) 0x8000;
 }
-
-#endif                 /* CONFIG_FSLDMAFEC */
index 7e17360de54d9dcdf0313c8e3307411e7db2b1e5..cf29efa027296c21e004772976eb5362668c63f2 100644 (file)
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk
 
 LIB    := $(obj)libdma.a
 
-COBJS-y += MCD_tasksInit.o MCD_dmaApi.o MCD_tasks.o
+COBJS-$(CONFIG_FSLDMAFEC) += MCD_tasksInit.o MCD_dmaApi.o MCD_tasks.o
 
 COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
index 2933cb6451daaa3655e042c02d4926daddedb656..9a144073999d71ef9b6a16bc9dc969c6bdef27f8 100644 (file)
@@ -25,9 +25,11 @@ include $(TOPDIR)/config.mk
 
 LIB    := $(obj)libinput.a
 
-COBJS-y += i8042.o
-COBJS-y += keyboard.o
-COBJS-y += pc_keyb.o ps2ser.o ps2mult.o
+COBJS-$(CONFIG_I8042_KBD) += i8042.o
+ifdef CONFIG_PS2KBD
+COBJS-y += keyboard.o pc_keyb.o
+COBJS-$(CONFIG_PS2MULT) += ps2mult.o ps2ser.o
+endif
 
 COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
index 22c2a4e3a02da185783e0a1064ceca2f54f0866d..d152768b8e09428c4926fc7f7f6fa5a3670e8d8c 100644 (file)
@@ -27,8 +27,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_I8042_KBD
-
 #ifdef CONFIG_USE_CPCIDVI
 extern u8  gt_cpcidvi_in8(u32 offset);
 extern void gt_cpcidvi_out8(u32 offset, u8 data);
@@ -670,5 +668,3 @@ static int kbd_reset (void)
 
     return 0;
 }
-
-#endif /* CONFIG_I8042_KBD */
index 54182a79b1d320ef20b6443ebbe7a06dde803add..a634d76d6c294e7dfd50929f63e2101da0ebf17e 100644 (file)
@@ -11,8 +11,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_PS2KBD
-
 #include <devices.h>
 #include <keyboard.h>
 
@@ -301,5 +299,3 @@ int kbd_init (void)
        }
        return error;
 }
-
-#endif /* CONFIG_PS2KBD */
index 33e7c5f1248ef428a0763503761ab768a4f26c49..25ad3e40650449cfd15928d90da187d1fc4e6dd0 100644 (file)
@@ -13,8 +13,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_PS2KBD
-
 #include <keyboard.h>
 #include <pc_keyb.h>
 
@@ -252,5 +250,3 @@ void pckbd_leds(unsigned char leds)
        kbd_send_data(KBD_CMD_SET_LEDS);
        kbd_send_data(leds);
 }
-
-#endif /* CONFIG_PS2KBD */
index 9515a0fbf544e67ab52c33242c3861ea39d1667b..ecd585323f92107ea32470d4df3c511447f02ee0 100644 (file)
@@ -16,8 +16,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_PS2MULT
-
 #include <pc_keyb.h>
 #include <asm/atomic.h>
 #include <ps2mult.h>
@@ -462,5 +460,3 @@ int ps2mult_request_irq(void (*handler)(void *))
 
        return 0;
 }
-
-#endif /* CONFIG_PS2MULT */
index c1741eac67d425fe7a1e18809e06f840581616fb..480ffa25a2bfecb05d14df6fb4a8ebbca89226ab 100644 (file)
@@ -15,8 +15,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_PS2SERIAL
-
 #include <asm/io.h>
 #include <asm/atomic.h>
 #include <ps2mult.h>
@@ -326,5 +324,3 @@ static void ps2ser_interrupt(void *dev_id)
                ps2mult_callback(atomic_read(&ps2buf_cnt));
        }
 }
-
-#endif /* CONFIG_PS2SERIAL */
index fe8d3d87e96efd02cc61712e116d67974fa1a437..01e0f393d256e549d34561d17ec9fdd67293f6c6 100644 (file)
@@ -25,10 +25,10 @@ include $(TOPDIR)/config.mk
 
 LIB    := $(obj)libmisc.a
 
-COBJS-y += ali512x.o
-COBJS-y += ns87308.o
-COBJS-y += status_led.o
+COBJS-$(CONFIG_ALI152X) += ali512x.o
 COBJS-$(CONFIG_FSL_LAW) += fsl_law.o
+COBJS-$(CONFIG_NS87308) += ns87308.o
+COBJS-$(CONFIG_STATUS_LED) += status_led.o
 
 COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
index 90b45d98b8cc65886cce63ba24a3267199ea02fb..d6a2c1f57752b9e25d02d89cf67eb0c633138d28 100644 (file)
@@ -32,8 +32,6 @@
 
 #include <config.h>
 
-#ifdef CONFIG_ALI152X
-
 #include <common.h>
 #include <asm/io.h>
 #include <asm/ic/ali512x.h>
@@ -418,6 +416,3 @@ int ali512x_cio_in(int pin)
 
        return data & bit;
 }
-
-
-#endif
index cf4d3595e5da587ff2b8b27ffceabfb1b16530ab..6642c2e072d117337450ece8dd395b9b9f0ea1e6 100644 (file)
@@ -23,8 +23,6 @@
 
 #include <config.h>
 
-#ifdef CFG_NS87308
-
 #include <ns87308.h>
 
 void initialise_ns87308 (void)
@@ -117,5 +115,3 @@ void initialise_ns87308 (void)
        PNP_PGCS_CSLINE_CONF(2, CFG_NS87308_CS2_CONF);
 #endif
 }
-
-#endif
index ddb6c22e89030a935ba28b346045aef351ff54de..4ba3e180440584c15d091e06b4d47ca1c1b5cccc 100644 (file)
@@ -35,8 +35,6 @@
 
 /* ------------------------------------------------------------------------- */
 
-#ifdef CONFIG_STATUS_LED
-
 typedef struct {
        led_id_t mask;
        int state;
@@ -127,5 +125,3 @@ void status_led_set (int led, int state)
        }
        __led_set (ld->mask, state);
 }
-
-#endif /* CONFIG_STATUS_LED */
index ff932a1b6bf02315d7fa7c167c4b904fa66b042d..6538f7a15864f915e14849434f90d5dcdc8ecb04 100644 (file)
@@ -25,11 +25,11 @@ include $(TOPDIR)/config.mk
 
 LIB    := $(obj)libmtd.a
 
-COBJS-y += at45.o
-COBJS-y += cfi_flash.o
+COBJS-$(CONFIG_HAS_DATAFLASH) += at45.o
+COBJS-$(CONFIG_FLASH_CFI_DRIVER) += cfi_flash.o
 COBJS-$(CONFIG_HAS_DATAFLASH) += dataflash.o
-COBJS-y += mw_eeprom.o
 COBJS-$(CONFIG_FLASH_CFI_LEGACY) += jedec_flash.o
+COBJS-$(CONFIG_MW_EEPROM) += mw_eeprom.o
 
 COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
index a9d13ff90ef9fa4cf072ec846f13625c1fe4a845..d1a60aac90b38495dee178265cd951fd80692d72 100644 (file)
@@ -20,8 +20,6 @@
 
 #include <config.h>
 #include <common.h>
-
-#ifdef CONFIG_HAS_DATAFLASH
 #include <dataflash.h>
 
 /*
@@ -559,4 +557,3 @@ int AT91F_DataflashProbe(int cs, AT91PS_DataflashDesc pDesc)
        AT91F_DataFlashGetStatus(pDesc);
        return ((pDesc->command[1] == 0xFF) ? 0 : pDesc->command[1] & 0x3C);
 }
-#endif
index 479075ccb19942d406ffa9bea3100c2bf55a711b..402d835bf98f14d9db3f7ebb70d414f38722959b 100644 (file)
@@ -39,7 +39,6 @@
 #include <asm/io.h>
 #include <asm/byteorder.h>
 #include <environment.h>
-#ifdef CFG_FLASH_CFI_DRIVER
 
 /*
  * This file implements a Common Flash Interface (CFI) driver for
@@ -2015,5 +2014,3 @@ unsigned long flash_init (void)
 #endif
        return (size);
 }
-
-#endif /* CFG_FLASH_CFI */
index 2b3348810d2dea50dd14a425219fd176bd846b2c..f32ced4c2e083b939bf3effccaf582c1b7fb2b2f 100644 (file)
@@ -1,9 +1,6 @@
 /* Three-wire (MicroWire) serial eeprom driver (for 93C46 and compatibles) */
 
 #include <common.h>
-
-#ifdef CONFIG_MW_EEPROM
-
 #include <ssi.h>
 
 /*
@@ -237,5 +234,3 @@ int mw_eeprom_probe(int dev)
        }
        return 0;
 }
-
-#endif
index ffb3169594513f7620f90cea3aea6c0d8d69a0c4..19233105a20653e55aa55911cc351679a29a66d9 100644 (file)
@@ -25,15 +25,19 @@ include $(TOPDIR)/config.mk
 
 LIB    := $(obj)libnand.a
 
+ifdef CONFIG_CMD_NAND
+ifndef CONFIG_NAND_LEGACY
 COBJS-y += nand.o
 COBJS-y += nand_base.o
-COBJS-y += nand_ids.o
-COBJS-y += nand_ecc.o
 COBJS-y += nand_bbt.o
+COBJS-y += nand_ecc.o
+COBJS-y += nand_ids.o
 COBJS-y += nand_util.o
+endif
 
 COBJS-$(CONFIG_NAND_FSL_ELBC) += fsl_elbc_nand.o
-COBJS-y += fsl_upm.o
+COBJS-$(CONFIG_NAND_FSL_UPM) += fsl_upm.o
+endif
 
 COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
index ce197f5ad1632183180ed8722df65bd7aebbdf93..4cba8100a5f254f6adeaf934cbd2b6cc553fc0af 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <common.h>
 
-#if !defined(CFG_NAND_LEGACY)
+#if !defined(CONFIG_NAND_LEGACY)
 
 #include <linux/kernel.h>
 #include <linux/init.h>
index e651903040b937774e71abbc0d15a35dcaec0f93..1a1d8c4e61282cc77df124c2bd587b771a5a61a0 100644 (file)
@@ -11,8 +11,6 @@
  */
 
 #include <config.h>
-
-#if defined(CONFIG_CMD_NAND) && defined(CONFIG_NAND_FSL_UPM)
 #include <common.h>
 #include <asm/io.h>
 #include <asm/errno.h>
@@ -150,4 +148,3 @@ int fsl_upm_nand_init(struct nand_chip *chip, struct fsl_upm_nand *fun)
 
        return 0;
 }
-#endif /* CONFIG_CMD_NAND */
index e44470eb6cc8a7b79088a2a2ccec61c7174477aa..ebd2acd02bf662bb7e5c614f4897a25a77d867c7 100644 (file)
@@ -22,9 +22,6 @@
  */
 
 #include <common.h>
-
-#if defined(CONFIG_CMD_NAND) && !defined(CFG_NAND_LEGACY)
-
 #include <nand.h>
 
 #ifndef CFG_NAND_BASE_LIST
@@ -79,5 +76,3 @@ void nand_init(void)
        board_nand_select_device(nand_info[nand_curr_device].priv, nand_curr_device);
 #endif
 }
-
-#endif
index a29ff1146f2cc26cfb23be0876bf4affbdcb0802..0913bb87418cb52bf43d8efbd4944c358811ec0c 100644 (file)
@@ -59,8 +59,6 @@
 
 #define ENOTSUPP       524     /* Operation is not supported */
 
-#if defined(CONFIG_CMD_NAND) && !defined(CFG_NAND_LEGACY)
-
 #include <malloc.h>
 #include <watchdog.h>
 #include <linux/err.h>
@@ -2822,6 +2820,3 @@ MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Steven J. Hill <sjhill@realitydiluted.com>, Thomas Gleixner <tglx@linutronix.de>");
 MODULE_DESCRIPTION("Generic NAND flash driver code");
 #endif
-
-#endif
-
index 84479473b6d4408f1fcef744ef845ec1f1b6a798..b3b740da64120ba75af72e7b064b86c850096c69 100644 (file)
@@ -53,9 +53,6 @@
  */
 
 #include <common.h>
-
-#if defined(CONFIG_CMD_NAND) && !defined(CFG_NAND_LEGACY)
-
 #include <malloc.h>
 #include <linux/mtd/compat.h>
 #include <linux/mtd/mtd.h>
@@ -1237,5 +1234,3 @@ int nand_isbad_bbt(struct mtd_info *mtd, loff_t offs, int allowbbt)
 EXPORT_SYMBOL(nand_scan_bbt);
 EXPORT_SYMBOL(nand_default_bbt);
 #endif
-
-#endif
index e1d5154db223439b119c258ca4a088d5d602ef56..ee1f6cc8a85a98ddd136fc4c464d0ab425b2183b 100644 (file)
@@ -39,8 +39,6 @@
 
 #include <common.h>
 
-#if defined(CONFIG_CMD_NAND) && !defined(CFG_NAND_LEGACY)
-
 /* XXX U-BOOT XXX */
 #if 0
 #include <linux/types.h>
@@ -215,5 +213,3 @@ int nand_correct_data(struct mtd_info *mtd, u_char *dat,
 #if 0
 EXPORT_SYMBOL(nand_correct_data);
 #endif
-
-#endif
index f8b96cf025db6fc3b82598f692cc124e9cc26fba..2ff75c94e916bfcfe4bfc86af70f4adf0111b423 100644 (file)
@@ -12,9 +12,6 @@
  */
 
 #include <common.h>
-
-#if defined(CONFIG_CMD_NAND) && !defined(CFG_NAND_LEGACY)
-
 #include <linux/mtd/nand.h>
 /*
 *      Chip ID list
@@ -147,4 +144,3 @@ struct nand_manufacturers nand_manuf_ids[] = {
        {NAND_MFR_MICRON, "Micron"},
        {0x0, "Unknown"}
 };
-#endif
index 02fe914db8b2e8f89a102ccda757b32a247cd7c1..22820d55d02c64b93ac6b17b62c6b93744bca870 100644 (file)
@@ -31,9 +31,6 @@
  */
 
 #include <common.h>
-
-#if defined(CONFIG_CMD_NAND) && !defined(CFG_NAND_LEGACY)
-
 #include <command.h>
 #include <watchdog.h>
 #include <malloc.h>
@@ -606,5 +603,3 @@ int nand_read_skip_bad(nand_info_t *nand, size_t offset, size_t *length,
 
        return 0;
 }
-
-#endif /* defined(CONFIG_CMD_NAND) && !defined(CFG_NAND_LEGACY) */
index 4e29c36e7046646ad03492201dd72f8a4a093d33..a1a9cc92b593c65eb3ef79d76b7636f3d26ebec1 100644 (file)
@@ -25,8 +25,11 @@ include $(TOPDIR)/config.mk
 
 LIB    := $(obj)libnand_legacy.a
 
-COBJS  := nand_legacy.o
+ifdef CONFIG_CMD_NAND
+COBJS-$(CONFIG_NAND_LEGACY)    := nand_legacy.o
+endif
 
+COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
 
index fafefad60fefa6b572c5f2bc31f6028036a9fdec..bf5565a8fbe758d05493338c1cfb6090c8ff198d 100644 (file)
@@ -14,9 +14,6 @@
 #include <malloc.h>
 #include <asm/io.h>
 #include <watchdog.h>
-
-#if defined(CONFIG_CMD_NAND) && defined(CFG_NAND_LEGACY)
-
 #include <linux/mtd/nand_legacy.h>
 #include <linux/mtd/nand_ids.h>
 #include <jffs2/jffs2.h>
@@ -1608,5 +1605,3 @@ int read_jffs2_nand(size_t start, size_t len,
                        start, len, retlen, buf);
 }
 #endif /* CONFIG_JFFS2_NAND */
-
-#endif
index 92074b255287ba860f5befaeaf961e0662c6ef5d..1d35a57d84f01336eabda2e7bc6e15abac59fbb9 100644 (file)
@@ -25,8 +25,9 @@ include $(TOPDIR)/config.mk
 
 LIB    := $(obj)libonenand.a
 
-COBJS  := onenand_uboot.o onenand_base.o onenand_bbt.o
+COBJS-$(CONFIG_CMD_ONENAND)    := onenand_uboot.o onenand_base.o onenand_bbt.o
 
+COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
 
index eaa48f94873887fdb472ef7d118b21d1d810d7fd..8f12fa26e062cf670b36163ba3c6ffb1a16a90e9 100644 (file)
@@ -10,9 +10,6 @@
  */
 
 #include <common.h>
-
-#ifdef CONFIG_CMD_ONENAND
-
 #include <linux/mtd/compat.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/onenand.h>
@@ -1361,5 +1358,3 @@ int onenand_scan(struct mtd_info *mtd, int maxchips)
 void onenand_release(struct mtd_info *mtd)
 {
 }
-
-#endif /* CONFIG_CMD_ONENAND */
index 318d877bfbbd99bfe4080f341c4c38f68b8d1582..d13d2777e200e5c2b58dd77ec4b3882dc5260eb5 100644 (file)
@@ -15,9 +15,6 @@
  */
 
 #include <common.h>
-
-#ifdef CONFIG_CMD_ONENAND
-
 #include <linux/mtd/compat.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/onenand.h>
@@ -261,5 +258,3 @@ int onenand_default_bbt(struct mtd_info *mtd)
 
        return onenand_scan_bbt(mtd, bbm->badblock_pattern);
 }
-
-#endif /* CFG_CMD_ONENAND */
index bd7466ac9d95dc8155790c36ff4f46f3d18e6d74..d614450616f12dd533ffc08adc9c840a10293b0d 100644 (file)
@@ -14,9 +14,6 @@
  */
 
 #include <common.h>
-
-#ifdef CONFIG_CMD_ONENAND
-
 #include <linux/mtd/compat.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/onenand.h>
@@ -37,5 +34,3 @@ void onenand_init(void)
        puts("OneNAND: ");
        print_size(onenand_mtd.size, "\n");
 }
-
-#endif /* CONFIG_CMD_ONENAND */
index dec93b94d7e37883782a41ae37f3cf0cb283caf8..bffb1eb1a138229c82d8df5ed467a92dbd3439ea 100644 (file)
@@ -25,15 +25,13 @@ include $(TOPDIR)/config.mk
 
 LIB    := $(obj)libpci.a
 
-COBJS-y += fsl_pci_init.o
-COBJS-y += pci.o
-COBJS-y += pci_auto.o
-COBJS-y += pci_indirect.o
-COBJS-y += tsi108_pci.o
-COBJS-y += w83c553f.o
+COBJS-$(CONFIG_FSL_PCI_INIT) += fsl_pci_init.o
+COBJS-$(CONFIG_PCI) += pci.o pci_auto.o pci_indirect.o
 COBJS-$(CONFIG_SH4_PCI) += pci_sh4.o
 COBJS-$(CONFIG_SH7751_PCI) +=pci_sh7751.o
 COBJS-$(CONFIG_SH7780_PCI) +=pci_sh7780.o
+COBJS-$(CONFIG_TSI108_PCI) += tsi108_pci.o
+COBJS-$(CONFIG_WINBOND_83C553) += w83c553f.o
 
 COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
index a7afa908a2d9b5f69d66518255e5e175ce6fe4c7..bb2813f1292cf569e6bdc62ca24d22b88ef84b49 100644 (file)
@@ -18,8 +18,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_FSL_PCI_INIT
-
 /*
  * PCI/PCIE Controller initialization for mpc85xx/mpc86xx soc's
  *
@@ -197,5 +195,3 @@ fsl_pci_init(struct pci_controller *hose)
                pci_hose_write_config_word(hose, dev, PCI_SEC_STATUS, 0xffff);
        }
 }
-
-#endif /* CONFIG_FSL_PCI */
index 16180cbe51ae5bd8112b95767622c02e06526b2a..b5eea89e7d42d6e49ff7091411b1e3bfdefccc5b 100644 (file)
@@ -30,8 +30,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_PCI
-
 #include <command.h>
 #include <asm/processor.h>
 #include <asm/io.h>
@@ -544,5 +542,3 @@ void pci_init(void)
        /* now call board specific pci_init()... */
        pci_init_board();
 }
-
-#endif /* CONFIG_PCI */
index eb6959376a7e16569ce07f795dc3ac3e773241fb..2acf9bf780802a8aa16b78a72e2ca48f2a7059e5 100644 (file)
@@ -15,8 +15,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_PCI
-
 #include <pci.h>
 
 #undef DEBUG
@@ -408,5 +406,3 @@ int pciauto_config_device(struct pci_controller *hose, pci_dev_t dev)
 
        return sub_bus;
 }
-
-#endif /* CONFIG_PCI */
index 55517a8fed3c0c22b8e4b7dd36624e438fa7dbbf..ab51f8d01e8d8346bad7fe23b62a8e0036694a04 100644 (file)
@@ -11,7 +11,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_PCI
 #if (!defined(__I386__) && !defined(CONFIG_IXDP425))
 
 #include <asm/processor.h>
@@ -135,4 +134,3 @@ void pci_setup_indirect(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data)
 }
 
 #endif /* !__I386__ && !CONFIG_IXDP425 */
-#endif /* CONFIG_PCI */
index 4f02cb85e8c51d1c19269c7b726233ea68227e87..edd614f236eefd8c4f4824ba57a100f2059da1ad 100644 (file)
@@ -27,8 +27,6 @@
 
 #include <config.h>
 
-#ifdef CONFIG_TSI108_PCI
-
 #include <common.h>
 #include <pci.h>
 #include <asm/io.h>
@@ -182,5 +180,3 @@ void ft_pci_setup(void *blob, bd_t *bd)
        }
 }
 #endif /* CONFIG_OF_LIBFDT */
-
-#endif /* CONFIG_TSI108_PCI */
index 9ea08a2565ad1d068cc425970e9d3606c73bdeb8..d7355a4084d5ba018224daa87ac4b386e663d2fe 100644 (file)
@@ -30,8 +30,6 @@
 #include <common.h>
 #include <config.h>
 
-#ifdef CFG_WINBOND_83C553
-
 #include <asm/io.h>
 #include <pci.h>
 
@@ -222,5 +220,3 @@ void initialise_dma(void)
        out8(W83C553F_DMA1 + W83C553F_DMA1_CS, 0x00);
        out16(W83C553F_DMA2 + W83C553F_DMA2_CS, 0x0000);
 }
-
-#endif /* CFG_WINBOND_83C553 */
index 45a2fff62cab819366a10a0cae5817e470a6f1f3..18fe9ce614a64fcf5f69025f5e191a46b2255ac4 100644 (file)
@@ -25,8 +25,9 @@ include $(TOPDIR)/config.mk
 LIB    := $(obj)qe.a
 
 COBJS-$(CONFIG_OF_LIBFDT) += fdt.o
-COBJS  := qe.o uccf.o uec.o uec_phy.o $(COBJS-y)
+COBJS-$(CONFIG_QE) += qe.o uccf.o uec.o uec_phy.o
 
+COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
 
index 7b6ecd753d2b76c4ffadb172386d80b346b0a84e..e914d01d8051deafd3064bcc3c6150b61a020fcd 100644 (file)
@@ -27,7 +27,6 @@
 #include "asm/immap_qe.h"
 #include "qe.h"
 
-#if defined(CONFIG_QE)
 qe_map_t               *qe_immr = NULL;
 static qe_snum_t       snums[QE_NUM_OF_SNUM];
 
@@ -466,5 +465,3 @@ U_BOOT_CMD(
        "fw <addr> [<length>] - Upload firmware binary at address <addr> to "
                "the QE,\n\twith optional length <length> verification.\n"
        );
-
-#endif /* CONFIG_QE */
index 4a327ab48f64a4ea5f480c889fc5a203a5624c13..7f6337bac8e851e6309ab5ff6fd9a4fae411db5a 100644 (file)
@@ -28,7 +28,6 @@
 #include "qe.h"
 #include "uccf.h"
 
-#if defined(CONFIG_QE)
 void ucc_fast_transmit_on_demand(ucc_fast_private_t *uccf)
 {
        out_be16(&uccf->uf_regs->utodr, UCC_FAST_TOD);
@@ -401,4 +400,3 @@ int ucc_fast_init(ucc_fast_info_t *uf_info, ucc_fast_private_t  **uccf_ret)
        *uccf_ret = uccf;
        return 0;
 }
-#endif /* CONFIG_QE */
index ba89247e4fc757ebb67502baffba8678b6a95425..344c64999995f2674f98e62c3c896e4544da7d0d 100644 (file)
@@ -31,8 +31,6 @@
 #include "uec_phy.h"
 #include "miiphy.h"
 
-#if defined(CONFIG_QE)
-
 #ifdef CONFIG_UEC_ETH1
 static uec_info_t eth1_uec_info = {
        .uf_info                = {
@@ -1406,6 +1404,3 @@ int uec_initialize(int index)
 
        return 1;
 }
-
-
-#endif /* CONFIG_QE */
index 423ba789e9e27960e470116f552a84ad4a514649..186922e0c5152295903c49a6e16cf603a5c34f74 100644 (file)
@@ -26,8 +26,6 @@
 #include "uec_phy.h"
 #include "miiphy.h"
 
-#if defined(CONFIG_QE)
-
 #define ugphy_printk(format, arg...)  \
        printf(format "\n", ## arg)
 
@@ -677,4 +675,3 @@ void change_phy_interface_mode (struct eth_device *dev, enet_interface_e mode)
        marvell_phy_interface_mode (dev, mode);
 #endif
 }
-#endif /* CONFIG_QE */
index de6fbab740c32346c67e2cada2bc00c45631376f..2384735a2ce125752931fb48c4513ce8bf14a07b 100644 (file)
@@ -27,7 +27,7 @@ LIB   := $(obj)libserial.a
 
 COBJS-$(CONFIG_ATMEL_USART) += atmel_usart.o
 COBJS-$(CONFIG_MCFUART) += mcfuart.o
-COBJS-y += ns9750_serial.o
+COBJS-$(CONFIG_NS9750_UART) += ns9750_serial.o
 COBJS-y += ns16550.o
 COBJS-$(CONFIG_DRIVER_S3C4510_UART) += s3c4510b_uart.o
 COBJS-y += serial.o
@@ -35,7 +35,7 @@ COBJS-$(CONFIG_MAX3100_SERIAL) += serial_max3100.o
 COBJS-y += serial_pl010.o
 COBJS-y += serial_pl011.o
 COBJS-$(CONFIG_XILINX_UARTLITE) += serial_xuartlite.o
-COBJS-y += serial_sh.o
+COBJS-$(CONFIG_SCIF_CONSOLE) += serial_sh.o
 COBJS-$(CONFIG_USB_TTY) += usbtty.o
 
 COBJS  := $(COBJS-y)
index 02c0d3952099c58cf4a8034adf55ae4f51ea8877..e9645a053de19166153314f5fe3b0022d65d3a66 100644 (file)
@@ -28,8 +28,6 @@
 
 #include <common.h>
 
-#ifdef CFG_NS9750_UART
-
 #include "ns9750_bbus.h"       /* for GPIOs */
 #include "ns9750_ser.h"                /* for serial configuration */
 
@@ -210,5 +208,3 @@ static unsigned int calcRxCharGapRegister( void )
 {
        return NS9750_SER_RX_CHAR_TIMER_TRUN;
 }
-
-#endif /* CFG_NS9750_UART */
index 8bbfcf9c0cba8a7115d1c3b5b680791d1e2e36f6..b361eef9a41d8d06b63662843e5362e447a1087e 100644 (file)
@@ -26,7 +26,7 @@
 #ifdef CFG_NS16550_SERIAL
 
 #include <ns16550.h>
-#ifdef CFG_NS87308
+#ifdef CONFIG_NS87308
 #include <ns87308.h>
 #endif
 
@@ -159,7 +159,7 @@ int serial_init (void)
 {
        int clock_divisor;
 
-#ifdef CFG_NS87308
+#ifdef CONFIG_NS87308
        initialise_ns87308();
 #endif
 
index 0801ac4a8c8e7ab8952eff9fc4b167e2767d3277..2b9eeed47e0c68fdf530f89bc0362efbc5665303 100644 (file)
@@ -20,8 +20,6 @@
 #include <common.h>
 #include <asm/processor.h>
 
-#ifdef CFG_SCIF_CONSOLE
-
 #if defined (CONFIG_CONS_SCIF0)
 #define SCIF_BASE      SCIF0_BASE
 #elif defined (CONFIG_CONS_SCIF1)
@@ -215,5 +213,3 @@ int serial_getc(void)
 
        return ch;
 }
-
-#endif /* CFG_SCIF_CONSOLE */
index 8a06777ae2a91d70027a04cae4ac2d0c39b24bff..b5e7ab8b19e382b68b17e2e4039369d0a0abe47a 100644 (file)
@@ -146,7 +146,7 @@ static struct part_info *current_part;
 
 #if (defined(CONFIG_JFFS2_NAND) && \
      defined(CONFIG_CMD_NAND) )
-#if defined(CFG_NAND_LEGACY)
+#if defined(CONFIG_NAND_LEGACY)
 #include <linux/mtd/nand_legacy.h>
 #else
 #include <nand.h>
@@ -161,7 +161,7 @@ static struct part_info *current_part;
  *
  */
 
-#if defined(CFG_NAND_LEGACY)
+#if defined(CONFIG_NAND_LEGACY)
 /* this one defined in nand_legacy.c */
 int read_jffs2_nand(size_t start, size_t len,
                size_t * retlen, u_char * buf, int nanddev);
@@ -201,7 +201,7 @@ static int read_nand_cached(u32 off, u32 size, u_char *buf)
                                }
                        }
 
-#if defined(CFG_NAND_LEGACY)
+#if defined(CONFIG_NAND_LEGACY)
                        if (read_jffs2_nand(nand_cache_off, NAND_CACHE_SIZE,
                                                &retlen, nand_cache, id->num) < 0 ||
                                        retlen != NAND_CACHE_SIZE) {
index 3ce9c982552f77c2e2e2c18450c4a1618f537efb..9f6de7d32a5b3f97a39a8a37116e3b3e8136a8d6 100644 (file)
@@ -1,6 +1,6 @@
 #include <common.h>
 
-#if !defined(CFG_NAND_LEGACY) && defined(CONFIG_CMD_JFFS2)
+#if !defined(CONFIG_NAND_LEGACY) && defined(CONFIG_CMD_JFFS2)
 
 #include <malloc.h>
 #include <linux/stat.h>
diff --git a/include/asm-ppc/interrupt.h b/include/asm-ppc/interrupt.h
new file mode 100644 (file)
index 0000000..792836b
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * (C) Copyright 2008
+ * Ricado Ribalda-Universidad Autonoma de Madrid-ricardo.ribalda@uam.es
+ * This work has been supported by: QTechnology  http://qtec.com/
+ * Based on interrupts.c Wolfgang Denk-DENX Software Engineering-wd@denx.de
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+#ifndef INTERRUPT_H
+#define INTERRUPT_H
+
+#if defined(CONFIG_XILINX_440)
+#include <asm/xilinx_irq.h>
+#else
+#include <asm/ppc4xx-uic.h>
+#endif
+
+void pic_enable(void);
+void pic_irq_enable(unsigned int irq);
+void pic_irq_disable(unsigned int irq);
+void pic_irq_ack(unsigned int irq);
+void external_interrupt(struct pt_regs *regs);
+void interrupt_run_handler(int vec);
+
+#endif
diff --git a/include/asm-ppc/ppc4xx-ebc.h b/include/asm-ppc/ppc4xx-ebc.h
new file mode 100644 (file)
index 0000000..d180e04
--- /dev/null
@@ -0,0 +1,156 @@
+/*
+ * (C) Copyright 2008
+ * Stefan Roese, DENX Software Engineering, sr@denx.de.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef _PPC4xx_EBC_H_
+#define _PPC4xx_EBC_H_
+
+/*
+ * Currently there are two register layout versions for the
+ * IBM EBC core used on 4xx PPC's:
+ */
+#if defined(CONFIG_405CR) || defined(CONFIG_405GP) || \
+    defined(CONFIG_405EP) || \
+    defined(CONFIG_440EP) || defined(CONFIG_440GR) || \
+    defined(CONFIG_440EPX) || defined(CONFIG_440GRX)
+#define CONFIG_EBC_PPC4xx_IBM_VER1
+#endif
+
+/* Bank Configuration Register */
+#define        EBC_BXCR_BAS_MASK       PPC_REG_VAL(11, 0xFFF)
+#define EBC_BXCR_BAS_ENCODE(n) (((static_cast(u32, n)) & EBC_BXCR_BAS_MASK))
+#define EBC_BXCR_BS_MASK       PPC_REG_VAL(14, 0x7)
+#define EBC_BXCR_BS_1MB                PPC_REG_VAL(14, 0x0)
+#define EBC_BXCR_BS_2MB                PPC_REG_VAL(14, 0x1)
+#define EBC_BXCR_BS_4MB                PPC_REG_VAL(14, 0x2)
+#define EBC_BXCR_BS_8MB                PPC_REG_VAL(14, 0x3)
+#define EBC_BXCR_BS_16MB       PPC_REG_VAL(14, 0x4)
+#define EBC_BXCR_BS_32MB       PPC_REG_VAL(14, 0x5)
+#define EBC_BXCR_BS_64MB       PPC_REG_VAL(14, 0x6)
+#define EBC_BXCR_BS_128MB      PPC_REG_VAL(14, 0x7)
+#define EBC_BXCR_BU_MASK       PPC_REG_VAL(16, 0x3)
+#define        EBC_BXCR_BU_NONE        PPC_REG_VAL(16, 0x0)
+#define EBC_BXCR_BU_R          PPC_REG_VAL(16, 0x1)
+#define EBC_BXCR_BU_W          PPC_REG_VAL(16, 0x2)
+#define EBC_BXCR_BU_RW         PPC_REG_VAL(16, 0x3)
+#define EBC_BXCR_BW_MASK       PPC_REG_VAL(18, 0x3)
+#define EBC_BXCR_BW_8BIT       PPC_REG_VAL(18, 0x0)
+#define EBC_BXCR_BW_16BIT      PPC_REG_VAL(18, 0x1)
+#if defined(CONFIG_EBC_PPC4xx_IBM_VER1)
+#define EBC_BXCR_BW_32BIT      PPC_REG_VAL(18, 0x2)
+#else
+#define EBC_BXCR_BW_32BIT      PPC_REG_VAL(18, 0x3)
+#endif
+
+/* Bank Access Parameter Register */
+#define EBC_BXAP_BME_ENABLED   PPC_REG_VAL(0, 0x1)
+#define EBC_BXAP_BME_DISABLED  PPC_REG_VAL(0, 0x0)
+#define EBC_BXAP_TWT_ENCODE(n) PPC_REG_VAL(8, (static_cast(u32, n)) & 0xFF)
+#define        EBC_BXAP_FWT_ENCODE(n)  PPC_REG_VAL(5, (static_cast(u32, n)) & 0x1F)
+#define        EBC_BXAP_BWT_ENCODE(n)  PPC_REG_VAL(8, (static_cast(u32, n)) & 0x7)
+#define EBC_BXAP_BCE_DISABLE   PPC_REG_VAL(9, 0x0)
+#define EBC_BXAP_BCE_ENABLE    PPC_REG_VAL(9, 0x1)
+#define EBC_BXAP_BCT_MASK      PPC_REG_VAL(11, 0x3)
+#define EBC_BXAP_BCT_2TRANS    PPC_REG_VAL(11, 0x0)
+#define EBC_BXAP_BCT_4TRANS    PPC_REG_VAL(11, 0x1)
+#define EBC_BXAP_BCT_8TRANS    PPC_REG_VAL(11, 0x2)
+#define EBC_BXAP_BCT_16TRANS   PPC_REG_VAL(11, 0x3)
+#define EBC_BXAP_CSN_ENCODE(n) PPC_REG_VAL(13, (static_cast(u32, n)) & 0x3)
+#define EBC_BXAP_OEN_ENCODE(n) PPC_REG_VAL(15, (static_cast(u32, n)) & 0x3)
+#define EBC_BXAP_WBN_ENCODE(n) PPC_REG_VAL(17, (static_cast(u32, n)) & 0x3)
+#define EBC_BXAP_WBF_ENCODE(n) PPC_REG_VAL(19, (static_cast(u32, n)) & 0x3)
+#define EBC_BXAP_TH_ENCODE(n)  PPC_REG_VAL(22, (static_cast(u32, n)) & 0x7)
+#define EBC_BXAP_RE_ENABLED    PPC_REG_VAL(23, 0x1)
+#define EBC_BXAP_RE_DISABLED   PPC_REG_VAL(23, 0x0)
+#define EBC_BXAP_SOR_DELAYED   PPC_REG_VAL(24, 0x0)
+#define EBC_BXAP_SOR_NONDELAYED        PPC_REG_VAL(24, 0x1)
+#define EBC_BXAP_BEM_WRITEONLY PPC_REG_VAL(25, 0x0)
+#define EBC_BXAP_BEM_RW                PPC_REG_VAL(25, 0x1)
+#define EBC_BXAP_PEN_DISABLED  PPC_REG_VAL(26, 0x0)
+#define EBC_BXAP_PEN_ENABLED   PPC_REG_VAL(26, 0x1)
+
+/* Common fields in EBC0_CFG register */
+#define EBC_CFG_PTD_MASK       PPC_REG_VAL(1, 0x1)
+#define EBC_CFG_PTD_ENABLE     PPC_REG_VAL(1, 0x0)
+#define EBC_CFG_PTD_DISABLE    PPC_REG_VAL(1, 0x1)
+#define EBC_CFG_RTC_MASK       PPC_REG_VAL(4, 0x7)
+#define EBC_CFG_RTC_16PERCLK   PPC_REG_VAL(4, 0x0)
+#define EBC_CFG_RTC_32PERCLK   PPC_REG_VAL(4, 0x1)
+#define EBC_CFG_RTC_64PERCLK   PPC_REG_VAL(4, 0x2)
+#define EBC_CFG_RTC_128PERCLK  PPC_REG_VAL(4, 0x3)
+#define EBC_CFG_RTC_256PERCLK  PPC_REG_VAL(4, 0x4)
+#define EBC_CFG_RTC_512PERCLK  PPC_REG_VAL(4, 0x5)
+#define EBC_CFG_RTC_1024PERCLK PPC_REG_VAL(4, 0x6)
+#define EBC_CFG_RTC_2048PERCLK PPC_REG_VAL(4, 0x7)
+#define EBC_CFG_PME_MASK       PPC_REG_VAL(14, 0x1)
+#define EBC_CFG_PME_DISABLE    PPC_REG_VAL(14, 0x0)
+#define EBC_CFG_PME_ENABLE     PPC_REG_VAL(14, 0x1)
+#define EBC_CFG_PMT_MASK       PPC_REG_VAL(19, 0x1F)
+#define EBC_CFG_PMT_ENCODE(n)  PPC_REG_VAL(19, (static_cast(u32, n)) & 0x1F)
+
+/* Now the two versions of the other bits */
+#if defined(CONFIG_EBC_PPC4xx_IBM_VER1)
+#define EBC_CFG_EBTC_MASK      PPC_REG_VAL(0, 0x1)
+#define EBC_CFG_EBTC_HI                PPC_REG_VAL(0, 0x0)
+#define EBC_CFG_EBTC_DRIVEN    PPC_REG_VAL(0, 0x1)
+#define EBC_CFG_EMPH_MASK      PPC_REG_VAL(6, 0x3)
+#define EBC_CFG_EMPH_ENCODE(n) PPC_REG_VAL(6, (static_cast(u32, n)) & 0x3)
+#define EBC_CFG_EMPL_MASK      PPC_REG_VAL(8, 0x3)
+#define EBC_CFG_EMPL_ENCODE(n) PPC_REG_VAL(8, (static_cast(u32, n)) & 0x3)
+#define EBC_CFG_CSTC_MASK      PPC_REG_VAL(9, 0x1)
+#define EBC_CFG_CSTC_HI                PPC_REG_VAL(9, 0x0)
+#define EBC_CFG_CSTC_DRIVEN    PPC_REG_VAL(9, 0x1)
+#define EBC_CFG_BPR_MASK       PPC_REG_VAL(11, 0x3)
+#define EBC_CFG_BPR_1DW                PPC_REG_VAL(11, 0x0)
+#define EBC_CFG_BPR_2DW                PPC_REG_VAL(11, 0x1)
+#define EBC_CFG_BPR_4DW                PPC_REG_VAL(11, 0x2)
+#define EBC_CFG_EMS_MASK       PPC_REG_VAL(13, 0x3)
+#define EBC_CFG_EMS_8BIT       PPC_REG_VAL(13, 0x0)
+#define EBC_CFG_EMS_16BIT      PPC_REG_VAL(13, 0x1)
+#define EBC_CFG_EMS_32BIT      PPC_REG_VAL(13, 0x2)
+#else
+#define EBC_CFG_LE_MASK                PPC_REG_VAL(0, 0x1)
+#define EBC_CFG_LE_UNLOCK      PPC_REG_VAL(0, 0x0)
+#define EBC_CFG_LE_LOCK                PPC_REG_VAL(0, 0x1)
+#define EBC_CFG_ATC_MASK       PPC_REG_VAL(5, 0x1)
+#define EBC_CFG_ATC_HI         PPC_REG_VAL(5, 0x0)
+#define EBC_CFG_ATC_PREVIOUS   PPC_REG_VAL(5, 0x1)
+#define EBC_CFG_DTC_MASK       PPC_REG_VAL(6, 0x1)
+#define EBC_CFG_DTC_HI         PPC_REG_VAL(6, 0x0)
+#define EBC_CFG_DTC_PREVIOUS   PPC_REG_VAL(6, 0x1)
+#define EBC_CFG_CTC_MASK       PPC_REG_VAL(7, 0x1)
+#define EBC_CFG_CTC_HI         PPC_REG_VAL(7, 0x0)
+#define EBC_CFG_CTC_PREVIOUS   PPC_REG_VAL(7, 0x1)
+#define EBC_CFG_OEO_MASK       PPC_REG_VAL(8, 0x1)
+#define EBC_CFG_OEO_HI         PPC_REG_VAL(8, 0x0)
+#define EBC_CFG_OEO_PREVIOUS   PPC_REG_VAL(8, 0x1)
+#define EBC_CFG_EMC_MASK       PPC_REG_VAL(9, 0x1)
+#define EBC_CFG_EMC_NONDEFAULT PPC_REG_VAL(9, 0x0)
+#define EBC_CFG_EMC_DEFAULT    PPC_REG_VAL(9, 0x1)
+#define EBC_CFG_PR_MASK                PPC_REG_VAL(21, 0x3)
+#define EBC_CFG_PR_16          PPC_REG_VAL(21, 0x0)
+#define EBC_CFG_PR_32          PPC_REG_VAL(21, 0x1)
+#define EBC_CFG_PR_64          PPC_REG_VAL(21, 0x2)
+#define EBC_CFG_PR_128         PPC_REG_VAL(21, 0x3)
+#endif
+
+#endif /* _PPC4xx_EBC_H_ */
diff --git a/include/asm-ppc/ppc4xx-intvec.h b/include/asm-ppc/ppc4xx-intvec.h
deleted file mode 100644 (file)
index 5b45de4..0000000
+++ /dev/null
@@ -1,474 +0,0 @@
-/*
-*  Copyright (C) 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
-*/
-
-/*
- * Interrupt vector number definitions to ease the
- * 405 -- 440 porting pain ;-)
- *
- * NOTE: They're not all here yet ... update as needed.
- *
- */
-
-#ifndef _VECNUMS_H_
-#define _VECNUMS_H_
-
-#if defined(CONFIG_440EPX) || defined(CONFIG_440GRX)
-
-/* UIC 0 */
-#define VECNUM_U0                   0  /* UART 0                        */
-#define VECNUM_U1                   1  /* UART 1                        */
-#define VECNUM_IIC0                 2  /* IIC                           */
-#define VECNUM_KRD                  3  /* Kasumi Ready for data         */
-#define VECNUM_KDA                  4  /* Kasumi Data Available         */
-#define VECNUM_PCRW                 5  /* PCI command register write    */
-#define VECNUM_PPM                  6  /* PCI power management          */
-#define VECNUM_IIC1                 7  /* IIC                           */
-#define VECNUM_SPI                  8  /* SPI                           */
-#define VECNUM_EPCISER              9  /* External PCI SERR             */
-#define VECNUM_MTE                 10  /* MAL TXEOB                     */
-#define VECNUM_MRE                 11  /* MAL RXEOB                     */
-#define VECNUM_D0                  12  /* DMA channel 0                 */
-#define VECNUM_D1                  13  /* DMA channel 1                 */
-#define VECNUM_D2                  14  /* DMA channel 2                 */
-#define VECNUM_D3                  15  /* DMA channel 3                 */
-#define VECNUM_UD0                 16  /* UDMA irq 0                    */
-#define VECNUM_UD1                 17  /* UDMA irq 1                    */
-#define VECNUM_UD2                 18  /* UDMA irq 2                    */
-#define VECNUM_UD3                 19  /* UDMA irq 3                    */
-#define VECNUM_HSB2D               20  /* USB2.0 Device                 */
-#define VECNUM_USBDEV             20  /* USB 1.1/USB 2.0 Device        */
-#define VECNUM_OHCI1               21  /* USB2.0 Host OHCI irq 1        */
-#define VECNUM_OHCI2               22  /* USB2.0 Host OHCI irq 2        */
-#define VECNUM_EIP94               23  /* Security EIP94                */
-#define VECNUM_ETH0                24  /* Emac 0                        */
-#define VECNUM_ETH1                25  /* Emac 1                        */
-#define VECNUM_EHCI                26  /* USB2.0 Host EHCI              */
-#define VECNUM_EIR4                27  /* External interrupt 4          */
-#define VECNUM_UIC2NC              28  /* UIC2 non-critical interrupt   */
-#define VECNUM_UIC2C               29  /* UIC2 critical interrupt       */
-#define VECNUM_UIC1NC              30  /* UIC1 non-critical interrupt   */
-#define VECNUM_UIC1C               31  /* UIC1 critical interrupt       */
-
-/* UIC 1 */
-#define VECNUM_MS           (32 +  0)  /* MAL SERR                      */
-#define VECNUM_MTDE         (32 +  1)  /* MAL TXDE                      */
-#define VECNUM_MRDE         (32 +  2)  /* MAL RXDE                      */
-#define VECNUM_U2           (32 +  3)  /* UART 2                        */
-#define VECNUM_U3           (32 +  4)  /* UART 3                        */
-#define VECNUM_EBCO         (32 +  5)  /* EBCO interrupt status         */
-#define VECNUM_NDFC         (32 +  6)  /* NDFC                          */
-#define VECNUM_KSLE         (32 +  7)  /* KASUMI slave error            */
-#define VECNUM_CT5          (32 +  8)  /* GPT compare timer 5           */
-#define VECNUM_CT6          (32 +  9)  /* GPT compare timer 6           */
-#define VECNUM_PLB34I0      (32 + 10)  /* PLB3X4X MIRQ0                 */
-#define VECNUM_PLB34I1      (32 + 11)  /* PLB3X4X MIRQ1                 */
-#define VECNUM_PLB34I2      (32 + 12)  /* PLB3X4X MIRQ2                 */
-#define VECNUM_PLB34I3      (32 + 13)  /* PLB3X4X MIRQ3                 */
-#define VECNUM_PLB34I4      (32 + 14)  /* PLB3X4X MIRQ4                 */
-#define VECNUM_PLB34I5      (32 + 15)  /* PLB3X4X MIRQ5                 */
-#define VECNUM_CT0          (32 + 16)  /* GPT compare timer 0           */
-#define VECNUM_CT1          (32 + 17)  /* GPT compare timer 1           */
-#define VECNUM_EIR7         (32 + 18)  /* External interrupt 7          */
-#define VECNUM_EIR8         (32 + 19)  /* External interrupt 8          */
-#define VECNUM_EIR9         (32 + 20)  /* External interrupt 9          */
-#define VECNUM_CT2          (32 + 21)  /* GPT compare timer 2           */
-#define VECNUM_CT3          (32 + 22)  /* GPT compare timer 3           */
-#define VECNUM_CT4          (32 + 23)  /* GPT compare timer 4           */
-#define VECNUM_SRE          (32 + 24)  /* Serial ROM error              */
-#define VECNUM_GPTDC        (32 + 25)  /* GPT decrementer pulse         */
-#define VECNUM_RSVD0        (32 + 26)  /* Reserved                      */
-#define VECNUM_EPCIPER      (32 + 27)  /* External PCI PERR             */
-#define VECNUM_EIR0         (32 + 28)  /* External interrupt 0          */
-#define VECNUM_EWU0         (32 + 29)  /* Ethernet 0 wakeup             */
-#define VECNUM_EIR1         (32 + 30)  /* External interrupt 1          */
-#define VECNUM_EWU1         (32 + 31)  /* Ethernet 1 wakeup             */
-
-#define VECNUM_TXDE         VECNUM_MTDE
-#define VECNUM_RXDE         VECNUM_MRDE
-
-/* UIC 2 */
-#define VECNUM_EIR5         (64 +  0)  /* External interrupt 5          */
-#define VECNUM_EIR6         (64 +  1)  /* External interrupt 6          */
-#define VECNUM_OPB          (64 +  2)  /* OPB to PLB bridge int stat    */
-#define VECNUM_EIR2         (64 +  3)  /* External interrupt 2          */
-#define VECNUM_EIR3         (64 +  4)  /* External interrupt 3          */
-#define VECNUM_DDR2         (64 +  5)  /* DDR2 sdram                    */
-#define VECNUM_MCTX0        (64 +  6)  /* MAl intp coalescence TX0      */
-#define VECNUM_MCTX1        (64 +  7)  /* MAl intp coalescence TX1      */
-#define VECNUM_MCTR0        (64 +  8)  /* MAl intp coalescence TR0      */
-#define VECNUM_MCTR1        (64 +  9)  /* MAl intp coalescence TR1      */
-
-#elif defined(CONFIG_460EX) || defined(CONFIG_460GT)
-
-/* UIC 0 */
-#define VECNUM_U1      1               /* UART1                        */
-#define VECNUM_IIC0    2               /* IIC0                         */
-#define VECNUM_IIC1    3               /* IIC1                         */
-#define VECNUM_PIM     4               /* PCI inbound message          */
-#define VECNUM_PCRW    5               /* PCI command reg write        */
-#define VECNUM_PPM     6               /* PCI power management         */
-#define VECNUM_MSI0    8               /* PCI MSI level 0              */
-#define VECNUM_EIR0    9               /* External interrupt 0         */
-#define VECNUM_UIC2NC  10              /* UIC2 non-critical interrupt  */
-#define VECNUM_UIC2C   11              /* UIC2 critical interrupt      */
-#define VECNUM_D0      12              /* DMA channel 0                */
-#define VECNUM_D1      13              /* DMA channel 1                */
-#define VECNUM_D2      14              /* DMA channel 2                */
-#define VECNUM_D3      15              /* DMA channel 3                */
-#define VECNUM_UIC3NC  16              /* UIC3 non-critical interrupt  */
-#define VECNUM_UIC3C   17              /* UIC3 critical interrupt      */
-#define VECNUM_EIR1    9               /* External interrupt 1         */
-#define VECNUM_UIC1NC  30              /* UIC1 non-critical interrupt  */
-#define VECNUM_UIC1C   31              /* UIC1 critical interrupt      */
-
-/* UIC 1 */
-#define VECNUM_EIR2    (32 + 0)        /* External interrupt 0         */
-#define VECNUM_U0      (32 + 1)        /* UART0                        */
-#define VECNUM_EIR3    (32 + 20)       /* External interrupt 3         */
-#define VECNUM_EIR4    (32 + 21)       /* External interrupt 4         */
-#define VECNUM_EIR5    (32 + 26)       /* External interrupt 5         */
-#define VECNUM_EIR6    (32 + 27)       /* External interrupt 6         */
-#define VECNUM_U2      (32 + 28)       /* UART2                        */
-#define VECNUM_U3      (32 + 29)       /* UART3                        */
-#define VECNUM_EIR7    (32 + 30)       /* External interrupt 7         */
-#define VECNUM_EIR8    (32 + 31)       /* External interrupt 8         */
-
-/* UIC 2 */
-#define VECNUM_EIR9    (64 + 2)        /* External interrupt 9         */
-#define VECNUM_MS      (64 + 3)        /* MAL SERR                     */
-#define        VECNUM_TXDE     (64 + 4)        /* MAL TXDE                     */
-#define        VECNUM_RXDE     (64 + 5)        /* MAL RXDE                     */
-#define VECNUM_MTE     (64 + 6)        /* MAL TXEOB                    */
-#define        VECNUM_MRE      (64 + 7)        /* MAL RXEOB                    */
-#define        VECNUM_ETH0     (64 + 16)       /* Ethernet 0                   */
-#define        VECNUM_ETH1     (64 + 17)       /* Ethernet 1                   */
-#define        VECNUM_ETH2     (64 + 18)       /* Ethernet 2                   */
-#define        VECNUM_ETH3     (64 + 19)       /* Ethernet 3                   */
-#define VECNUM_EWU0    (64 + 20)       /* Emac 0 wakeup                */
-#define VECNUM_EWU1    (64 + 21)       /* Emac 1 wakeup                */
-#define VECNUM_EWU2    (64 + 22)       /* Emac 2 wakeup                */
-#define VECNUM_EWU3    (64 + 23)       /* Emac 3 wakeup                */
-#define VECNUM_EIR10   (64 + 24)       /* External interrupt 10        */
-#define VECNUM_EIR11   (64 + 25)       /* External interrupt 11        */
-
-/* UIC 3 */
-#define VECNUM_EIR12   (96 + 20)       /* External interrupt 20        */
-#define VECNUM_EIR13   (96 + 21)       /* External interrupt 21        */
-#define VECNUM_EIR14   (96 + 22)       /* External interrupt 22        */
-#define VECNUM_EIR15   (96 + 23)       /* External interrupt 23        */
-#define VECNUM_PCIEMSI0        (96 + 24)       /* PCI Express MSI level 0      */
-#define VECNUM_PCIEMSI1        (96 + 25)       /* PCI Express MSI level 1      */
-#define VECNUM_PCIEMSI2        (96 + 26)       /* PCI Express MSI level 2      */
-#define VECNUM_PCIEMSI3        (96 + 27)       /* PCI Express MSI level 3      */
-#define VECNUM_PCIEMSI4        (96 + 28)       /* PCI Express MSI level 4      */
-#define VECNUM_PCIEMSI5        (96 + 29)       /* PCI Express MSI level 5      */
-#define VECNUM_PCIEMSI6        (96 + 30)       /* PCI Express MSI level 6      */
-#define VECNUM_PCIEMSI7        (96 + 31)       /* PCI Express MSI level 7      */
-
-#elif defined(CONFIG_440SPE)
-
-/* UIC 0 */
-#define VECNUM_U0           0           /* UART0                        */
-#define VECNUM_U1           1           /* UART1                        */
-#define VECNUM_IIC0         2           /* IIC0                         */
-#define VECNUM_IIC1         3           /* IIC1                         */
-#define VECNUM_PIM          4           /* PCI inbound message          */
-#define VECNUM_PCRW         5           /* PCI command reg write        */
-#define VECNUM_PPM          6           /* PCI power management         */
-#define VECNUM_MSI0         7           /* PCI MSI level 0              */
-#define VECNUM_MSI1         8           /* PCI MSI level 0              */
-#define VECNUM_MSI2         9           /* PCI MSI level 0              */
-#define VECNUM_UIC2NC       10          /* UIC2 non-critical interrupt  */
-#define VECNUM_UIC2C        11          /* UIC2 critical interrupt      */
-#define VECNUM_D0           12          /* DMA channel 0                */
-#define VECNUM_D1           13          /* DMA channel 1                */
-#define VECNUM_D2           14          /* DMA channel 2                */
-#define VECNUM_D3           15          /* DMA channel 3                */
-#define VECNUM_UIC3NC       16          /* UIC3 non-critical interrupt  */
-#define VECNUM_UIC3C        17          /* UIC3 critical interrupt      */
-#define VECNUM_UIC1NC       30          /* UIC1 non-critical interrupt  */
-#define VECNUM_UIC1C        31          /* UIC1 critical interrupt      */
-
-/* UIC 1 */
-#define VECNUM_MS           (32 + 1 )   /* MAL SERR                     */
-#define VECNUM_TXDE         (32 + 2 )   /* MAL TXDE                     */
-#define VECNUM_RXDE         (32 + 3 )   /* MAL RXDE                     */
-#define VECNUM_MTE          (32 + 6 )   /* MAL Tx EOB                   */
-#define VECNUM_MRE          (32 + 7 )   /* MAL Rx EOB                   */
-#define VECNUM_CT0          (32 + 12 )  /* GPT compare timer 0          */
-#define VECNUM_CT1          (32 + 13 )  /* GPT compare timer 1          */
-#define VECNUM_CT2          (32 + 14 )  /* GPT compare timer 2          */
-#define VECNUM_CT3          (32 + 15 )  /* GPT compare timer 3          */
-#define VECNUM_CT4          (32 + 16 )  /* GPT compare timer 4          */
-#define VECNUM_ETH0         (32 + 28)   /* Ethernet interrupt status    */
-#define VECNUM_EWU0         (32 + 29)   /* Emac  wakeup                 */
-
-/* UIC 2 */
-#define VECNUM_EIR5         (64 + 24)   /* External interrupt 5         */
-#define VECNUM_EIR4         (64 + 25)   /* External interrupt 4         */
-#define VECNUM_EIR3         (64 + 26)   /* External interrupt 3         */
-#define VECNUM_EIR2         (64 + 27)   /* External interrupt 2         */
-#define VECNUM_EIR1         (64 + 28)   /* External interrupt 1         */
-#define VECNUM_EIR0         (64 + 29)   /* External interrupt 0         */
-
-#elif defined(CONFIG_440SP)
-
-/* UIC 0 */
-#define VECNUM_U0           0           /* UART0                        */
-#define VECNUM_U1           1           /* UART1                        */
-#define VECNUM_IIC0         2           /* IIC0                         */
-#define VECNUM_IIC1         3           /* IIC1                         */
-#define VECNUM_PIM          4           /* PCI inbound message          */
-#define VECNUM_PCRW         5           /* PCI command reg write        */
-#define VECNUM_PPM          6           /* PCI power management         */
-#define VECNUM_UIC1NC       30          /* UIC1 non-critical interrupt  */
-#define VECNUM_UIC1C        31          /* UIC1 critical interrupt      */
-
-/* UIC 1 */
-#define VECNUM_EIR0         (32 + 0)   /* External interrupt 0         */
-#define VECNUM_MS           (32 + 1)   /* MAL SERR                     */
-#define VECNUM_TXDE         (32 + 2)   /* MAL TXDE                     */
-#define VECNUM_RXDE         (32 + 3)   /* MAL RXDE                     */
-#define VECNUM_MTE          (32 + 6)   /* MAL Tx EOB                   */
-#define VECNUM_MRE          (32 + 7)   /* MAL Rx EOB                   */
-#define VECNUM_CT0          (32 + 12)  /* GPT compare timer 0          */
-#define VECNUM_CT1          (32 + 13)  /* GPT compare timer 1          */
-#define VECNUM_CT2          (32 + 14)  /* GPT compare timer 2          */
-#define VECNUM_CT3          (32 + 15)  /* GPT compare timer 3          */
-#define VECNUM_CT4          (32 + 16)  /* GPT compare timer 4          */
-#define VECNUM_ETH0         (32 + 28)  /* Ethernet interrupt status    */
-#define VECNUM_EWU0         (32 + 29)  /* Emac  wakeup                 */
-
-#elif defined(CONFIG_440)
-
-/* UIC 0 */
-#define VECNUM_U0           0           /* UART0                        */
-#define VECNUM_U1           1           /* UART1                        */
-#define VECNUM_IIC0         2           /* IIC0                         */
-#define VECNUM_IIC1         3           /* IIC1                         */
-#define VECNUM_PIM          4           /* PCI inbound message          */
-#define VECNUM_PCRW         5           /* PCI command reg write        */
-#define VECNUM_PPM          6           /* PCI power management         */
-#define VECNUM_MSI0         7           /* PCI MSI level 0              */
-#define VECNUM_MSI1         8           /* PCI MSI level 0              */
-#define VECNUM_MSI2         9           /* PCI MSI level 0              */
-#define VECNUM_MTE          10          /* MAL TXEOB                    */
-#define VECNUM_MRE          11          /* MAL RXEOB                    */
-#define VECNUM_D0           12          /* DMA channel 0                */
-#define VECNUM_D1           13          /* DMA channel 1                */
-#define VECNUM_D2           14          /* DMA channel 2                */
-#define VECNUM_D3           15          /* DMA channel 3                */
-#define VECNUM_CT0          18          /* GPT compare timer 0          */
-#define VECNUM_CT1          19          /* GPT compare timer 1          */
-#define VECNUM_CT2          20          /* GPT compare timer 2          */
-#define VECNUM_CT3          21          /* GPT compare timer 3          */
-#define VECNUM_CT4          22          /* GPT compare timer 4          */
-#define VECNUM_EIR0         23          /* External interrupt 0         */
-#define VECNUM_EIR1         24          /* External interrupt 1         */
-#define VECNUM_EIR2         25          /* External interrupt 2         */
-#define VECNUM_EIR3         26          /* External interrupt 3         */
-#define VECNUM_EIR4         27          /* External interrupt 4         */
-#define VECNUM_EIR5         28          /* External interrupt 5         */
-#define VECNUM_EIR6         29          /* External interrupt 6         */
-#define VECNUM_UIC1NC       30          /* UIC1 non-critical interrupt  */
-#define VECNUM_UIC1C        31          /* UIC1 critical interrupt      */
-
-/* UIC 1 */
-#define VECNUM_MS           (32 + 0 )   /* MAL SERR                     */
-#define VECNUM_TXDE         (32 + 1 )   /* MAL TXDE                     */
-#define VECNUM_RXDE         (32 + 2 )   /* MAL RXDE                     */
-#define VECNUM_USBDEV      (32 + 23)   /* USB 1.1/USB 2.0 Device       */
-#define VECNUM_ETH0         (32 + 28)   /* Ethernet 0 interrupt status  */
-#define VECNUM_EWU0         (32 + 29)   /* Ethernet 0 wakeup            */
-
-#else /* !defined(CONFIG_440) */
-
-#if defined(CONFIG_405EZ)
-#define VECNUM_D0              0       /* DMA channel 0                */
-#define VECNUM_D1              1       /* DMA channel 1                */
-#define VECNUM_D2              2       /* DMA channel 2                */
-#define VECNUM_D3              3       /* DMA channel 3                */
-#define VECNUM_1588            4       /* IEEE 1588 network synchronization */
-#define VECNUM_U0              5       /* UART0                        */
-#define VECNUM_U1              6       /* UART1                        */
-#define VECNUM_CAN0            7       /* CAN 0                        */
-#define VECNUM_CAN1            8       /* CAN 1                        */
-#define VECNUM_SPI             9       /* SPI                          */
-#define VECNUM_IIC0            10      /* I2C                          */
-#define VECNUM_CHT0            11      /* Chameleon timer high pri interrupt */
-#define VECNUM_CHT1            12      /* Chameleon timer high pri interrupt */
-#define VECNUM_USBH1           13      /* USB Host 1                   */
-#define VECNUM_USBH2           14      /* USB Host 2                   */
-#define VECNUM_USBDEV          15      /* USB Device                   */
-#define VECNUM_ETH0            16      /* 10/100 Ethernet interrupt status */
-#define VECNUM_EWU0            17      /* Ethernet wakeup sequence detected */
-
-#define VECNUM_MADMAL          18      /* Logical OR of following MadMAL int */
-#define VECNUM_MS              18      /*      MAL_SERR_INT            */
-#define VECNUM_TXDE            18      /*      MAL_TXDE_INT            */
-#define VECNUM_RXDE            18      /*      MAL_RXDE_INT            */
-
-#define VECNUM_MTE             19      /* MAL TXEOB                    */
-#define VECNUM_MTE1            20      /* MAL TXEOB1                   */
-#define VECNUM_MRE             21      /* MAL RXEOB                    */
-#define VECNUM_NAND            22      /* NAND Flash controller        */
-#define VECNUM_ADC             23      /* ADC                          */
-#define VECNUM_DAC             24      /* DAC                          */
-#define VECNUM_OPB2PLB         25      /* OPB to PLB bridge interrupt  */
-#define VECNUM_RESERVED0       26      /* Reserved                     */
-#define VECNUM_EIR0            27      /* External interrupt 0         */
-#define VECNUM_EIR1            28      /* External interrupt 1         */
-#define VECNUM_EIR2            29      /* External interrupt 2         */
-#define VECNUM_EIR3            30      /* External interrupt 3         */
-#define VECNUM_EIR4            31      /* External interrupt 4         */
-
-#elif defined(CONFIG_405EX)
-
-/* UIC 0 */
-#define VECNUM_U0              00
-#define VECNUM_U1              01
-#define VECNUM_IIC0            02
-#define VECNUM_PKA             03
-#define VECNUM_TRNG            04
-#define VECNUM_EBM             05
-#define VECNUM_BGI             06
-#define VECNUM_IIC1            07
-#define VECNUM_SPI             08
-#define VECNUM_EIR0            09
-#define VECNUM_MTE             10      /* MAL Tx EOB */
-#define VECNUM_MRE             11      /* MAL Rx EOB */
-#define VECNUM_DMA0            12
-#define VECNUM_DMA1            13
-#define VECNUM_DMA2            14
-#define VECNUM_DMA3            15
-#define VECNUM_PCIE0AL         16
-#define VECNUM_PCIE0VPD                17
-#define VECNUM_RPCIE0HRST      18
-#define VECNUM_FPCIE0HRST      19
-#define VECNUM_PCIE0TCR                20
-#define VECNUM_PCIEMSI0                21
-#define VECNUM_PCIEMSI1                22
-#define VECNUM_SECURITY                23
-#define VECNUM_ETH0            24
-#define VECNUM_ETH1            25
-#define VECNUM_PCIEMSI2                26
-#define VECNUM_EIR4            27
-#define VECNUM_UIC2NC          28
-#define VECNUM_UIC2C           29
-#define VECNUM_UIC1NC          30
-#define VECNUM_UIC1C           31
-
-/* UIC 1 */
-#define VECNUM_MS              (32 + 00)       /* MAL SERR */
-#define VECNUM_TXDE            (32 + 01)       /* MAL TXDE */
-#define VECNUM_RXDE            (32 + 02)       /* MAL RXDE */
-#define VECNUM_PCIE0BMVC0      (32 + 03)
-#define VECNUM_PCIE0DCRERR     (32 + 04)
-#define VECNUM_EBC             (32 + 05)
-#define VECNUM_NDFC            (32 + 06)
-#define VECNUM_PCEI1DCRERR     (32 + 07)
-#define VECNUM_CT8             (32 + 08)
-#define VECNUM_CT9             (32 + 09)
-#define VECNUM_PCIE1AL         (32 + 10)
-#define VECNUM_PCIE1VPD                (32 + 11)
-#define VECNUM_RPCE1HRST       (32 + 12)
-#define VECNUM_FPCE1HRST       (32 + 13)
-#define VECNUM_PCIE1TCR                (32 + 14)
-#define VECNUM_PCIE1VC0                (32 + 15)
-#define VECNUM_CT3             (32 + 16)
-#define VECNUM_CT4             (32 + 17)
-#define VECNUM_EIR7            (32 + 18)
-#define VECNUM_EIR8            (32 + 19)
-#define VECNUM_EIR9            (32 + 20)
-#define VECNUM_CT5             (32 + 21)
-#define VECNUM_CT6             (32 + 22)
-#define VECNUM_CT7             (32 + 23)
-#define VECNUM_SROM            (32 + 24)       /* SERIAL ROM */
-#define VECNUM_GPTDECPULS      (32 + 25)       /* GPT Decrement pulse */
-#define VECNUM_EIR2            (32 + 26)
-#define VECNUM_EIR5            (32 + 27)
-#define VECNUM_EIR6            (32 + 28)
-#define VECNUM_EMAC0WAKE       (32 + 29)
-#define VECNUM_EIR1            (32 + 30)
-#define VECNUM_EMAC1WAKE       (32 + 31)
-
-/* UIC 2 */
-#define VECNUM_PCIE0INTA       (64 + 00)       /* PCIE0 INTA */
-#define VECNUM_PCIE0INTB       (64 + 01)       /* PCIE0 INTB */
-#define VECNUM_PCIE0INTC       (64 + 02)       /* PCIE0 INTC */
-#define VECNUM_PCIE0INTD       (64 + 03)       /* PCIE0 INTD */
-#define VECNUM_EIR3            (64 + 04)       /* External IRQ 3 */
-#define VECNUM_DDRMCUE         (64 + 05)
-#define VECNUM_DDRMCCE         (64 + 06)
-#define VECNUM_MALINTCOATX0    (64 + 07)       /* Interrupt coalecence TX0 */
-#define VECNUM_MALINTCOATX1    (64 + 08)       /* Interrupt coalecence TX1 */
-#define VECNUM_MALINTCOARX0    (64 + 09)       /* Interrupt coalecence RX0 */
-#define VECNUM_MALINTCOARX1    (64 + 10)       /* Interrupt coalecence RX1 */
-#define VECNUM_PCIE1INTA       (64 + 11)       /* PCIE0 INTA */
-#define VECNUM_PCIE1INTB       (64 + 12)       /* PCIE0 INTB */
-#define VECNUM_PCIE1INTC       (64 + 13)       /* PCIE0 INTC */
-#define VECNUM_PCIE1INTD       (64 + 14)       /* PCIE0 INTD */
-#define VECNUM_RPCIEMSI2       (64 + 15)       /* MSI level 2 */
-#define VECNUM_PCIEMSI3                (64 + 16)       /* MSI level 2 */
-#define VECNUM_PCIEMSI4                (64 + 17)       /* MSI level 2 */
-#define VECNUM_PCIEMSI5                (64 + 18)       /* MSI level 2 */
-#define VECNUM_PCIEMSI6                (64 + 19)       /* MSI level 2 */
-#define VECNUM_PCIEMSI7                (64 + 20)       /* MSI level 2 */
-#define VECNUM_PCIEMSI8                (64 + 21)       /* MSI level 2 */
-#define VECNUM_PCIEMSI9                (64 + 22)       /* MSI level 2 */
-#define VECNUM_PCIEMSI10       (64 + 23)       /* MSI level 2 */
-#define VECNUM_PCIEMSI11       (64 + 24)       /* MSI level 2 */
-#define VECNUM_PCIEMSI12       (64 + 25)       /* MSI level 2 */
-#define VECNUM_PCIEMSI13       (64 + 26)       /* MSI level 2 */
-#define VECNUM_PCIEMSI14       (64 + 27)       /* MSI level 2 */
-#define VECNUM_PCIEMSI15       (64 + 28)       /* MSI level 2 */
-#define VECNUM_PLB4XAHB                (64 + 29)       /* PLBxAHB bridge */
-#define VECNUM_USBWAKE         (64 + 30)       /* USB wakup */
-#define VECNUM_USBOTG          (64 + 31)       /* USB OTG */
-
-#else  /* !CONFIG_405EZ */
-
-#define VECNUM_U0           0           /* UART0                        */
-#define VECNUM_U1           1           /* UART1                        */
-#define VECNUM_D0           5           /* DMA channel 0                */
-#define VECNUM_D1           6           /* DMA channel 1                */
-#define VECNUM_D2           7           /* DMA channel 2                */
-#define VECNUM_D3           8           /* DMA channel 3                */
-#define VECNUM_EWU0         9           /* Ethernet wakeup              */
-#define VECNUM_MS           10          /* MAL SERR                     */
-#define VECNUM_MTE          11          /* MAL TXEOB                    */
-#define VECNUM_MRE          12          /* MAL RXEOB                    */
-#define VECNUM_TXDE         13          /* MAL TXDE                     */
-#define VECNUM_RXDE         14          /* MAL RXDE                     */
-#define VECNUM_ETH0         15          /* Ethernet interrupt status    */
-#define VECNUM_EIR0         25          /* External interrupt 0         */
-#define VECNUM_EIR1         26          /* External interrupt 1         */
-#define VECNUM_EIR2         27          /* External interrupt 2         */
-#define VECNUM_EIR3         28          /* External interrupt 3         */
-#define VECNUM_EIR4         29          /* External interrupt 4         */
-#define VECNUM_EIR5         30          /* External interrupt 5         */
-#define VECNUM_EIR6         31          /* External interrupt 6         */
-#endif /* defined(CONFIG_405EZ) */
-
-#endif /* defined(CONFIG_440) */
-
-#endif /* _VECNUMS_H_ */
index e151f0c11399d9476cc145895170374f6486f68b..df787b3d4c7d961a2031263916956a3135f9a1da 100644 (file)
  * Memory Bank 0-7 configuration
  */
 #if defined(CONFIG_440SPE) || \
-    defined(CONFIG_460EX) || defined(CONFIG_460GT)
+    defined(CONFIG_460EX) || defined(CONFIG_460GT) || \
+    defined(CONFIG_460SX)
 #define SDRAM_RXBAS_SDBA_MASK          0xFFE00000      /* Base address */
 #define SDRAM_RXBAS_SDBA_ENCODE(n)     ((u32)(((phys_size_t)(n) >> 2) & 0xFFE00000))
 #define SDRAM_RXBAS_SDBA_DECODE(n)     ((((phys_size_t)(n)) & 0xFFE00000) << 2)
 /*
  * Memory controller registers
  */
+#define SDRAM_BESR     0x00    /* PLB bus error status (read/clear)         */
+#define SDRAM_BESRT    0x01    /* PLB bus error status (test/set)           */
+#define SDRAM_BEARL    0x02    /* PLB bus error address low                 */
+#define SDRAM_BEARH    0x03    /* PLB bus error address high                */
+#define SDRAM_WMIRQ    0x06    /* PLB write master interrupt (read/clear)   */
+#define SDRAM_WMIRQT   0x07    /* PLB write master interrupt (test/set)     */
+#define SDRAM_PLBOPT   0x08    /* PLB slave options                         */
+#define SDRAM_PUABA    0x09    /* PLB upper address base                    */
+#ifndef CONFIG_405EX
 #define SDRAM_MCSTAT   0x14    /* memory controller status                  */
+#else
+#define SDRAM_MCSTAT   0x1F    /* memory controller status                  */
+#endif
 #define SDRAM_MCOPT1   0x20    /* memory controller options 1               */
 #define SDRAM_MCOPT2   0x21    /* memory controller options 2               */
 #define SDRAM_MODT0    0x22    /* on die termination for bank 0             */
 #define SDRAM_MMODE    0x88    /* memory mode                               */
 #define SDRAM_MEMODE   0x89    /* memory extended mode                      */
 #define SDRAM_ECCCR    0x98    /* ECC error status                          */
+#define SDRAM_ECCES    SDRAM_ECCCR
 #define SDRAM_CID      0xA4    /* core ID                                   */
+#ifndef CONFIG_405EX
 #define SDRAM_RID      0xA8    /* revision ID                               */
+#endif
+#define SDRAM_FCSR     0xB0    /* feedback calibration status               */
 #define SDRAM_RTSR     0xB1    /* run time status tracking                  */
+#ifdef CONFIG_405EX
+#define SDRAM_RID      0xF8    /* revision ID                               */
+#endif
+
+/*
+ * Memory Controller Bus Error Status
+ */
+#define SDRAM_BESR_MASK                        PPC_REG_VAL(7, 0xFF)
+#define SDRAM_BESR_M0ID_MASK           PPC_REG_VAL(3, 0xF)
+#define SDRAM_BESR_M0ID_ICU            PPC_REG_VAL(3, 0x0)
+#define SDRAM_BESR_M0ID_PCIE0          PPC_REG_VAL(3, 0x1)
+#define SDRAM_BESR_M0ID_PCIE1          PPC_REG_VAL(3, 0x2)
+#define SDRAM_BESR_M0ID_DMA            PPC_REG_VAL(3, 0x3)
+#define SDRAM_BESR_M0ID_DCU            PPC_REG_VAL(3, 0x4)
+#define SDRAM_BESR_M0ID_OPB            PPC_REG_VAL(3, 0x5)
+#define SDRAM_BESR_M0ID_MAL            PPC_REG_VAL(3, 0x6)
+#define SDRAM_BESR_M0ID_SEC            PPC_REG_VAL(3, 0x7)
+#define SDRAM_BESR_M0ET_MASK           PPC_REG_VAL(6, 0x7)
+#define SDRAM_BESR_M0ET_NONE           PPC_REG_VAL(6, 0x0)
+#define SDRAM_BESR_M0ET_ECC            PPC_REG_VAL(6, 0x1)
+#define SDRAM_BESR_M0RW_WRITE          PPC_REG_VAL(7, 0)
+#define SDRAM_BESR_M0RW_READ           PPC_REG_VAL(8, 1)
 
 /*
  * Memory Controller Status
  * SDRAM Delay Line Calibration Register
  */
 #define SDRAM_DLCR_DCLM_MASK           0x80000000
-#define SDRAM_DLCR_DCLM_MANUEL         0x80000000
+#define SDRAM_DLCR_DCLM_MANUAL         0x80000000
 #define SDRAM_DLCR_DCLM_AUTO           0x00000000
 #define SDRAM_DLCR_DLCR_MASK           0x08000000
 #define SDRAM_DLCR_DLCR_CALIBRATE      0x08000000
 #define SDRAM_DLCR_DLCV_ENCODE(n)      ((((u32)(n))&0x1FF)<<0)
 #define SDRAM_DLCR_DLCV_DECODE(n)      ((((u32)(n))>>0)&0x1FF)
 
+/*
+ * SDRAM Memory On Die Terimination Control Register
+ */
+#define SDRAM_MODT_ODTON_DISABLE               PPC_REG_VAL(0, 0)
+#define SDRAM_MODT_ODTON_ENABLE                        PPC_REG_VAL(0, 1)
+#define SDRAM_MODT_EB1W_DISABLE                        PPC_REG_VAL(1, 0)
+#define SDRAM_MODT_EB1W_ENABLE                 PPC_REG_VAL(1, 1)
+#define SDRAM_MODT_EB1R_DISABLE                        PPC_REG_VAL(2, 0)
+#define SDRAM_MODT_EB1R_ENABLE                 PPC_REG_VAL(2, 1)
+#define SDRAM_MODT_EB0W_DISABLE                        PPC_REG_VAL(7, 0)
+#define SDRAM_MODT_EB0W_ENABLE                 PPC_REG_VAL(7, 1)
+#define SDRAM_MODT_EB0R_DISABLE                        PPC_REG_VAL(8, 0)
+#define SDRAM_MODT_EB0R_ENABLE                 PPC_REG_VAL(8, 1)
+
 /*
  * SDRAM Controller On Die Termination Register
  */
-#define SDRAM_CODT_ODT_ON                      0x80000000
-#define SDRAM_CODT_ODT_OFF                     0x00000000
-#define SDRAM_CODT_DQS_VOLTAGE_DDR_MASK                0x00000020
-#define SDRAM_CODT_DQS_2_5_V_DDR1              0x00000000
-#define SDRAM_CODT_DQS_1_8_V_DDR2              0x00000020
-#define SDRAM_CODT_DQS_MASK                    0x00000010
-#define SDRAM_CODT_DQS_DIFFERENTIAL            0x00000000
-#define SDRAM_CODT_DQS_SINGLE_END              0x00000010
-#define SDRAM_CODT_CKSE_DIFFERENTIAL           0x00000000
-#define SDRAM_CODT_CKSE_SINGLE_END             0x00000008
-#define SDRAM_CODT_FEEBBACK_RCV_SINGLE_END     0x00000004
-#define SDRAM_CODT_FEEBBACK_DRV_SINGLE_END     0x00000002
-#define SDRAM_CODT_IO_HIZ                      0x00000000
-#define SDRAM_CODT_IO_NMODE                    0x00000001
+#define SDRAM_CODT_ODT_ON                      PPC_REG_VAL(0, 1)
+#define SDRAM_CODT_ODT_OFF                     PPC_REG_VAL(0, 0)
+#define SDRAM_CODT_RK1W_ON                     PPC_REG_VAL(1, 1)
+#define SDRAM_CODT_RK1W_OFF                    PPC_REG_VAL(1, 0)
+#define SDRAM_CODT_RK1R_ON                     PPC_REG_VAL(2, 1)
+#define SDRAM_CODT_RK1R_OFF                    PPC_REG_VAL(2, 0)
+#define SDRAM_CODT_RK0W_ON                     PPC_REG_VAL(7, 1)
+#define SDRAM_CODT_RK0W_OFF                    PPC_REG_VAL(7, 0)
+#define SDRAM_CODT_RK0R_ON                     PPC_REG_VAL(8, 1)
+#define SDRAM_CODT_RK0R_OFF                    PPC_REG_VAL(8, 0)
+#define SDRAM_CODT_ODTSH_NORMAL                        PPC_REG_VAL(10, 0)
+#define SDRAM_CODT_ODTSH_REMOVE_ONE_AT_END     PPC_REG_VAL(10, 1)
+#define SDRAM_CODT_ODTSH_ADD_ONE_AT_START      PPC_REG_VAL(10, 2)
+#define SDRAM_CODT_ODTSH_SHIFT_ONE_EARLIER     PPC_REG_VAL(10, 3)
+#define SDRAM_CODT_CODTZ_75OHM                 PPC_REG_VAL(11, 0)
+#define SDRAM_CODT_CKEG_ON                     PPC_REG_VAL(12, 1)
+#define SDRAM_CODT_CKEG_OFF                    PPC_REG_VAL(12, 0)
+#define SDRAM_CODT_CTLG_ON                     PPC_REG_VAL(13, 1)
+#define SDRAM_CODT_CTLG_OFF                    PPC_REG_VAL(13, 0)
+#define SDRAM_CODT_FBDG_ON                     PPC_REG_VAL(14, 1)
+#define SDRAM_CODT_FBDG_OFF                    PPC_REG_VAL(14, 0)
+#define SDRAM_CODT_FBRG_ON                     PPC_REG_VAL(15, 1)
+#define SDRAM_CODT_FBRG_OFF                    PPC_REG_VAL(15, 0)
+#define SDRAM_CODT_CKLZ_36OHM                  PPC_REG_VAL(18, 1)
+#define SDRAM_CODT_CKLZ_18OHM                  PPC_REG_VAL(18, 0)
+#define SDRAM_CODT_DQS_VOLTAGE_DDR_MASK                PPC_REG_VAL(26, 1)
+#define SDRAM_CODT_DQS_2_5_V_DDR1              PPC_REG_VAL(26, 0)
+#define SDRAM_CODT_DQS_1_8_V_DDR2              PPC_REG_VAL(26, 1)
+#define SDRAM_CODT_DQS_MASK                    PPC_REG_VAL(27, 1)
+#define SDRAM_CODT_DQS_DIFFERENTIAL            PPC_REG_VAL(27, 0)
+#define SDRAM_CODT_DQS_SINGLE_END              PPC_REG_VAL(27, 1)
+#define SDRAM_CODT_CKSE_DIFFERENTIAL           PPC_REG_VAL(28, 0)
+#define SDRAM_CODT_CKSE_SINGLE_END             PPC_REG_VAL(28, 1)
+#define SDRAM_CODT_FEEBBACK_RCV_SINGLE_END     PPC_REG_VAL(29, 1)
+#define SDRAM_CODT_FEEBBACK_DRV_SINGLE_END     PPC_REG_VAL(30, 1)
+#define SDRAM_CODT_IO_HIZ                      PPC_REG_VAL(31, 0)
+#define SDRAM_CODT_IO_NMODE                    PPC_REG_VAL(31, 1)
 
 /*
- * SDRAM Mode Register
+ * SDRAM Initialization Preload Register
  */
-#define SDRAM_MMODE_WR_MASK            0x00000E00
-#define SDRAM_MMODE_WR_DDR1            0x00000000
-#define SDRAM_MMODE_WR_DDR2_3_CYC      0x00000400
-#define SDRAM_MMODE_WR_DDR2_4_CYC      0x00000600
-#define SDRAM_MMODE_WR_DDR2_5_CYC      0x00000800
-#define SDRAM_MMODE_WR_DDR2_6_CYC      0x00000A00
-#define SDRAM_MMODE_DCL_MASK           0x00000070
-#define SDRAM_MMODE_DCL_DDR1_2_0_CLK   0x00000020
-#define SDRAM_MMODE_DCL_DDR1_2_5_CLK   0x00000060
-#define SDRAM_MMODE_DCL_DDR1_3_0_CLK   0x00000030
-#define SDRAM_MMODE_DCL_DDR2_2_0_CLK   0x00000020
-#define SDRAM_MMODE_DCL_DDR2_3_0_CLK   0x00000030
-#define SDRAM_MMODE_DCL_DDR2_4_0_CLK   0x00000040
-#define SDRAM_MMODE_DCL_DDR2_5_0_CLK   0x00000050
-#define SDRAM_MMODE_DCL_DDR2_6_0_CLK   0x00000060
-#define SDRAM_MMODE_DCL_DDR2_7_0_CLK   0x00000070
+#define SDRAM_INITPLR_ENABLE                   PPC_REG_VAL(0, 1)
+#define SDRAM_INITPLR_DISABLE                  PPC_REG_VAL(0, 0)
+#define SDRAM_INITPLR_IMWT_MASK                        PPC_REG_VAL(8, 0xFF)
+#define SDRAM_INITPLR_IMWT_ENCODE(n)           PPC_REG_VAL(8, \
+                                                           (static_cast(u32, \
+                                                                        n)) \
+                                                           & 0xFF)
+#define SDRAM_INITPLR_ICMD_MASK                        PPC_REG_VAL(12, 0x7)
+#define SDRAM_INITPLR_ICMD_ENCODE(n)           PPC_REG_VAL(12, \
+                                                           (static_cast(u32, \
+                                                                        n)) \
+                                                           & 0x7)
+#define SDRAM_INITPLR_IBA_MASK                 PPC_REG_VAL(15, 0x7)
+#define SDRAM_INITPLR_IBA_ENCODE(n)            PPC_REG_VAL(15, \
+                                                           (static_cast(u32, \
+                                                                        n)) \
+                                                           & 0x7)
+#define SDRAM_INITPLR_IMA_MASK                 PPC_REG_VAL(31, 0x7FFF)
+#define SDRAM_INITPLR_IMA_ENCODE(n)            PPC_REG_VAL(31, \
+                                                           (static_cast(u32, \
+                                                                        n)) \
+                                                           & 0x7FFF)
 
 /*
- * SDRAM Extended Mode Register
+ * JEDEC DDR Initialization Commands
  */
-#define SDRAM_MEMODE_DIC_MASK          0x00000002
-#define SDRAM_MEMODE_DIC_NORMAL                0x00000000
-#define SDRAM_MEMODE_DIC_WEAK          0x00000002
-#define SDRAM_MEMODE_DLL_MASK          0x00000001
-#define SDRAM_MEMODE_DLL_DISABLE       0x00000001
-#define SDRAM_MEMODE_DLL_ENABLE                0x00000000
-#define SDRAM_MEMODE_RTT_MASK          0x00000044
-#define SDRAM_MEMODE_RTT_DISABLED      0x00000000
-#define SDRAM_MEMODE_RTT_75OHM         0x00000004
-#define SDRAM_MEMODE_RTT_150OHM                0x00000040
-#define SDRAM_MEMODE_DQS_MASK          0x00000400
-#define SDRAM_MEMODE_DQS_DISABLE       0x00000400
-#define SDRAM_MEMODE_DQS_ENABLE                0x00000000
+#define JEDEC_CMD_NOP                          7
+#define JEDEC_CMD_PRECHARGE                    2
+#define JEDEC_CMD_REFRESH                      1
+#define JEDEC_CMD_EMR                          0
+#define JEDEC_CMD_READ                         5
+#define JEDEC_CMD_WRITE                                4
+
+/*
+ * JEDEC Precharge Command Memory Address Arguments
+ */
+#define JEDEC_MA_PRECHARGE_ONE                 (0 << 10)
+#define JEDEC_MA_PRECHARGE_ALL                 (1 << 10)
+
+/*
+ * JEDEC DDR EMR Command Bank Address Arguments
+ */
+#define JEDEC_BA_MR                            0
+#define JEDEC_BA_EMR                           1
+#define JEDEC_BA_EMR2                          2
+#define JEDEC_BA_EMR3                          3
+
+/*
+ * JEDEC DDR Mode Register
+ */
+#define JEDEC_MA_MR_PDMODE_FAST_EXIT           (0 << 12)
+#define JEDEC_MA_MR_PDMODE_SLOW_EXIT           (1 << 12)
+#define JEDEC_MA_MR_WR_MASK                    (0x7 << 9)
+#define JEDEC_MA_MR_WR_DDR1                    (0x0 << 9)
+#define JEDEC_MA_MR_WR_DDR2_2_CYC              (0x1 << 9)
+#define JEDEC_MA_MR_WR_DDR2_3_CYC              (0x2 << 9)
+#define JEDEC_MA_MR_WR_DDR2_4_CYC              (0x3 << 9)
+#define JEDEC_MA_MR_WR_DDR2_5_CYC              (0x4 << 9)
+#define JEDEC_MA_MR_WR_DDR2_6_CYC              (0x5 << 9)
+#define JEDEC_MA_MR_DLL_RESET                  (1 << 8)
+#define JEDEC_MA_MR_MODE_NORMAL                        (0 << 8)
+#define JEDEC_MA_MR_MODE_TEST                  (1 << 8)
+#define JEDEC_MA_MR_CL_MASK                    (0x7 << 4)
+#define JEDEC_MA_MR_CL_DDR1_2_0_CLK            (0x2 << 4)
+#define JEDEC_MA_MR_CL_DDR1_2_5_CLK            (0x6 << 4)
+#define JEDEC_MA_MR_CL_DDR1_3_0_CLK            (0x3 << 4)
+#define JEDEC_MA_MR_CL_DDR2_2_0_CLK            (0x2 << 4)
+#define JEDEC_MA_MR_CL_DDR2_3_0_CLK            (0x3 << 4)
+#define JEDEC_MA_MR_CL_DDR2_4_0_CLK            (0x4 << 4)
+#define JEDEC_MA_MR_CL_DDR2_5_0_CLK            (0x5 << 4)
+#define JEDEC_MA_MR_CL_DDR2_6_0_CLK            (0x6 << 4)
+#define JEDEC_MA_MR_CL_DDR2_7_0_CLK            (0x7 << 4)
+#define JEDEC_MA_MR_BTYP_SEQUENTIAL            (0 << 3)
+#define JEDEC_MA_MR_BTYP_INTERLEAVED           (1 << 3)
+#define JEDEC_MA_MR_BLEN_MASK                  (0x7 << 0)
+#define JEDEC_MA_MR_BLEN_4                     (2 << 0)
+#define JEDEC_MA_MR_BLEN_8                     (3 << 0)
+
+/*
+ * JEDEC DDR Extended Mode Register
+ */
+#define JEDEC_MA_EMR_OUTPUT_MASK               (1 << 12)
+#define JEDEC_MA_EMR_OUTPUT_ENABLE             (0 << 12)
+#define JEDEC_MA_EMR_OUTPUT_DISABLE            (1 << 12)
+#define JEDEC_MA_EMR_RQDS_MASK                 (1 << 11)
+#define JEDEC_MA_EMR_RDQS_DISABLE              (0 << 11)
+#define JEDEC_MA_EMR_RDQS_ENABLE               (1 << 11)
+#define JEDEC_MA_EMR_DQS_MASK                  (1 << 10)
+#define JEDEC_MA_EMR_DQS_DISABLE               (1 << 10)
+#define JEDEC_MA_EMR_DQS_ENABLE                        (0 << 10)
+#define JEDEC_MA_EMR_OCD_MASK                  (0x7 << 7)
+#define JEDEC_MA_EMR_OCD_EXIT                  (0 << 7)
+#define JEDEC_MA_EMR_OCD_ENTER                 (7 << 7)
+#define JEDEC_MA_EMR_AL_DDR1_0_CYC             (0 << 3)
+#define JEDEC_MA_EMR_AL_DDR2_1_CYC             (1 << 3)
+#define JEDEC_MA_EMR_AL_DDR2_2_CYC             (2 << 3)
+#define JEDEC_MA_EMR_AL_DDR2_3_CYC             (3 << 3)
+#define JEDEC_MA_EMR_AL_DDR2_4_CYC             (4 << 3)
+#define JEDEC_MA_EMR_RTT_MASK                  (0x11 << 2)
+#define JEDEC_MA_EMR_RTT_DISABLED              (0x00 << 2)
+#define JEDEC_MA_EMR_RTT_75OHM                 (0x01 << 2)
+#define JEDEC_MA_EMR_RTT_150OHM                        (0x10 << 2)
+#define JEDEC_MA_EMR_RTT_50OHM                 (0x11 << 2)
+#define JEDEC_MA_EMR_ODS_MASK                  (1 << 1)
+#define JEDEC_MA_EMR_ODS_NORMAL                        (0 << 1)
+#define JEDEC_MA_EMR_ODS_WEAK                  (1 << 1)
+#define JEDEC_MA_EMR_DLL_MASK                  (1 << 0)
+#define JEDEC_MA_EMR_DLL_ENABLE                        (0 << 0)
+#define JEDEC_MA_EMR_DLL_DISABLE               (1 << 0)
+
+/*
+ * JEDEC DDR Extended Mode Register 2
+ */
+#define JEDEC_MA_EMR2_TEMP_COMMERCIAL          (0 << 7)
+#define JEDEC_MA_EMR2_TEMP_INDUSTRIAL          (1 << 7)
+
+/*
+ * SDRAM Mode Register (Corresponds 1:1 w/ JEDEC Mode Register)
+ */
+#define SDRAM_MMODE_WR_MASK                    JEDEC_MA_MR_WR_MASK
+#define SDRAM_MMODE_WR_DDR1                    JEDEC_MA_MR_WR_DDR1
+#define SDRAM_MMODE_WR_DDR2_2_CYC              JEDEC_MA_MR_WR_DDR2_2_CYC
+#define SDRAM_MMODE_WR_DDR2_3_CYC              JEDEC_MA_MR_WR_DDR2_3_CYC
+#define SDRAM_MMODE_WR_DDR2_4_CYC              JEDEC_MA_MR_WR_DDR2_4_CYC
+#define SDRAM_MMODE_WR_DDR2_5_CYC              JEDEC_MA_MR_WR_DDR2_5_CYC
+#define SDRAM_MMODE_WR_DDR2_6_CYC              JEDEC_MA_MR_WR_DDR2_6_CYC
+#define SDRAM_MMODE_DCL_MASK                   JEDEC_MA_MR_CL_MASK
+#define SDRAM_MMODE_DCL_DDR1_2_0_CLK           JEDEC_MA_MR_CL_DDR1_2_0_CLK
+#define SDRAM_MMODE_DCL_DDR1_2_5_CLK           JEDEC_MA_MR_CL_DDR1_2_5_CLK
+#define SDRAM_MMODE_DCL_DDR1_3_0_CLK           JEDEC_MA_MR_CL_DDR1_3_0_CLK
+#define SDRAM_MMODE_DCL_DDR2_2_0_CLK           JEDEC_MA_MR_CL_DDR2_2_0_CLK
+#define SDRAM_MMODE_DCL_DDR2_3_0_CLK           JEDEC_MA_MR_CL_DDR2_3_0_CLK
+#define SDRAM_MMODE_DCL_DDR2_4_0_CLK           JEDEC_MA_MR_CL_DDR2_4_0_CLK
+#define SDRAM_MMODE_DCL_DDR2_5_0_CLK           JEDEC_MA_MR_CL_DDR2_5_0_CLK
+#define SDRAM_MMODE_DCL_DDR2_6_0_CLK           JEDEC_MA_MR_CL_DDR2_6_0_CLK
+#define SDRAM_MMODE_DCL_DDR2_7_0_CLK           JEDEC_MA_MR_CL_DDR2_7_0_CLK
+#define SDRAM_MMODE_BTYP_SEQUENTIAL            JEDEC_MA_MR_BTYP_SEQUENTIAL
+#define SDRAM_MMODE_BTYP_INTERLEAVED           JEDEC_MA_MR_BTYP_INTERLEAVED
+#define SDRAM_MMODE_BLEN_MASK                  JEDEC_MA_MR_BLEN_MASK
+#define SDRAM_MMODE_BLEN_4                     JEDEC_MA_MR_BLEN_4
+#define SDRAM_MMODE_BLEN_8                     JEDEC_MA_MR_BLEN_8
+
+/*
+ * SDRAM Extended Mode Register (Corresponds 1:1 w/ JEDEC Extended
+ * Mode Register)
+ */
+#define SDRAM_MEMODE_QOFF_MASK                 JEDEC_MA_EMR_OUTPUT_MASK
+#define SDRAM_MEMODE_QOFF_DISABLE              JEDEC_MA_EMR_OUTPUT_DISABLE
+#define SDRAM_MEMODE_QOFF_ENABLE               JEDEC_MA_EMR_OUTPUT_ENABLE
+#define SDRAM_MEMODE_RDQS_MASK                 JEDEC_MA_EMR_RQDS_MASK
+#define SDRAM_MEMODE_RDQS_DISABLE              JEDEC_MA_EMR_RDQS_DISABLE
+#define SDRAM_MEMODE_RDQS_ENABLE               JEDEC_MA_EMR_RDQS_ENABLE
+#define SDRAM_MEMODE_DQS_MASK                  JEDEC_MA_EMR_DQS_MASK
+#define SDRAM_MEMODE_DQS_DISABLE               JEDEC_MA_EMR_DQS_DISABLE
+#define SDRAM_MEMODE_DQS_ENABLE                        JEDEC_MA_EMR_DQS_ENABLE
+#define SDRAM_MEMODE_AL_DDR1_0_CYC             JEDEC_MA_EMR_AL_DDR1_0_CYC
+#define SDRAM_MEMODE_AL_DDR2_1_CYC             JEDEC_MA_EMR_AL_DDR2_1_CYC
+#define SDRAM_MEMODE_AL_DDR2_2_CYC             JEDEC_MA_EMR_AL_DDR2_2_CYC
+#define SDRAM_MEMODE_AL_DDR2_3_CYC             JEDEC_MA_EMR_AL_DDR2_3_CYC
+#define SDRAM_MEMODE_AL_DDR2_4_CYC             JEDEC_MA_EMR_AL_DDR2_4_CYC
+#define SDRAM_MEMODE_RTT_MASK                  JEDEC_MA_EMR_RTT_MASK
+#define SDRAM_MEMODE_RTT_DISABLED              JEDEC_MA_EMR_RTT_DISABLED
+#define SDRAM_MEMODE_RTT_75OHM                 JEDEC_MA_EMR_RTT_75OHM
+#define SDRAM_MEMODE_RTT_150OHM                        JEDEC_MA_EMR_RTT_150OHM
+#define SDRAM_MEMODE_RTT_50OHM                 JEDEC_MA_EMR_RTT_50OHM
+#define SDRAM_MEMODE_DIC_MASK                  JEDEC_MA_EMR_ODS_MASK
+#define SDRAM_MEMODE_DIC_NORMAL                        JEDEC_MA_EMR_ODS_NORMAL
+#define SDRAM_MEMODE_DIC_WEAK                  JEDEC_MA_EMR_ODS_WEAK
+#define SDRAM_MEMODE_DLL_MASK                  JEDEC_MA_EMR_DLL_MASK
+#define SDRAM_MEMODE_DLL_DISABLE               JEDEC_MA_EMR_DLL_DISABLE
+#define SDRAM_MEMODE_DLL_ENABLE                        JEDEC_MA_EMR_DLL_ENABLE
 
 /*
  * SDRAM Clock Timing Register
 #define SDRAM_SDTR3_RFC_MASK           0x0000003F
 #define SDRAM_SDTR3_RFC_ENCODE(n)      ((((u32)(n))&0x3F)<<0)
 
+/*
+ * ECC Error Status
+ */
+#define SDRAM_ECCES_MASK                PPC_REG_VAL(21, 0x3FFFFF)
+#define SDRAM_ECCES_BNCE_MASK           PPC_REG_VAL(15, 0xFFFF)
+#define SDRAM_ECCES_BNCE_ENCODE(lane)   PPC_REG_VAL(((lane) & 0xF), 1)
+#define SDRAM_ECCES_CKBER_MASK          PPC_REG_VAL(17, 0x3)
+#define SDRAM_ECCES_CKBER_NONE          PPC_REG_VAL(17, 0)
+#define SDRAM_ECCES_CKBER_16_ECC_0_3    PPC_REG_VAL(17, 2)
+#define SDRAM_ECCES_CKBER_32_ECC_0_3    PPC_REG_VAL(17, 1)
+#define SDRAM_ECCES_CKBER_32_ECC_4_8    PPC_REG_VAL(17, 2)
+#define SDRAM_ECCES_CKBER_32_ECC_0_8    PPC_REG_VAL(17, 3)
+#define SDRAM_ECCES_CE                  PPC_REG_VAL(18, 1)
+#define SDRAM_ECCES_UE                  PPC_REG_VAL(19, 1)
+#define SDRAM_ECCES_BKNER_MASK          PPC_REG_VAL(21, 0x3)
+#define SDRAM_ECCES_BK0ER               PPC_REG_VAL(20, 1)
+#define SDRAM_ECCES_BK1ER               PPC_REG_VAL(21, 1)
+
 /*
  * Memory Bank 0-1 configuration
  */
diff --git a/include/asm-ppc/ppc4xx-uic.h b/include/asm-ppc/ppc4xx-uic.h
new file mode 100644 (file)
index 0000000..c908d42
--- /dev/null
@@ -0,0 +1,316 @@
+/*
+ *  Copyright (C) 2002 Scott McNutt <smcnutt@artesyncp.com>
+ *
+ * (C) Copyright 2008
+ * Stefan Roese, DENX Software Engineering, sr@denx.de.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef _PPC4xx_UIC_H_
+#define _PPC4xx_UIC_H_
+
+/*
+ * Define the number of UIC's
+ */
+#if defined(CONFIG_440GX) || defined(CONFIG_440SPE) || \
+    defined(CONFIG_460EX) || defined(CONFIG_460GT) || \
+    defined(CONFIG_460SX)
+#define UIC_MAX                4
+#elif defined(CONFIG_440EPX) || defined(CONFIG_440GRX) || \
+    defined(CONFIG_405EX)
+#define UIC_MAX                3
+#elif defined(CONFIG_440GP) || defined(CONFIG_440SP) || \
+    defined(CONFIG_440EP) || defined(CONFIG_440GR)
+#define UIC_MAX                2
+#else
+#define UIC_MAX                1
+#endif
+
+#define IRQ_MAX UIC_MAX * 32
+
+/*
+ * UIC register
+ */
+#define UIC_SR 0x0                     /* UIC status                   */
+#define UIC_ER 0x2                     /* UIC enable                   */
+#define UIC_CR 0x3                     /* UIC critical                 */
+#define UIC_PR 0x4                     /* UIC polarity                 */
+#define UIC_TR 0x5                     /* UIC triggering               */
+#define UIC_MSR 0x6                    /* UIC masked status            */
+#define UIC_VR 0x7                     /* UIC vector                   */
+#define UIC_VCR 0x8                    /* UIC vector configuration     */
+
+/*
+ * On 440GX we use the UICB0 as UIC0. Its the root UIC where all other UIC's
+ * are cascaded on. With this trick we can use the common UIC code for 440GX
+ * too.
+ */
+#if defined(CONFIG_440GX)
+#define UIC0_DCR_BASE 0x200
+#define UIC1_DCR_BASE 0xc0
+#define UIC2_DCR_BASE 0xd0
+#define UIC3_DCR_BASE 0x210
+#else
+#define UIC0_DCR_BASE 0xc0
+#define UIC1_DCR_BASE 0xd0
+#define UIC2_DCR_BASE 0xe0
+#define UIC3_DCR_BASE 0xf0
+#endif
+
+#define uic0sr (UIC0_DCR_BASE+0x0)     /* UIC0 status                  */
+#define uic0er (UIC0_DCR_BASE+0x2)     /* UIC0 enable                  */
+#define uic0cr (UIC0_DCR_BASE+0x3)     /* UIC0 critical                */
+#define uic0pr (UIC0_DCR_BASE+0x4)     /* UIC0 polarity                */
+#define uic0tr (UIC0_DCR_BASE+0x5)     /* UIC0 triggering              */
+#define uic0msr (UIC0_DCR_BASE+0x6)    /* UIC0 masked status           */
+#define uic0vr (UIC0_DCR_BASE+0x7)     /* UIC0 vector                  */
+#define uic0vcr (UIC0_DCR_BASE+0x8)    /* UIC0 vector configuration    */
+
+#define uic1sr (UIC1_DCR_BASE+0x0)     /* UIC1 status                  */
+#define uic1er (UIC1_DCR_BASE+0x2)     /* UIC1 enable                  */
+#define uic1cr (UIC1_DCR_BASE+0x3)     /* UIC1 critical                */
+#define uic1pr (UIC1_DCR_BASE+0x4)     /* UIC1 polarity                */
+#define uic1tr (UIC1_DCR_BASE+0x5)     /* UIC1 triggering              */
+#define uic1msr (UIC1_DCR_BASE+0x6)    /* UIC1 masked status           */
+#define uic1vr (UIC1_DCR_BASE+0x7)     /* UIC1 vector                  */
+#define uic1vcr (UIC1_DCR_BASE+0x8)    /* UIC1 vector configuration    */
+
+#define uic2sr (UIC2_DCR_BASE+0x0)     /* UIC2 status-Read Clear       */
+#define uic2srs        (UIC2_DCR_BASE+0x1)     /* UIC2 status-Read Set         */
+#define uic2er (UIC2_DCR_BASE+0x2)     /* UIC2 enable                  */
+#define uic2cr (UIC2_DCR_BASE+0x3)     /* UIC2 critical                */
+#define uic2pr (UIC2_DCR_BASE+0x4)     /* UIC2 polarity                */
+#define uic2tr (UIC2_DCR_BASE+0x5)     /* UIC2 triggering              */
+#define uic2msr (UIC2_DCR_BASE+0x6)    /* UIC2 masked status           */
+#define uic2vr (UIC2_DCR_BASE+0x7)     /* UIC2 vector                  */
+#define uic2vcr (UIC2_DCR_BASE+0x8)    /* UIC2 vector configuration    */
+
+#define uic3sr (UIC3_DCR_BASE+0x0)     /* UIC3 status-Read Clear       */
+#define uic3srs        (UIC3_DCR_BASE+0x1)     /* UIC3 status-Read Set         */
+#define uic3er (UIC3_DCR_BASE+0x2)     /* UIC3 enable                  */
+#define uic3cr (UIC3_DCR_BASE+0x3)     /* UIC3 critical                */
+#define uic3pr (UIC3_DCR_BASE+0x4)     /* UIC3 polarity                */
+#define uic3tr (UIC3_DCR_BASE+0x5)     /* UIC3 triggering              */
+#define uic3msr (UIC3_DCR_BASE+0x6)    /* UIC3 masked status           */
+#define uic3vr (UIC3_DCR_BASE+0x7)     /* UIC3 vector                  */
+#define uic3vcr (UIC3_DCR_BASE+0x8)    /* UIC3 vector configuration    */
+
+/* The following is for compatibility with 405 code */
+#define uicsr  uic0sr
+#define uicer  uic0er
+#define uiccr  uic0cr
+#define uicpr  uic0pr
+#define uictr  uic0tr
+#define uicmsr uic0msr
+#define uicvr  uic0vr
+#define uicvcr uic0vcr
+
+/*
+ * Now the interrupt vector definitions. They are different for most of
+ * the 4xx variants, so we need some more #ifdef's here. No mask
+ * definitions anymore here. For this please use the UIC_MASK macro below.
+ *
+ * Note: Please only define the interrupts really used in U-Boot here.
+ * Those are the cascading and EMAC/MAL related interrupt.
+ */
+
+#if defined(CONFIG_405EP) || defined(CONFIG_405GP)
+#define VECNUM_MAL_SERR                10
+#define VECNUM_MAL_TXEOB       11
+#define VECNUM_MAL_RXEOB       12
+#define VECNUM_MAL_TXDE                13
+#define VECNUM_MAL_RXDE                14
+#define VECNUM_ETH0            15
+#define VECNUM_ETH1_OFFS       2
+#define VECNUM_EIRQ6           29
+#endif /* defined(CONFIG_405EP) */
+
+#if defined(CONFIG_405EZ)
+#define VECNUM_USBDEV          15
+#define VECNUM_ETH0            16
+#define VECNUM_MAL_SERR                18
+#define VECNUM_MAL_TXDE                18
+#define VECNUM_MAL_RXDE                18
+#define VECNUM_MAL_TXEOB       19
+#define VECNUM_MAL_RXEOB       21
+#endif /* CONFIG_405EX */
+
+#if defined(CONFIG_405EX)
+/* UIC 0 */
+#define VECNUM_MAL_TXEOB       10
+#define VECNUM_MAL_RXEOB       11
+#define VECNUM_ETH0            24
+#define VECNUM_ETH1_OFFS       1
+#define VECNUM_UIC2NCI         28
+#define VECNUM_UIC2CI          29
+#define VECNUM_UIC1NCI         30
+#define VECNUM_UIC1CI          31
+
+/* UIC 1 */
+#define VECNUM_MAL_SERR                (32 + 0)
+#define VECNUM_MAL_TXDE                (32 + 1)
+#define VECNUM_MAL_RXDE                (32 + 2)
+#endif /* CONFIG_405EX */
+
+#if defined(CONFIG_440GP) || \
+    defined(CONFIG_440EP) || defined(CONFIG_440GR)
+/* UIC 0 */
+#define VECNUM_MAL_TXEOB       10
+#define VECNUM_MAL_RXEOB       11
+#define VECNUM_UIC1NCI         30
+#define VECNUM_UIC1CI          31
+
+/* UIC 1 */
+#define VECNUM_MAL_SERR                (32 + 0)
+#define VECNUM_MAL_TXDE                (32 + 1)
+#define VECNUM_MAL_RXDE                (32 + 2)
+#define VECNUM_USBDEV          (32 + 23)
+#define VECNUM_ETH0            (32 + 28)
+#define VECNUM_ETH1_OFFS       2
+#endif /* CONFIG_440GP */
+
+#if defined(CONFIG_440GX)
+/* UICB 0 (440GX only) */
+/*
+ * All those defines below are off-by-one, so that the common UIC code
+ * can be used. So VECNUM_UIC1CI refers to VECNUM_UIC0CI etc.
+ */
+#define VECNUM_UIC1CI          0
+#define VECNUM_UIC1NCI         1
+#define VECNUM_UIC2CI          2
+#define VECNUM_UIC2NCI         3
+#define VECNUM_UIC3CI          4
+#define VECNUM_UIC3NCI         5
+
+/* UIC 0, used as UIC1 on 440GX because of UICB0 */
+#define VECNUM_MAL_TXEOB       (32 + 10)
+#define VECNUM_MAL_RXEOB       (32 + 11)
+
+/* UIC 1, used as UIC2 on 440GX because of UICB0 */
+#define VECNUM_MAL_SERR                (64 + 0)
+#define VECNUM_MAL_TXDE                (64 + 1)
+#define VECNUM_MAL_RXDE                (64 + 2)
+#define VECNUM_ETH0            (64 + 28)
+#define VECNUM_ETH1_OFFS       2
+#endif /* CONFIG_440GX */
+
+#if defined(CONFIG_440EPX) || defined(CONFIG_440GRX)
+/* UIC 0 */
+#define VECNUM_MAL_TXEOB       10
+#define VECNUM_MAL_RXEOB       11
+#define VECNUM_USBDEV          20
+#define VECNUM_ETH0            24
+#define VECNUM_ETH1_OFFS       1
+#define VECNUM_UIC2NCI         28
+#define VECNUM_UIC2CI          29
+#define VECNUM_UIC1NCI         30
+#define VECNUM_UIC1CI          31
+
+/* UIC 1 */
+#define VECNUM_MAL_SERR                (32 + 0)
+#define VECNUM_MAL_TXDE                (32 + 1)
+#define VECNUM_MAL_RXDE                (32 + 2)
+
+/* UIC 2 */
+#define VECNUM_EIRQ2           (64 + 3)
+#endif /* CONFIG_440EPX */
+
+#if defined(CONFIG_440SP)
+/* UIC 0 */
+#define VECNUM_UIC1NCI         30
+#define VECNUM_UIC1CI          31
+
+/* UIC 1 */
+#define VECNUM_MAL_SERR                (32 + 1)
+#define VECNUM_MAL_TXDE                (32 + 2)
+#define VECNUM_MAL_RXDE                (32 + 3)
+#define VECNUM_MAL_TXEOB       (32 + 6)
+#define VECNUM_MAL_RXEOB       (32 + 7)
+#define VECNUM_ETH0            (32 + 28)
+#endif /* CONFIG_440SP */
+
+#if defined(CONFIG_440SPE)
+/* UIC 0 */
+#define VECNUM_UIC2NCI         10
+#define VECNUM_UIC2CI          11
+#define VECNUM_UIC3NCI         16
+#define VECNUM_UIC3CI          17
+#define VECNUM_UIC1NCI         30
+#define VECNUM_UIC1CI          31
+
+/* UIC 1 */
+#define VECNUM_MAL_SERR                (32 + 1)
+#define VECNUM_MAL_TXDE                (32 + 2)
+#define VECNUM_MAL_RXDE                (32 + 3)
+#define VECNUM_MAL_TXEOB       (32 + 6)
+#define VECNUM_MAL_RXEOB       (32 + 7)
+#define VECNUM_ETH0            (32 + 28)
+#endif /* CONFIG_440SPE */
+
+#if defined(CONFIG_460EX) || defined(CONFIG_460GT)
+/* UIC 0 */
+#define VECNUM_UIC2NCI         10
+#define VECNUM_UIC2CI          11
+#define VECNUM_UIC3NCI         16
+#define VECNUM_UIC3CI          17
+#define VECNUM_UIC1NCI         30
+#define VECNUM_UIC1CI          31
+
+/* UIC 2 */
+#define VECNUM_MAL_SERR                (64 + 3)
+#define        VECNUM_MAL_TXDE         (64 + 4)
+#define        VECNUM_MAL_RXDE         (64 + 5)
+#define VECNUM_MAL_TXEOB       (64 + 6)
+#define        VECNUM_MAL_RXEOB        (64 + 7)
+#define        VECNUM_ETH0             (64 + 16)
+#define VECNUM_ETH1_OFFS       1
+#endif /* CONFIG_460EX */
+
+#if defined(CONFIG_460SX)
+/* UIC 0 */
+#define VECNUM_UIC2NCI         10
+#define VECNUM_UIC2CI          11
+#define VECNUM_UIC3NCI         16
+#define VECNUM_UIC3CI          17
+#define        VECNUM_ETH0             19
+#define VECNUM_ETH1_OFFS       1
+#define VECNUM_UIC1NCI         30
+#define VECNUM_UIC1CI          31
+
+/* UIC 1 */
+#define VECNUM_MAL_SERR                (32 + 1)
+#define        VECNUM_MAL_TXDE         (32 + 2)
+#define        VECNUM_MAL_RXDE         (32 + 3)
+#define VECNUM_MAL_TXEOB       (32 + 6)
+#define        VECNUM_MAL_RXEOB        (32 + 7)
+#endif /* CONFIG_460EX */
+
+#if !defined(VECNUM_ETH1_OFFS)
+#define VECNUM_ETH1_OFFS       1
+#endif
+
+/*
+ * Mask definitions (used for example in 4xx_enet.c)
+ */
+#define UIC_MASK(vec)          (0x80000000 >> ((vec) & 0x1f))
+/* UIC_NR won't work for 440GX because of its specific UIC DCR addresses */
+#define UIC_NR(vec)            ((vec) >> 5)
+
+#endif /* _PPC4xx_UIC_H_ */
index e6178680918ac078a7e163f454f66acf298a382d..dce4717f427df7cb36044c669888c5d2d66a0cef 100644 (file)
 #define PVR_460EX_RA   0x130218A3 /* 460EX rev A without Security Engine */
 #define PVR_460GT_SE_RA        0x130218A0 /* 460GT rev A with Security Engine    */
 #define PVR_460GT_RA   0x130218A1 /* 460GT rev A without Security Engine */
+#define PVR_460SX_RA    0x13541800 /* 460SX rev A                   */
+#define PVR_460SX_RA_V1 0x13541801 /* 460SX rev A Variant 1 Security disabled */
+#define PVR_460GX_RA    0x13541802 /* 460GX rev A                   */
+#define PVR_460GX_RA_V1 0x13541803 /* 460GX rev A Variant 1 Security disabled */
 #define PVR_601                0x00010000
 #define PVR_602                0x00050000
 #define PVR_603                0x00030000
 #define PVR_86xx       0x80040000
 #define PVR_86xx_REV1  (PVR_86xx | 0x0010)
 
+#define PVR_VIRTEX5     0x7ff21912
+
 /*
  * For the 8xx processors, all of them report the same PVR family for
  * the PowerPC core. The various versions of these processors must be
diff --git a/include/asm-ppc/xilinx_irq.h b/include/asm-ppc/xilinx_irq.h
new file mode 100644 (file)
index 0000000..61171c2
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * (C) Copyright 2008
+ * Ricado Ribalda-Universidad Autonoma de Madrid-ricardo.ribalda@uam.es
+ * This work has been supported by: QTechnology  http://qtec.com/
+ * Based on interrupts.c Wolfgang Denk-DENX Software Engineering-wd@denx.de
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+#ifndef XILINX_IRQ_H
+#define XILINX_IRQ_H
+
+#define intc   XPAR_INTC_0_BASEADDR
+#define ISR    (intc + (0 * 4))        /* Interrupt Status Register */
+#define IPR    (intc + (1 * 4))        /* Interrupt Pending Register */
+#define IER    (intc + (2 * 4))        /* Interrupt Enable Register */
+#define IAR    (intc + (3 * 4))        /* Interrupt Acknowledge Register */
+#define SIE    (intc + (4 * 4))        /* Set Interrupt Enable bits */
+#define CIE    (intc + (5 * 4))        /* Clear Interrupt Enable bits */
+#define IVR    (intc + (6 * 4))        /* Interrupt Vector Register */
+#define MER    (intc + (7 * 4))        /* Master Enable Register */
+
+#define IRQ_MASK(irq)  (1 << (irq & 0x1f))
+
+#define IRQ_MAX                XPAR_INTC_MAX_NUM_INTR_INPUTS
+
+#endif
index 2f266a242ffad0fece4ff5cb050d081ccc82d8ed..6ee0a3631fb5f36f4f011c0a5b340e543471efe2 100644 (file)
@@ -269,7 +269,7 @@ extern int flash_banks;
 
 #define CFG_FLASH_BASE         0xFE000000
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use the common driver */
 #define CFG_MAX_FLASH_SECT     256     /* max num of sects on one chip */
 #define CFG_MAX_FLASH_BANKS    flash_banks /* max num of flash banks */
                                            /* updated in board_early_init_r */
index f05c1d592b0e2dcac5e91808c9d4bde753496a90..6aa881caca4bc92efca0d19a5bf4795cd2e7d11a 100644 (file)
 
 #define CFG_MONITOR_BASE       TEXT_BASE       /* start of monitor */
 
-#define CFG_FLASH_CFI_DRIVER    1
+#define CONFIG_FLASH_CFI_DRIVER    1
 #define CFG_FLASH_CFI           1
 #define CFG_FLASH_EMPTY_INFO
 
index cefdd29602d6b92d25865db1f49a977b2228081e..07a9f4e934530083253fe05f44fb6adc0bec2f7f 100644 (file)
  */
 #define CFG_FLASH_BASE         0xFE000000
 #define CFG_FLASH_CFI                          /* The flash is CFI compatible  */
-#define CFG_FLASH_CFI_DRIVER                   /* Use common CFI driver        */
+#define CONFIG_FLASH_CFI_DRIVER                        /* Use common CFI driver        */
 #define CFG_MAX_FLASH_BANKS    1               /* Max number of flash banks    */
 #define CFG_MAX_FLASH_SECT     128             /* Max num of sects on one chip */
 
index 8ec70aa639c1553ac50c03f907e48966b3be0c49..26a1a2d31224c1a9cbd369db92ce84480e062443 100644 (file)
@@ -338,7 +338,7 @@ extern unsigned char   scsi_sym53c8xx_ccf;
 /*
  * Winbond Configuration
  */
-#define CFG_WINBOND_83C553      1                       /* has a winbond bridge */
+#define CONFIG_WINBOND_83C553      1                       /* has a winbond bridge */
 #define CFG_USE_WINBOND_IDE     0                       /* use winbond 83c553 internal ide */
 #define CFG_WINBOND_ISA_CFG_ADDR    0x80005800          /* pci-isa bridge config addr */
 #define CFG_WINBOND_IDE_CFG_ADDR    0x80005900          /* ide config addr */
@@ -346,7 +346,7 @@ extern unsigned char   scsi_sym53c8xx_ccf;
 /*
  * NS87308 Configuration
  */
-#define CFG_NS87308                    /* Nat Semi super-io cntr on ISA bus */
+#define CONFIG_NS87308                    /* Nat Semi super-io cntr on ISA bus */
 #define CFG_NS87308_BADDR_10    1
 #define CFG_NS87308_DEVS        (CFG_NS87308_UART1   | \
                                 CFG_NS87308_UART2   | \
index b7574bf1494b80f8eab7f12b03bc8f84a2f9f29c..3c5d03812eb2bf6c9a2c98e3aebca20c5b866945 100644 (file)
 
 /* use CFI flash driver if no module variant is spezified */
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use the common driver */
 #define CFG_FLASH_BANKS_LIST   { CFG_BOOTCS_START }
 #define CFG_FLASH_EMPTY_INFO
 #define CFG_FLASH_SIZE         0x04000000 /* 64 MByte */
index bb7856f675d91b75d0a71bf35fbfe790eb21d29a..11d19c6f7f5a8e9fb6201618d1870f9113e164fe 100644 (file)
@@ -86,7 +86,7 @@
 
 
 /* CONFIG_CMD_DOC required legacy NAND support */
-#define CFG_NAND_LEGACY
+#define CONFIG_NAND_LEGACY
 
 #if 0
 #define CONFIG_PCI             1
index 89edbde1de64baa44e469f6de0f84bffcef3dd63..03756c3b242ca8ca7dde1d3ac1c200c6184ff968 100644 (file)
  * FLASH related
  *----------------------------------------------------------------------*/
 
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_CFI          1          /* Flash is CFI conformant           */
 #define CFG_FLASH_PROTECTION   1          /* use hardware protection           */
 #define CFG_FLASH_USE_BUFFER_WRITE 1      /* use buffered writes (20x faster)  */
index 3879d9b27a5ba443230fd6bcba68fbc87464a220..d325c4d076ad0700dfce14b65600029803c246de 100644 (file)
 #endif
 
 
-#define CFG_NAND_LEGACY
+#define CONFIG_NAND_LEGACY
 
 /*
  * Miscellaneous configurable options
index 64c9ac076da64b61c05611c4b14b0f685c49bdf8..c757523aec2b43bc8141922e8cf77682a35f1fa2 100644 (file)
  * FLASH related
  */
 #define CFG_FLASH_CFI                  /* The flash is CFI compatible */
-#define CFG_FLASH_CFI_DRIVER           /* Use common CFI driver       */
+#define CONFIG_FLASH_CFI_DRIVER                /* Use common CFI driver       */
 
 #define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE }
 
index 7824b900ad4d46f47c90fd73986dc870f584e8a6..5f1743b2ff3a2dab5048a43ce88e4c663acbc06b 100644 (file)
  */
 #define CFG_FLASH_BASE         0xFC000000
 #define CFG_FLASH_CFI                          /* The flash is CFI compatible  */
-#define CFG_FLASH_CFI_DRIVER                   /* Use common CFI driver        */
+#define CONFIG_FLASH_CFI_DRIVER                        /* Use common CFI driver        */
 #define CFG_MAX_FLASH_BANKS    1               /* Max number of flash banks    */
 #define CFG_MAX_FLASH_SECT     512             /* Max num of sects on one chip */
 
index 79b71db75a69c16092d0001a2e1368f567a4b7a2..e694a0218fca7af702e1f835425c28cf2fc8f792 100644 (file)
 
 /* use CFI flash driver */
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use the common driver */
 #define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE, CFG_FLASH_BASE+flash_info[0].size }
 #define CFG_FLASH_EMPTY_INFO
 #define CFG_FLASH_USE_BUFFER_WRITE     1
index ec757e2ff65c6e07e207dc783dc2913e14869d92..84b682415d4f714113070088091bb6fbeefa2a32 100644 (file)
 
 /* use CFI flash driver */
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use the common driver */
 #define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE, CFG_FLASH_BASE+flash_info[0].size }
 #define CFG_FLASH_EMPTY_INFO
 #define CFG_FLASH_USE_BUFFER_WRITE     1
index 037b115c136322c135e4d0f09a3457c3b1a065a8..422ed32aaaac80387914fc426206980dc3e35311 100644 (file)
 #define CFG_FPGA_PROG_FEEDBACK
 
 
-#define CFG_NAND_LEGACY
+#define CONFIG_NAND_LEGACY
 
 /*
  * Verbose help from command monitor.
index 8ea1ac37d15924e794dbd5224d5af562b167de05..9bcbfe3b7d9b84712e32e2ad530ece04d76a2f80 100644 (file)
 /*
  * define UIC_EXT0 ... UIC_EXT6 if external interrupt is active high
  */
-#define CFG_UIC0_POLARITY       (0xFFFFFF80 | UIC_EXT6)
+#define CFG_UIC0_POLARITY       (0xFFFFFF80 | UIC_MASK(VECNUM_EIRQ6))
 
 /*-----------------------------------------------------------------------
  * FPGA stuff
index 26dd954c18a7eff11f31506475feed5f11d7f0f5..5deb84de5a6fa3e507d2bdc34c3f54e71d30c0b0 100644 (file)
  */
 
 
-#define CFG_WINBOND_83C553     1       /*has a winbond bridge                  */
+#define CONFIG_WINBOND_83C553  1       /*has a winbond bridge                  */
 #define CFG_USE_WINBOND_IDE    0       /*use winbond 83c553 internal IDE ctrlr */
 #define CFG_WINBOND_ISA_CFG_ADDR    0x80005800 /*pci-isa bridge config addr    */
 #define CFG_WINBOND_IDE_CFG_ADDR    0x80005900 /*ide config addr               */
 /*
  * NS87308 Configuration
  */
-#define CFG_NS87308                    /* Nat Semi super-io controller on ISA bus */
+#define CONFIG_NS87308                 /* Nat Semi super-io controller on ISA bus */
 
 #define CFG_NS87308_BADDR_10   1
 
index 081ca6cc5ea7f009fb143dccc8a2761b8607204a..a7e7c5744ec381dfd72ec79bfe1ce5b32b36ef73 100644 (file)
 
 /* use CFI flash driver */
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use the common driver */
 #define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE }
 #define CFG_FLASH_EMPTY_INFO
 #define CFG_FLASH_USE_BUFFER_WRITE     1
index f7d4499f4f7042a2ef778df417e1d7963bc197b9..029bb9914b746b7c1d23d0a6f62743067aa8da40 100644 (file)
 #define CFG_BOOTMAPSZ        (8 << 20)       /* Initial Memory map for Linux */
 
 #define CFG_FLASH_CFI                          /* The flash is CFI compatible  */
-#define CFG_FLASH_CFI_DRIVER                   /* Use common CFI driver        */
+#define CONFIG_FLASH_CFI_DRIVER                        /* Use common CFI driver        */
 #define CFG_FLASH_BANKS_LIST   { 0xFF800000 }
 #define CFG_MAX_FLASH_BANKS_DETECT     1
 /* What should the base address of the main FLASH be and how big is
  */
 #if defined(CONFIG_CMD_NAND)
 
-#define CFG_NAND_LEGACY
+#define CONFIG_NAND_LEGACY
 #define CFG_NAND0_BASE 0xE1000000
 
 #define CFG_MAX_NAND_DEVICE     1       /* Max number of NAND devices           */
index 760f7cca6e9a62a4fbd872b10b34570fdc5d91c4..27e46a432bb6d2919195f0cf80705ef2eb8d76dd 100644 (file)
  */
 #define CFG_FLASH_BASE         0xFE000000
 #define CFG_FLASH_CFI                          /* The flash is CFI compatible  */
-#define CFG_FLASH_CFI_DRIVER                   /* Use common CFI driver        */
+#define CONFIG_FLASH_CFI_DRIVER                        /* Use common CFI driver        */
 #define CFG_MAX_FLASH_BANKS    1               /* Max num of memory banks      */
 #define CFG_MAX_FLASH_SECT     142             /* Max num of sects on one chip */
 
index 3a347eac55e51c08f46fd9bdfe49065472873993..0b90946a364aa6fe6007ac5f523f41177963113f 100644 (file)
 #undef CONFIG_FLASH_16BIT      /* Flash is 8-bit */
 
 #if defined(CONFIG_LITE5200B)
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_CFI
 #define CFG_FLASH_BANKS_LIST   {CFG_CS1_START,CFG_CS0_START}
 #endif
index 3d2891354f882071f5681812d52c833eee48ea43..8713b02aaf9d3978827e961ef4916e08b8918e70 100644 (file)
 #define CFG_FLASH_CFI
 #ifdef CFG_FLASH_CFI
 
-#      define CFG_FLASH_CFI_DRIVER     1
+#      define CONFIG_FLASH_CFI_DRIVER  1
 #      define CFG_FLASH_SIZE           0x1000000       /* Max size that the board might have */
 #      define CFG_FLASH_CFI_WIDTH      FLASH_CFI_16BIT
 #      define CFG_MAX_FLASH_BANKS      1       /* max number of memory banks */
index 8af1c52abf9aa4e6d52079b376f3b04f1b0a0032..e8361321f171cc8c2da333f72cf75b9a9def5c4e 100644 (file)
  */
 #define CFG_FLASH_CFI
 #ifdef CFG_FLASH_CFI
-#      define CFG_FLASH_CFI_DRIVER     1
+#      define CONFIG_FLASH_CFI_DRIVER  1
 #      define CFG_FLASH_SIZE           0x800000        /* Max size that the board might have */
 #ifdef NORFLASH_PS32BIT
 #      define CFG_FLASH_CFI_WIDTH      FLASH_CFI_32BIT
index de7ea42930f748aaebdca24bec88cd906af39d66..c2f5dd9fa47589846c826777de2ef02770b1eb56 100644 (file)
 #define CFG_FLASH_CFI
 #ifdef CFG_FLASH_CFI
 
-#      define CFG_FLASH_CFI_DRIVER     1
+#      define CONFIG_FLASH_CFI_DRIVER  1
 #      define CFG_FLASH_SIZE           0x1000000       /* Max size that the board might have */
 #      define CFG_FLASH_CFI_WIDTH      FLASH_CFI_16BIT
 #      define CFG_MAX_FLASH_BANKS      1       /* max number of memory banks */
index f5e1b646ca2e52000e1f8dd5b175e92c75869028..9dbd129763344118d984a3decb632d5e84c78ec0 100644 (file)
 #define CFG_FLASH_ERASE_TOUT   1000
 
 #define CFG_FLASH_CFI          1
-#define CFG_FLASH_CFI_DRIVER   1
+#define CONFIG_FLASH_CFI_DRIVER        1
 #define CFG_FLASH_SIZE         0x200000
 #define CFG_FLASH_CFI_WIDTH    FLASH_CFI_16BIT
 
index a6fac4cbf63cb88d068f78610179551241b103da..12f9783abe89499ab75b7a5d70771724b3ebf7ac 100644 (file)
 #define CFG_FLASH_ERASE_TOUT   1000
 
 #define CFG_FLASH_CFI          1
-#define CFG_FLASH_CFI_DRIVER   1
+#define CONFIG_FLASH_CFI_DRIVER        1
 #define CFG_FLASH_SIZE         0x200000
 
 /* Cache Configuration */
index 283c873d8349fade56c556bb8ff552481eb96d19..30c70e5796fa0ebc97e85cbba756484ceab57b07 100644 (file)
 #define CFG_FLASH_ERASE_TOUT   1000
 
 #define CFG_FLASH_CFI          1
-#define CFG_FLASH_CFI_DRIVER   1
+#define CONFIG_FLASH_CFI_DRIVER        1
 #define CFG_FLASH_SIZE         0x200000
 
 /*-----------------------------------------------------------------------
index df46ee443857084ab5a19dfa15b17a10ccfc8f2d..c2c7fab732c6cd6138d2f63bb7186d7ad5efbcc5 100644 (file)
 #define CFG_FLASH_CFI
 #ifdef CFG_FLASH_CFI
 
-#      define CFG_FLASH_CFI_DRIVER     1
+#      define CONFIG_FLASH_CFI_DRIVER  1
 #      define CFG_FLASH_SIZE           0x1000000       /* Max size that the board might have */
 #      define CFG_FLASH_CFI_WIDTH      FLASH_CFI_16BIT
 #      define CFG_MAX_FLASH_BANKS      1       /* max number of memory banks */
index b30d99c92e9440e791c02a285a81407c35e51670..58948a20a9c863c461e453dcfceb3e4422185fcf 100644 (file)
  */
 #define CFG_FLASH_CFI
 #ifdef CFG_FLASH_CFI
-#      define CFG_FLASH_CFI_DRIVER     1
+#      define CONFIG_FLASH_CFI_DRIVER  1
 #      define CFG_FLASH_SIZE           0x800000        /* Max size that the board might have */
 #      define CFG_FLASH_CFI_WIDTH      FLASH_CFI_16BIT
 #      define CFG_MAX_FLASH_BANKS      1       /* max number of memory banks */
index a710c6d9f8af1f30774cb13e7cf67d14427959a0..814c3a610d1645aac8d89cacc31c254a0f4d5f07 100644 (file)
  */
 #define CFG_FLASH_CFI
 #ifdef CFG_FLASH_CFI
-#      define CFG_FLASH_CFI_DRIVER     1
+#      define CONFIG_FLASH_CFI_DRIVER  1
 #      define CFG_FLASH_SIZE           0x800000        /* Max size that the board might have */
 #      define CFG_FLASH_CFI_WIDTH      FLASH_CFI_16BIT
 #      define CFG_MAX_FLASH_BANKS      1       /* max number of memory banks */
index 3a022afafd2014d79e74c6b0bf147784e35b4ada..6620f03d3d66c8d902fa47931b770638d2e9912a 100644 (file)
 #undef CFG_FLASH_CFI
 #ifdef CFG_FLASH_CFI
 
-#      define CFG_FLASH_CFI_DRIVER     1
+#      define CONFIG_FLASH_CFI_DRIVER  1
 #      define CFG_FLASH_SIZE           0x1000000       /* Max size that the board might have */
 #      define CFG_FLASH_CFI_WIDTH      FLASH_CFI_8BIT
 #      define CFG_MAX_FLASH_BANKS      2       /* max number of memory banks */
index e8804b56609ce7fcfe28e62ebc447334314ae143..4037efb733ef1b9ccbc7a8271705a5096f25ceb6 100644 (file)
 #define CFG_FLASH_CFI
 #ifdef CFG_FLASH_CFI
 #      define CFG_FLASH_BASE           (CFG_CS0_BASE)
-#      define CFG_FLASH_CFI_DRIVER     1
+#      define CONFIG_FLASH_CFI_DRIVER  1
 #      define CFG_FLASH_CFI_WIDTH      FLASH_CFI_16BIT
 #      define CFG_MAX_FLASH_SECT       137     /* max number of sectors on one chip */
 #      define CFG_FLASH_PROTECTION     /* "Real" (hardware) sectors protection */
index 0f957fff58423d0714597d54e7891c97fc807e1f..a14c55bc336507c9d75a514e9551e640ce148bde 100644 (file)
 #define CFG_FLASH_CFI
 #ifdef CFG_FLASH_CFI
 #      define CFG_FLASH_BASE           (CFG_CS0_BASE)
-#      define CFG_FLASH_CFI_DRIVER     1
+#      define CONFIG_FLASH_CFI_DRIVER  1
 #      define CFG_FLASH_CFI_WIDTH      FLASH_CFI_16BIT
 #      define CFG_MAX_FLASH_SECT       137     /* max number of sectors on one chip */
 #      define CFG_FLASH_PROTECTION     /* "Real" (hardware) sectors protection */
index d683b87ae009bb2cd9822f28c3e36628b2c0dc26..66235e37b41bf7fdc5dcf77d024edc9a8ef49cab 100644 (file)
@@ -88,7 +88,7 @@
 #endif
 
 
-#define CFG_NAND_LEGACY
+#define CONFIG_NAND_LEGACY
 
 #define         CFG_HUSH_PARSER
 #define         CFG_PROMPT_HUSH_PS2 "> "
index 37f8cffd3d75d49c5fc22389af98f14bb7ac1253..a4c4240b651e33f8fa932565b3e4abd73ca093ae 100644 (file)
  * FLASH on the Local Bus
  */
 #define CFG_FLASH_CFI                          /* use the Common Flash Interface */
-#define CFG_FLASH_CFI_DRIVER                   /* use the CFI driver */
+#define CONFIG_FLASH_CFI_DRIVER                        /* use the CFI driver */
 #define CFG_FLASH_BASE         0xFE000000      /* start of FLASH   */
 #define CFG_FLASH_SIZE         8               /* flash size in MB */
 #define CFG_FLASH_EMPTY_INFO                   /* display empty sectors */
index 095f6658c1f06018ffd66f05350cd70605c6b6ca..b0cc36dce3922250bf7527dfdd161e2e3a7d4475 100644 (file)
  * FLASH on the Local Bus
  */
 #define CFG_FLASH_CFI          /* use the Common Flash Interface */
-#define CFG_FLASH_CFI_DRIVER   /* use the CFI driver */
+#define CONFIG_FLASH_CFI_DRIVER        /* use the CFI driver */
 #define CFG_FLASH_CFI_WIDTH    FLASH_CFI_16BIT
 
 #define CFG_FLASH_BASE         0xFE000000 /* FLASH base address */
index 977c041dca6e31f18f639e9f99534000e0bf2469..94b3d5a337dd0fd7a81ed9b0afcde6d3b216091d 100644 (file)
  * FLASH on the Local Bus
  */
 #define CFG_FLASH_CFI          /* use the Common Flash Interface */
-#define CFG_FLASH_CFI_DRIVER   /* use the CFI driver */
+#define CONFIG_FLASH_CFI_DRIVER        /* use the CFI driver */
 #define CFG_FLASH_BASE         0xFE000000      /* FLASH base address */
 #define CFG_FLASH_SIZE         16      /* FLASH size is 16M */
 
index 9ca2a2be04ed67c51519611b16463f14f75fcf73..401d0afc4d0f0cd00414a75426f653e986b8d055 100644 (file)
  * FLASH on the Local Bus
  */
 #define CFG_FLASH_CFI          /* use the Common Flash Interface */
-#define CFG_FLASH_CFI_DRIVER   /* use the CFI driver */
+#define CONFIG_FLASH_CFI_DRIVER        /* use the CFI driver */
 #define CFG_FLASH_BASE         0xFE000000      /* FLASH base address */
 #define CFG_FLASH_SIZE         16      /* FLASH size is 16M */
 
index 870583845d9ca706e6b492067a4e10f500196eec..a53f5cd2612b6fab2cd5bd50a173f353caa6755c 100644 (file)
  * FLASH on the Local Bus
  */
 #define CFG_FLASH_CFI                          /* use the Common Flash Interface */
-#define CFG_FLASH_CFI_DRIVER                   /* use the CFI driver */
+#define CONFIG_FLASH_CFI_DRIVER                        /* use the CFI driver */
 #define CFG_FLASH_BASE         0xFE000000      /* start of FLASH   */
 #define CFG_FLASH_SIZE         32              /* max flash size in MB */
 /* #define CFG_FLASH_USE_BUFFER_WRITE */
index 82d06867be791c2fa87081620266dc4f2921289d..45ddd5c45151333875c54234a6dd11ccec7d59e8 100644 (file)
  */
 
 #define CFG_FLASH_CFI                          /* use the Common Flash Interface */
-#define CFG_FLASH_CFI_DRIVER                   /* use the CFI driver */
+#define CONFIG_FLASH_CFI_DRIVER                        /* use the CFI driver */
 #define CFG_FLASH_BASE         0xFE000000      /* start of FLASH   */
 #define CFG_FLASH_EMPTY_INFO
 #define CFG_MAX_FLASH_SECT     135     /* 127 64KB sectors + 8 8KB sectors per device */
@@ -419,7 +419,7 @@ boards, we say we have two, but don't display a message if we find only one. */
   #define CFG_ENV_SIZE         0x2000
 #else
   #define CFG_NO_FLASH         /* Flash is not usable now */
-  #undef  CFG_FLASH_CFI_DRIVER
+  #undef  CONFIG_FLASH_CFI_DRIVER
   #define CFG_ENV_IS_NOWHERE   /* Store ENV in memory only */
   #define CFG_ENV_ADDR         (CFG_MONITOR_BASE - 0x1000)
   #define CFG_ENV_SIZE         0x2000
index b4bff9a2be38e286f86aa0962bbe7c13c767f08b..43d4118b66298f8303267cff10eba2c62299fb91 100644 (file)
  * FLASH on the Local Bus
  */
 #define CFG_FLASH_CFI          /* use the Common Flash Interface */
-#define CFG_FLASH_CFI_DRIVER   /* use the CFI driver */
+#define CONFIG_FLASH_CFI_DRIVER        /* use the CFI driver */
 #define CFG_FLASH_BASE         0xFE000000 /* FLASH base address */
 #define CFG_FLASH_SIZE         32 /* max FLASH size is 32M */
 #define CONFIG_FLASH_SHOW_PROGRESS 45 /* count down from 45/5: 9..1 */
index ca8d53cf25303fb42ac1a9cec272dcd5de87b4e1..6898495b8db17e71e382615857a5303210c1abe9 100644 (file)
  * FLASH on the Local Bus
  */
 #define CFG_FLASH_CFI          /* use the Common Flash Interface */
-#define CFG_FLASH_CFI_DRIVER   /* use the CFI driver */
+#define CONFIG_FLASH_CFI_DRIVER        /* use the CFI driver */
 #define CFG_FLASH_SIZE         8 /* max FLASH size is 32M */
 #define CFG_FLASH_PROTECTION   1 /* Use intel Flash protection. */
 
index 0dd02795a628ba40924004453d8fc2d004636517..f9c1b170d1d6eb690cabb56dcb66c994fc536949 100644 (file)
  * FLASH on the Local Bus
  */
 #define CFG_FLASH_CFI          /* use the Common Flash Interface */
-#define CFG_FLASH_CFI_DRIVER   /* use the CFI driver */
+#define CONFIG_FLASH_CFI_DRIVER        /* use the CFI driver */
 #define CFG_FLASH_BASE         0xFE000000 /* FLASH base address */
 #define CFG_FLASH_SIZE         32 /* max FLASH size is 32M */
 
index 29c2490e6b1915eddd1d77823a3f00c686842493..82b33530d903f6957047990ecf85227b927a3d13 100644 (file)
  * FLASH on the Local Bus
  */
 #define CFG_FLASH_CFI          /* use the Common Flash Interface */
-#define CFG_FLASH_CFI_DRIVER   /* use the CFI driver */
+#define CONFIG_FLASH_CFI_DRIVER        /* use the CFI driver */
 #define CFG_FLASH_BASE         0xFE000000 /* FLASH base address */
 #define CFG_FLASH_SIZE         8 /* max FLASH size is 32M */
 
index d1d3cc360692f02e3ead3714c44150f24d0ce4ac..6351925d7bb5a5390304cd958b5373b7b735c354 100644 (file)
 #undef  CFG_RAMBOOT
 #endif
 
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_CFI
 #define CFG_FLASH_EMPTY_INFO
 
index a64565db931f5c2ecda6647c2f48361415ea6d6c..d948d76a79798bb023bc046945dacba29e4ad6c7 100644 (file)
@@ -154,7 +154,7 @@ extern unsigned long get_clock_freq(void);
 
 #define CFG_MONITOR_BASE       TEXT_BASE       /* start of monitor */
 
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_CFI
 #define CFG_FLASH_EMPTY_INFO
 
index 091fd2e870d1d53c674beeffe7e01e0ba2c3d2ee..9a77b7bcbc73436f4eb1498d14ebc7a462f0765b 100644 (file)
@@ -168,7 +168,7 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 
 #define CFG_MONITOR_BASE       TEXT_BASE       /* start of monitor */
 
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_CFI
 #define CFG_FLASH_EMPTY_INFO
 
index acf6f0dce6a2d2cb00dbe4ddf92dc0a389a58673..33c5c933e0f6adf6f30413e36106d7a4ee7b2b9c 100644 (file)
@@ -172,7 +172,7 @@ extern unsigned long get_clock_freq(void);
 
 #define CFG_MONITOR_BASE       TEXT_BASE       /* start of monitor */
 
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_CFI
 #define CFG_FLASH_EMPTY_INFO
 
index 1948c0d276fd1eb0a16d7cdcf1eac6e7be1c6b32..85c235c4eb06429fd4b99b1b80eb75fc4148ccab 100644 (file)
@@ -154,7 +154,7 @@ extern unsigned long get_clock_freq(void);
 
 #define CFG_MONITOR_BASE       TEXT_BASE       /* start of monitor */
 
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_CFI
 #define CFG_FLASH_EMPTY_INFO
 
index 27212162723ce601099728005d72305a6cb2619d..3567d1ce357c9d8c989808e07ba4ae08effdc6e0 100644 (file)
 #undef  CFG_RAMBOOT
 #endif
 
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_CFI
 #define CFG_FLASH_EMPTY_INFO
 
index 9e6bb44ff925f93a529b6c4d9acc531858a22d8a..a82d528dc06f9ae8d760e06062cbf88bd86bcc33 100644 (file)
@@ -167,7 +167,7 @@ extern unsigned long get_clock_freq(void);
 
 #define CFG_MONITOR_BASE       TEXT_BASE       /* start of monitor */
 
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_CFI
 #define CFG_FLASH_EMPTY_INFO
 
index 06899b1aff6a53adadc6e863dde37d21bfb84e50..e9371a2f3641a13aee0a3684957f4d166b7921e5 100644 (file)
 #define CFG_FLASH_WRITE_TOUT   500     /* Flash Write Timeout (ms) */
 #define CFG_MONITOR_BASE       TEXT_BASE       /* start of monitor */
 
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_CFI
 #define CFG_FLASH_EMPTY_INFO
 
index cd354948a115e4f8efb222a078b1732c1ab8fa03..468fd08b9db55acdd0ad410f9e9e537f46193f4b 100644 (file)
@@ -214,7 +214,7 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 #define CFG_FLASH_WRITE_TOUT   500     /* Flash Write Timeout (ms) */
 #define CFG_MONITOR_BASE       TEXT_BASE       /* start of monitor */
 
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_CFI
 #define CFG_FLASH_EMPTY_INFO
 
index 2c27b978e0f8b9924b77a52e8af08fe0f5253e2f..0ce88d6be6fbeb5406a162aa0e35852bde132d97 100644 (file)
  */
 #undef         CONFIG_FLASH_16BIT
 #define CFG_FLASH_CFI
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_CFI_AMD_RESET 1
 #define CFG_FLASH_EMPTY_INFO
 
index b412655b6dd05a42273ab46f4abac863768712fb..0dce9b46d629aadda845eea2587d192c6b4a2620 100644 (file)
 
 /* Flash */
 #define CFG_FLASH_CFI
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_CFI_WIDTH    FLASH_CFI_16BIT
 
 #define CFG_FLASH_BASE         0xFF800000
index fa0e5db0216c1deaffb47b74b2222acc92ede00b..40cf275786ba53530f40dab0060d8dd654253fed 100644 (file)
@@ -67,7 +67,7 @@
 #define CFG_BAUDRATE_TABLE     { 115200 }      /* List of legal baudrate settings for this board */
 
 /* SCIF */
-#define CFG_SCIF_CONSOLE       1
+#define CONFIG_SCIF_CONSOLE    1
 #define CONFIG_CONS_SCIF0      1
 #undef  CFG_CONSOLE_INFO_QUIET /* Suppress display of console
                                                                   information at boot */
 
 /* FLASH */
 #define CFG_FLASH_CFI
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #undef  CFG_FLASH_QUIET_TEST
 /* print 'E' for empty sector on flinfo */
 #define CFG_FLASH_EMPTY_INFO
index 27e7ab9bcec15ce2a89912d2515ee6d8b8a0fbf8..6c18b81691472720a7bccc59ee2f2fc2906d1a54 100644 (file)
 /****************************************************************/
 
 /* NAND */
-#define CFG_NAND_LEGACY
+#define CONFIG_NAND_LEGACY
 #define CFG_NAND_BASE          NAND_BASE
 #define CONFIG_MTD_NAND_ECC_JFFS2
 #define CONFIG_MTD_NAND_VERIFY_WRITE
index 56c76d3258c61f4574b0cc6533f20ca590a468b6..1f1bc540bb4a4516cfe0eab5eef049c2374acf20 100644 (file)
 /****************************************************************/
 
 /* NAND */
-#define CFG_NAND_LEGACY
+#define CONFIG_NAND_LEGACY
 #define CFG_NAND_BASE                  NAND_BASE
 #define CONFIG_MTD_NAND_VERIFY_WRITE
 #define CONFIG_MTD_NAND_UNSAFE
index b8c48482acbf0826775960298cfafeb271cb78b3..9a1f1d6da5c3466be9f4ac9ac588c501b829dcaa 100644 (file)
 /****************************************************************/
 
 /* NAND */
-#define CFG_NAND_LEGACY
+#define CONFIG_NAND_LEGACY
 #define CFG_NAND_BASE          NAND_BASE
 #define CONFIG_MTD_NAND_ECC_JFFS2
 #define CONFIG_MTD_NAND_VERIFY_WRITE
index 1293fb0e2bc873d0ec7daecc3b634f74be35a0b7..c029594187072395d85fe78e901e787e9e9c9f86 100644 (file)
 
 /*****************************************************************************/
 
-#define CFG_NAND_LEGACY
+#define CONFIG_NAND_LEGACY
 
 #if defined(CONFIG_NETVIA_VERSION) && CONFIG_NETVIA_VERSION >= 2
 
index 21d90c303a94c1ecf09f4466a0ed843f1cbad892..31762b9a368b46cbcac13539a011f3274e4f822c 100644 (file)
 
 /* use CFI flash driver */
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use the common driver */
 #define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE, CFG_FLASH_BASE+flash_info[0].size }
 #define CFG_FLASH_EMPTY_INFO
 #define CFG_FLASH_USE_BUFFER_WRITE     1
index 268b0343a360fb32efe4245df215af87c66b2966..6ebaa85e8c0fac710961d7e9c915b1a0a4781f05 100644 (file)
@@ -84,7 +84,7 @@
 #define CONFIG_PCI             1
 #define CONFIG_PCI_PNP         1       /* PCI plug-and-play */
 
-#define CFG_NAND_LEGACY
+#define CONFIG_NAND_LEGACY
 
 /*
  * Miscellaneous configurable options
index 250b58604815e630f011d42ac7b155a77ccd23c9..9202794ab21e9c1a3cb314e36db94c9939aaaa31 100644 (file)
@@ -86,7 +86,7 @@
 #define CONFIG_PCI             1
 #define CONFIG_PCI_PNP         1       /* PCI plug-and-play */
 
-#define CFG_NAND_LEGACY
+#define CONFIG_NAND_LEGACY
 
 /*
  * Miscellaneous configurable options
index 5890012b4ee696a7c6f8260a016fa3728959751e..2ceda001cab098bdb10a2d1428591acee0c6b70a 100644 (file)
@@ -77,7 +77,7 @@
 #define CONFIG_CMD_BSP
 
 
-#define CFG_NAND_LEGACY
+#define CONFIG_NAND_LEGACY
 
 #define         CFG_HUSH_PARSER
 #define         CFG_PROMPT_HUSH_PS2 "> "
index 259178f857bb7af800948b84cb329bdc3ddb6695..5e0bb056d80f30d9c153d6829dd4d4701317d50a 100644 (file)
@@ -88,7 +88,7 @@
 
 #if !defined(CONFIG_BOOT_ROM)
 /* DoC requires legacy NAND for now */
-#define CFG_NAND_LEGACY
+#define CONFIG_NAND_LEGACY
 #endif
 
 
index 36e9aa56ea39bdf1a0e73468f5f4483613214b47..190e2a44247ecc1ff30293e307893ff5b10e279b 100644 (file)
 #endif
 
 
-#define CFG_NAND_LEGACY
+#define CONFIG_NAND_LEGACY
 
 /*
  * Disk-On-Chip configuration
index abf593cf712b60f772ccc822fb281d5128d59de4..96c0edf93971284a1432b015a672c9d2820b7443 100644 (file)
 /*
  * Disk-On-Chip configuration
  */
-#define CFG_NAND_LEGACY
+#define CONFIG_NAND_LEGACY
 
 #define CFG_DOC_SHORT_TIMEOUT
 #define CFG_MAX_DOC_DEVICE     1       /* Max number of DOC devices    */
index bd058fc1551097317fabd714a5529967d59e8be8..f2c11b0bb086eea9574dde2ebdb040746fac0511 100644 (file)
 #undef CFG_RAMBOOT
 #endif
 
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_CFI
 #define CFG_FLASH_EMPTY_INFO
 
index 9355aafa61bf79ccf9293334f89b38e0a80a6aa0..b2cf06000fda0a3ae53d2680934bdacbe8dfb096 100644 (file)
 #undef  CFG_RAMBOOT
 #endif
 
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_CFI
 #define CFG_FLASH_EMPTY_INFO
 
index adbe8a9fba6d2ede7e3ee6d0d1de2d0b184b563e..966bbf9a3188ea6710114bfd5d2dfd86faf3218f 100644 (file)
 #define CFG_FLASH_INCREMENT    0x01000000
 
 #define CFG_FLASH_CFI         1       /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER  1       /* Use the common driver */
+#define CONFIG_FLASH_CFI_DRIVER  1       /* Use the common driver */
 #define CFG_FLASH_PROTECTION  1       /* don't use hardware protection        */
 #define CFG_FLASH_USE_BUFFER_WRITE 1  /* use buffered writes (20x faster)     */
 #define CFG_MAX_FLASH_BANKS   2       /* max num of flash banks */
index 42f1d8d006283a30cb479b6f0d6648fc3a96f08c..9140287c873f59e25efcdbdb934989d52a9e6cf4 100644 (file)
  * FLASH related
  *----------------------------------------------------------------------*/
 #define CFG_FLASH_CFI          /* The flash is CFI compatible  */
-#define CFG_FLASH_CFI_DRIVER   /* Use common CFI driver        */
+#define CONFIG_FLASH_CFI_DRIVER        /* Use common CFI driver        */
 
 #define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE }
 
index 01ebc8f6e07bf75944b1ffe6f88e796a53c2c573..e8ed0951c8b992ee9a858f85a465b0326c576bc3 100644 (file)
 
 #define CFG_FLASH_BASE         0xFE000000
 #define CFG_FLASH_CFI
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_MAX_FLASH_BANKS    1       /* max num of flash banks       */
 #define CFG_MAX_FLASH_SECT     256     /* max num of sects on one chip */
 
index 8a53fdd0cb875a26d664ff2af41726d1df860999..6033d93dd5493d1c9a5834afd9edab9c08c56d29 100644 (file)
  */
 
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant              */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver                */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use the common driver                */
 #if 0
 #define CFG_FLASH_USE_BUFFER_WRITE 1    /* use buffered writes (20x faster)     */
 #define CFG_FLASH_PROTECTION           /* use hardware protection              */
index 50ad7dd598de2d18806a2dc0ef1191ffae3eabbe..d23367979fbec805f2c704f29831645a2e96ad35 100644 (file)
  * FLASH driver setup
  */
 #define CFG_FLASH_CFI          1       /* Flash memory is CFI compliant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use drivers/mtd/cfi_flash.c */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use drivers/mtd/cfi_flash.c */
 #define CFG_FLASH_USE_BUFFER_WRITE 1   /* Use buffered writes (~10x faster) */
 #define CFG_FLASH_PROTECTION   1       /* Use hardware sector protection */
 
index aefc7eecbd121ff7e5bc9690668ad1eba8ee33b8..c5d538686029f3cbbbbf552555fbb239eb19f3b4 100644 (file)
 */
 
 /* NAND flash support */
-#define CFG_NAND_LEGACY
+#define CONFIG_NAND_LEGACY
 #define CONFIG_MTD_NAND_ECC_JFFS2
 #define CFG_MAX_NAND_DEVICE    1       /* Max number of NAND devices   */
 #define SECTORSIZE 512
index 5bbe3c5919d261faef084d51aa48e40269334abe..cfd16d3127414996eb9f7a24739bcfb636296dfc 100644 (file)
  */
 
 
-#define CFG_WINBOND_83C553     1       /*has a winbond bridge                  */
+#define CONFIG_WINBOND_83C553  1       /*has a winbond bridge                  */
 #define CFG_USE_WINBOND_IDE    0       /*use winbond 83c553 internal IDE ctrlr */
 #define CFG_WINBOND_ISA_CFG_ADDR    0x80005800 /*pci-isa bridge config addr    */
 #define CFG_WINBOND_IDE_CFG_ADDR    0x80005900 /*ide config addr               */
 /*
  * NS87308 Configuration
  */
-#define CFG_NS87308                    /* Nat Semi super-io controller on ISA bus */
+#define CONFIG_NS87308                 /* Nat Semi super-io controller on ISA bus */
 
 #define CFG_NS87308_BADDR_10   1
 
index a08451eb30b7e3cafc8182765f37b37e6b92daa5..c0f2c5796a606c9ae80f365b6e3f871e2ca7dd23 100644 (file)
  */
 
 
-#define CFG_WINBOND_83C553     1       /*has a winbond bridge                  */
+#define CONFIG_WINBOND_83C553  1       /*has a winbond bridge                  */
 #define CFG_USE_WINBOND_IDE    0       /*use winbond 83c553 internal IDE ctrlr */
 #define CFG_WINBOND_ISA_CFG_ADDR    0x80005800 /*pci-isa bridge config addr    */
 #define CFG_WINBOND_IDE_CFG_ADDR    0x80005900 /*ide config addr               */
 /*
  * NS87308 Configuration
  */
-#define CFG_NS87308                    /* Nat Semi super-io controller on ISA bus */
+#define CONFIG_NS87308                 /* Nat Semi super-io controller on ISA bus */
 
 #define CFG_NS87308_BADDR_10   1
 
index d21783b838f897360bf90fc19c98431de4b7fc7a..3b6816675a21022534422f80999b4530d29f3d5f 100644 (file)
 
 /* use CFI flash driver */
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use the common driver */
 #define CFG_FLASH_BANKS_LIST   { CFG_BOOTCS_START }
 #define CFG_FLASH_EMPTY_INFO
 #define CFG_FLASH_SIZE         0x04000000 /* 64 MByte */
index 7310abfa60048e0d499068a18557b48525243004..8073b7ec6e5e9de81c4e33404dc373a926e35a1a 100644 (file)
 
 /* use CFI flash driver */
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use the common driver */
 #define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE }
 #define CFG_FLASH_EMPTY_INFO
 #define CFG_FLASH_USE_BUFFER_WRITE     1
index bfb478a86888f618857cb517cbe6d50368d6c4bb..992439f3b338dff4360fc1f437c19f03f66ed25d 100644 (file)
 #else
 /* use CFI flash driver */
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use the common driver */
 #define CFG_FLASH_BANKS_LIST   { CFG_BOOTCS_START }
 #define CFG_MAX_FLASH_BANKS    1       /* max num of flash banks
                                           (= chip selects) */
index 9cc196410c39eec8fa5f7c4ce19c1837c5c24a5d..839b6be91b904c71af39852afb48a90d579a54ab 100644 (file)
 
 /* use CFI flash driver */
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use the common driver */
 #define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE, CFG_FLASH_BASE+flash_info[0].size }
 #define CFG_FLASH_EMPTY_INFO
 #define CFG_FLASH_USE_BUFFER_WRITE     1
index 5edd37935d51d7308851b6cb66a7cf8cb72b10ff..b9a7a59c258da41c3dd769ee5c734010ec429e9f 100644 (file)
 
 /* use CFI flash driver */
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use the common driver */
 #define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE }
 #define CFG_FLASH_EMPTY_INFO
 #define CFG_FLASH_USE_BUFFER_WRITE     1
index ba0402d2978c7aaf2119e0fb465b0916282c9bb3..039ecf17bb8e631a26bccea988db56d8e429904c 100644 (file)
 #define CFG_MAX_FLASH_SECT     128     /* max num of sects on one chip */
 
 #define CFG_FLASH_CFI                          /* flash is CFI compat. */
-#define CFG_FLASH_CFI_DRIVER                   /* Use common CFI driver*/
+#define CONFIG_FLASH_CFI_DRIVER                        /* Use common CFI driver*/
 #define CFG_FLASH_EMPTY_INFO           /* print 'E' for empty sector   */
 #define CFG_FLASH_QUIET_TEST   1       /* don't warn upon unknown flash*/
 
index 0d2ca7225b184e6e305b40a265c52b449db627ff..e8f69f6dc86f55ccfca771ae451a8d17b209869f 100644 (file)
@@ -78,7 +78,7 @@
  * FLASH on the Local Bus
  */
 #define CFG_FLASH_CFI                          /* use the Common Flash Interface */
-#define CFG_FLASH_CFI_DRIVER                   /* use the CFI driver */
+#define CONFIG_FLASH_CFI_DRIVER                        /* use the CFI driver */
 #undef CFG_FLASH_CHECKSUM
 #define CFG_FLASH_BASE         0x80000000      /* start of FLASH   */
 #define CFG_FLASH_SIZE         8               /* FLASH size in MB */
index 9edf0d8072f429b9c3500eed6748b0cff866db0a..388fafc555487794172647e1f6d512de623a95d4 100644 (file)
 
 /* use CFI flash driver */
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use the common driver */
 #define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE, CFG_FLASH_BASE+flash_info[0].size }
 #define CFG_FLASH_EMPTY_INFO
 #define CFG_FLASH_USE_BUFFER_WRITE     1
index e2c1ce80fad2e726b68d9c2d4dfff4903712987b..6f0864f47ab716ec064fa1b7b7309482779d5bb1 100644 (file)
 
 /* use CFI flash driver */
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use the common driver */
 #define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE }
 #define CFG_FLASH_EMPTY_INFO
 #define CFG_FLASH_USE_BUFFER_WRITE     1
index dd19d4e5785cbf60f2cea5bc01048446aea95a88..093d6599ea1569c51ede47b7ec657e556e309331 100644 (file)
 
 /* use CFI flash driver */
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use the common driver */
 #define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE, CFG_FLASH_BASE+flash_info[0].size }
 #define CFG_FLASH_EMPTY_INFO
 #define CFG_FLASH_USE_BUFFER_WRITE     1
index 8a1c350cce37e81e9075d1b82318ed000badf5b8..64bbc39cf82ab444546ada21401f247eb5ec0c60 100644 (file)
 
 /* use CFI flash driver */
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use the common driver */
 #define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE }
 #define CFG_FLASH_EMPTY_INFO
 #define CFG_FLASH_USE_BUFFER_WRITE     1
index d18f2346c649997dee426f9b2bf57b97bab3390c..d84554e37dc73aa6e3d5cb8bc74775e1459b4648 100644 (file)
 #endif /* CONFIG_TQM_BIGFLASH */
 
 #define CFG_FLASH_CFI                  /* flash is CFI compat.         */
-#define CFG_FLASH_CFI_DRIVER           /* Use common CFI driver        */
+#define CONFIG_FLASH_CFI_DRIVER                /* Use common CFI driver        */
 #define CFG_FLASH_EMPTY_INFO           /* print 'E' for empty sector   */
 #define CFG_FLASH_QUIET_TEST   1       /* don't warn upon unknown flash*/
 #define CFG_FLASH_USE_BUFFER_WRITE     1 /* speed up output to Flash   */
 /* NAND FLASH */
 #ifdef CONFIG_NAND
 
-#undef CFG_NAND_LEGACY
+#undef CONFIG_NAND_LEGACY
 
 #define CONFIG_NAND_FSL_UPM    1
 
index 803cdb854c4308c121deaed54b622b4c569c125b..dacc3406bb84ce55cb312a0a523b1da1050d7407 100644 (file)
 
 /* use CFI flash driver */
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use the common driver */
 #define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE, CFG_FLASH_BASE+flash_info[0].size }
 #define CFG_FLASH_EMPTY_INFO
 #define CFG_FLASH_USE_BUFFER_WRITE     1
index 071da1e607d4ce9a0fa7db36386e69ec1ced8a92..3ec849c8bc811211982476bcd284d96f189a5eb2 100644 (file)
  */
 /* use CFI flash driver */
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use the common driver */
 #define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE }
 #define CFG_FLASH_EMPTY_INFO
 #define CFG_FLASH_USE_BUFFER_WRITE     1
index d34f6bea6498271a165f113f7e8af9e4c239b108..6c610ee5904a8493658efbc797f53057b47a54bc 100644 (file)
 
 /* use CFI flash driver */
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use the common driver */
 #define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE, CFG_FLASH_BASE+flash_info[0].size }
 #define CFG_FLASH_EMPTY_INFO
 #define CFG_FLASH_USE_BUFFER_WRITE     1
index 9270e449834254e176e39eb9bca62590640f40fd..2eca59b99dd6513675d2c262d71da882c797a51b 100644 (file)
 
 /* use CFI flash driver */
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use the common driver */
 #define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE }
 #define CFG_FLASH_EMPTY_INFO
 #define CFG_FLASH_USE_BUFFER_WRITE     1
index d916d5337280726475e0db24e55f822de0538e6e..4683286d7a0af9040b097bbc6d49dde1cf5bb487 100644 (file)
  */
 /* use CFI flash driver */
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use the common driver */
 #define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE }
 #define CFG_FLASH_EMPTY_INFO
 #define CFG_FLASH_USE_BUFFER_WRITE     1
index f075442f38113e3ba9c93d2bc1af94599d434c27..5daaf04be84c60c77dd850a4a74784076b378e65 100644 (file)
 
 /* use CFI flash driver */
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use the common driver */
 #define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE }
 #define CFG_FLASH_EMPTY_INFO
 #define CFG_FLASH_USE_BUFFER_WRITE     1
index 598fe7bf27823fd100ed8ccf362a467863acfdb8..25e98e249e5cd88e9dbf88415e0b2c2617bd94b4 100644 (file)
  * Flash configuration
  */
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use the common driver */
 #if CONFIG_TOTAL5200_REV==2
 #   define CFG_MAX_FLASH_BANKS 3       /* max num of flash banks */
 #   define CFG_FLASH_BANKS_LIST { CFG_CS5_START, CFG_CS4_START, CFG_BOOTCS_START }
index ad8db613ec1f1650f8ffd244124f1335e40a8d74..02cabb2fb81c43d288159b3c44021b1789964aa2 100644 (file)
  */
 #if defined(CONFIG_CMD_NAND)
 
-#define CFG_NAND_LEGACY
+#define CONFIG_NAND_LEGACY
 #define CFG_MAX_NAND_DEVICE    1       /* Max number of NAND devices           */
 #define SECTORSIZE 512
 
index b04be766f5723e378bb0e9f8c93db4e1cc4a963c..388c74768117e3a07d369007c4f59c5e6f9dcdd8 100644 (file)
 #define CFG_FLSIMM_BASE                0xFF000000
 
 #define CFG_FLASH_CFI
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_MAX_FLASH_BANKS    2       /* max num of flash banks       */
 #define CFG_MAX_FLASH_SECT     32      /* max num of sects on one chip */
 
index 9092a7c0962e5efea73d0d96d910a4c417c44f90..ed2754d66a8be39441b4defd5229bd1c61ad37c1 100644 (file)
  *----------------------------------------------------------------------*/
 #if !defined(CONFIG_NAND_U_BOOT) && !defined(CONFIG_NAND_SPL)
 #define CFG_FLASH_CFI                  /* The flash is CFI compatible  */
-#define CFG_FLASH_CFI_DRIVER           /* Use common CFI driver        */
+#define CONFIG_FLASH_CFI_DRIVER                /* Use common CFI driver        */
 
 #define CFG_FLASH_BANKS_LIST    {CFG_FLASH_BASE}
 #define CFG_MAX_FLASH_BANKS    1       /* max number of memory banks           */
index 4c4b1d145d2f59571a2f1157575887ea520a9db8..33a74949a541ff5ea014a8a9fa141254b6941f78 100644 (file)
 
 /* Use common CFI driver */
 #define CFG_FLASH_CFI
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 /* no byte writes on IXP4xx */
 #define CFG_FLASH_CFI_WIDTH            FLASH_CFI_16BIT
 /* print 'E' for empty sector on flinfo */
index 873fced007955884e00e5dcebeca15f97eff8197..75aaa1184213c8e5682ed83d1787ba92011ec23b 100644 (file)
 
 /* Use common CFI driver */
 #define CFG_FLASH_CFI
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 /* no byte writes on IXP4xx */
 #define CFG_FLASH_CFI_WIDTH            FLASH_CFI_16BIT
 
index 5e468e6101a47509751ab846cb7ce2704284437c..693c2847fdb0d7608637a9011bcc57844661099d 100644 (file)
 
 /* Use common CFI driver */
 #define CFG_FLASH_CFI
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 /* no byte writes on IXP4xx */
 #define CFG_FLASH_CFI_WIDTH            FLASH_CFI_16BIT
 
index e4dca2afac2e384731ebe96a3a3a4a45461667b8..7f8e0f4d0f96b3404c59f5fe702e0ec92310c905 100644 (file)
 
 /* Use common CFI driver */
 #define CFG_FLASH_CFI
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 /* board provides its own flash_init code */
 #define CONFIG_FLASH_CFI_LEGACY                1
 /* no byte writes on IXP4xx */
index 091da803a7823430423d655aa20b71faaa2d10b9..d129ea317dc59b4cfa8375ba69657f73f6f28f02 100644 (file)
  */
 #undef CONFIG_BKUP_FLASH
 #define CFG_FLASH_CFI                          /* use the Common Flash Interface */
-#define CFG_FLASH_CFI_DRIVER                   /* use the CFI driver */
+#define CONFIG_FLASH_CFI_DRIVER                        /* use the CFI driver */
 #ifdef CONFIG_BKUP_FLASH
 #define CFG_FLASH_BASE         0xFF800000      /* start of FLASH   */
 #define CFG_FLASH_SIZE         0x00800000      /* max flash size in bytes */
index c5e475921c430bc5ed60b1b287fc015a78d1156e..f27cc4a1500ac31339aac1b5ce8dc185cea9997d 100644 (file)
 
 /* use CFI flash driver if no module variant is spezified */
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use the common driver */
 #define CFG_FLASH_BANKS_LIST   { CFG_BOOTCS_START }
 #define CFG_FLASH_EMPTY_INFO
 #define CFG_FLASH_SIZE         0x04000000 /* 64 MByte */
index fb6feb52749be94bd7560e54ecdfb91ce19e19ed..f342c7a6db6ffddfd53a5e14a1670db23e05b521 100644 (file)
@@ -86,7 +86,7 @@
  * FLASH related
  *----------------------------------------------------------------------*/
 #define CFG_FLASH_CFI          1       /* The flash is CFI compatible          */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use common CFI driver                */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use common CFI driver                */
 #define CFG_MAX_FLASH_BANKS    1       /* max number of memory banks           */
 #define CFG_MAX_FLASH_SECT     512     /* max number of sectors on one chip    */
 #define CFG_FLASH_USE_BUFFER_WRITE 1   /* use buffered writes (20x faster)     */
index 5884611b9ada30ff079de124145d8d13dd5ffff8..c93e77a2e22d253c10cf931fdd51c0e345dadb2c 100644 (file)
  * CFI FLASH driver setup
  */
 # define       CFG_FLASH_CFI   1       /* Flash memory is CFI compliant */
-# define       CFG_FLASH_CFI_DRIVER    1       /* Use drivers/cfi_flash.c */
+# define       CONFIG_FLASH_CFI_DRIVER 1       /* Use drivers/cfi_flash.c */
 /* #define CFG_FLASH_USE_BUFFER_WRITE 1 */ /* Use buffered writes (~10x faster) */
 # define       CFG_FLASH_PROTECTION    1       /* Use h/w sector protection*/
 
index d10f092f98530aa2a48d82ca79488b07decee742..ed7b5ef8ffd6b5c8c1bc7869fcb0daa2436f08d3 100644 (file)
 #define CFG_FLASH_BASE         PHYS_FLASH_1
 #define CFG_FLASH_SIZE          PHYS_FLASH_SIZE
 #define CFG_FLASH_CFI           1      /* flash is CFI conformant      */
-#define CFG_FLASH_CFI_DRIVER    1      /* use common cfi driver        */
+#define CONFIG_FLASH_CFI_DRIVER    1   /* use common cfi driver        */
 #define CFG_FLASH_USE_BUFFER_WRITE 1   /* use buffered writes (20x faster) */
 #define CFG_MAX_FLASH_BANKS     1      /* max # of memory banks        */
 #define CFG_FLASH_INCREMENT     0      /* there is only one bank       */
index 342ce2a649d67640876a548246cefefaba2f3e53..520c67685dba52560ff75dc13b3cfda7da3e368d 100644 (file)
 
 /* NOR flash */
 #define CFG_FLASH_CFI                  1
-#define CFG_FLASH_CFI_DRIVER           1
+#define CONFIG_FLASH_CFI_DRIVER                1
 #define PHYS_FLASH_1                   0x10000000
 #define CFG_FLASH_BASE                 PHYS_FLASH_1
 #define CFG_MAX_FLASH_SECT             256
index cd2eae20634fb46350ffb1cb53294b48ae3a2312..fca431e3baf1c7449c62b75e72c9f64a21a824a8 100644 (file)
 #define CONFIG_CMD_MII
 #define CONFIG_CMD_NAND
 
-#define CFG_NAND_LEGACY
+#define CONFIG_NAND_LEGACY
 
 #define CFG_MAX_NAND_DEVICE    1       /* Max number of NAND devices           */
 #define SECTORSIZE 512
index a8194b564d958c8b87c8b97b1f80bcef29c82a43..5f90d39d5caf83c79dd941430099afb695333a0d 100644 (file)
 #define CFG_NO_FLASH                   1
 #else
 #define CFG_FLASH_CFI                  1
-#define CFG_FLASH_CFI_DRIVER           1
+#define CONFIG_FLASH_CFI_DRIVER                1
 #define PHYS_FLASH_1                   0x10000000
 #define CFG_FLASH_BASE                 PHYS_FLASH_1
 #define CFG_MAX_FLASH_SECT             256
index f040b863c77fe97244f99e56869034b93da9d890..6d8c1b22a3878d4562d1eb33756729478b47168e 100644 (file)
 #define CONFIG_NR_DRAM_BANKS           1
 
 #define CFG_FLASH_CFI                  1
-#define CFG_FLASH_CFI_DRIVER           1
+#define CONFIG_FLASH_CFI_DRIVER                1
 
 #define CFG_FLASH_BASE                 0x00000000
 #define CFG_FLASH_SIZE                 0x800000
index 68f0cecf39e8dc195f6eba6ccd9e8f8ead4702a9..3a7d27354f848fe588931328a714275c54c302aa 100644 (file)
 /* External flash on STK1000 */
 #if 0
 #define CFG_FLASH_CFI                  1
-#define CFG_FLASH_CFI_DRIVER           1
+#define CONFIG_FLASH_CFI_DRIVER                1
 #endif
 
 #define CFG_FLASH_BASE                 0x00000000
index d3a2f69edeacb3d841a6d0cacd27c59b4a6e1edd..55ea7f290f341ba7900e4c026808e8a4741941f1 100644 (file)
 /* External flash on STK1000 */
 #if 0
 #define CFG_FLASH_CFI                  1
-#define CFG_FLASH_CFI_DRIVER           1
+#define CONFIG_FLASH_CFI_DRIVER                1
 #endif
 
 #define CFG_FLASH_BASE                 0x00000000
index a37ba92416bb2f9876b85851253855ebc8c50dc2..369c61964903c5e8064304a492f45fb9e40b9bb4 100644 (file)
 /* External flash on STK1000 */
 #if 0
 #define CFG_FLASH_CFI                  1
-#define CFG_FLASH_CFI_DRIVER           1
+#define CONFIG_FLASH_CFI_DRIVER                1
 #endif
 
 #define CFG_FLASH_BASE                 0x00000000
index a6c5b6e24eda239fd659090e5107c9fa5f307320..902f822e45fcda7da3aa485564d3473db14e0490 100644 (file)
 /* External flash on STK1000 */
 #if 0
 #define CFG_FLASH_CFI                  1
-#define CFG_FLASH_CFI_DRIVER           1
+#define CONFIG_FLASH_CFI_DRIVER                1
 #endif
 
 #define CFG_FLASH_BASE                 0x00000000
index d70aa1087cb179bb8ae9aa004cf01a96215fe22f..9f5667bcb5283fea87c1fd927d3cabe5a1e7271c 100644 (file)
@@ -94,7 +94,7 @@
  */
 
 #define CFG_FLASH_CFI          /* The flash is CFI compatible  */
-#define CFG_FLASH_CFI_DRIVER   /* Use common CFI driver        */
+#define CONFIG_FLASH_CFI_DRIVER        /* Use common CFI driver        */
 #define        CFG_FLASH_CFI_AMD_RESET
 
 #define CFG_FLASH_BASE         0x20000000
index a881d53289b10adc0f3168d4ca13a8966d1cc92d..a06c1dccfb4dcf03c57472fb89ea14c6f95b0edd 100644 (file)
 
 #define CFG_FLASH_BASE         0x20000000
 #define CFG_FLASH_CFI          /* The flash is CFI compatible */
-#define CFG_FLASH_CFI_DRIVER   /* Use common CFI driver */
+#define CONFIG_FLASH_CFI_DRIVER        /* Use common CFI driver */
 #define CFG_FLASH_PROTECTION
 #define CFG_MAX_FLASH_BANKS    1
 #define CFG_MAX_FLASH_SECT     71      /* some have 67 sectors (M29W320DB), but newer have 71 (M29W320EB) */
index e99e97924cde0e41a19ae608e3d0c115fef0609d..e4a7f9dbce3fe624b98052065391aad7cddaa1a2 100644 (file)
@@ -77,7 +77,7 @@
  */
 
 #define CFG_FLASH_CFI          /* The flash is CFI compatible */
-#define CFG_FLASH_CFI_DRIVER   /* Use common CFI driver */
+#define CONFIG_FLASH_CFI_DRIVER        /* Use common CFI driver */
 #define CFG_FLASH_CFI_AMD_RESET
 #define        CFG_ENV_IS_IN_FLASH     1
 #define CFG_FLASH_BASE         0x20000000
index f097e2c2f09042b7a085273b096ef030140bedbc..38714cc3069dfb42e7038c90f2426c8cc5ae2e4d 100644 (file)
 #define CFG_FLASH_ERASE_TOUT   240000  /* Flash Erase Timeout (in ms)  */
 #define CFG_FLASH_WRITE_TOUT   500     /* Flash Write Timeout (in ms)  */
 
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_CFI
 #define CFG_FLASH_EMPTY_INFO
 
index ac2e5d99e01401234508a994bc2dba55bba810f9..3b5b2809359954d813f526aca1528cade8915d8e 100644 (file)
  * FLASH related
  *----------------------------------------------------------------------*/
 #define CFG_FLASH_CFI                  /* The flash is CFI compatible  */
-#define CFG_FLASH_CFI_DRIVER           /* Use common CFI driver        */
+#define CONFIG_FLASH_CFI_DRIVER                /* Use common CFI driver        */
 #define CFG_FLASH_CFI_AMD_RESET        1       /* Use AMD (Spansion) reset cmd */
 
 #define CFG_FLASH_BANKS_LIST    {CFG_FLASH_BASE}
index ef50c7cabb7c2b2400b6779c785abb1ce2b6d662..0221dfeb8c1e02674293c1c4f39bd9fe39f93179 100644 (file)
  * Flash configuration
  */
 #define CFG_FLASH_CFI          1
-#define CFG_FLASH_CFI_DRIVER   1
+#define CONFIG_FLASH_CFI_DRIVER        1
 #define CFG_FLASH_BASE         0xfc000000
 /* we need these despite using CFI */
 #define CFG_MAX_FLASH_BANKS    1       /* max num of flash banks */
index 15bf1772b94975cf61a4d7bfb8c9d47ce258ba54..5145c004235ed83a915fac9aa42dec3bfc855c05 100644 (file)
  *
  */
 #define CFG_FLASH_CFI          1       /* flash is CFI conformant      */
-#define CFG_FLASH_CFI_DRIVER   1       /* use common cfi driver        */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* use common cfi driver        */
 #define CFG_FLASH_USE_BUFFER_WRITE 1   /* use buffered writes (20x faster) */
 #define CFG_MAX_FLASH_BANKS    1       /* max # of memory banks        */
 #define CFG_FLASH_INCREMENT    0       /* there is only one bank       */
index b06c0a269da282a04244f8565258bcc1ac94c00a..d3e5ea86b1b5d2e7b41548e8ee850e10057bfacc 100644 (file)
  *
  */
 #define CFG_FLASH_CFI          1       /* flash is CFI conformant      */
-#define CFG_FLASH_CFI_DRIVER   1       /* use common cfi driver        */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* use common cfi driver        */
 #define CFG_FLASH_USE_BUFFER_WRITE 1   /* use buffered writes (20x faster) */
 #define CFG_MAX_FLASH_BANKS    1       /* max # of memory banks        */
 #define CFG_FLASH_INCREMENT    0       /* there is only one bank       */
index 735a211e07e84c04d603809ef3d469d7b8825f7d..88c8fdbf7fdf98cd1692a2d58e8c5480a3181e76 100644 (file)
 #define PHYS_FLASH_SIZE                        0x800000  /* 8 megs main flash */
 #define CFG_FLASH_BASE                 PHYS_FLASH_1
 #define CFG_FLASH_CFI          1       /* flash is CFI conformant      */
-#define CFG_FLASH_CFI_DRIVER   1       /* use common cfi driver        */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* use common cfi driver        */
 #define CFG_FLASH_EMPTY_INFO
 #define CFG_FLASH_USE_BUFFER_WRITE 1   /* use buffered writes (20x faster) */
 #define CFG_MAX_FLASH_BANKS    1       /* max # of memory banks        */
index 632c4c2bf9d1f132a798a4ef99b4165f78467a17..c27ce18ff2b6e516b2892663070765d67befa80b 100644 (file)
 #endif
 #define CFG_ENV_IS_IN_FLASH
 #undef CFG_NO_FLASH
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_CFI
 #define CFG_MAX_FLASH_BANKS    1               /* max number of flash banks */
 #define CFG_FLASH_SECT_SZ      0x10000         /* 64KB sect size AMD Flash */
index ba68605a0557edc6a1d43599398f41674956e655..c55766ce34f2d40018277ad6873c00fad001c3e7 100644 (file)
 #endif
 #define CFG_ENV_IS_IN_FLASH
 #undef CFG_NO_FLASH
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_CFI
 #define CFG_MAX_FLASH_BANKS    1               /* max number of flash banks */
 #define CFG_FLASH_SECT_SZ      0x20000         /* 128KB sect size AMD Flash */
index 0e10396dfa9659e91f7aeb871d3cba23d0f9d014..8941c5eb12a6fc4aa79459e52393b6edb5d76acb 100644 (file)
 #define CFG_FLASH_BANKS_LIST {PHYS_FLASH_1, PHYS_FLASH_2}
 
 #define CFG_FLASH_CFI           1
-#define CFG_FLASH_CFI_DRIVER    1
+#define CONFIG_FLASH_CFI_DRIVER    1
 
 /* The following #defines are needed to get flash environment right */
 #define        CFG_MONITOR_BASE        TEXT_BASE
index 14fde1a957942519b6685927c0e778aee4573e77..1db962aaf5066c1ee16672a72f362d960657d5f1 100644 (file)
 /*
  * NAND Flash
  */
-#undef CFG_NAND_LEGACY
+#undef CONFIG_NAND_LEGACY
 
 #define CFG_NAND0_BASE         0x0 /* 0x43100040 */ /* 0x10000000 */
 #undef CFG_NAND1_BASE
index f8e2c885b064d6112dad78fb080fc19de68c9881..6ba0d3fe57d15c8d3f8d4e16f3ba9093535c7ea2 100644 (file)
  */
 
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant              */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver                */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use the common driver                */
 #define CFG_MAX_FLASH_SECT     64      /* max number of sectors on one chip    */
 #define CFG_MAX_FLASH_BANKS    1       /* max number of memory banks           */
 #define CFG_FLASH_INCREMENT    0       /* there is only one bank               */
index 8a220b681632db599cb55174415296a58c64b43f..ccc0d5d225be7f1228f36706ab52c264d36c902b 100644 (file)
 
 #define CFG_FLASH_BASE         0xFF800000
 #define CFG_FLASH_CFI
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_MAX_FLASH_BANKS    1       /* max num of flash banks       */
 #define CFG_MAX_FLASH_SECT     256     /* max num of sects on one chip */
 
index ac5847ce12c2126d3b83f30eea27ee5fb8974f82..ac68c869a732efc51259d0ab9fd77c483adf20bb 100644 (file)
  *----------------------------------------------------------------------*/
 #define CFG_FLASH_BASE         0xFC000000
 #define CFG_FLASH_CFI
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_MAX_FLASH_BANKS    1       /* max num of flash banks       */
 #define CFG_MAX_FLASH_SECT     512     /* max num of sects on one chip */
 #define CFG_FLASH_EMPTY_INFO           /* print 'E' for empty sector in flinfo */
index 3b1b4ab95063b2562978f44eba44d5f31d351a09..1d9c05b729bf20d737551ad2e65fceededf65da8 100644 (file)
 #else
 /* REVISIT: This doesn't work on ADS GCPlus just yet: */
 #define CFG_FLASH_CFI           1       /* flash is CFI conformant      */
-#define CFG_FLASH_CFI_DRIVER    1       /* use common cfi driver        */
+#define CONFIG_FLASH_CFI_DRIVER    1       /* use common cfi driver        */
 #define CFG_FLASH_USE_BUFFER_WRITE 1    /* use buffered writes (20x faster) */
 #define CFG_MAX_FLASH_BANKS     1       /* max # of memory banks        */
 #define CFG_FLASH_INCREMENT     0       /* there is only one bank       */
index ffe7671ec03a12dd90b650266a676363f9e276d5..942609f8caf27d08a4e41addf7aad7f4fc6111d8 100644 (file)
 
 /*** CFI CONFIG ***/
 #define CFG_FLASH_CFI_WIDTH    FLASH_CFI_8BIT
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_CFI
 /* Bypass cache when reading regs from flash memory */
 #define CFG_FLASH_CFI_BYPASS_READ
index 7b1d582202e98d3f7be74f02e303e75175979e6f..ae25fb291e0d285b809734521447b7691388368a 100644 (file)
 
 /*** CFI CONFIG ***/
 #define CFG_FLASH_CFI_WIDTH    FLASH_CFI_8BIT
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_CFI
 /* Bypass cache when reading regs from flash memory */
 #define CFG_FLASH_CFI_BYPASS_READ
index 6fe2b7cc3bc28f9d7b1d26433e18a864d9340101..f019bb44eabd71729bb55274d0b2292747ad94de 100644 (file)
 
 /*** CFI CONFIG ***/
 #define CFG_FLASH_CFI_WIDTH    FLASH_CFI_8BIT
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_CFI
 /* Bypass cache when reading regs from flash memory */
 #define CFG_FLASH_CFI_BYPASS_READ
index 3fb8eb3a618e57f94fc1deef9359fcffbe4700e8..f880a7b51985e496e2745bd9d32135d0f83e406b 100644 (file)
 
 /*** CFI CONFIG ***/
 #define CFG_FLASH_CFI_WIDTH    FLASH_CFI_8BIT
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_CFI
 #endif
 
index 406ce3df373b77672a590c5429848f0778b402d7..e5af9a6e97ffcb5d6e0b1e5906f7db2e242fbf84 100644 (file)
 
 /*** CFI CONFIG ***/
 #define CFG_FLASH_CFI_WIDTH    FLASH_CFI_8BIT
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_CFI
 #endif
 
index 13b0358cb693e78edbed396335207a7af69fbe95..d99ac5355e64d00f0236d3cc51f509c4e6a68aac 100644 (file)
 
 /* Use common CFI driver */
 #define CFG_FLASH_CFI
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 /* board provides its own flash_init code */
 #define CONFIG_FLASH_CFI_LEGACY                1
 #define CFG_FLASH_CFI_WIDTH            FLASH_CFI_8BIT
index 20808681f3161f56cb69041aa846979a16ece11d..54d6721145d5260e565de08fb80f2fc7ca1ee011 100644 (file)
 
 /* Use common CFI driver */
 #define CFG_FLASH_CFI
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 /* board provides its own flash_init code */
 #define CONFIG_FLASH_CFI_LEGACY                1
 #define CFG_FLASH_CFI_WIDTH            FLASH_CFI_8BIT
index ad7cf76869a8c8e35e1939f5c833edf0481f4170..205f5ccb03ad0f6a1f93da8ec96db27eeed80c85 100644 (file)
 #define CFG_FLASH_ERASE_TOUT   240000  /* Flash Erase Timeout (in ms)  */
 #define CFG_FLASH_WRITE_TOUT   500     /* Flash Write Timeout (in ms)  */
 
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_CFI
 #define CFG_FLASH_EMPTY_INFO
 #define CFG_FLASH_CFI_AMD_RESET
index ec4ed1eeb674191b01effb27aa21c9b98b444e64..c4763335b6e33999936916c1d7b14b4304cd2c31 100644 (file)
  * CFI FLASH driver setup
  */
 #define CFG_FLASH_CFI          1       /* Flash memory is CFI compliant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use drivers/cfi_flash.c */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use drivers/cfi_flash.c */
 #define CFG_FLASH_USE_BUFFER_WRITE 1   /* Use buffered writes (~10x faster) */
 #define CFG_FLASH_PROTECTION   1       /* Use hardware sector protection */
 
index 7d6aaa1b54baef3d7155eca75efe18d9d4655281..237f3616af44401d52b9a1cbc85806ff98adc375 100644 (file)
  * CFI FLASH driver setup
  */
 #define CFG_FLASH_CFI          1       /* Flash memory is CFI compliant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use drivers/cfi_flash.c */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use drivers/cfi_flash.c */
 #define CFG_FLASH_USE_BUFFER_WRITE 1   /* Use buffered writes (~10x faster) */
 #define CFG_FLASH_PROTECTION   1       /* Use hardware sector protection */
 
index 6ec92c38c578580c8c001a1c5306c583e8ac48b8..efa2802fee22d9f643b1a36b2653695862c6ef20 100644 (file)
  * Flash configuration
  */
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER   1
+#define CONFIG_FLASH_CFI_DRIVER        1
 #define CFG_FLASH_BASE         0xffe00000
 #define CFG_FLASH_SIZE         0x00200000
 #define CFG_MAX_FLASH_BANKS    1       /* max num of memory banks */
index b7c43fedf324428aa6a9a2e0146a9b7072f331bc..6b73abe1f6f8970ff05297f7ad57d95c1ecf24f9 100644 (file)
 #define CFG_MAX_FLASH_SECT      128    /* max number of sectors on one chip    */
 
 #define CFG_FLASH_CFI                          /* The flash is CFI compatible  */
-#define CFG_FLASH_CFI_DRIVER                   /* Use common CFI driver        */
+#define CONFIG_FLASH_CFI_DRIVER                        /* Use common CFI driver        */
 #define        CFG_ENV_IS_IN_FLASH     1
 
 #define CFG_FLASH_BANKS_LIST   { PHYS_FLASH_1 }
index 05dc841e35c281ea497f559d1df1cbfcbc395678..d4e487124b16835967006037348a11684502ace9 100644 (file)
 #define CFG_MAX_FLASH_SECT      128    /* max number of sectors on one chip    */
 
 #define CFG_FLASH_CFI                          /* The flash is CFI compatible  */
-#define CFG_FLASH_CFI_DRIVER                   /* Use common CFI driver        */
+#define CONFIG_FLASH_CFI_DRIVER                        /* Use common CFI driver        */
 #define        CFG_ENV_IS_IN_FLASH     1
 
 #define CFG_FLASH_USE_BUFFER_WRITE 1   /* use buffered writes (20x faster)     */
index c9859270c00ed0de5666f63a9e06dd88dc559b8e..af88a3fa2d10b08185ad5dd8e11cfe1d2a638608 100644 (file)
 
 #define CFG_MAX_FLASH_BANKS    1       /* max num of flash banks */
 
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_CFI
 #define CFG_FLASH_EMPTY_INFO
 #define CFG_FLASH_CFI_WIDTH    FLASH_CFI_8BIT
index f07e470683a61ef00789c2db48c5ef831757ac92..5dcca7573371165d1dee756ad7de19ded8b65e17 100644 (file)
@@ -54,7 +54,6 @@
 #include "amcc-common.h"
 
 #define CONFIG_BOARD_EARLY_INIT_F 1    /* Call board_pre_init          */
-#define        CONFIG_MISC_INIT_F      1       /* Use misc_init_f()            */
 #undef  CONFIG_SHOW_BOOT_PROGRESS
 
 /*-----------------------------------------------------------------------
  * FLASH related
  *----------------------------------------------------------------------*/
 #define CFG_FLASH_CFI
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_EMPTY_INFO           /* print 'E' for empty sector on flinfo */
 #define CFG_FLASH_USE_BUFFER_WRITE 1   /* use buffered writes (20x faster)     */
 
index 7dcce836eb78bf0e466406e12f3b949f5a7fd30f..e775e60949b505eac3af6a98b67fb7866f1c4810 100644 (file)
 #define CFG_MAXARGS            16              /* max number of command args */
 #define CFG_PBSIZE             (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
 
-#define        CFG_FLASH_CFI_DRIVER
+#define        CONFIG_FLASH_CFI_DRIVER
 #define        CFG_FLASH_CFI
 
 #ifndef __ASSEMBLY__
index 9c1a3a4c1e5f4d042a23ae1592bd2358cfd215fe..a475f97e62516d9a10d751e99261d4c3cb161e9d 100644 (file)
  * FLASH related
  *----------------------------------------------------------------------*/
 #define CFG_FLASH_CFI                  /* The flash is CFI compatible  */
-#define CFG_FLASH_CFI_DRIVER           /* Use common CFI driver        */
+#define CONFIG_FLASH_CFI_DRIVER                /* Use common CFI driver        */
 
 #define CFG_FLASH_BANKS_LIST    {CFG_FLASH_BASE}
 #define CFG_MAX_FLASH_BANKS    1       /* max number of memory banks           */
 #define CFG_SDRAM0_MB1CF       SDRAM_RXBAS_SDBE_DISABLE
 #define CFG_SDRAM0_MB2CF       SDRAM_RXBAS_SDBE_DISABLE
 #define CFG_SDRAM0_MB3CF       SDRAM_RXBAS_SDBE_DISABLE
-#define CFG_SDRAM0_MCOPT1      0x04322000
+#define CFG_SDRAM0_MCOPT1      (SDRAM_MCOPT1_PMU_OPEN          | \
+                                SDRAM_MCOPT1_8_BANKS           | \
+                                SDRAM_MCOPT1_DDR2_TYPE         | \
+                                SDRAM_MCOPT1_QDEP              | \
+                                SDRAM_MCOPT1_DCOO_DISABLED)
 #define CFG_SDRAM0_MCOPT2      0x00000000
-#define CFG_SDRAM0_MODT0       0x01800000
+#define CFG_SDRAM0_MODT0       (SDRAM_MODT_EB0W_ENABLE | \
+                                SDRAM_MODT_EB0R_ENABLE)
 #define CFG_SDRAM0_MODT1       0x00000000
-#define CFG_SDRAM0_CODT                0x0080f837
-#define CFG_SDRAM0_RTR         0x06180000
-#define CFG_SDRAM0_INITPLR0    0xa8380000
-#define CFG_SDRAM0_INITPLR1    0x81900400
-#define CFG_SDRAM0_INITPLR2    0x81020000
-#define CFG_SDRAM0_INITPLR3    0x81030000
-#define CFG_SDRAM0_INITPLR4    0x81010404
-#define CFG_SDRAM0_INITPLR5    0x81000542
-#define CFG_SDRAM0_INITPLR6    0x81900400
-#define CFG_SDRAM0_INITPLR7    0x8D080000
-#define CFG_SDRAM0_INITPLR8    0x8D080000
-#define CFG_SDRAM0_INITPLR9    0x8D080000
-#define CFG_SDRAM0_INITPLR10   0x8D080000
-#define CFG_SDRAM0_INITPLR11   0x81000442
-#define CFG_SDRAM0_INITPLR12   0x81010780
-#define CFG_SDRAM0_INITPLR13   0x81010400
-#define CFG_SDRAM0_INITPLR14   0x00000000
-#define CFG_SDRAM0_INITPLR15   0x00000000
-#define CFG_SDRAM0_RQDC                0x80000038
-#define CFG_SDRAM0_RFDC                0x00000209
-#define CFG_SDRAM0_RDCC                0x40000000
-#define CFG_SDRAM0_DLCR                0x030000a5
-#define CFG_SDRAM0_CLKTR       0x80000000
+#define CFG_SDRAM0_CODT                (SDRAM_CODT_RK0R_ON             | \
+                                SDRAM_CODT_CKLZ_36OHM          | \
+                                SDRAM_CODT_DQS_1_8_V_DDR2      | \
+                                SDRAM_CODT_IO_NMODE)
+#define CFG_SDRAM0_RTR         SDRAM_RTR_RINT_ENCODE(1560)
+#define CFG_SDRAM0_INITPLR0    (SDRAM_INITPLR_ENABLE                   | \
+               SDRAM_INITPLR_IMWT_ENCODE(80)                           | \
+               SDRAM_INITPLR_ICMD_ENCODE(JEDEC_CMD_NOP))
+#define CFG_SDRAM0_INITPLR1    (SDRAM_INITPLR_ENABLE                   | \
+               SDRAM_INITPLR_IMWT_ENCODE(3)                            | \
+               SDRAM_INITPLR_ICMD_ENCODE(JEDEC_CMD_PRECHARGE)          | \
+               SDRAM_INITPLR_IBA_ENCODE(JEDEC_BA_MR)                   | \
+               SDRAM_INITPLR_IMA_ENCODE(JEDEC_MA_PRECHARGE_ALL))
+#define CFG_SDRAM0_INITPLR2    (SDRAM_INITPLR_ENABLE                   | \
+               SDRAM_INITPLR_IMWT_ENCODE(2)                            | \
+               SDRAM_INITPLR_ICMD_ENCODE(JEDEC_CMD_EMR)                | \
+               SDRAM_INITPLR_IBA_ENCODE(JEDEC_BA_EMR2)                 | \
+               SDRAM_INITPLR_IMA_ENCODE(JEDEC_MA_EMR2_TEMP_COMMERCIAL))
+#define CFG_SDRAM0_INITPLR3    (SDRAM_INITPLR_ENABLE                   | \
+               SDRAM_INITPLR_IMWT_ENCODE(2)                            | \
+               SDRAM_INITPLR_ICMD_ENCODE(JEDEC_CMD_EMR)                | \
+               SDRAM_INITPLR_IBA_ENCODE(JEDEC_BA_EMR3)                 | \
+               SDRAM_INITPLR_IMA_ENCODE(0))
+#define CFG_SDRAM0_INITPLR4    (SDRAM_INITPLR_ENABLE                   | \
+               SDRAM_INITPLR_IMWT_ENCODE(2)                            | \
+               SDRAM_INITPLR_ICMD_ENCODE(JEDEC_CMD_EMR)                | \
+               SDRAM_INITPLR_IBA_ENCODE(JEDEC_BA_EMR)                  | \
+               SDRAM_INITPLR_IMA_ENCODE(JEDEC_MA_EMR_DQS_DISABLE | \
+                                        JEDEC_MA_EMR_RTT_75OHM))
+#define CFG_SDRAM0_INITPLR5    (SDRAM_INITPLR_ENABLE                   | \
+               SDRAM_INITPLR_IMWT_ENCODE(2)                            | \
+               SDRAM_INITPLR_ICMD_ENCODE(JEDEC_CMD_EMR)                | \
+               SDRAM_INITPLR_IBA_ENCODE(JEDEC_BA_MR)                   | \
+               SDRAM_INITPLR_IMA_ENCODE(JEDEC_MA_MR_WR_DDR2_3_CYC | \
+                                        JEDEC_MA_MR_CL_DDR2_4_0_CLK | \
+                                        JEDEC_MA_MR_BLEN_4 | \
+                                        JEDEC_MA_MR_DLL_RESET))
+#define CFG_SDRAM0_INITPLR6    (SDRAM_INITPLR_ENABLE                   | \
+               SDRAM_INITPLR_IMWT_ENCODE(3)                            | \
+               SDRAM_INITPLR_ICMD_ENCODE(JEDEC_CMD_PRECHARGE)          | \
+               SDRAM_INITPLR_IBA_ENCODE(0x0)                           | \
+               SDRAM_INITPLR_IMA_ENCODE(JEDEC_MA_PRECHARGE_ALL))
+#define CFG_SDRAM0_INITPLR7    (SDRAM_INITPLR_ENABLE                   | \
+               SDRAM_INITPLR_IMWT_ENCODE(26)                           | \
+               SDRAM_INITPLR_ICMD_ENCODE(JEDEC_CMD_REFRESH))
+#define CFG_SDRAM0_INITPLR8    (SDRAM_INITPLR_ENABLE                   | \
+               SDRAM_INITPLR_IMWT_ENCODE(26)                           | \
+               SDRAM_INITPLR_ICMD_ENCODE(JEDEC_CMD_REFRESH))
+#define CFG_SDRAM0_INITPLR9    (SDRAM_INITPLR_ENABLE                   | \
+               SDRAM_INITPLR_IMWT_ENCODE(26)                           | \
+               SDRAM_INITPLR_ICMD_ENCODE(JEDEC_CMD_REFRESH))
+#define CFG_SDRAM0_INITPLR10   (SDRAM_INITPLR_ENABLE                   | \
+               SDRAM_INITPLR_IMWT_ENCODE(26)                           | \
+               SDRAM_INITPLR_ICMD_ENCODE(JEDEC_CMD_REFRESH))
+#define CFG_SDRAM0_INITPLR11   (SDRAM_INITPLR_ENABLE                   | \
+               SDRAM_INITPLR_IMWT_ENCODE(2)                            | \
+               SDRAM_INITPLR_ICMD_ENCODE(JEDEC_CMD_EMR)                | \
+               SDRAM_INITPLR_IBA_ENCODE(JEDEC_BA_MR)                   | \
+               SDRAM_INITPLR_IMA_ENCODE(JEDEC_MA_MR_WR_DDR2_3_CYC | \
+                                        JEDEC_MA_MR_CL_DDR2_4_0_CLK | \
+                                        JEDEC_MA_MR_BLEN_4))
+#define CFG_SDRAM0_INITPLR12   (SDRAM_INITPLR_ENABLE                   | \
+               SDRAM_INITPLR_IMWT_ENCODE(2)                            | \
+               SDRAM_INITPLR_ICMD_ENCODE(JEDEC_CMD_EMR)                | \
+               SDRAM_INITPLR_IBA_ENCODE(JEDEC_BA_EMR)                  | \
+               SDRAM_INITPLR_IMA_ENCODE(JEDEC_MA_EMR_OCD_ENTER | \
+                                        JEDEC_MA_EMR_RDQS_DISABLE | \
+                                        JEDEC_MA_EMR_DQS_DISABLE | \
+                                        JEDEC_MA_EMR_RTT_DISABLED | \
+                                        JEDEC_MA_EMR_ODS_NORMAL))
+#define CFG_SDRAM0_INITPLR13   (SDRAM_INITPLR_ENABLE                   | \
+               SDRAM_INITPLR_IMWT_ENCODE(2)                            | \
+               SDRAM_INITPLR_ICMD_ENCODE(JEDEC_CMD_EMR)                | \
+               SDRAM_INITPLR_IBA_ENCODE(JEDEC_BA_EMR)                  | \
+               SDRAM_INITPLR_IMA_ENCODE(JEDEC_MA_EMR_OCD_EXIT | \
+                                        JEDEC_MA_EMR_RDQS_DISABLE | \
+                                        JEDEC_MA_EMR_DQS_DISABLE | \
+                                        JEDEC_MA_EMR_RTT_DISABLED | \
+                                        JEDEC_MA_EMR_ODS_NORMAL))
+#define CFG_SDRAM0_INITPLR14   (SDRAM_INITPLR_DISABLE)
+#define CFG_SDRAM0_INITPLR15   (SDRAM_INITPLR_DISABLE)
+#define CFG_SDRAM0_RQDC                (SDRAM_RQDC_RQDE_ENABLE | \
+                                SDRAM_RQDC_RQFD_ENCODE(56))
+#define CFG_SDRAM0_RFDC                SDRAM_RFDC_RFFD_ENCODE(521)
+#define CFG_SDRAM0_RDCC                (SDRAM_RDCC_RDSS_T2)
+#define CFG_SDRAM0_DLCR                (SDRAM_DLCR_DCLM_AUTO           | \
+                                SDRAM_DLCR_DLCS_CONT_DONE      | \
+                                SDRAM_DLCR_DLCV_ENCODE(165))
+#define CFG_SDRAM0_CLKTR       (SDRAM_CLKTR_CLKP_180_DEG_ADV)
 #define CFG_SDRAM0_WRDTR       0x00000000
-#define CFG_SDRAM0_SDTR1       0x80201000
-#define CFG_SDRAM0_SDTR2       0x32204232
-#define CFG_SDRAM0_SDTR3       0x080b0d1a
-#define CFG_SDRAM0_MMODE       0x00000442
-#define CFG_SDRAM0_MEMODE      0x00000404
+#define CFG_SDRAM0_SDTR1       (SDRAM_SDTR1_LDOF_2_CLK | \
+                                SDRAM_SDTR1_RTW_2_CLK  | \
+                                SDRAM_SDTR1_RTRO_1_CLK)
+#define CFG_SDRAM0_SDTR2       (SDRAM_SDTR2_RCD_3_CLK          | \
+                                SDRAM_SDTR2_WTR_2_CLK          | \
+                                SDRAM_SDTR2_XSNR_32_CLK        | \
+                                SDRAM_SDTR2_WPC_4_CLK          | \
+                                SDRAM_SDTR2_RPC_2_CLK          | \
+                                SDRAM_SDTR2_RP_3_CLK           | \
+                                SDRAM_SDTR2_RRD_2_CLK)
+#define CFG_SDRAM0_SDTR3       (SDRAM_SDTR3_RAS_ENCODE(8)      | \
+                                SDRAM_SDTR3_RC_ENCODE(11)      | \
+                                SDRAM_SDTR3_XCS                | \
+                                SDRAM_SDTR3_RFC_ENCODE(26))
+#define CFG_SDRAM0_MMODE       (SDRAM_MMODE_WR_DDR2_3_CYC | \
+                                SDRAM_MMODE_DCL_DDR2_4_0_CLK | \
+                                SDRAM_MMODE_BLEN_4)
+#define CFG_SDRAM0_MEMODE      (SDRAM_MEMODE_DQS_DISABLE | \
+                                SDRAM_MEMODE_RTT_75OHM)
 
 /*-----------------------------------------------------------------------
  * I2C
  *----------------------------------------------------------------------*/
 #define CONFIG_M88E1111_PHY    1
 #define CONFIG_IBM_EMAC4_V4    1
+#define CONFIG_EMAC_PHY_MODE   EMAC_PHY_MODE_RGMII_RGMII
 #define CONFIG_PHY_ADDR                1       /* PHY address, See schematics  */
 
 #define CONFIG_PHY_RESET       1       /* reset phy upon startup       */
index 4ca4ed00667e0b0a650c51c8c2b6e3119a19397f..a887446f262050af2a96eea048b688e9d9bf7465 100644 (file)
  * FLASH related
  */
 #define CFG_FLASH_CFI                  /* The flash is CFI compatible        */
-#define CFG_FLASH_CFI_DRIVER           /* Use common CFI driver              */
+#define CONFIG_FLASH_CFI_DRIVER                /* Use common CFI driver              */
 #define CONFIG_FLASH_CFI_LEGACY                /* Allow hard-coded config for FLASH0 */
 
 #define CFG_FLASH_BANKS_LIST   { CFG_FLASH1_ADDR, CFG_FLASH0_ADDR }
index 569800aa2313c7ca308ef25fd26709749f72eafc..819e456e459d14f2cbef8105ac6ac608d7cbcfa4 100644 (file)
 #define CFG_BOOTMAPSZ          (8 << 20)
 
 #define CFG_FLASH_CFI
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_USE_BUFFER_WRITE
 #define CFG_FLASH_PROTECTION
 #define CFG_FLASH_EMPTY_INFO
index bc642941162c01f7fd3987ee202165bc58e5679b..e5a0fb9715367b5d6985011a8963e427d6a236cf 100644 (file)
  * FLASH organization
  */
 #define CFG_FLASH_CFI                  /* The flash is CFI compatible  */
-#define CFG_FLASH_CFI_DRIVER           /* Use common CFI driver        */
+#define CONFIG_FLASH_CFI_DRIVER                /* Use common CFI driver        */
 
 #undef  CFG_FLASH_PROTECTION
 #define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE }
index 2f3a066062871bc3565b502017a3bc12eea533c9..3d135c4eaa6914789d05d51c6a797609b5c7572a 100644 (file)
  * FLASH related
  *----------------------------------------------------------------------*/
 #define CFG_FLASH_CFI                          /* The flash is CFI compatible  */
-#define CFG_FLASH_CFI_DRIVER                   /* Use common CFI driver        */
+#define CONFIG_FLASH_CFI_DRIVER                        /* Use common CFI driver        */
 
 #define CFG_FLASH0             0xFC000000
 #define CFG_FLASH1             0xF8000000
index e4be1ed33fe491e7f04a80263a85b0bc83c87559..bc94cf4a33253732f689ac4adbcec65165260a6e 100644 (file)
@@ -57,7 +57,7 @@
  * Hardware drivers
  */
 #define CFG_FLASH_CFI          1
-#define CFG_FLASH_CFI_DRIVER   1
+#define CONFIG_FLASH_CFI_DRIVER        1
 #define CFG_ENV_SECT_SIZE      0x20000
 #define CFG_FLASH_USE_BUFFER_WRITE
 #define CFG_FLASH_PROTECTION   /*for Intel P30 Flash*/
index 65b240e0f18e33a12706a27499a0e166f33b5780..cfc6fdc3e06ce61ac8d15e80fa27690678807b41 100644 (file)
  * FLASH related
  *----------------------------------------------------------------------*/
 #define CFG_FLASH_CFI                  /* The flash is CFI compatible  */
-#define CFG_FLASH_CFI_DRIVER           /* Use common CFI driver        */
+#define CONFIG_FLASH_CFI_DRIVER                /* Use common CFI driver        */
 
 #define CFG_FLASH_BANKS_LIST    {CFG_FLASH_BASE}
 #define CFG_MAX_FLASH_BANKS    1       /* max number of memory banks           */
  *----------------------------------------------------------------------*/
 #define CONFIG_M88E1111_PHY    1
 #define CONFIG_IBM_EMAC4_V4    1
+#define CONFIG_EMAC_PHY_MODE   EMAC_PHY_MODE_RGMII_RGMII
 #define CONFIG_PHY_ADDR                6       /* PHY address, See schematics  */
 
 #define CONFIG_PHY_RESET       1       /* reset phy upon startup       */
index e4c3f7239be4fbd6bae717a027e49143e4219bfb..f5128474479a4208499f70bc7ea46f1a79decb60 100644 (file)
 #define CFG_FLASH_SIZE         0x04000000
 
 #define CFG_FLASH_CFI                          /* The flash is CFI compatible  */
-#define CFG_FLASH_CFI_DRIVER                   /* Use common CFI driver        */
+#define CONFIG_FLASH_CFI_DRIVER                        /* Use common CFI driver        */
 
 #define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE }
 
index 4e9645e5851ac48482267a594eed8637aad7b891..6adba9616fc8441a7adda4abc46cc3f370141563 100644 (file)
 
 /* Use common CFI driver */
 #define CFG_FLASH_CFI
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 /* board provides its own flash_init code */
 #define CONFIG_FLASH_CFI_LEGACY                1
 #define CFG_FLASH_CFI_WIDTH            FLASH_CFI_8BIT
index 8dfb9aa8a96f859fc8e61ee2e120188c2220ee6c..75040fece6e8361eacd3085a60a105b2fd3e0d57 100644 (file)
 #define CONFIG_ENV_OVERWRITE   1
 #endif
 
-#define CFG_FLASH_CFI_DRIVER   1          /* Flash is CFI conformant           */
+#define CONFIG_FLASH_CFI_DRIVER        1          /* Flash is CFI conformant           */
 #define CFG_FLASH_CFI          1          /* Flash is CFI conformant           */
 #define CFG_FLASH_PROTECTION   1          /* use hardware protection           */
 #if 0
index 59ff96b5c54e1bd1847e67b3eca946a4a67892a7..5fe3075efc432569bc6c46cdef5c927822a79d4a 100644 (file)
 #define CFG_FLASH_BASE         0xFE000000
 #define CFG_FLASH_SIZE         32
 #define CFG_FLASH_CFI
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_MAX_FLASH_BANKS    2       /* max num of flash banks       */
 #define CFG_MAX_FLASH_SECT     512     /* max num of sects on one chip */
 
index 9cbc9ccf93f428d9c91191c074f91ea92547e05d..6f1c640b1a329fd6969679b4be9c985d7597aeba 100644 (file)
 #define CFG_MAX_FLASH_BANKS    1       /* max number of memory banks           */
 #define CFG_FLASH_SIZE         32
 #define CFG_FLASH_CFI
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_MAX_FLASH_SECT     256     /* max num of sects on one chip */
 
 
index 7e0df870191871e690f31053a437d56473658311..36a42ba6fc25509724ca2f518e8aa92eb8b9d557 100644 (file)
        #define CFG_FLASH_BASE          XILINX_FLASH_START
        #define CFG_FLASH_SIZE          XILINX_FLASH_SIZE
        #define CFG_FLASH_CFI           1
-       #define CFG_FLASH_CFI_DRIVER    1
+       #define CONFIG_FLASH_CFI_DRIVER 1
        #define CFG_FLASH_EMPTY_INFO    1       /* ?empty sector */
        #define CFG_MAX_FLASH_BANKS     1       /* max number of memory banks */
        #define CFG_MAX_FLASH_SECT      128     /* max number of sectors on one chip */
diff --git a/include/configs/ml507.h b/include/configs/ml507.h
new file mode 100644 (file)
index 0000000..c653a51
--- /dev/null
@@ -0,0 +1,122 @@
+/*
+ * (C) Copyright 2008
+ *  Ricado Ribalda-Universidad Autonoma de Madrid-ricardo.ribalda@uam.es
+ *  This work has been supported by: QTechnology  http://qtec.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, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+/*
+#define DEBUG
+#define ET_DEBUG
+*/
+ /*CPU*/
+#define CONFIG_XILINX_ML507    1
+#define CONFIG_XILINX_440      1
+#define CONFIG_440             1
+#define CONFIG_4xx             1
+#include "../board/xilinx/ml507/xparameters.h"
+
+/*Mem Map*/
+#define CFG_SDRAM_BASE         0x0
+#define CFG_SDRAM_SIZE_MB      256
+#define CFG_MONITOR_BASE       TEXT_BASE
+#define CFG_MONITOR_LEN                ( 192 * 1024 )
+#define CFG_MALLOC_LEN         ( CFG_ENV_SIZE + 128 * 1024 )
+
+/*Uart*/
+#define CONFIG_XILINX_UARTLITE
+#define CONFIG_BAUDRATE                XPAR_UARTLITE_0_BAUDRATE
+#define CFG_BAUDRATE_TABLE     { XPAR_UARTLITE_0_BAUDRATE }
+#define CONFIG_SERIAL_BASE     XPAR_UARTLITE_0_BASEADDR
+
+/*Cmd*/
+#include <config_cmd_default.h>
+#define CONFIG_CMD_ASKENV
+#define CONFIG_CMD_CACHE
+#define CONFIG_CMD_DIAG
+#define CONFIG_CMD_ELF
+#define CONFIG_CMD_IRQ
+#define CONFIG_CMD_REGINFO
+#define CONFIG_CMD_JFFS2
+#define CONFIG_JFFS2_CMDLINE
+#undef CONFIG_CMD_I2C
+#undef CONFIG_CMD_DTT
+#undef CONFIG_CMD_NET
+#undef CONFIG_CMD_PING
+#undef CONFIG_CMD_DHCP
+#undef CONFIG_CMD_EEPROM
+#undef CONFIG_CMD_IMLS
+
+/*Env*/
+#define        CFG_ENV_IS_IN_FLASH
+#define        CFG_ENV_SIZE            0x20000
+#define        CFG_ENV_SECT_SIZE       0x20000
+#define CFG_ENV_OFFSET                 0x340000
+#define CFG_ENV_ADDR           (XPAR_FLASH_MEM0_BASEADDR+CFG_ENV_OFFSET)
+
+/*Misc*/
+#define CONFIG_BOOTDELAY       5               /* autoboot after 5 seconds     */
+#define CFG_LONGHELP                           /* undef to save memory         */
+#define CFG_PROMPT             "board:/# "     /* Monitor Command Prompt       */
+#if defined(CONFIG_CMD_KGDB)
+#define CFG_CBSIZE             1024            /* Console I/O Buffer Size      */
+#else
+#define CFG_CBSIZE             256             /* Console I/O Buffer Size      */
+#endif
+#define CFG_PBSIZE             ( CFG_CBSIZE + sizeof( CFG_PROMPT ) + 16 )
+#define CFG_MAXARGS            16              /* max number of command args   */
+#define CFG_BARGSIZE           CFG_CBSIZE      /* Boot Argument Buffer Size */
+#define CFG_MEMTEST_START      0x00400000      /* memtest works on           */
+#define CFG_MEMTEST_END                0x00C00000      /* 4 ... 12 MB in DRAM        */
+#define CFG_LOAD_ADDR          0x00400000      /* default load address       */
+#define CFG_EXTBDINFO          1               /* Extended board_into (bd_t) */
+#define CFG_HZ                 1000            /* decrementer freq: 1 ms ticks */
+#define CONFIG_CMDLINE_EDITING                 /* add command line history     */
+#define CONFIG_AUTO_COMPLETE                   /* add autocompletion support   */
+#define CONFIG_LOOPW                           /* enable loopw command         */
+#define CONFIG_MX_CYCLIC                       /* enable mdc/mwc commands      */
+#define CONFIG_ZERO_BOOTDELAY_CHECK            /* check for keypress on bootdelay==0 */
+#define CONFIG_VERSION_VARIABLE                        /* include version env variable */
+#define CFG_CONSOLE_INFO_QUIET                 /* don't print console @ startup */
+#define CFG_HUSH_PARSER                                /* Use the HUSH parser          */
+#define        CFG_PROMPT_HUSH_PS2     "> "
+#define CONFIG_LOADS_ECHO                      /* echo on for serial download  */
+#define CFG_LOADS_BAUD_CHANGE                  /* allow baudrate change        */
+#define CFG_BOOTMAPSZ          ( 8 << 20 )     /* Initial Memory map for Linux */
+#define CONFIG_PREBOOT         "echo U-Boot is up and runnining;"
+
+/*Stack*/
+#define CFG_INIT_RAM_ADDR      0x800000        /* Initial RAM address    */
+#define CFG_INIT_RAM_END       0x2000          /* End of used area in RAM  */
+#define CFG_GBL_DATA_SIZE      128             /* num bytes initial data   */
+#define CFG_GBL_DATA_OFFSET    ( CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE )
+#define CFG_INIT_SP_OFFSET     CFG_GBL_DATA_OFFSET
+/*Speed*/
+#define CONFIG_SYS_CLK_FREQ    XPAR_CORE_CLOCK_FREQ_HZ
+
+/*Flash*/
+#define        CFG_FLASH_BASE          XPAR_FLASH_MEM0_BASEADDR
+#define        CFG_FLASH_SIZE          (32*1024*1024)
+#define        CFG_FLASH_CFI           1
+#define        CFG_FLASH_CFI_DRIVER    1
+#define        CFG_FLASH_EMPTY_INFO    1
+#define        CFG_MAX_FLASH_BANKS     1
+#define        CFG_MAX_FLASH_SECT      259
+#define        CFG_FLASH_PROTECTION
+#define MTDIDS_DEFAULT         "nor0=ml507-flash"
+#define MTDPARTS_DEFAULT       "mtdparts=ml507-flash:-(user)"
+
+
+#endif                                         /* __CONFIG_H */
index 3d1eafee6966d8626a3a3a6d3125894f2eb6e746..f2a35ee2b39ad72055483d142c2acca8a0dd9cc3 100644 (file)
  * Flash configuration
  */
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER   1
+#define CONFIG_FLASH_CFI_DRIVER        1
 #define CFG_FLASH_BASE         0xff000000
 #define CFG_FLASH_SIZE         0x01000000
 #define CFG_MAX_FLASH_BANKS    1       /* max num of memory banks */
index 2f249674050f701c66bf993270e06034ae32a4df..d379b1fb05322f58db511c73084ccc2819b1c3c6 100644 (file)
 #define FLASH_BANK_SIZE                0x01000000      /* 16 MB Total */
 #define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE, /* CFG_FLASH_BASE2 */ }
 
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_CFI
 #define CFG_WRITE_SWAPPED_DATA
 
index 0fc0b970dbad2fb23988e9c498ef6e8c564013cb..3df6e39f49decf2dfbb0ca766cd96f9d5e455de7 100644 (file)
@@ -67,7 +67,7 @@
 
 /* Flash */
 #define CFG_FLASH_CFI
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_EMPTY_INFO
 #define CFG_FLASH_BASE         0xA0000000
 #define CFG_MAX_FLASH_SECT     256
@@ -86,7 +86,7 @@
 #define CFG_HZ                 (CONFIG_SYS_CLK_FREQ / TMU_CLK_DIVIDER)
 
 /* UART */
-#define CFG_SCIF_CONSOLE       1
+#define CONFIG_SCIF_CONSOLE    1
 #define CONFIG_CONS_SCIF0      1
 
 #endif /* __MPR2_H */
index 5e79a271115fd706787d29212d881f63de5c57df..1c3d2771b08497eab1f51ae5388097a899bacfe0 100644 (file)
@@ -63,7 +63,7 @@
 #define CFG_BAUDRATE_TABLE     { 115200 }
 
 /* SCIF */
-#define CFG_SCIF_CONSOLE       1
+#define CONFIG_SCIF_CONSOLE    1
 #define CONFIG_CONS_SCIF0      1
 
 #define CFG_MEMTEST_START      MS7720SE_SDRAM_BASE
@@ -82,7 +82,7 @@
 
 /* FLASH */
 #define CFG_FLASH_CFI
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #undef  CFG_FLASH_QUIET_TEST
 #define CFG_FLASH_EMPTY_INFO   /* print 'E' for empty sector on flinfo */
 
index 7298e55c7080267a709af6a367a8b82de12076ce..3809e7120cd6745380be433bfc2d30a51bf452c8 100644 (file)
@@ -62,7 +62,7 @@
 #define CFG_BAUDRATE_TABLE     { 115200 }      /* List of legal baudrate settings for this board */
 
 /* SCIF */
-#define CFG_SCIF_CONSOLE       1
+#define CONFIG_SCIF_CONSOLE    1
 #define CONFIG_CONS_SCIF0      1
 #undef  CFG_CONSOLE_INFO_QUIET                 /* Suppress display of console information at boot */
 #undef  CFG_CONSOLE_OVERWRITE_ROUTINE
@@ -90,7 +90,7 @@
 
 /* FLASH */
 #define CFG_FLASH_CFI
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #undef  CFG_FLASH_QUIET_TEST
 #define CFG_FLASH_EMPTY_INFO                   /* print 'E' for empty sector on flinfo */
 
index 3000c77c119a009386e8f88962fc903d724adb2d..4356a671e8369e402fd2c62832c910da7c086aea 100644 (file)
@@ -42,7 +42,7 @@
 #define CONFIG_CMD_FLASH
 #define CONFIG_CMD_ENV
 
-#define CFG_SCIF_CONSOLE       1
+#define CONFIG_SCIF_CONSOLE    1
 #define CONFIG_BAUDRATE                38400
 #define CONFIG_CONS_SCIF1      1
 #define BOARD_LATE_INIT                1
@@ -86,7 +86,7 @@
 #define CFG_RX_ETH_BUFFER      (8)
 
 #define CFG_FLASH_CFI
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #undef CFG_FLASH_CFI_BROKEN_TABLE
 #undef  CFG_FLASH_QUIET_TEST
 #define CFG_FLASH_EMPTY_INFO                           /* print 'E' for empty sector on flinfo */
index e0046ec2d38efb8e2066d50a846d0a5270a92e0e..cea2834305dd6a78f88c0695518ba5e12bf1b0b6 100644 (file)
  */
 #define CFG_FLASH_BASE         0xFF000000
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use the common driver */
 #define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE }
 #define CFG_FLASH_EMPTY_INFO
 #define CFG_FLASH_SIZE         0x01000000 /* 16 MByte */
index 37ba872a43923249c8149aeb3236fd639187286d..9ede7645d9e1230d97cdf99caa35c8fe68b39e02 100644 (file)
  * CFI FLASH driver setup
  */
 #define CFG_FLASH_CFI                  1 /* Flash memory is CFI compliant */
-#define CFG_FLASH_CFI_DRIVER           1 /* Use drivers/cfi_flash.c */
+#define CONFIG_FLASH_CFI_DRIVER                1 /* Use drivers/cfi_flash.c */
 #define CONFIG_FLASH_SPANSION_S29WS_N  1 /* A non-standard buffered write algorithm */
 #define CFG_FLASH_USE_BUFFER_WRITE     1 /* Use buffered writes (~10x faster) */
 #define CFG_FLASH_PROTECTION           1 /* Use hardware sector protection */
index f30cb46cf7ccfd1d7f4521e0f303416763e98e56..746a56e9aa36814bcf8f728886e20913738075b6 100644 (file)
@@ -56,7 +56,7 @@
 /*
  * Hardware drivers
  */
-#define CFG_NS9750_UART                        1       /* use on-chip UART */
+#define CONFIG_NS9750_UART             1       /* use on-chip UART */
 #define CONFIG_DRIVER_NS9750_ETHERNET  1       /* use on-chip ethernet */
 
 /*
index 0be46eacec77fb5c6833fbeaaede3f90d1d62131..46b30e025a440429aec6ae3400eeb9fc542e9212 100644 (file)
  * FLASH driver setup
  */
 #define CFG_FLASH_CFI          1       /* Flash memory is CFI compliant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use drivers/mtd/cfi_flash.c */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use drivers/mtd/cfi_flash.c */
 #define CFG_FLASH_USE_BUFFER_WRITE     1       /* Use buffered writes (~10x faster) */
 #define CFG_FLASH_PROTECTION   1       /* Use hardware sector protection */
 
index 88a3f6eb95b73daaa366f2dd031133293ef9386e..afdcba41150dfc53e6a719f4678eb70870097c3f 100644 (file)
 /*
  *  Board NAND Info.
  */
-#define CFG_NAND_LEGACY
+#define CONFIG_NAND_LEGACY
 #define CFG_NAND_ADDR 0x04000000  /* physical address to access nand at CS0*/
 
 #define CFG_MAX_NAND_DEVICE 1  /* Max number of NAND devices */
  * CFI FLASH driver setup
  */
 #define CFG_FLASH_CFI          1       /* Flash memory is CFI compliant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use drivers/mtd/cfi_flash.c */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use drivers/mtd/cfi_flash.c */
 #define CFG_FLASH_USE_BUFFER_WRITE 1   /* Use buffered writes (~10x faster) */
 #define CFG_FLASH_PROTECTION   1       /* Use hardware sector protection */
 
index e3bde4ff81d6875b441c68511a8af598e45c1e88..1c44ce032fee13bccaf23c0ac67bb522ea008e1e 100644 (file)
  * FLASH driver setup
  */
 #define CFG_FLASH_CFI          1       /* Flash memory is CFI compliant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use drivers/mtd/cfi_flash.c */
+#define CONFIG_FLASH_CFI_DRIVER   1       /* Use drivers/mtd/cfi_flash.c */
 
 #define CFG_FLASH_BANKS_LIST { PHYS_FLASH_1, PHYS_FLASH_2 }
 
index 0913b14a4ca9f22adef465244d4b4ca9abe8b03c..33a94bc2ca79fc65b74f4b15f03745837dc6f47d 100644 (file)
  * FLASH related
  *----------------------------------------------------------------------*/
 #define CFG_FLASH_CFI                  /* The flash is CFI compatible          */
-#define CFG_FLASH_CFI_DRIVER           /* Use common CFI driver                */
+#define CONFIG_FLASH_CFI_DRIVER                /* Use common CFI driver                */
 #define CFG_MAX_FLASH_BANKS    1       /* max number of memory banks           */
 #define CFG_MAX_FLASH_SECT     512     /* max number of sectors on one chip    */
 #define CFG_FLASH_ERASE_TOUT   120000  /* Timeout for Flash Erase (in ms)      */
index 82f239117e388ea5116c0dd7a43f7012b68324de..ac0d83ac1c5883b4d0958e340b9474818163d033 100644 (file)
  * FLASH related
  *----------------------------------------------------------------------*/
 #define CFG_FLASH_CFI                          /* The flash is CFI compatible  */
-#define CFG_FLASH_CFI_DRIVER                   /* Use common CFI driver        */
+#define CONFIG_FLASH_CFI_DRIVER                        /* Use common CFI driver        */
 
 #define CFG_FLASH_BANKS_LIST { CFG_FLASH3, CFG_FLASH2, CFG_FLASH1, CFG_FLASH0 }
 
index aca70dce69bce4c41dd0c646f414a82e056eaa5f..889207a94e633cde9bfae9ed8d6f960729dc6ae8 100644 (file)
  */
 #if defined(CONFIG_SCPU)
 #define CFG_FLASH_CFI                          /* The flash is CFI compatible  */
-#define CFG_FLASH_CFI_DRIVER                   /* Use common CFI driver        */
+#define CONFIG_FLASH_CFI_DRIVER                        /* Use common CFI driver        */
 #define CFG_FLASH_CFI_WIDTH    FLASH_CFI_16BIT /* no byte writes on IXP4xx     */
 #endif
 
index dee664361f92b046266c0f100d242a3d8be411e3..6f1195b1e50211f713abd949de4e43333dc5c56e 100644 (file)
  */
 
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant              */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver                */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use the common driver                */
 #define CFG_MAX_FLASH_SECT     128     /* max number of sectors on one chip    */
 #define CFG_MAX_FLASH_BANKS    1       /* max number of memory banks           */
 #define CFG_FLASH_INCREMENT    0       /* there is only one bank               */
index a2f365042c98b3135d4dea162cfb283b6afb87d7..179ff7ad50a60da0e2ef8c08279936e8daec59da 100644 (file)
  * FLASH and environment organization
  */
 #define CFG_FLASH_CFI
-#define CFG_FLASH_CFI_DRIVER   1
+#define CONFIG_FLASH_CFI_DRIVER        1
 
 #define CFG_MONITOR_BASE       0
 #define CFG_MONITOR_LEN                PHYS_FLASH_SECT_SIZE
index 3dfd2181f4844fef4436442f5ef481359ecb4f5e..19e627b61ca6e77f2c44fa91c5600f7e038ce4a2 100644 (file)
 #define CFG_MAX_FLASH_BANKS    1
 #define CFG_MAX_FLASH_SECT     128
 #define CFG_FLASH_CFI          1       /* Flash memory is CFI compliant */
-#define CFG_FLASH_CFI_DRIVER   1
+#define CONFIG_FLASH_CFI_DRIVER        1
 #define CFG_FLASH_USE_BUFFER_WRITE     1
 
 #define CFG_ENV_IS_IN_FLASH    1
index 622a5d4cccdc7f54e64450f95d5aaa179e164362..d464734dadccd35c53d6f17cdfa11876b29d6d80 100644 (file)
  * FLASH organization
  */
 #define CFG_FLASH_CFI                  /* The flash is CFI compatible  */
-#define        CFG_FLASH_CFI_DRIVER
+#define        CONFIG_FLASH_CFI_DRIVER
 
 #define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE }
 
index cc261c33e100de6935665f56d33f062ca9f8ae87..34a1ea6e2c6d7750d4f5e1ec9d9796daba954e80 100644 (file)
 #define CFG_FLASH_BASE 0xFF000000
 
 #if 1
-    #define CFG_FLASH_CFI_DRIVER
+    #define CONFIG_FLASH_CFI_DRIVER
 #else
-    #undef CFG_FLASH_CFI_DRIVER
+    #undef CONFIG_FLASH_CFI_DRIVER
 #endif
 
 
-#ifdef CFG_FLASH_CFI_DRIVER
+#ifdef CONFIG_FLASH_CFI_DRIVER
     #define CFG_FLASH_CFI 1
     #undef CFG_FLASH_USE_BUFFER_WRITE
     #define CFG_FLASH_BANKS_LIST {CFG_FLASH_BASE}
index e269336e82a0b770fbe1cef0d9d2da902f03935b..06ede3e039a171ad034118576d3615388223ead2 100644 (file)
@@ -26,7 +26,7 @@
 #define CONFIG_DOS_PARTITION
 
 /* SCIF */
-#define CFG_SCIF_CONSOLE       1
+#define CONFIG_SCIF_CONSOLE    1
 #define CONFIG_BAUDRATE                115200
 #define CONFIG_CONS_SCIF1      1
 #define BOARD_LATE_INIT                1
@@ -65,7 +65,7 @@
  * NOR Flash ( Spantion S29GL256P )
  */
 #define CFG_FLASH_CFI
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_BASE         (0xA0000000)
 #define CFG_MAX_FLASH_BANKS (1)
 #define CFG_MAX_FLASH_SECT  256
index 4c82c5a2fdcab27a097d375405ba94d8cf6176ac..77881e7a28d673d0032d2ce7adb904100a3582c4 100644 (file)
@@ -49,7 +49,7 @@
 #define CONFIG_CMD_EXT2
 #define CONFIG_DOS_PARTITION
 
-#define CFG_SCIF_CONSOLE       1
+#define CONFIG_SCIF_CONSOLE    1
 #define CONFIG_BAUDRATE                115200
 #define CONFIG_CONS_SCIF0      1
 
 #define CFG_RX_ETH_BUFFER      (8)
 
 #define CFG_FLASH_CFI
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #undef CFG_FLASH_CFI_BROKEN_TABLE
 #undef  CFG_FLASH_QUIET_TEST
 /* print 'E' for empty sector on flinfo */
diff --git a/include/configs/redwood.h b/include/configs/redwood.h
new file mode 100644 (file)
index 0000000..32ed574
--- /dev/null
@@ -0,0 +1,186 @@
+/*
+ * Configuration for AMCC 460SX Ref (redwood)
+ *
+ * (C) Copyright 2008
+ * Feng Kan, Applied Micro Circuits Corp., fkan@amcc.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 __CONFIG_H
+#define __CONFIG_H
+
+/*-----------------------------------------------------------------------
+ * High Level Configuration Options
+ *----------------------------------------------------------------------*/
+#define CONFIG_4xx                     1       /* ... PPC4xx family    */
+#define CONFIG_440                     1       /* ... PPC460 family    */
+#define CONFIG_460SX                   1       /* ... PPC460 family    */
+#define CONFIG_BOARD_EARLY_INIT_F      1       /* Call board_pre_init  */
+
+/*-----------------------------------------------------------------------
+ * Include common defines/options for all AMCC boards
+ *----------------------------------------------------------------------*/
+#define CONFIG_HOSTNAME                redwood
+
+#include "amcc-common.h"
+
+#define CONFIG_SYS_CLK_FREQ    33333333        /* external freq to pll */
+
+/*-----------------------------------------------------------------------
+ * Base addresses -- Note these are effective addresses where the
+ * actual resources get mapped (not physical addresses)
+ *----------------------------------------------------------------------*/
+#define CFG_FLASH_BASE         0xfff00000      /* start of FLASH       */
+#define CFG_PERIPHERAL_BASE    0xa0000000      /* internal peripherals */
+#define CFG_ISRAM_BASE         0x90000000      /* internal SRAM        */
+
+#define CFG_PCI_BASE           0xd0000000      /* internal PCI regs    */
+
+#define CFG_PCIE_MEMBASE        0x90000000      /* mapped PCIe memory   */
+#define CFG_PCIE0_MEMBASE       0x90000000      /* mapped PCIe memory   */
+#define CFG_PCIE1_MEMBASE       0xa0000000      /* mapped PCIe memory   */
+#define CFG_PCIE_MEMSIZE        0x01000000
+
+#define CFG_PCIE0_XCFGBASE      0xb0000000
+#define CFG_PCIE1_XCFGBASE      0xb2000000
+#define CFG_PCIE2_XCFGBASE      0xb4000000
+#define CFG_PCIE0_CFGBASE       0xb6000000
+#define CFG_PCIE1_CFGBASE       0xb8000000
+#define CFG_PCIE2_CFGBASE       0xba000000
+
+/* PCIe mapped UTL registers */
+#define CFG_PCIE0_REGBASE   0xd0000000
+#define CFG_PCIE1_REGBASE   0xd0010000
+#define CFG_PCIE2_REGBASE   0xd0020000
+
+/* System RAM mapped to PCI space */
+#define CONFIG_PCI_SYS_MEM_BUS CFG_SDRAM_BASE
+#define CONFIG_PCI_SYS_MEM_PHYS        CFG_SDRAM_BASE
+#define CONFIG_PCI_SYS_MEM_SIZE        (1024 * 1024 * 1024)
+
+#define CFG_FPGA_BASE          0xe2000000      /* epld                 */
+#define CFG_OPER_FLASH         0xe7000000      /* SRAM - OPER Flash    */
+
+/*-----------------------------------------------------------------------
+ * Initial RAM & stack pointer (placed in internal SRAM)
+ *----------------------------------------------------------------------*/
+#define CFG_TEMP_STACK_OCM     1
+#define CFG_OCM_DATA_ADDR      CFG_ISRAM_BASE
+#define CFG_INIT_RAM_ADDR      CFG_ISRAM_BASE  /* Initial RAM address  */
+#define CFG_INIT_RAM_END       0x2000          /* End of used area in RAM */
+#define CFG_GBL_DATA_SIZE      128             /* num bytes initial data */
+
+#define CFG_GBL_DATA_OFFSET    (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
+#define CFG_POST_WORD_ADDR     (CFG_GBL_DATA_OFFSET - 0x4)
+#define CFG_INIT_SP_OFFSET     CFG_POST_WORD_ADDR
+
+/*-----------------------------------------------------------------------
+ * DDR SDRAM
+ *----------------------------------------------------------------------*/
+#define CONFIG_SPD_EEPROM      1       /* Use SPD EEPROM for setup     */
+#define CONFIG_DDR_ECC         1       /* with ECC support             */
+
+#define CFG_SPD_MAX_DIMMS       2
+
+/* SPD i2c spd addresses */
+#define SPD_EEPROM_ADDRESS     {IIC0_DIMM0_ADDR, IIC0_DIMM1_ADDR}
+#define IIC0_DIMM0_ADDR                0x53
+#define IIC0_DIMM1_ADDR                0x52
+
+/*-----------------------------------------------------------------------
+ * I2C
+ *----------------------------------------------------------------------*/
+#define CFG_I2C_SPEED           400000  /* I2C speed                    */
+
+#define IIC0_BOOTPROM_ADDR     0x50
+#define IIC0_ALT_BOOTPROM_ADDR 0x54
+
+/* Don't probe these addrs */
+#define CFG_I2C_NOPROBES       {0x50, 0x52, 0x53, 0x54}
+
+#define CFG_I2C_EEPROM_ADDR_LEN        2       /* Bytes of address             */
+
+/*-----------------------------------------------------------------------
+ * Environment
+ *----------------------------------------------------------------------*/
+#undef  CFG_ENV_IS_IN_NVRAM            /* ... not in NVRAM             */
+#define        CFG_ENV_IS_IN_FLASH     1       /* Environment uses flash       */
+#undef CFG_ENV_IS_IN_EEPROM            /* ... not in EEPROM            */
+
+#define CONFIG_PREBOOT "echo;" \
+       "echo Type \"run flash_nfs\" to mount root filesystem over NFS;" \
+       "echo"
+
+#undef CONFIG_BOOTARGS
+
+#define        CONFIG_EXTRA_ENV_SETTINGS                                       \
+       CONFIG_AMCC_DEF_ENV                                             \
+       CONFIG_AMCC_DEF_ENV_POWERPC                                     \
+       CONFIG_AMCC_DEF_ENV_NOR_UPD                                     \
+       CONFIG_AMCC_DEF_ENV_NAND_UPD                                    \
+       "kernel_addr=fc000000\0"                                        \
+       "fdt_addr=fc1e0000\0"                                           \
+       "ramdisk_addr=fc200000\0"                                       \
+       ""
+
+/*----------------------------------------------------------------------------+
+| Commands in addition to amcc-common.h
++----------------------------------------------------------------------------*/
+#define CONFIG_CMD_SDRAM
+
+#define CONFIG_BOOTCOMMAND     "run flash_self"
+
+#define CONFIG_BOOTDELAY       5       /* autoboot after 5 seconds     */
+
+#define        CONFIG_IBM_EMAC4_V4     1
+#define CONFIG_PHY_RESET        1      /* reset phy upon startup       */
+#define CONFIG_PHY_RESET_DELAY 1000
+#define CONFIG_M88E1141_PHY    1       /* Enable phy */
+#define CONFIG_PHY_GIGE                1       /* Include GbE speed/duplex detection */
+
+#define CONFIG_HAS_ETH0
+#define CONFIG_HAS_ETH1
+#define CONFIG_PHY_ADDR                0       /* PHY address, See schematics  */
+#define CONFIG_PHY1_ADDR       1       /* PHY address, See schematics  */
+
+#undef CONFIG_WATCHDOG                 /* watchdog disabled            */
+
+/*-----------------------------------------------------------------------
+ * FLASH related
+ *----------------------------------------------------------------------*/
+#define CFG_FLASH_CFI                   /* The flash is CFI compatible  */
+#define CFG_FLASH_CFI_DRIVER            /* Use common CFI driver        */
+#define CFG_FLASH_CFI_AMD_RESET 1       /* Use AMD (Spansion) reset cmd */
+
+#define CFG_MAX_FLASH_BANKS    3       /* number of banks              */
+#define CFG_MAX_FLASH_SECT     256     /* sectors per device           */
+
+#undef CFG_FLASH_CHECKSUM
+#define CFG_FLASH_ERASE_TOUT   120000  /* Timeout for Flash Erase (in ms) */
+#define CFG_FLASH_WRITE_TOUT   500     /* Timeout for Flash Write (in ms) */
+
+#ifdef CFG_ENV_IS_IN_FLASH
+#define CFG_ENV_SECT_SIZE      0x10000 /* size of one complete sector  */
+#define CFG_ENV_ADDR           0xfffa0000
+#define CFG_ENV_SIZE           0x10000 /* Size of Environment vars     */
+#endif /* CFG_ENV_IS_IN_FLASH */
+
+/*---------------------------------------------------------------------------*/
+
+#endif /* __CONFIG_H */
index 74815567ff922a4daf7422c48b9e716ac611cb9f..261229c489c5b061b0df6d795ef12161c3cdace9 100644 (file)
  * FLASH on the Local Bus
  */
 #define CFG_FLASH_CFI                          /* use the Common Flash Interface */
-#define CFG_FLASH_CFI_DRIVER                   /* use the CFI driver */
+#define CONFIG_FLASH_CFI_DRIVER                        /* use the CFI driver */
 #define CFG_FLASH_BASE         0xFF800000      /* start of FLASH   */
 #define CFG_FLASH_SIZE         8               /* flash size in MB */
 /* #define CFG_FLASH_USE_BUFFER_WRITE */
index 358fc0208e9b0af82221e35efbdd4df194454c04..b4238e566f30d460aa64d109941cb7ba6faa9412 100644 (file)
 
 #define CFG_MONITOR_BASE       TEXT_BASE       /* start of monitor */
 
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_CFI
 #define CFG_FLASH_EMPTY_INFO
 
index 6345cce635e3d8766226f9472f3062233503ca29..b244eef950c1c9ff080d487b2f7e866b5ffe37a5 100644 (file)
  */
 
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant      */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver        */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use the common driver        */
 #if 0
 #define CFG_FLASH_USE_BUFFER_WRITE 1    /* use buffered writes (20x faster)   */
 #define CFG_FLASH_PROTECTION           /* use hardware protection      */
index ebfcb463247574f1c5e93d6a50762e48b394bf76..efc787e999382ae9f6266fd8dbf0752371522442 100644 (file)
 #define CFG_FLASH_WRITE_TOUT   500     /* Flash Write Timeout (ms) */
 #define CFG_MONITOR_BASE       TEXT_BASE       /* start of monitor */
 
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_CFI
 #define CFG_WRITE_SWAPPED_DATA
 #define CFG_FLASH_EMPTY_INFO
index 87311ea6c7af0200894ed4edbc70f668c52fd122..659f74ed9541a382e06219bc082ed6f3e0c4079b 100644 (file)
@@ -397,7 +397,7 @@ extern unsigned long offsetOfEnvironment;
 #define CFG_MAX_FLASH_SECT     256     /* max number of sectors on one chip    */
 
 #define CFG_FLASH_CFI                  /* flash is CFI compat. */
-#define CFG_FLASH_CFI_DRIVER           /* Use common CFI driver*/
+#define CONFIG_FLASH_CFI_DRIVER                /* Use common CFI driver*/
 #define CFG_FLASH_EMPTY_INFO           /* print 'E' for empty sector   */
 #define CFG_FLASH_QUIET_TEST   1       /* don't warn upon unknown flash*/
 #define CFG_FLASH_ERASE_TOUT   120000  /* Timeout for Flash Erase (in ms)      */
index 0e830b878d4cdc26b744c14afe738526d187eb10..e29655e6362eb186bb784cebd6e2756de9d31095 100644 (file)
 #define CFG_SATA_MAXBUS         2       /*Max Sata buses supported */
 #define CFG_SATA_DEVS_PER_BUS   2      /*Max no. of devices per bus/port */
 #define CFG_SATA_MAX_DEVICE     (CFG_SATA_MAXBUS* CFG_SATA_DEVS_PER_BUS)
-#define CFG_ATA_PIIX            1       /*Supports ata_piix driver */
+#define CONFIG_ATA_PIIX                1       /*Supports ata_piix driver */
 
 /************************************************************
  * DISK Partition support
index 730037e6f30362bee83dd6dbc8a71c3d00da25f9..18675c2d536f176cc29d3ea43edddd331c3436b2 100644 (file)
  * FLASH related
  */
 #define CFG_FLASH_CFI                  /* The flash is CFI compatible  */
-#define CFG_FLASH_CFI_DRIVER           /* Use common CFI driver        */
+#define CONFIG_FLASH_CFI_DRIVER                /* Use common CFI driver        */
 
 #define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE }
 
index 5a6566320aacacb76865c557d5c6ca2b17b6970f..1306702fcbb23b74985fbce6a05c10cd1d495008 100644 (file)
@@ -52,7 +52,7 @@
 #undef  CONFIG_SHOW_BOOT_PROGRESS
 
 /* SCIF */
-#define CFG_SCIF_CONSOLE        1
+#define CONFIG_SCIF_CONSOLE        1
 #define CONFIG_BAUDRATE         115200
 #define CONFIG_CONS_SCIF2              1
 
@@ -89,7 +89,7 @@
 #define CFG_BOOTMAPSZ          (8 * 1024 * 1024)
 
 #define CFG_FLASH_CFI
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #undef  CFG_FLASH_QUIET_TEST
 #define CFG_FLASH_EMPTY_INFO   /* print 'E' for empty sector on flinfo */
 /* Timeout for Flash erase operations (in ms) */
index 3e47eb88a7cba31331ab87eacda42d18197f271c..1d202d4b2f8381ea402f9205abc1d1a0a6dce737 100644 (file)
 
 /* use CFI flash driver if no module variant is spezified */
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use the common driver */
 #define CFG_FLASH_BANKS_LIST   { CFG_BOOTCS_START }
 #define CFG_FLASH_EMPTY_INFO
 #define CFG_FLASH_SIZE         0x04000000 /* 64 MByte */
index 16274137dc6ba01a4c40428a070aa3acaaf1fc3c..8a649425b4a237c750ede5bddfbdd3fcfe7f39cb 100644 (file)
 #define CFG_OR1_PRELIM         0xfe000ff7      /* 32MB Flash           */
 
 #define CFG_FLASH_CFI                          /* flash is CFI compat. */
-#define CFG_FLASH_CFI_DRIVER                   /* Use common CFI driver*/
+#define CONFIG_FLASH_CFI_DRIVER                        /* Use common CFI driver*/
 #define CFG_FLASH_EMPTY_INFO           /* print 'E' for empty sector   */
 
 #define CFG_MAX_FLASH_BANKS    2               /* number of banks      */
index 18f553373709cc448c1c6cfdba8cc97d67cfe80b..f4e460800cfe5f1a7a025e33d7dc82755d598d7e 100644 (file)
 #define CFG_MAX_FLASH_BANKS    2       /* max num of flash banks */
 #define CFG_MAX_FLASH_SECT     512     /* max num of sects on one chip */
 
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_CFI
 #define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE,  \
                                CFG_FLASH_BASE+0x04000000 } /* two banks */
index f46c464cbc04e358cd2924f8b4d8b3b2a41fe8a3..daaa23f48e7ca2a2869c3f75c03fd37d9c943230 100644 (file)
  */
 #define CFG_FLASH_BASE          0xFE000000
 #define CFG_FLASH_CFI                           /* The flash is CFI compatible  */
-#define CFG_FLASH_CFI_DRIVER                    /* Use common CFI driver        */
+#define CONFIG_FLASH_CFI_DRIVER                    /* Use common CFI driver        */
 #define CFG_MAX_FLASH_BANKS     1               /* Max number of flash banks    */
 #define CFG_MAX_FLASH_SECT      128             /* Max num of sects on one chip */
 
index 69d2d67ab1cdbfe4b45b66d682e48cfb7bc01e39..93798a46f963c0b8d9f537e7b42b9f5bb6ef0f15 100644 (file)
 
 /* use CFI flash driver if no module variant is spezified */
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use the common driver */
 #define CFG_FLASH_BANKS_LIST   { CFG_BOOTCS_START }
 #define CFG_FLASH_EMPTY_INFO
 #define CFG_FLASH_SIZE         0x04000000 /* 64 MByte */
index a1e9789ea01b512b1a1ea64c428ffc9f067c549e..4f1c1563553d462b013ce73494f9ef851c65a2b5 100644 (file)
@@ -98,7 +98,7 @@
 #define CFG_OR0_PRELIM (CFG_FLASH_BASE | 0x0FF7)
 
 #define CFG_FLASH_CFI          1
-#define CFG_FLASH_CFI_DRIVER   1
+#define CONFIG_FLASH_CFI_DRIVER        1
 #undef CFG_FLASH_USE_BUFFER_WRITE      /* use buffered writes (20x faster) */
 #define CFG_MAX_FLASH_SECT     256     /* max number of sectors on one chip */
 #define CFG_MAX_FLASH_BANKS    1       /* max number of memory banks   */
index fcafba59379402c48950185741498c071e738411..37a52cf7edbd7e421a61b1ba62b26b8fc270ba05 100644 (file)
 #define CFG_ENV_SIZE_REDUND    CFG_ENV_SIZE
 
 #define CFG_FLASH_CFI          1
-#define CFG_FLASH_CFI_DRIVER   1
+#define CONFIG_FLASH_CFI_DRIVER        1
 #undef CFG_FLASH_USE_BUFFER_WRITE      /* use buffered writes (20x faster) */
 #define CFG_MAX_FLASH_SECT     128     /* max number of sectors on one chip */
 #define CFG_MAX_FLASH_BANKS    2       /* max number of memory banks   */
 /****************************************************************/
 
 /* NAND */
-#define CFG_NAND_LEGACY
+#define CONFIG_NAND_LEGACY
 #define CFG_NAND_BASE          NAND_BASE
 #define CONFIG_MTD_NAND_ECC_JFFS2
 #define CONFIG_MTD_NAND_VERIFY_WRITE
index 70336b5ebd01bb34b392d7280521540058eb15e3..bbbfa15db1d7e83fc68700149cec66bf043e9147 100644 (file)
 #define CONFIG_CMD_DATE
 
 
-#define CFG_NAND_LEGACY
+#define CONFIG_NAND_LEGACY
 
 /*
  * Miscellaneous configurable options
index ba421925edcd1b2d400ca47cc7cdeaab8d89ae7a..81133bb5c8689eaadd8956badc49e3f0fb20e1eb 100644 (file)
@@ -89,7 +89,7 @@
  * FLASH related
  *----------------------------------------------------------------------*/
 #define CFG_FLASH_CFI
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_EMPTY_INFO           /* print 'E' for empty sector on flinfo */
 #define CFG_FLASH_USE_BUFFER_WRITE 1   /* use buffered writes (20x faster)     */
 
index f77dd14f1a857d27124beb65412ca2269fe54ac1..6367f873ef94414c5273d675abba39d133fc9e8a 100644 (file)
  */
 
 #define CFG_FLASH_CFI
-#define CFG_FLASH_CFI_DRIVER   1
+#define CONFIG_FLASH_CFI_DRIVER        1
 
 #define CFG_MONITOR_BASE       0
 #define CFG_MONITOR_LEN                0x40000
index e74b1bb85ba7bae503783db32f11615f2c85f791..106e6f27591dcb4fd3d59d68d02ef168a9fc8cd2 100644 (file)
  * FLASH organization
  */
 #define CFG_FLASH_CFI                          /* The flash is CFI compatible  */
-#define CFG_FLASH_CFI_DRIVER                   /* Use common CFI driver        */
+#define CONFIG_FLASH_CFI_DRIVER                        /* Use common CFI driver        */
 #define CFG_FLASH_CFI_AMD_RESET        1               /* AMD RESET for STM 29W320DB!  */
 
 #define CFG_MAX_FLASH_BANKS    1       /* max number of memory banks           */
index 042750e2fe9a98f5623b0e833d9e501b912e45a2..a18618893cd132de4df0bc96338389d20a2027df 100644 (file)
 #define CFG_FLASH_ERASE_TOUT   240000  /* Flash Erase Timeout (in ms)  */
 #define CFG_FLASH_WRITE_TOUT   500     /* Flash Write Timeout (in ms)  */
 
-#define CFG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_DRIVER
 #define CFG_FLASH_CFI
 #define CFG_FLASH_EMPTY_INFO
 #define CFG_FLASH_CFI_AMD_RESET
index c2035225526092a941654ba85579acee301006b9..35745484d44ddb570b36f95f80a5088bce376357 100644 (file)
  * Flash configuration - use CFI driver
  */
 #define CFG_FLASH_CFI          1               /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER   1               /* Use the common driver */
+#define CONFIG_FLASH_CFI_DRIVER        1               /* Use the common driver */
 #define CFG_FLASH_CFI_AMD_RESET        1
 #define CFG_FLASH_BASE         0xFF000000
 #define CFG_MAX_FLASH_BANKS    1               /* max num of flash banks */
index f1048861d869285eeb70c11bbf1a60bec1e4a9a7..1a125f16ce8c7106a2016d0365beb8992de1a6ed 100644 (file)
 
 /* use CFI flash driver */
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use the common driver */
 #define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE, CFG_FLASH_BASE+flash_info[0].size }
 #define CFG_FLASH_EMPTY_INFO
 #define CFG_FLASH_USE_BUFFER_WRITE     1
index 8c827af315e0ea9c176ce57c3f580d35f96e99c8..20917ee9a5cfdc5273f7fa33ad8404893551e2d5 100644 (file)
@@ -60,7 +60,7 @@
  * FLASH organization
  */
 #define CFG_FLASH_CFI                  /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER           /* Use the common driver */
+#define CONFIG_FLASH_CFI_DRIVER                /* Use the common driver */
 #define CFG_MAX_FLASH_BANKS    1
 #define CFG_FLASH_BASE         PHYS_FLASH_1
 
index 891b515d4ec56e0a020c0547fa7bd3c4335f05d7..cb2042ce6ce0fb9f5113cce4e1e4235ed43c0898 100644 (file)
  * FLASH related
  *----------------------------------------------------------------------*/
 #define CFG_FLASH_CFI                          /* The flash is CFI compatible  */
-#define CFG_FLASH_CFI_DRIVER                   /* Use common CFI driver        */
+#define CONFIG_FLASH_CFI_DRIVER                        /* Use common CFI driver        */
 #define CFG_FLASH_CFI_AMD_RESET 1              /* AMD RESET for STM 29W320DB!  */
 
 #define CFG_MAX_FLASH_BANKS    1       /* max number of memory banks           */
index cd120dfbf1344ee0a9c93c1a5f104743bf386279..b50cba556cf79dfe77d3a7e6ab9836d259859b6f 100644 (file)
  * FLASH organization
  */
 #define CFG_FLASH_CFI                          /* The flash is CFI compatible  */
-#define CFG_FLASH_CFI_DRIVER                   /* Use common CFI driver        */
+#define CONFIG_FLASH_CFI_DRIVER                        /* Use common CFI driver        */
 
 #define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE }
 
index d9eb9118280753ad6b93d3c6740f163b30665119..e7aa26df048752e54ba8bb0029cd6dd78d267dbd 100644 (file)
@@ -28,7 +28,7 @@
 #ifndef __LINUX_MTD_NAND_IDS_H
 #define __LINUX_MTD_NAND_IDS_H
 
-#ifndef CFG_NAND_LEGACY
+#ifndef CONFIG_NAND_LEGACY
 #error This module is for the legacy NAND support
 #endif
 
index bb66e4547017265be04e2b6a90127bf579c5643b..99eafbbcdccde31e808984ac746adc33bda5edb9 100644 (file)
@@ -36,7 +36,7 @@
 #ifndef __LINUX_MTD_NAND_LEGACY_H
 #define __LINUX_MTD_NAND_LEGACY_H
 
-#ifndef CFG_NAND_LEGACY
+#ifndef CONFIG_NAND_LEGACY
 #error This module is for the legacy NAND support
 #endif
 
index 764e9f97229406587158a2bcd01dec9dfbac5b6a..4c2b76dd4b33f947e69e67a838f10124f095a9f2 100644 (file)
@@ -26,7 +26,7 @@
 
 extern void nand_init(void);
 
-#ifndef CFG_NAND_LEGACY
+#ifndef CONFIG_NAND_LEGACY
 #include <linux/mtd/compat.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/nand.h>
@@ -128,5 +128,5 @@ void board_nand_select_device(struct nand_chip *nand, int chip);
 
 __attribute__((noreturn)) void nand_boot(void);
 
-#endif /* !CFG_NAND_LEGACY */
+#endif /* !CONFIG_NAND_LEGACY */
 #endif
index 2231a5fbb45a1cde90bfa4196d7f6f8082f7178a..f19b67f1bb71011d55f0fd623deb47b517b5a5f7 100644 (file)
 #define dmasgc (DMA_DCR_BASE+0x23)  /* DMA scatter/gather command register  */
 #define dmaadr (DMA_DCR_BASE+0x24)  /* DMA address decode register          */
 
-/******************************************************************************
- * Universal interrupt controller
- ******************************************************************************/
-#define UIC_SR 0x0                     /* UIC status                      */
-#define UIC_ER 0x2                     /* UIC enable                      */
-#define UIC_CR 0x3                     /* UIC critical                    */
-#define UIC_PR 0x4                     /* UIC polarity                    */
-#define UIC_TR 0x5                     /* UIC triggering                  */
-#define UIC_MSR 0x6                    /* UIC masked status               */
-#define UIC_VR 0x7                     /* UIC vector                      */
-#define UIC_VCR 0x8                    /* UIC vector configuration        */
-
-#define UIC_DCR_BASE 0xc0
-#define UIC0_DCR_BASE UIC_DCR_BASE
-#define uicsr       (UIC_DCR_BASE+0x0)  /* UIC status                       */
-#define uicsrs      (UIC_DCR_BASE+0x1)  /* UIC status set                   */
-#define uicer       (UIC_DCR_BASE+0x2)  /* UIC enable                       */
-#define uiccr       (UIC_DCR_BASE+0x3)  /* UIC critical                     */
-#define uicpr       (UIC_DCR_BASE+0x4)  /* UIC polarity                     */
-#define uictr       (UIC_DCR_BASE+0x5)  /* UIC triggering                   */
-#define uicmsr      (UIC_DCR_BASE+0x6)  /* UIC masked status                */
-#define uicvr       (UIC_DCR_BASE+0x7)  /* UIC vector                       */
-#define uicvcr      (UIC_DCR_BASE+0x8)  /* UIC vector configuration         */
-
-#if defined(CONFIG_405EX)
-#define uic0sr       uicsr             /* UIC status            */
-#define uic0srs       uicsrs           /* UIC status set        */
-#define uic0er       uicer             /* UIC enable            */
-#define uic0cr       uiccr             /* UIC critical          */
-#define uic0pr       uicpr             /* UIC polarity          */
-#define uic0tr       uictr             /* UIC triggering        */
-#define uic0msr       uicmsr           /* UIC masked status     */
-#define uic0vr       uicvr             /* UIC vector            */
-#define uic0vcr       uicvcr           /* UIC vector configuration*/
-
-#define UIC_DCR_BASE1 0xd0
-#define UIC1_DCR_BASE 0xd0
-#define uic1sr       (UIC_DCR_BASE1+0x0)  /* UIC status            */
-#define uic1srs       (UIC_DCR_BASE1+0x1)  /* UIC status set       */
-#define uic1er       (UIC_DCR_BASE1+0x2)  /* UIC enable            */
-#define uic1cr       (UIC_DCR_BASE1+0x3)  /* UIC critical          */
-#define uic1pr       (UIC_DCR_BASE1+0x4)  /* UIC polarity          */
-#define uic1tr       (UIC_DCR_BASE1+0x5)  /* UIC triggering        */
-#define uic1msr       (UIC_DCR_BASE1+0x6)  /* UIC masked status     */
-#define uic1vr       (UIC_DCR_BASE1+0x7)  /* UIC vector            */
-#define uic1vcr       (UIC_DCR_BASE1+0x8)  /* UIC vector configuration*/
-
-#define UIC_DCR_BASE2 0xe0
-#define UIC2_DCR_BASE 0xe0
-#define uic2sr       (UIC_DCR_BASE2+0x0)  /* UIC status            */
-#define uic2srs       (UIC_DCR_BASE2+0x1)  /* UIC status set       */
-#define uic2er       (UIC_DCR_BASE2+0x2)  /* UIC enable            */
-#define uic2cr       (UIC_DCR_BASE2+0x3)  /* UIC critical          */
-#define uic2pr       (UIC_DCR_BASE2+0x4)  /* UIC polarity          */
-#define uic2tr       (UIC_DCR_BASE2+0x5)  /* UIC triggering        */
-#define uic2msr       (UIC_DCR_BASE2+0x6)  /* UIC masked status     */
-#define uic2vr       (UIC_DCR_BASE2+0x7)  /* UIC vector            */
-#define uic2vcr       (UIC_DCR_BASE2+0x8)  /* UIC vector configuration*/
-#endif
-
-/*-----------------------------------------------------------------------------+
-|  Universal interrupt controller interrupts
-+-----------------------------------------------------------------------------*/
-#if defined(CONFIG_405EZ)
-#define UIC_DMA0       0x80000000      /* DMA chan. 0                  */
-#define UIC_DMA1       0x40000000      /* DMA chan. 1                  */
-#define UIC_DMA2       0x20000000      /* DMA chan. 2                  */
-#define UIC_DMA3       0x10000000      /* DMA chan. 3                  */
-#define UIC_1588       0x08000000      /* IEEE 1588 network synchronization */
-#define UIC_UART0      0x04000000      /* UART 0                       */
-#define UIC_UART1      0x02000000      /* UART 1                       */
-#define UIC_CAN0       0x01000000      /* CAN 0                        */
-#define UIC_CAN1       0x00800000      /* CAN 1                        */
-#define UIC_SPI                0x00400000      /* SPI                          */
-#define UIC_IIC                0x00200000      /* IIC                          */
-#define UIC_CHT0       0x00100000      /* Chameleon timer high pri interrupt */
-#define UIC_CHT1       0x00080000      /* Chameleon timer high pri interrupt */
-#define UIC_USBH1      0x00040000      /* USB Host 1                   */
-#define UIC_USBH2      0x00020000      /* USB Host 2                   */
-#define UIC_USBDEV     0x00010000      /* USB Device                   */
-#define UIC_ENET       0x00008000      /* Ethernet interrupt status    */
-#define UIC_ENET1      0x00008000      /* dummy define                 */
-#define UIC_EMAC_WAKE  0x00004000      /* EMAC wake up                 */
-
-#define UIC_MADMAL     0x00002000      /* Logical OR of following MadMAL int */
-#define UIC_MAL_SERR   0x00002000      /*   MAL SERR                   */
-#define UIC_MAL_TXDE   0x00002000      /*   MAL TXDE                   */
-#define UIC_MAL_RXDE   0x00002000      /*   MAL RXDE                   */
-
-#define UIC_MAL_TXEOB  0x00001000      /* MAL TXEOB                    */
-#define UIC_MAL_TXEOB1 0x00000800      /* MAL TXEOB1                   */
-#define UIC_MAL_RXEOB  0x00000400      /* MAL RXEOB                    */
-#define UIC_NAND       0x00000200      /* NAND Flash controller        */
-#define UIC_ADC                0x00000100      /* ADC                          */
-#define UIC_DAC                0x00000080      /* DAC                          */
-#define UIC_OPB2PLB    0x00000040      /* OPB to PLB bridge interrupt  */
-#define UIC_RESERVED0  0x00000020      /* Reserved                     */
-#define UIC_EXT0       0x00000010      /* External  interrupt 0        */
-#define UIC_EXT1       0x00000008      /* External  interrupt 1        */
-#define UIC_EXT2       0x00000004      /* External  interrupt 2        */
-#define UIC_EXT3       0x00000002      /* External  interrupt 3        */
-#define UIC_EXT4       0x00000001      /* External  interrupt 4        */
-
-#elif defined(CONFIG_405EX)
-
-/* UIC 0 */
-#define UIC_U0                 0x80000000      /* */
-#define UIC_U1                 0x40000000      /* */
-#define UIC_IIC0               0x20000000      /* */
-#define UIC_PKA                        0x10000000      /* */
-#define UIC_TRNG               0x08000000      /* */
-#define UIC_EBM                        0x04000000      /* */
-#define UIC_BGI                        0x02000000      /* */
-#define UIC_IIC1               0x01000000      /* */
-#define UIC_SPI                        0x00800000      /* */
-#define UIC_EIRQ0              0x00400000      /**/
-#define UIC_MTE                        0x00200000      /*MAL Tx EOB */
-#define UIC_MRE                        0x00100000      /*MAL Rx EOB */
-#define UIC_DMA0               0x00080000      /* */
-#define UIC_DMA1               0x00040000      /* */
-#define UIC_DMA2               0x00020000      /* */
-#define UIC_DMA3               0x00010000      /* */
-#define UIC_PCIE0AL            0x00008000      /* */
-#define UIC_PCIE0VPD           0x00004000      /* */
-#define UIC_RPCIE0HRST         0x00002000      /* */
-#define UIC_FPCIE0HRST         0x00001000      /* */
-#define UIC_PCIE0TCR           0x00000800      /* */
-#define UIC_PCIEMSI0           0x00000400      /* */
-#define UIC_PCIEMSI1           0x00000200      /* */
-#define UIC_SECURITY           0x00000100      /* */
-#define UIC_ENET               0x00000080      /* */
-#define UIC_ENET1              0x00000040      /* */
-#define UIC_PCIEMSI2           0x00000020      /* */
-#define UIC_EIRQ4              0x00000010      /**/
-#define UICB0_UIC2NCI          0x00000008      /* */
-#define UICB0_UIC2CI           0x00000004      /* */
-#define UICB0_UIC1NCI          0x00000002      /* */
-#define UICB0_UIC1CI           0x00000001      /* */
-
-#define UICB0_ALL              (UICB0_UIC1CI | UICB0_UIC1NCI | \
-                                UICB0_UIC1CI | UICB0_UIC2NCI)
-
-#define UIC_MAL_TXEOB          UIC_MTE/* MAL TXEOB                          */
-#define UIC_MAL_RXEOB          UIC_MRE/* MAL RXEOB                          */
-/* UIC 1 */
-#define UIC_MS                 0x80000000      /* MAL SERR */
-#define UIC_MTDE               0x40000000      /* MAL TXDE */
-#define UIC_MRDE               0x20000000      /* MAL RXDE */
-#define UIC_PCIE0BMVC0         0x10000000      /* */
-#define UIC_PCIE0DCRERR                0x08000000      /* */
-#define UIC_EBC                        0x04000000      /* */
-#define UIC_NDFC               0x02000000      /* */
-#define UIC_PCEI1DCRERR                0x01000000      /* */
-#define UIC_GPTCMPT8           0x00800000      /* */
-#define UIC_GPTCMPT9           0x00400000      /* */
-#define UIC_PCIE1AL            0x00200000      /* */
-#define UIC_PCIE1VPD           0x00100000      /* */
-#define UIC_RPCE1HRST          0x00080000      /* */
-#define UIC_FPCE1HRST          0x00040000      /* */
-#define UIC_PCIE1TCR           0x00020000      /* */
-#define UIC_PCIE1VC0           0x00010000      /* */
-#define UIC_GPTCMPT3           0x00008000      /* */
-#define UIC_GPTCMPT4           0x00004000      /* */
-#define UIC_EIRQ7              0x00002000      /* */
-#define UIC_EIRQ8              0x00001000      /* */
-#define UIC_EIRQ9              0x00000800      /* */
-#define UIC_GPTCMP5            0x00000400      /* */
-#define UIC_GPTCMP6            0x00000200      /* */
-#define UIC_GPTCMP7            0x00000100      /* */
-#define UIC_SROM               0x00000080      /* SERIAL ROM*/
-#define UIC_GPTDECPULS         0x00000040      /* GPT Decrement pulse*/
-#define UIC_EIRQ2              0x00000020      /* */
-#define UIC_EIRQ5              0x00000010      /* */
-#define UIC_EIRQ6              0x00000008      /* */
-#define UIC_EMAC0WAKE          0x00000004      /* */
-#define UIC_EIRQ1              0x00000002      /* */
-#define UIC_EMAC1WAKE          0x00000001      /* */
-#define UIC_MAL_SERR           UIC_MS          /* MAL SERR     */
-#define UIC_MAL_TXDE           UIC_MTDE                /* MAL TXDE     */
-#define UIC_MAL_RXDE           UIC_MRDE                /* MAL RXDE     */
-/* UIC 2 */
-#define UIC_PCIE0INTA          0x80000000      /* PCIE0 INTA*/
-#define UIC_PCIE0INTB          0x40000000      /* PCIE0 INTB*/
-#define UIC_PCIE0INTC          0x20000000      /* PCIE0 INTC*/
-#define UIC_PCIE0INTD          0x10000000      /* PCIE0 INTD*/
-#define UIC_EIRQ3              0x08000000      /* External IRQ 3*/
-#define UIC_DDRMCUE            0x04000000      /* */
-#define UIC_DDRMCCE            0x02000000      /* */
-#define UIC_MALINTCOATX0       0x01000000      /* Interrupt coalecence TX0*/
-#define UIC_MALINTCOATX1       0x00800000      /* Interrupt coalecence TX1*/
-#define UIC_MALINTCOARX0       0x00400000      /* Interrupt coalecence RX0*/
-#define UIC_MALINTCOARX1       0x00200000      /* Interrupt coalecence RX1*/
-#define UIC_PCIE1INTA          0x00100000      /* PCIE0 INTA*/
-#define UIC_PCIE1INTB          0x00080000      /* PCIE0 INTB*/
-#define UIC_PCIE1INTC          0x00040000      /* PCIE0 INTC*/
-#define UIC_PCIE1INTD          0x00020000      /* PCIE0 INTD*/
-#define UIC_RPCIEMSI2          0x00010000      /* MSI level 2 Note this looks same as uic0-26*/
-#define UIC_PCIEMSI3           0x00008000      /* MSI level 2*/
-#define UIC_PCIEMSI4           0x00004000      /* MSI level 2*/
-#define UIC_PCIEMSI5           0x00002000      /* MSI level 2*/
-#define UIC_PCIEMSI6           0x00001000      /* MSI level 2*/
-#define UIC_PCIEMSI7           0x00000800      /* MSI level 2*/
-#define UIC_PCIEMSI8           0x00000400      /* MSI level 2*/
-#define UIC_PCIEMSI9           0x00000200      /* MSI level 2*/
-#define UIC_PCIEMSI10          0x00000100      /* MSI level 2*/
-#define UIC_PCIEMSI11          0x00000080      /* MSI level 2*/
-#define UIC_PCIEMSI12          0x00000040      /* MSI level 2*/
-#define UIC_PCIEMSI13          0x00000020      /* MSI level 2*/
-#define UIC_PCIEMSI14          0x00000010      /* MSI level 2*/
-#define UIC_PCIEMSI15          0x00000008      /* MSI level 2*/
-#define UIC_PLB4XAHB           0x00000004      /* PLBxAHB bridge*/
-#define UIC_USBWAKE            0x00000002      /* USB wakup*/
-#define UIC_USBOTG             0x00000001      /*  USB OTG*/
-#define UIC_ETH0       UIC_ENET
-#define UIC_ETH1       UIC_ENET1
-
-#else  /* !defined(CONFIG_405EZ) */
-
-#define UIC_UART0     0x80000000      /* UART 0                                    */
-#define UIC_UART1     0x40000000      /* UART 1                                    */
-#define UIC_IIC       0x20000000      /* IIC                               */
-#define UIC_EXT_MAST  0x10000000      /* External Master                   */
-#define UIC_PCI       0x08000000      /* PCI write to command reg          */
-#define UIC_DMA0      0x04000000      /* DMA chan. 0                       */
-#define UIC_DMA1      0x02000000      /* DMA chan. 1                       */
-#define UIC_DMA2      0x01000000      /* DMA chan. 2                       */
-#define UIC_DMA3      0x00800000      /* DMA chan. 3                       */
-#define UIC_EMAC_WAKE 0x00400000      /* EMAC wake up                      */
-#define UIC_MAL_SERR  0x00200000      /* MAL SERR                          */
-#define UIC_MAL_TXEOB 0x00100000      /* MAL TXEOB                         */
-#define UIC_MAL_RXEOB 0x00080000      /* MAL RXEOB                         */
-#define UIC_MAL_TXDE  0x00040000      /* MAL TXDE                          */
-#define UIC_MAL_RXDE  0x00020000      /* MAL RXDE                          */
-#define UIC_ENET      0x00010000      /* Ethernet0                         */
-#define UIC_ENET1     0x00004000      /* Ethernet1 on 405EP                */
-#define UIC_ECC_CE    0x00004000      /* ECC Correctable Error on 405GP     */
-#define UIC_EXT_PCI_SERR 0x00008000   /* External PCI SERR#                */
-#define UIC_PCI_PM    0x00002000      /* PCI Power Management              */
-#define UIC_EXT0      0x00000040      /* External  interrupt 0             */
-#define UIC_EXT1      0x00000020      /* External  interrupt 1             */
-#define UIC_EXT2      0x00000010      /* External  interrupt 2             */
-#define UIC_EXT3      0x00000008      /* External  interrupt 3             */
-#define UIC_EXT4      0x00000004      /* External  interrupt 4             */
-#define UIC_EXT5      0x00000002      /* External  interrupt 5             */
-#define UIC_EXT6      0x00000001      /* External  interrupt 6             */
-#endif /* defined(CONFIG_405EZ) */
-
-/******************************************************************************
- * External Bus Controller (EBC)
- *****************************************************************************/
-
-/* Bank Configuration Register */
-#define        EBC_BXCR_BAS_MASK       PPC_REG_VAL(11, 0xFFF)
-#define EBC_BXCR_BAS_ENCODE(n) (((static_cast(unsigned long, n)) & \
-                                 EBC_BXCR_BAS_MASK) << 0)
-#define EBC_BXCR_BS_MASK       PPC_REG_VAL(14, 0x7)
-#define EBC_BXCR_BS_1MB                PPC_REG_VAL(14, 0x0)
-#define EBC_BXCR_BS_2MB                PPC_REG_VAL(14, 0x1)
-#define EBC_BXCR_BS_4MB                PPC_REG_VAL(14, 0x2)
-#define EBC_BXCR_BS_8MB                PPC_REG_VAL(14, 0x3)
-#define EBC_BXCR_BS_16MB       PPC_REG_VAL(14, 0x4)
-#define EBC_BXCR_BS_32MB       PPC_REG_VAL(14, 0x5)
-#define EBC_BXCR_BS_64MB       PPC_REG_VAL(14, 0x6)
-#define EBC_BXCR_BS_128MB      PPC_REG_VAL(14, 0x7)
-#define EBC_BXCR_BU_MASK       PPC_REG_VAL(16, 0x3)
-#define        EBC_BXCR_BU_NONE        PPC_REG_VAL(16, 0x0)
-#define EBC_BXCR_BU_R          PPC_REG_VAL(16, 0x1)
-#define EBC_BXCR_BU_W          PPC_REG_VAL(16, 0x2)
-#define EBC_BXCR_BU_RW         PPC_REG_VAL(16, 0x3)
-#define EBC_BXCR_BW_MASK       PPC_REG_VAL(18, 0x3)
-#define EBC_BXCR_BW_8BIT       PPC_REG_VAL(18, 0x0)
-#define EBC_BXCR_BW_16BIT      PPC_REG_VAL(18, 0x1)
-#define EBC_BXCR_BW_32BIT      PPC_REG_VAL(18, 0x3)
-
-/* Bank Access Parameter Register */
-#define EBC_BXAP_BME_ENABLED   PPC_REG_VAL(0, 0x1)
-#define EBC_BXAP_BME_DISABLED  PPC_REG_VAL(0, 0x0)
-#define EBC_BXAP_TWT_ENCODE(n) PPC_REG_VAL(8, \
-                                           (static_cast(unsigned long, n)) \
-                                           & 0xFF)
-#define        EBC_BXAP_FWT_ENCODE(n)  PPC_REG_VAL(5, \
-                                           (static_cast(unsigned long, n)) \
-                                           & 0x1F)
-#define        EBC_BXAP_BWT_ENCODE(n)  PPC_REG_VAL(8, \
-                                           (static_cast(unsigned long, n)) \
-                                           & 0x7)
-#define EBC_BXAP_BCE_DISABLE   PPC_REG_VAL(9, 0x0)
-#define EBC_BXAP_BCE_ENABLE    PPC_REG_VAL(9, 0x1)
-#define EBC_BXAP_BCT_MASK      PPC_REG_VAL(11, 0x3)
-#define EBC_BXAP_BCT_2TRANS    PPC_REG_VAL(11, 0x0)
-#define EBC_BXAP_BCT_4TRANS    PPC_REG_VAL(11, 0x1)
-#define EBC_BXAP_BCT_8TRANS    PPC_REG_VAL(11, 0x2)
-#define EBC_BXAP_BCT_16TRANS   PPC_REG_VAL(11, 0x3)
-#define EBC_BXAP_CSN_ENCODE(n) PPC_REG_VAL(13, \
-                                           (static_cast(unsigned long, n)) \
-                                           & 0x3)
-#define EBC_BXAP_OEN_ENCODE(n) PPC_REG_VAL(15, \
-                                           (static_cast(unsigned long, n)) \
-                                           & 0x3)
-#define EBC_BXAP_WBN_ENCODE(n) PPC_REG_VAL(17, \
-                                           (static_cast(unsigned long, n)) \
-                                           & 0x3)
-#define EBC_BXAP_WBF_ENCODE(n) PPC_REG_VAL(19, \
-                                           (static_cast(unsigned long, n)) \
-                                           & 0x3)
-#define EBC_BXAP_TH_ENCODE(n)  PPC_REG_VAL(22, \
-                                           (static_cast(unsigned long, n)) \
-                                           & 0x7)
-#define EBC_BXAP_RE_ENABLED    PPC_REG_VAL(23, 0x1)
-#define EBC_BXAP_RE_DISABLED   PPC_REG_VAL(23, 0x0)
-#define EBC_BXAP_SOR_DELAYED   PPC_REG_VAL(24, 0x0)
-#define EBC_BXAP_SOR_NONDELAYED        PPC_REG_VAL(24, 0x1)
-#define EBC_BXAP_BEM_WRITEONLY PPC_REG_VAL(25, 0x0)
-#define EBC_BXAP_BEM_RW                PPC_REG_VAL(25, 0x1)
-#define EBC_BXAP_PEN_DISABLED  PPC_REG_VAL(26, 0x0)
-#define EBC_BXAP_PEN_ENABLED   PPC_REG_VAL(26, 0x1)
-
-/* Configuration Register */
-#define EBC_CFG_LE_MASK                PPC_REG_VAL(0, 0x1)
-#define EBC_CFG_LE_UNLOCK      PPC_REG_VAL(0, 0x0)
-#define EBC_CFG_LE_LOCK                PPC_REG_VAL(0, 0x1)
-#define EBC_CFG_PTD_MASK       PPC_REG_VAL(1, 0x1)
-#define EBC_CFG_PTD_ENABLE     PPC_REG_VAL(1, 0x0)
-#define EBC_CFG_PTD_DISABLE    PPC_REG_VAL(1, 0x1)
-#define EBC_CFG_RTC_MASK       PPC_REG_VAL(4, 0x7)
-#define EBC_CFG_RTC_16PERCLK   PPC_REG_VAL(4, 0x0)
-#define EBC_CFG_RTC_32PERCLK   PPC_REG_VAL(4, 0x1)
-#define EBC_CFG_RTC_64PERCLK   PPC_REG_VAL(4, 0x2)
-#define EBC_CFG_RTC_128PERCLK  PPC_REG_VAL(4, 0x3)
-#define EBC_CFG_RTC_256PERCLK  PPC_REG_VAL(4, 0x4)
-#define EBC_CFG_RTC_512PERCLK  PPC_REG_VAL(4, 0x5)
-#define EBC_CFG_RTC_1024PERCLK PPC_REG_VAL(4, 0x6)
-#define EBC_CFG_RTC_2048PERCLK PPC_REG_VAL(4, 0x7)
-#define EBC_CFG_ATC_MASK       PPC_REG_VAL(5, 0x1)
-#define EBC_CFG_ATC_HI         PPC_REG_VAL(5, 0x0)
-#define EBC_CFG_ATC_PREVIOUS   PPC_REG_VAL(5, 0x1)
-#define EBC_CFG_DTC_MASK       PPC_REG_VAL(6, 0x1)
-#define EBC_CFG_DTC_HI         PPC_REG_VAL(6, 0x0)
-#define EBC_CFG_DTC_PREVIOUS   PPC_REG_VAL(6, 0x1)
-#define EBC_CFG_CTC_MASK       PPC_REG_VAL(7, 0x1)
-#define EBC_CFG_CTC_HI         PPC_REG_VAL(7, 0x0)
-#define EBC_CFG_CTC_PREVIOUS   PPC_REG_VAL(7, 0x1)
-#define EBC_CFG_OEO_MASK       PPC_REG_VAL(8, 0x1)
-#define EBC_CFG_OEO_DISABLE    PPC_REG_VAL(8, 0x0)
-#define EBC_CFG_OEO_ENABLE     PPC_REG_VAL(8, 0x1)
-#define EBC_CFG_EMC_MASK       PPC_REG_VAL(9, 0x1)
-#define EBC_CFG_EMC_NONDEFAULT PPC_REG_VAL(9, 0x0)
-#define EBC_CFG_EMC_DEFAULT    PPC_REG_VAL(9, 0x1)
-#define EBC_CFG_PME_MASK       PPC_REG_VAL(14, 0x1)
-#define EBC_CFG_PME_DISABLE    PPC_REG_VAL(14, 0x0)
-#define EBC_CFG_PME_ENABLE     PPC_REG_VAL(14, 0x1)
-#define EBC_CFG_PMT_MASK       PPC_REG_VAL(19, 0x1F)
-#define EBC_CFG_PMT_ENCODE(n)  PPC_REG_VAL(19, \
-                                           (static_cast(unsigned long, n)) \
-                                           & 0x1F)
-#define EBC_CFG_PR_MASK                PPC_REG_VAL(21, 0x3)
-#define EBC_CFG_PR_16          PPC_REG_VAL(21, 0x0)
-#define EBC_CFG_PR_32          PPC_REG_VAL(21, 0x1)
-#define EBC_CFG_PR_64          PPC_REG_VAL(21, 0x2)
-#define EBC_CFG_PR_128         PPC_REG_VAL(21, 0x3)
-
 #ifndef CONFIG_405EP
 /******************************************************************************
  * Decompression Controller
 #if defined(CONFIG_405EX)
 #define SDR0_SRST              0x0200
 
+/*
+ * Software Reset Register
+ */
+#define SDR0_SRST_BGO          PPC_REG_VAL(0, 1)
+#define SDR0_SRST_PLB4         PPC_REG_VAL(1, 1)
+#define SDR0_SRST_EBC          PPC_REG_VAL(2, 1)
+#define SDR0_SRST_OPB          PPC_REG_VAL(3, 1)
+#define SDR0_SRST_UART0                PPC_REG_VAL(4, 1)
+#define SDR0_SRST_UART1                PPC_REG_VAL(5, 1)
+#define SDR0_SRST_IIC0         PPC_REG_VAL(6, 1)
+#define SDR0_SRST_BGI          PPC_REG_VAL(7, 1)
+#define SDR0_SRST_GPIO         PPC_REG_VAL(8, 1)
+#define SDR0_SRST_GPT          PPC_REG_VAL(9, 1)
+#define SDR0_SRST_DMC          PPC_REG_VAL(10, 1)
+#define SDR0_SRST_RGMII                PPC_REG_VAL(11, 1)
+#define SDR0_SRST_EMAC0                PPC_REG_VAL(12, 1)
+#define SDR0_SRST_EMAC1                PPC_REG_VAL(13, 1)
+#define SDR0_SRST_CPM          PPC_REG_VAL(14, 1)
+#define SDR0_SRST_EPLL         PPC_REG_VAL(15, 1)
+#define SDR0_SRST_UIC          PPC_REG_VAL(16, 1)
+#define SDR0_SRST_UPRST                PPC_REG_VAL(17, 1)
+#define SDR0_SRST_IIC1         PPC_REG_VAL(18, 1)
+#define SDR0_SRST_SCP          PPC_REG_VAL(19, 1)
+#define SDR0_SRST_UHRST                PPC_REG_VAL(20, 1)
+#define SDR0_SRST_DMA          PPC_REG_VAL(21, 1)
+#define SDR0_SRST_DMAC         PPC_REG_VAL(22, 1)
+#define SDR0_SRST_MAL          PPC_REG_VAL(23, 1)
+#define SDR0_SRST_EBM          PPC_REG_VAL(24, 1)
+#define SDR0_SRST_GPTR         PPC_REG_VAL(25, 1)
+#define SDR0_SRST_PE0          PPC_REG_VAL(26, 1)
+#define SDR0_SRST_PE1          PPC_REG_VAL(27, 1)
+#define SDR0_SRST_CRYP         PPC_REG_VAL(28, 1)
+#define SDR0_SRST_PKP          PPC_REG_VAL(29, 1)
+#define SDR0_SRST_AHB          PPC_REG_VAL(30, 1)
+#define SDR0_SRST_NDFC         PPC_REG_VAL(31, 1)
+
 #define sdr_uart0      0x0120  /* UART0 Config */
 #define sdr_uart1      0x0121  /* UART1 Config */
 #define sdr_mfr                0x4300  /* SDR0_MFR reg */
index c581f1b468a11c4bfdb6643ea0cd87a333fda9e8..92db15f312af27f66045b36e68b4c7fe3b2c07e2 100644 (file)
@@ -77,7 +77,6 @@
 #define         tbl    0x11c   /* time base lower (supervisor)*/
 #define         tbu    0x11d   /* time base upper (supervisor)*/
 #define         pir    0x11e   /* processor id register */
-/*#define  pvr 0x11f    processor version register */
 #define         dbsr   0x130   /* debug status register */
 #define         dbcr0  0x134   /* debug control register 0 */
 #define         dbcr1  0x135   /* debug control register 1 */
 #define sdr_sdstp6     0x4005
 #define sdr_sdstp7     0x4007
 
-/******************************************************************************
- * PCI express defines
- ******************************************************************************/
-#define SDR0_PE0UTLSET1                0x00000300      /* PE0 Upper transaction layer conf setting */
-#define SDR0_PE0UTLSET2                0x00000301      /* PE0 Upper transaction layer conf setting 2 */
-#define SDR0_PE0DLPSET         0x00000302      /* PE0 Data link & logical physical configuration */
-#define SDR0_PE0LOOP           0x00000303      /* PE0 Loopback interface status */
-#define SDR0_PE0RCSSET         0x00000304      /* PE0 Reset, clock & shutdown setting */
-#define SDR0_PE0RCSSTS         0x00000305      /* PE0 Reset, clock & shutdown status */
-#define SDR0_PE0HSSSET1L0      0x00000306      /* PE0 HSS Control Setting 1: Lane 0 */
-#define SDR0_PE0HSSSET2L0      0x00000307      /* PE0 HSS Control Setting 2: Lane 0 */
-#define SDR0_PE0HSSSTSL0       0x00000308      /* PE0 HSS Control Status : Lane 0 */
-#define SDR0_PE0HSSSET1L1      0x00000309      /* PE0 HSS Control Setting 1: Lane 1 */
-#define SDR0_PE0HSSSET2L1      0x0000030A      /* PE0 HSS Control Setting 2: Lane 1 */
-#define SDR0_PE0HSSSTSL1       0x0000030B      /* PE0 HSS Control Status : Lane 1 */
-#define SDR0_PE0HSSSET1L2      0x0000030C      /* PE0 HSS Control Setting 1: Lane 2 */
-#define SDR0_PE0HSSSET2L2      0x0000030D      /* PE0 HSS Control Setting 2: Lane 2 */
-#define SDR0_PE0HSSSTSL2       0x0000030E      /* PE0 HSS Control Status : Lane 2 */
-#define SDR0_PE0HSSSET1L3      0x0000030F      /* PE0 HSS Control Setting 1: Lane 3 */
-#define SDR0_PE0HSSSET2L3      0x00000310      /* PE0 HSS Control Setting 2: Lane 3 */
-#define SDR0_PE0HSSSTSL3       0x00000311      /* PE0 HSS Control Status : Lane 3 */
-#define SDR0_PE0HSSSET1L4      0x00000312      /* PE0 HSS Control Setting 1: Lane 4 */
-#define SDR0_PE0HSSSET2L4      0x00000313      /* PE0 HSS Control Setting 2: Lane 4 */
-#define SDR0_PE0HSSSTSL4       0x00000314      /* PE0 HSS Control Status : Lane 4 */
-#define SDR0_PE0HSSSET1L5      0x00000315      /* PE0 HSS Control Setting 1: Lane 5 */
-#define SDR0_PE0HSSSET2L5      0x00000316      /* PE0 HSS Control Setting 2: Lane 5 */
-#define SDR0_PE0HSSSTSL5       0x00000317      /* PE0 HSS Control Status : Lane 5 */
-#define SDR0_PE0HSSSET1L6      0x00000318      /* PE0 HSS Control Setting 1: Lane 6 */
-#define SDR0_PE0HSSSET2L6      0x00000319      /* PE0 HSS Control Setting 2: Lane 6 */
-#define SDR0_PE0HSSSTSL6       0x0000031A      /* PE0 HSS Control Status : Lane 6 */
-#define SDR0_PE0HSSSET1L7      0x0000031B      /* PE0 HSS Control Setting 1: Lane 7 */
-#define SDR0_PE0HSSSET2L7      0x0000031C      /* PE0 HSS Control Setting 2: Lane 7 */
-#define SDR0_PE0HSSSTSL7       0x0000031D      /* PE0 HSS Control Status : Lane 7 */
-#define SDR0_PE0HSSSEREN       0x0000031E      /* PE0 Serdes Transmitter Enable */
-#define SDR0_PE0LANEABCD       0x0000031F      /* PE0 Lanes ABCD affectation */
-#define SDR0_PE0LANEEFGH       0x00000320      /* PE0 Lanes EFGH affectation */
-
-#define SDR0_PE1UTLSET1                0x00000340      /* PE1 Upper transaction layer conf setting */
-#define SDR0_PE1UTLSET2                0x00000341      /* PE1 Upper transaction layer conf setting 2 */
-#define SDR0_PE1DLPSET         0x00000342      /* PE1 Data link & logical physical configuration */
-#define SDR0_PE1LOOP           0x00000343      /* PE1 Loopback interface status */
-#define SDR0_PE1RCSSET         0x00000344      /* PE1 Reset, clock & shutdown setting */
-#define SDR0_PE1RCSSTS         0x00000345      /* PE1 Reset, clock & shutdown status */
-#define SDR0_PE1HSSSET1L0      0x00000346      /* PE1 HSS Control Setting 1: Lane 0 */
-#define SDR0_PE1HSSSET2L0      0x00000347      /* PE1 HSS Control Setting 2: Lane 0 */
-#define SDR0_PE1HSSSTSL0       0x00000348      /* PE1 HSS Control Status : Lane 0 */
-#define SDR0_PE1HSSSET1L1      0x00000349      /* PE1 HSS Control Setting 1: Lane 1 */
-#define SDR0_PE1HSSSET2L1      0x0000034A      /* PE1 HSS Control Setting 2: Lane 1 */
-#define SDR0_PE1HSSSTSL1       0x0000034B      /* PE1 HSS Control Status : Lane 1 */
-#define SDR0_PE1HSSSET1L2      0x0000034C      /* PE1 HSS Control Setting 1: Lane 2 */
-#define SDR0_PE1HSSSET2L2      0x0000034D      /* PE1 HSS Control Setting 2: Lane 2 */
-#define SDR0_PE1HSSSTSL2       0x0000034E      /* PE1 HSS Control Status : Lane 2 */
-#define SDR0_PE1HSSSET1L3      0x0000034F      /* PE1 HSS Control Setting 1: Lane 3 */
-#define SDR0_PE1HSSSET2L3      0x00000350      /* PE1 HSS Control Setting 2: Lane 3 */
-#define SDR0_PE1HSSSTSL3       0x00000351      /* PE1 HSS Control Status : Lane 3 */
-#define SDR0_PE1HSSSEREN       0x00000352      /* PE1 Serdes Transmitter Enable */
-#define SDR0_PE1LANEABCD       0x00000353      /* PE1 Lanes ABCD affectation */
-#define SDR0_PE2UTLSET1                0x00000370      /* PE2 Upper transaction layer conf setting */
-#define SDR0_PE2UTLSET2                0x00000371      /* PE2 Upper transaction layer conf setting 2 */
-#define SDR0_PE2DLPSET         0x00000372      /* PE2 Data link & logical physical configuration */
-#define SDR0_PE2LOOP           0x00000373      /* PE2 Loopback interface status */
-#define SDR0_PE2RCSSET         0x00000374      /* PE2 Reset, clock & shutdown setting */
-#define SDR0_PE2RCSSTS         0x00000375      /* PE2 Reset, clock & shutdown status */
-#define SDR0_PE2HSSSET1L0      0x00000376      /* PE2 HSS Control Setting 1: Lane 0 */
-#define SDR0_PE2HSSSET2L0      0x00000377      /* PE2 HSS Control Setting 2: Lane 0 */
-#define SDR0_PE2HSSSTSL0       0x00000378      /* PE2 HSS Control Status : Lane 0 */
-#define SDR0_PE2HSSSET1L1      0x00000379      /* PE2 HSS Control Setting 1: Lane 1 */
-#define SDR0_PE2HSSSET2L1      0x0000037A      /* PE2 HSS Control Setting 2: Lane 1 */
-#define SDR0_PE2HSSSTSL1       0x0000037B      /* PE2 HSS Control Status : Lane 1 */
-#define SDR0_PE2HSSSET1L2      0x0000037C      /* PE2 HSS Control Setting 1: Lane 2 */
-#define SDR0_PE2HSSSET2L2      0x0000037D      /* PE2 HSS Control Setting 2: Lane 2 */
-#define SDR0_PE2HSSSTSL2       0x0000037E      /* PE2 HSS Control Status : Lane 2 */
-#define SDR0_PE2HSSSET1L3      0x0000037F      /* PE2 HSS Control Setting 1: Lane 3 */
-#define SDR0_PE2HSSSET2L3      0x00000380      /* PE2 HSS Control Setting 2: Lane 3 */
-#define SDR0_PE2HSSSTSL3       0x00000381      /* PE2 HSS Control Status : Lane 3 */
-#define SDR0_PE2HSSSEREN       0x00000382      /* PE2 Serdes Transmitter Enable */
-#define SDR0_PE2LANEABCD       0x00000383      /* PE2 Lanes ABCD affectation */
-#define SDR0_PEGPLLSET1                0x000003A0      /* PE Pll LC Tank Setting1 */
-#define SDR0_PEGPLLSET2                0x000003A1      /* PE Pll LC Tank Setting2 */
-#define SDR0_PEGPLLSTS         0x000003A2      /* PE Pll LC Tank Status */
 #endif /* CONFIG_440SPE */
 
 /*-----------------------------------------------------------------------------
  +----------------------------------------------------------------------------*/
 #if defined (CONFIG_440GX) || \
     defined(CONFIG_440SP) || defined(CONFIG_440SPE) || \
-    defined(CONFIG_460EX) || defined(CONFIG_460GT)
+    defined(CONFIG_460EX) || defined(CONFIG_460GT) || \
+    defined(CONFIG_460SX)
 #define L2_CACHE_BASE  0x030
 #define l2_cache_cfg   (L2_CACHE_BASE+0x00)    /* L2 Cache Config      */
 #define l2_cache_cmd   (L2_CACHE_BASE+0x01)    /* L2 Cache Command     */
 /*-----------------------------------------------------------------------------
  | Clocking, Power Management and Chip Control
  +----------------------------------------------------------------------------*/
-#if defined(CONFIG_460EX) || defined(CONFIG_460GT)
+#if defined(CONFIG_460EX) || defined(CONFIG_460GT) || \
+    defined(CONFIG_460SX)
 #define CNTRL_DCR_BASE 0x160
 #else
 #define CNTRL_DCR_BASE 0x0b0
 #define cntrl0         (CNTRL_DCR_BASE+0x3b)   /* Control 0 register           */
 #define cntrl1         (CNTRL_DCR_BASE+0x3a)   /* Control 1 register           */
 
-/*-----------------------------------------------------------------------------
- | Universal interrupt controller
- +----------------------------------------------------------------------------*/
-#define UIC_SR 0x0                     /* UIC status                      */
-#define UIC_ER 0x2                     /* UIC enable                      */
-#define UIC_CR 0x3                     /* UIC critical                    */
-#define UIC_PR 0x4                     /* UIC polarity                    */
-#define UIC_TR 0x5                     /* UIC triggering                  */
-#define UIC_MSR 0x6                    /* UIC masked status               */
-#define UIC_VR 0x7                     /* UIC vector                      */
-#define UIC_VCR 0x8                    /* UIC vector configuration        */
-
-#define UIC0_DCR_BASE 0xc0
-#define uic0sr (UIC0_DCR_BASE+0x0)   /* UIC0 status                       */
-#define uic0er (UIC0_DCR_BASE+0x2)   /* UIC0 enable                       */
-#define uic0cr (UIC0_DCR_BASE+0x3)   /* UIC0 critical                     */
-#define uic0pr (UIC0_DCR_BASE+0x4)   /* UIC0 polarity                     */
-#define uic0tr (UIC0_DCR_BASE+0x5)   /* UIC0 triggering                   */
-#define uic0msr (UIC0_DCR_BASE+0x6)   /* UIC0 masked status               */
-#define uic0vr (UIC0_DCR_BASE+0x7)   /* UIC0 vector                       */
-#define uic0vcr (UIC0_DCR_BASE+0x8)   /* UIC0 vector configuration        */
-
-#define UIC1_DCR_BASE 0xd0
-#define uic1sr (UIC1_DCR_BASE+0x0)   /* UIC1 status                       */
-#define uic1er (UIC1_DCR_BASE+0x2)   /* UIC1 enable                       */
-#define uic1cr (UIC1_DCR_BASE+0x3)   /* UIC1 critical                     */
-#define uic1pr (UIC1_DCR_BASE+0x4)   /* UIC1 polarity                     */
-#define uic1tr (UIC1_DCR_BASE+0x5)   /* UIC1 triggering                   */
-#define uic1msr (UIC1_DCR_BASE+0x6)   /* UIC1 masked status               */
-#define uic1vr (UIC1_DCR_BASE+0x7)   /* UIC1 vector                       */
-#define uic1vcr (UIC1_DCR_BASE+0x8)   /* UIC1 vector configuration        */
-
-#if defined(CONFIG_440SPE) || \
-    defined(CONFIG_440EPX) || defined(CONFIG_440GRX) || \
-    defined(CONFIG_460EX) || defined(CONFIG_460GT)
-#define UIC2_DCR_BASE 0xe0
-#define uic2sr (UIC2_DCR_BASE+0x0)   /* UIC2 status-Read Clear         */
-#define uic2srs        (UIC2_DCR_BASE+0x1)   /* UIC2 status-Read Set */
-#define uic2er (UIC2_DCR_BASE+0x2)   /* UIC2 enable                    */
-#define uic2cr (UIC2_DCR_BASE+0x3)   /* UIC2 critical                  */
-#define uic2pr (UIC2_DCR_BASE+0x4)   /* UIC2 polarity                  */
-#define uic2tr (UIC2_DCR_BASE+0x5)   /* UIC2 triggering                */
-#define uic2msr (UIC2_DCR_BASE+0x6)   /* UIC2 masked status            */
-#define uic2vr (UIC2_DCR_BASE+0x7)   /* UIC2 vector                    */
-#define uic2vcr (UIC2_DCR_BASE+0x8)   /* UIC2 vector configuration     */
-
-#define UIC3_DCR_BASE 0xf0
-#define uic3sr (UIC3_DCR_BASE+0x0)   /* UIC3 status-Read Clear         */
-#define uic3srs        (UIC3_DCR_BASE+0x1)   /* UIC3 status-Read Set */
-#define uic3er (UIC3_DCR_BASE+0x2)   /* UIC3 enable                    */
-#define uic3cr (UIC3_DCR_BASE+0x3)   /* UIC3 critical                  */
-#define uic3pr (UIC3_DCR_BASE+0x4)   /* UIC3 polarity                  */
-#define uic3tr (UIC3_DCR_BASE+0x5)   /* UIC3 triggering                */
-#define uic3msr (UIC3_DCR_BASE+0x6)   /* UIC3 masked status            */
-#define uic3vr (UIC3_DCR_BASE+0x7)   /* UIC3 vector                    */
-#define uic3vcr (UIC3_DCR_BASE+0x8)   /* UIC3 vector configuration     */
-#endif /* CONFIG_440SPE */
-
-#if defined(CONFIG_440GX)
-#define UIC2_DCR_BASE 0x210
-#define uic2sr (UIC2_DCR_BASE+0x0)   /* UIC2 status                       */
-#define uic2er (UIC2_DCR_BASE+0x2)   /* UIC2 enable                       */
-#define uic2cr (UIC2_DCR_BASE+0x3)   /* UIC2 critical                     */
-#define uic2pr (UIC2_DCR_BASE+0x4)   /* UIC2 polarity                     */
-#define uic2tr (UIC2_DCR_BASE+0x5)   /* UIC2 triggering                   */
-#define uic2msr (UIC2_DCR_BASE+0x6)   /* UIC2 masked status               */
-#define uic2vr (UIC2_DCR_BASE+0x7)   /* UIC2 vector                       */
-#define uic2vcr (UIC2_DCR_BASE+0x8)   /* UIC2 vector configuration        */
-
-
-#define UIC_DCR_BASE 0x200
-#define uicb0sr         (UIC_DCR_BASE+0x0)   /* UIC Base Status Register          */
-#define uicb0er         (UIC_DCR_BASE+0x2)   /* UIC Base enable                   */
-#define uicb0cr         (UIC_DCR_BASE+0x3)   /* UIC Base critical                 */
-#define uicb0pr         (UIC_DCR_BASE+0x4)   /* UIC Base polarity                 */
-#define uicb0tr         (UIC_DCR_BASE+0x5)   /* UIC Base triggering               */
-#define uicb0msr (UIC_DCR_BASE+0x6)   /* UIC Base masked status                   */
-#define uicb0vr         (UIC_DCR_BASE+0x7)   /* UIC Base vector                   */
-#define uicb0vcr (UIC_DCR_BASE+0x8)   /* UIC Base vector configuration    */
-#endif /* CONFIG_440GX */
-
-/* The following is for compatibility with 405 code */
-#define uicsr  uic0sr
-#define uicer  uic0er
-#define uiccr  uic0cr
-#define uicpr  uic0pr
-#define uictr  uic0tr
-#define uicmsr uic0msr
-#define uicvr  uic0vr
-#define uicvcr uic0vcr
-
-#if defined(CONFIG_440SPE) || defined(CONFIG_440EPX)
-/*----------------------------------------------------------------------------+
-| Clock / Power-on-reset DCR's.
-+----------------------------------------------------------------------------*/
-#define CPR0_CLKUPD                    0x20
-#define CPR0_CLKUPD_BSY_MASK           0x80000000
-#define CPR0_CLKUPD_BSY_COMPLETED      0x00000000
-#define CPR0_CLKUPD_BSY_BUSY           0x80000000
-#define CPR0_CLKUPD_CUI_MASK           0x80000000
-#define CPR0_CLKUPD_CUI_DISABLE                0x00000000
-#define CPR0_CLKUPD_CUI_ENABLE         0x80000000
-#define CPR0_CLKUPD_CUD_MASK           0x40000000
-#define CPR0_CLKUPD_CUD_DISABLE                0x00000000
-#define CPR0_CLKUPD_CUD_ENABLE         0x40000000
-
-#define CPR0_PLLC                      0x40
-#define CPR0_PLLC_RST_MASK             0x80000000
-#define CPR0_PLLC_RST_PLLLOCKED                0x00000000
-#define CPR0_PLLC_RST_PLLRESET         0x80000000
-#define CPR0_PLLC_ENG_MASK             0x40000000
-#define CPR0_PLLC_ENG_DISABLE          0x00000000
-#define CPR0_PLLC_ENG_ENABLE           0x40000000
-#define CPR0_PLLC_ENG_ENCODE(n)                ((((unsigned long)(n))&0x01)<<30)
-#define CPR0_PLLC_ENG_DECODE(n)                ((((unsigned long)(n))>>30)&0x01)
-#define CPR0_PLLC_SRC_MASK             0x20000000
-#define CPR0_PLLC_SRC_PLLOUTA          0x00000000
-#define CPR0_PLLC_SRC_PLLOUTB          0x20000000
-#define CPR0_PLLC_SRC_ENCODE(n)                ((((unsigned long)(n))&0x01)<<29)
-#define CPR0_PLLC_SRC_DECODE(n)                ((((unsigned long)(n))>>29)&0x01)
-#define CPR0_PLLC_SEL_MASK             0x07000000
-#define CPR0_PLLC_SEL_PLLOUT           0x00000000
-#define CPR0_PLLC_SEL_CPU              0x01000000
-#define CPR0_PLLC_SEL_EBC              0x05000000
-#define CPR0_PLLC_SEL_ENCODE(n)                ((((unsigned long)(n))&0x07)<<24)
-#define CPR0_PLLC_SEL_DECODE(n)                ((((unsigned long)(n))>>24)&0x07)
-#define CPR0_PLLC_TUNE_MASK            0x000003FF
-#define CPR0_PLLC_TUNE_ENCODE(n)       ((((unsigned long)(n))&0x3FF)<<0)
-#define CPR0_PLLC_TUNE_DECODE(n)       ((((unsigned long)(n))>>0)&0x3FF)
-
-#define CPR0_PLLD                      0x60
-#define CPR0_PLLD_FBDV_MASK            0x1F000000
-#define CPR0_PLLD_FBDV_ENCODE(n)       ((((unsigned long)(n))&0x1F)<<24)
-#define CPR0_PLLD_FBDV_DECODE(n)       ((((((unsigned long)(n))>>24)-1)&0x1F)+1)
-#define CPR0_PLLD_FWDVA_MASK           0x000F0000
-#define CPR0_PLLD_FWDVA_ENCODE(n)      ((((unsigned long)(n))&0x0F)<<16)
-#define CPR0_PLLD_FWDVA_DECODE(n)      ((((((unsigned long)(n))>>16)-1)&0x0F)+1)
-#define CPR0_PLLD_FWDVB_MASK           0x00000700
-#define CPR0_PLLD_FWDVB_ENCODE(n)      ((((unsigned long)(n))&0x07)<<8)
-#define CPR0_PLLD_FWDVB_DECODE(n)      ((((((unsigned long)(n))>>8)-1)&0x07)+1)
-#define CPR0_PLLD_LFBDV_MASK           0x0000003F
-#define CPR0_PLLD_LFBDV_ENCODE(n)      ((((unsigned long)(n))&0x3F)<<0)
-#define CPR0_PLLD_LFBDV_DECODE(n)      ((((((unsigned long)(n))>>0)-1)&0x3F)+1)
-
-#define CPR0_PRIMAD                    0x80
-#define CPR0_PRIMAD_PRADV0_MASK                0x07000000
-#define CPR0_PRIMAD_PRADV0_ENCODE(n)   ((((unsigned long)(n))&0x07)<<24)
-#define CPR0_PRIMAD_PRADV0_DECODE(n)   ((((((unsigned long)(n))>>24)-1)&0x07)+1)
-
-#define CPR0_PRIMBD                    0xA0
-#define CPR0_PRIMBD_PRBDV0_MASK                0x07000000
-#define CPR0_PRIMBD_PRBDV0_ENCODE(n)   ((((unsigned long)(n))&0x07)<<24)
-#define CPR0_PRIMBD_PRBDV0_DECODE(n)   ((((((unsigned long)(n))>>24)-1)&0x07)+1)
-
-#define CPR0_OPBD                      0xC0
-#define CPR0_OPBD_OPBDV0_MASK          0x03000000
-#define CPR0_OPBD_OPBDV0_ENCODE(n)     ((((unsigned long)(n))&0x03)<<24)
-#define CPR0_OPBD_OPBDV0_DECODE(n)     ((((((unsigned long)(n))>>24)-1)&0x03)+1)
-
-#define CPR0_PERD                      0xE0
-#if !defined(CONFIG_440EPX)
-#define CPR0_PERD_PERDV0_MASK          0x03000000
-#define CPR0_PERD_PERDV0_ENCODE(n)     ((((unsigned long)(n))&0x03)<<24)
-#define CPR0_PERD_PERDV0_DECODE(n)     ((((((unsigned long)(n))>>24)-1)&0x03)+1)
-#endif
-
-#define CPR0_MALD                      0x100
-#define CPR0_MALD_MALDV0_MASK          0x03000000
-#define CPR0_MALD_MALDV0_ENCODE(n)     ((((unsigned long)(n))&0x03)<<24)
-#define CPR0_MALD_MALDV0_DECODE(n)     ((((((unsigned long)(n))>>24)-1)&0x03)+1)
-
-#define CPR0_ICFG                      0x140
-#define CPR0_ICFG_RLI_MASK             0x80000000
-#define CPR0_ICFG_RLI_RESETCPR         0x00000000
-#define CPR0_ICFG_RLI_PRESERVECPR      0x80000000
-#define CPR0_ICFG_ICS_MASK             0x00000007
-#define CPR0_ICFG_ICS_ENCODE(n)                ((((unsigned long)(n))&0x3F)<<0)
-#define CPR0_ICFG_ICS_DECODE(n)                ((((((unsigned long)(n))>>0)-1)&0x3F)+1)
-
-/************************/
-/* IIC defines          */
-/************************/
-#define IIC0_MMIO_BASE 0xA0000400
-#define IIC1_MMIO_BASE 0xA0000500
-
-#endif /* CONFIG_440SP */
-
 /*-----------------------------------------------------------------------------
  | DMA
  +----------------------------------------------------------------------------*/
 #define malrcbs24   (MAL_DCR_BASE+0x78) /* RX 24 Channel buffer size reg    */
 #endif /* CONFIG_440GX */
 
-
-/*---------------------------------------------------------------------------+
-|  Universal interrupt controller 0 interrupts (UIC0)
-+---------------------------------------------------------------------------*/
-#if defined(CONFIG_440SP)
-#define UIC_U0         0x80000000      /* UART 0                           */
-#define UIC_U1         0x40000000      /* UART 1                           */
-#define UIC_IIC0       0x20000000      /* IIC                              */
-#define UIC_IIC1       0x10000000      /* IIC                              */
-#define UIC_PIM                0x08000000      /* PCI0 inbound message             */
-#define UIC_PCRW       0x04000000      /* PCI0 command write register      */
-#define UIC_PPM                0x02000000      /* PCI0 power management            */
-#define UIC_PVPD       0x01000000      /* PCI0 VPD Access                  */
-#define UIC_MSI0       0x00800000      /* PCI0 MSI level 0                 */
-#define UIC_P1IM       0x00400000      /* PCI1 Inbound Message             */
-#define UIC_P1CRW      0x00200000      /* PCI1 command write register      */
-#define UIC_P1PM       0x00100000      /* PCI1 power management            */
-#define UIC_P1VPD      0x00080000      /* PCI1 VPD Access                  */
-#define UIC_P1MSI0     0x00040000      /* PCI1 MSI level 0                 */
-#define UIC_P2IM       0x00020000      /* PCI2 inbound message             */
-#define UIC_P2CRW      0x00010000      /* PCI2 command register write      */
-#define UIC_P2PM       0x00008000      /* PCI2 power management            */
-#define UIC_P2VPD      0x00004000      /* PCI2 VPD access                  */
-#define UIC_P2MSI0     0x00002000      /* PCI2 MSI level 0                 */
-#define UIC_D0CPF      0x00001000      /* DMA0 command pointer             */
-#define UIC_D0CSF      0x00000800      /* DMA0 command status              */
-#define UIC_D1CPF      0x00000400      /* DMA1 command pointer             */
-#define UIC_D1CSF      0x00000200      /* DMA1 command status              */
-#define UIC_I2OID      0x00000100      /* I2O inbound doorbell             */
-#define UIC_I2OPLF     0x00000080      /* I2O inbound post list            */
-#define UIC_I2O0LL     0x00000040      /* I2O0 low latency PLB write       */
-#define UIC_I2O1LL     0x00000020      /* I2O1 low latency PLB write       */
-#define UIC_I2O0HB     0x00000010      /* I2O0 high bandwidth PLB write    */
-#define UIC_I2O1HB     0x00000008      /* I2O1 high bandwidth PLB write    */
-#define UIC_GPTCT      0x00000004      /* GPT count timer                  */
-#define UIC_UIC1NC     0x00000002      /* UIC1 non-critical interrupt      */
-#define UIC_UIC1C      0x00000001      /* UIC1 critical interrupt          */
-#elif defined(CONFIG_440GX) || defined(CONFIG_440EP)
-#define UIC_U0         0x80000000      /* UART 0                           */
-#define UIC_U1         0x40000000      /* UART 1                           */
-#define UIC_IIC0       0x20000000      /* IIC                              */
-#define UIC_IIC1       0x10000000      /* IIC                              */
-#define UIC_PIM                0x08000000      /* PCI inbound message              */
-#define UIC_PCRW       0x04000000      /* PCI command register write       */
-#define UIC_PPM                0x02000000      /* PCI power management             */
-#define UIC_MSI0       0x01000000      /* PCI MSI level 0                  */
-#define UIC_MSI1       0x00800000      /* PCI MSI level 1                  */
-#define UIC_MSI2       0x00400000      /* PCI MSI level 2                  */
-#define UIC_MTE                0x00200000      /* MAL TXEOB                        */
-#define UIC_MRE                0x00100000      /* MAL RXEOB                        */
-#define UIC_D0         0x00080000      /* DMA channel 0                    */
-#define UIC_D1         0x00040000      /* DMA channel 1                    */
-#define UIC_D2         0x00020000      /* DMA channel 2                    */
-#define UIC_D3         0x00010000      /* DMA channel 3                    */
-#define UIC_RSVD0      0x00008000      /* Reserved                         */
-#define UIC_RSVD1      0x00004000      /* Reserved                         */
-#define UIC_CT0                0x00002000      /* GPT compare timer 0              */
-#define UIC_CT1                0x00001000      /* GPT compare timer 1              */
-#define UIC_CT2                0x00000800      /* GPT compare timer 2              */
-#define UIC_CT3                0x00000400      /* GPT compare timer 3              */
-#define UIC_CT4                0x00000200      /* GPT compare timer 4              */
-#define UIC_EIR0       0x00000100      /* External interrupt 0             */
-#define UIC_EIR1       0x00000080      /* External interrupt 1             */
-#define UIC_EIR2       0x00000040      /* External interrupt 2             */
-#define UIC_EIR3       0x00000020      /* External interrupt 3             */
-#define UIC_EIR4       0x00000010      /* External interrupt 4             */
-#define UIC_EIR5       0x00000008      /* External interrupt 5             */
-#define UIC_EIR6       0x00000004      /* External interrupt 6             */
-#define UIC_UIC1NC     0x00000002      /* UIC1 non-critical interrupt      */
-#define UIC_UIC1C      0x00000001      /* UIC1 critical interrupt          */
-
-#elif defined(CONFIG_440EPX) || defined(CONFIG_440GRX)
-
-#define UIC_U0        0x80000000  /* UART 0                             */
-#define UIC_U1        0x40000000  /* UART 1                             */
-#define UIC_IIC0      0x20000000  /* IIC                                */
-#define UIC_KRD       0x10000000  /* Kasumi Ready for data              */
-#define UIC_KDA       0x08000000  /* Kasumi Data Available              */
-#define UIC_PCRW      0x04000000  /* PCI command register write         */
-#define UIC_PPM       0x02000000  /* PCI power management               */
-#define UIC_IIC1      0x01000000  /* IIC                                */
-#define UIC_SPI       0x00800000  /* SPI                                */
-#define UIC_EPCISER   0x00400000  /* External PCI SERR                  */
-#define UIC_MTE       0x00200000  /* MAL TXEOB                          */
-#define UIC_MRE       0x00100000  /* MAL RXEOB                          */
-#define UIC_D0        0x00080000  /* DMA channel 0                      */
-#define UIC_D1        0x00040000  /* DMA channel 1                      */
-#define UIC_D2        0x00020000  /* DMA channel 2                      */
-#define UIC_D3        0x00010000  /* DMA channel 3                      */
-#define UIC_UD0       0x00008000  /* UDMA irq 0                         */
-#define UIC_UD1       0x00004000  /* UDMA irq 1                         */
-#define UIC_UD2       0x00002000  /* UDMA irq 2                         */
-#define UIC_UD3       0x00001000  /* UDMA irq 3                         */
-#define UIC_HSB2D     0x00000800  /* USB2.0 Device                      */
-#define UIC_OHCI1     0x00000400  /* USB2.0 Host OHCI irq 1             */
-#define UIC_OHCI2     0x00000200  /* USB2.0 Host OHCI irq 2             */
-#define UIC_EIP94     0x00000100  /* Security EIP94                     */
-#define UIC_ETH0      0x00000080  /* Emac 0                             */
-#define UIC_ETH1      0x00000040  /* Emac 1                             */
-#define UIC_EHCI      0x00000020  /* USB2.0 Host EHCI                   */
-#define UIC_EIR4      0x00000010  /* External interrupt 4               */
-#define UIC_UIC2NC    0x00000008  /* UIC2 non-critical interrupt        */
-#define UIC_UIC2C     0x00000004  /* UIC2 critical interrupt            */
-#define UIC_UIC1NC    0x00000002  /* UIC1 non-critical interrupt        */
-#define UIC_UIC1C     0x00000001  /* UIC1 critical interrupt            */
-
-/* For compatibility with 405 code */
-#define UIC_MAL_TXEOB  UIC_MTE
-#define UIC_MAL_RXEOB  UIC_MRE
-
-#elif defined(CONFIG_460EX) || defined(CONFIG_460GT)
-
-#define UIC_RSVD0      0x80000000      /* N/A - unused                     */
-#define UIC_U1         0x40000000      /* UART 1                           */
-#define UIC_IIC0       0x20000000      /* IIC                              */
-#define UIC_IIC1       0x10000000      /* IIC                              */
-#define UIC_PIM                0x08000000      /* PCI inbound message              */
-#define UIC_PCRW       0x04000000      /* PCI command register write       */
-#define UIC_PPM                0x02000000      /* PCI power management             */
-#define UIC_PCIVPD     0x01000000      /* PCI VPD                          */
-#define UIC_MSI0       0x00800000      /* PCI MSI level 0                  */
-#define UIC_EIR0       0x00400000      /* External interrupt 0             */
-#define UIC_UIC2NC     0x00200000      /* UIC2 non-critical interrupt      */
-#define UIC_UIC2C      0x00100000      /* UIC2 critical interrupt          */
-#define UIC_D0         0x00080000      /* DMA channel 0                    */
-#define UIC_D1         0x00040000      /* DMA channel 1                    */
-#define UIC_D2         0x00020000      /* DMA channel 2                    */
-#define UIC_D3         0x00010000      /* DMA channel 3                    */
-#define UIC_UIC3NC     0x00008000      /* UIC3 non-critical interrupt      */
-#define UIC_UIC3C      0x00004000      /* UIC3 critical interrupt          */
-#define UIC_EIR1       0x00002000      /* External interrupt 1             */
-#define UIC_TRNGDA     0x00001000      /* TRNG data available              */
-#define UIC_PKAR1      0x00000800      /* PKA ready (PKA[1])               */
-#define UIC_D1CPFF     0x00000400      /* DMA1 cp fifo full                */
-#define UIC_D1CSNS     0x00000200      /* DMA1 cs fifo needs service       */
-#define UIC_I2OID      0x00000100      /* I2O inbound door bell            */
-#define UIC_I2OLNE     0x00000080      /* I2O Inbound Post List FIFO Not Empty */
-#define UIC_I20R0LL    0x00000040      /* I2O Region 0 Low Latency PLB Write */
-#define UIC_I2OR1LL    0x00000020      /* I2O Region 1 Low Latency PLB Write */
-#define UIC_I20R0HB    0x00000010      /* I2O Region 0 High Bandwidth PLB Write */
-#define UIC_I2OR1HB    0x00000008      /* I2O Region 1 High Bandwidth PLB Write */
-#define UIC_EIP94      0x00000004      /* Security EIP94                   */
-#define UIC_UIC1NC     0x00000002      /* UIC1 non-critical interrupt      */
-#define UIC_UIC1C      0x00000001      /* UIC1 critical interrupt          */
-
-#elif !defined(CONFIG_440SPE)
-#define UIC_U0         0x80000000      /* UART 0                           */
-#define UIC_U1         0x40000000      /* UART 1                           */
-#define UIC_IIC0       0x20000000      /* IIC                              */
-#define UIC_IIC1       0x10000000      /* IIC                              */
-#define UIC_PIM                0x08000000      /* PCI inbound message              */
-#define UIC_PCRW       0x04000000      /* PCI command register write       */
-#define UIC_PPM                0x02000000      /* PCI power management             */
-#define UIC_MSI0       0x01000000      /* PCI MSI level 0                  */
-#define UIC_MSI1       0x00800000      /* PCI MSI level 1                  */
-#define UIC_MSI2       0x00400000      /* PCI MSI level 2                  */
-#define UIC_MTE                0x00200000      /* MAL TXEOB                        */
-#define UIC_MRE                0x00100000      /* MAL RXEOB                        */
-#define UIC_D0         0x00080000      /* DMA channel 0                    */
-#define UIC_D1         0x00040000      /* DMA channel 1                    */
-#define UIC_D2         0x00020000      /* DMA channel 2                    */
-#define UIC_D3         0x00010000      /* DMA channel 3                    */
-#define UIC_RSVD0      0x00008000      /* Reserved                         */
-#define UIC_RSVD1      0x00004000      /* Reserved                         */
-#define UIC_CT0                0x00002000      /* GPT compare timer 0              */
-#define UIC_CT1                0x00001000      /* GPT compare timer 1              */
-#define UIC_CT2                0x00000800      /* GPT compare timer 2              */
-#define UIC_CT3                0x00000400      /* GPT compare timer 3              */
-#define UIC_CT4                0x00000200      /* GPT compare timer 4              */
-#define UIC_EIR0       0x00000100      /* External interrupt 0             */
-#define UIC_EIR1       0x00000080      /* External interrupt 1             */
-#define UIC_EIR2       0x00000040      /* External interrupt 2             */
-#define UIC_EIR3       0x00000020      /* External interrupt 3             */
-#define UIC_EIR4       0x00000010      /* External interrupt 4             */
-#define UIC_EIR5       0x00000008      /* External interrupt 5             */
-#define UIC_EIR6       0x00000004      /* External interrupt 6             */
-#define UIC_UIC1NC     0x00000002      /* UIC1 non-critical interrupt      */
-#define UIC_UIC1C      0x00000001      /* UIC1 critical interrupt          */
-#endif /* CONFIG_440GX */
-
-/* For compatibility with 405 code */
-#define UIC_MAL_TXEOB  UIC_MTE
-#define UIC_MAL_RXEOB  UIC_MRE
-
-/*---------------------------------------------------------------------------+
-|  Universal interrupt controller 1 interrupts (UIC1)
-+---------------------------------------------------------------------------*/
-#if defined(CONFIG_440SP)
-#define UIC_EIR0       0x80000000      /* External interrupt 0             */
-#define UIC_MS         0x40000000      /* MAL SERR                         */
-#define UIC_MTDE       0x20000000      /* MAL TXDE                         */
-#define UIC_MRDE       0x10000000      /* MAL RXDE                         */
-#define UIC_DECE       0x08000000      /* DDR SDRAM correctible error      */
-#define UIC_EBCO       0x04000000      /* EBCO interrupt status            */
-#define UIC_MTE                0x02000000      /* MAL TXEOB                        */
-#define UIC_MRE                0x01000000      /* MAL RXEOB                        */
-#define UIC_P0MSI1     0x00800000      /* PCI0 MSI level 1                 */
-#define UIC_P1MSI1     0x00400000      /* PCI1 MSI level 1                 */
-#define UIC_P2MSI1     0x00200000      /* PCI2 MSI level 1                 */
-#define UIC_L2C                0x00100000      /* L2 cache                         */
-#define UIC_CT0                0x00080000      /* GPT compare timer 0              */
-#define UIC_CT1                0x00040000      /* GPT compare timer 1              */
-#define UIC_CT2                0x00020000      /* GPT compare timer 2              */
-#define UIC_CT3                0x00010000      /* GPT compare timer 3              */
-#define UIC_CT4                0x00008000      /* GPT compare timer 4              */
-#define UIC_EIR1       0x00004000      /* External interrupt 1             */
-#define UIC_EIR2       0x00002000      /* External interrupt 2             */
-#define UIC_EIR3       0x00001000      /* External interrupt 3             */
-#define UIC_EIR4       0x00000800      /* External interrupt 4             */
-#define UIC_EIR5       0x00000400      /* External interrupt 5             */
-#define UIC_DMAE       0x00000200      /* DMA error                        */
-#define UIC_I2OE       0x00000100      /* I2O error                        */
-#define UIC_SRE                0x00000080      /* Serial ROM error                 */
-#define UIC_P0AE       0x00000040      /* PCI0 asynchronous error          */
-#define UIC_P1AE       0x00000020      /* PCI1 asynchronous error          */
-#define UIC_P2AE       0x00000010      /* PCI2 asynchronous error          */
-#define UIC_ETH0       0x00000008      /* Ethernet 0                       */
-#define UIC_EWU0       0x00000004      /* Ethernet 0 wakeup                */
-#define UIC_ETH1       0x00000002      /* Reserved                         */
-#define UIC_XOR                0x00000001      /* XOR                              */
-#elif defined(CONFIG_440GX) || defined(CONFIG_440EP)
-#define UIC_MS         0x80000000      /* MAL SERR                         */
-#define UIC_MTDE       0x40000000      /* MAL TXDE                         */
-#define UIC_MRDE       0x20000000      /* MAL RXDE                         */
-#define UIC_DEUE       0x10000000      /* DDR SDRAM ECC uncorrectible error*/
-#define UIC_DECE       0x08000000      /* DDR SDRAM correctible error      */
-#define UIC_EBCO       0x04000000      /* EBCO interrupt status            */
-#define UIC_EBMI       0x02000000      /* EBMI interrupt status            */
-#define UIC_OPB                0x01000000      /* OPB to PLB bridge interrupt stat */
-#define UIC_MSI3       0x00800000      /* PCI MSI level 3                  */
-#define UIC_MSI4       0x00400000      /* PCI MSI level 4                  */
-#define UIC_MSI5       0x00200000      /* PCI MSI level 5                  */
-#define UIC_MSI6       0x00100000      /* PCI MSI level 6                  */
-#define UIC_MSI7       0x00080000      /* PCI MSI level 7                  */
-#define UIC_MSI8       0x00040000      /* PCI MSI level 8                  */
-#define UIC_MSI9       0x00020000      /* PCI MSI level 9                  */
-#define UIC_MSI10      0x00010000      /* PCI MSI level 10                 */
-#define UIC_MSI11      0x00008000      /* PCI MSI level 11                 */
-#define UIC_PPMI       0x00004000      /* PPM interrupt status             */
-#define UIC_EIR7       0x00002000      /* External interrupt 7             */
-#define UIC_EIR8       0x00001000      /* External interrupt 8             */
-#define UIC_EIR9       0x00000800      /* External interrupt 9             */
-#define UIC_EIR10      0x00000400      /* External interrupt 10            */
-#define UIC_EIR11      0x00000200      /* External interrupt 11            */
-#define UIC_EIR12      0x00000100      /* External interrupt 12            */
-#define UIC_SRE                0x00000080      /* Serial ROM error                 */
-#define UIC_RSVD2      0x00000040      /* Reserved                         */
-#define UIC_RSVD3      0x00000020      /* Reserved                         */
-#define UIC_PAE                0x00000010      /* PCI asynchronous error           */
-#define UIC_ETH0       0x00000008      /* Ethernet 0                       */
-#define UIC_EWU0       0x00000004      /* Ethernet 0 wakeup                */
-#define UIC_ETH1       0x00000002      /* Ethernet 1                       */
-#define UIC_EWU1       0x00000001      /* Ethernet 1 wakeup                */
-
-#elif defined(CONFIG_460EX) || defined(CONFIG_460GT)
-
-#define UIC_EIR2       0x80000000      /* External interrupt 2             */
-#define UIC_U0         0x40000000      /* UART 0                           */
-#define UIC_SPI                0x20000000      /* SPI                              */
-#define UIC_TRNGAL     0x10000000      /* TRNG alarm                       */
-#define UIC_DEUE       0x08000000      /* DDR SDRAM ECC correct/uncorrectable error */
-#define UIC_EBCO       0x04000000      /* EBCO interrupt status            */
-#define UIC_NDFC       0x02000000      /* NDFC                             */
-#define UIC_EIPPKPSE   0x01000000      /* EIPPKP slave error               */
-#define UIC_P0MSI1     0x00800000      /* PCI0 MSI level 1                 */
-#define UIC_P0MSI2     0x00400000      /* PCI0 MSI level 2                 */
-#define UIC_P0MSI3     0x00200000      /* PCI0 MSI level 3                 */
-#define UIC_L2C                0x00100000      /* L2 cache                         */
-#define UIC_CT0                0x00080000      /* GPT compare timer 0              */
-#define UIC_CT1                0x00040000      /* GPT compare timer 1              */
-#define UIC_CT2                0x00020000      /* GPT compare timer 2              */
-#define UIC_CT3                0x00010000      /* GPT compare timer 3              */
-#define UIC_CT4                0x00008000      /* GPT compare timer 4              */
-#define UIC_CT5                0x00004000      /* GPT compare timer 5              */
-#define UIC_CT6                0x00002000      /* GPT compare timer 6              */
-#define UIC_GPTDC      0x00001000      /* GPT decrementer pulse            */
-#define UIC_EIR3       0x00000800      /* External interrupt 3             */
-#define UIC_EIR4       0x00000400      /* External interrupt 4             */
-#define UIC_DMAE       0x00000200      /* DMA error                        */
-#define UIC_I2OE       0x00000100      /* I2O error                        */
-#define UIC_SRE                0x00000080      /* Serial ROM error                 */
-#define UIC_P0AE       0x00000040      /* PCI0 asynchronous error          */
-#define UIC_EIR5       0x00000020      /* External interrupt 5             */
-#define UIC_EIR6       0x00000010      /* External interrupt 6             */
-#define UIC_U2         0x00000008      /* UART 2                           */
-#define UIC_U3         0x00000004      /* UART 3                           */
-#define UIC_EIR7       0x00000002      /* External interrupt 7             */
-#define UIC_EIR8       0x00000001      /* External interrupt 8             */
-
-#elif defined(CONFIG_440EPX) || defined(CONFIG_440GRX)
-
-#define UIC_MS        0x80000000  /* MAL SERR                           */
-#define UIC_MTDE      0x40000000  /* MAL TXDE                           */
-#define UIC_MRDE      0x20000000  /* MAL RXDE                           */
-#define UIC_U2        0x10000000  /* UART 2                             */
-#define UIC_U3        0x08000000  /* UART 3                             */
-#define UIC_EBCO      0x04000000  /* EBCO interrupt status              */
-#define UIC_NDFC      0x02000000  /* NDFC                               */
-#define UIC_KSLE      0x01000000  /* KASUMI slave error                 */
-#define UIC_CT5       0x00800000  /* GPT compare timer 5                */
-#define UIC_CT6       0x00400000  /* GPT compare timer 6                */
-#define UIC_PLB34I0   0x00200000  /* PLB3X4X MIRQ0                      */
-#define UIC_PLB34I1   0x00100000  /* PLB3X4X MIRQ1                      */
-#define UIC_PLB34I2   0x00080000  /* PLB3X4X MIRQ2                      */
-#define UIC_PLB34I3   0x00040000  /* PLB3X4X MIRQ3                      */
-#define UIC_PLB34I4   0x00020000  /* PLB3X4X MIRQ4                      */
-#define UIC_PLB34I5   0x00010000  /* PLB3X4X MIRQ5                      */
-#define UIC_CT0       0x00008000  /* GPT compare timer 0                */
-#define UIC_CT1       0x00004000  /* GPT compare timer 1                */
-#define UIC_EIR7      0x00002000  /* External interrupt 7               */
-#define UIC_EIR8      0x00001000  /* External interrupt 8               */
-#define UIC_EIR9      0x00000800  /* External interrupt 9               */
-#define UIC_CT2       0x00000400  /* GPT compare timer 2                */
-#define UIC_CT3       0x00000200  /* GPT compare timer 3                */
-#define UIC_CT4       0x00000100  /* GPT compare timer 4                */
-#define UIC_SRE       0x00000080  /* Serial ROM error                   */
-#define UIC_GPTDC     0x00000040  /* GPT decrementer pulse              */
-#define UIC_RSVD0     0x00000020  /* Reserved                           */
-#define UIC_EPCIPER   0x00000010  /* External PCI PERR                  */
-#define UIC_EIR0      0x00000008  /* External interrupt 0               */
-#define UIC_EWU0      0x00000004  /* Ethernet 0 wakeup                  */
-#define UIC_EIR1      0x00000002  /* External interrupt 1               */
-#define UIC_EWU1      0x00000001  /* Ethernet 1 wakeup                  */
-
-/* For compatibility with 405 code */
-#define UIC_MAL_SERR   UIC_MS
-#define UIC_MAL_TXDE   UIC_MTDE
-#define UIC_MAL_RXDE   UIC_MRDE
-#define UIC_ENET       UIC_ETH0
-
-#elif !defined(CONFIG_440SPE)
-#define UIC_MS         0x80000000      /* MAL SERR                         */
-#define UIC_MTDE       0x40000000      /* MAL TXDE                         */
-#define UIC_MRDE       0x20000000      /* MAL RXDE                         */
-#define UIC_DEUE       0x10000000      /* DDR SDRAM ECC uncorrectible error*/
-#define UIC_DECE       0x08000000      /* DDR SDRAM correctible error      */
-#define UIC_EBCO       0x04000000      /* EBCO interrupt status            */
-#define UIC_EBMI       0x02000000      /* EBMI interrupt status            */
-#define UIC_OPB                0x01000000      /* OPB to PLB bridge interrupt stat */
-#define UIC_MSI3       0x00800000      /* PCI MSI level 3                  */
-#define UIC_MSI4       0x00400000      /* PCI MSI level 4                  */
-#define UIC_MSI5       0x00200000      /* PCI MSI level 5                  */
-#define UIC_MSI6       0x00100000      /* PCI MSI level 6                  */
-#define UIC_MSI7       0x00080000      /* PCI MSI level 7                  */
-#define UIC_MSI8       0x00040000      /* PCI MSI level 8                  */
-#define UIC_MSI9       0x00020000      /* PCI MSI level 9                  */
-#define UIC_MSI10      0x00010000      /* PCI MSI level 10                 */
-#define UIC_MSI11      0x00008000      /* PCI MSI level 11                 */
-#define UIC_PPMI       0x00004000      /* PPM interrupt status             */
-#define UIC_EIR7       0x00002000      /* External interrupt 7             */
-#define UIC_EIR8       0x00001000      /* External interrupt 8             */
-#define UIC_EIR9       0x00000800      /* External interrupt 9             */
-#define UIC_EIR10      0x00000400      /* External interrupt 10            */
-#define UIC_EIR11      0x00000200      /* External interrupt 11            */
-#define UIC_EIR12      0x00000100      /* External interrupt 12            */
-#define UIC_SRE                0x00000080      /* Serial ROM error                 */
-#define UIC_RSVD2      0x00000040      /* Reserved                         */
-#define UIC_RSVD3      0x00000020      /* Reserved                         */
-#define UIC_PAE                0x00000010      /* PCI asynchronous error           */
-#define UIC_ETH0       0x00000008      /* Ethernet 0                       */
-#define UIC_EWU0       0x00000004      /* Ethernet 0 wakeup                */
-#define UIC_ETH1       0x00000002      /* Ethernet 1                       */
-#define UIC_EWU1       0x00000001      /* Ethernet 1 wakeup                */
-#endif /* CONFIG_440SP */
-
-/* For compatibility with 405 code */
-#define UIC_MAL_SERR   UIC_MS
-#define UIC_MAL_TXDE   UIC_MTDE
-#define UIC_MAL_RXDE   UIC_MRDE
-#define UIC_ENET       UIC_ETH0
-
-/*---------------------------------------------------------------------------+
-|  Universal interrupt controller 2 interrupts (UIC2)
-+---------------------------------------------------------------------------*/
-#if defined(CONFIG_440GX)
-#define UIC_ETH2       0x80000000      /* Ethernet 2                       */
-#define UIC_EWU2       0x40000000      /* Ethernet 2 wakeup                */
-#define UIC_ETH3       0x20000000      /* Ethernet 3                       */
-#define UIC_EWU3       0x10000000      /* Ethernet 3 wakeup                */
-#define UIC_TAH0       0x08000000      /* TAH 0                            */
-#define UIC_TAH1       0x04000000      /* TAH 1                            */
-#define UIC_IMUOBFQ    0x02000000      /* IMU outbound free queue          */
-#define UIC_IMUIBPQ    0x01000000      /* IMU inbound post queue           */
-#define UIC_IMUIRQDB   0x00800000      /* IMU irq doorbell                 */
-#define UIC_IMUIBDB    0x00400000      /* IMU inbound doorbell             */
-#define UIC_IMUMSG0    0x00200000      /* IMU inbound message 0            */
-#define UIC_IMUMSG1    0x00100000      /* IMU inbound message 1            */
-#define UIC_IMUTO      0x00080000      /* IMU timeout                      */
-#define UIC_MSI12      0x00040000      /* PCI MSI level 12                 */
-#define UIC_MSI13      0x00020000      /* PCI MSI level 13                 */
-#define UIC_MSI14      0x00010000      /* PCI MSI level 14                 */
-#define UIC_MSI15      0x00008000      /* PCI MSI level 15                 */
-#define UIC_EIR13      0x00004000      /* External interrupt 13            */
-#define UIC_EIR14      0x00002000      /* External interrupt 14            */
-#define UIC_EIR15      0x00001000      /* External interrupt 15            */
-#define UIC_EIR16      0x00000800      /* External interrupt 16            */
-#define UIC_EIR17      0x00000400      /* External interrupt 17            */
-#define UIC_PCIVPD     0x00000200      /* PCI VPD                          */
-#define UIC_L2C                0x00000100      /* L2 Cache                         */
-#define UIC_ETH2PCS    0x00000080      /* Ethernet 2 PCS                   */
-#define UIC_ETH3PCS    0x00000040      /* Ethernet 3 PCS                   */
-#define UIC_RSVD26     0x00000020      /* Reserved                         */
-#define UIC_RSVD27     0x00000010      /* Reserved                         */
-#define UIC_RSVD28     0x00000008      /* Reserved                         */
-#define UIC_RSVD29     0x00000004      /* Reserved                         */
-#define UIC_RSVD30     0x00000002      /* Reserved                         */
-#define UIC_RSVD31     0x00000001      /* Reserved                         */
-
-#elif defined(CONFIG_460EX) || defined(CONFIG_460GT)
-
-#define UIC_TAH0       0x80000000      /* TAHOE 0                          */
-#define UIC_TAH1       0x40000000      /* TAHOE 1                          */
-#define UIC_EIR9       0x20000000      /* External interrupt 9             */
-#define UIC_MS         0x10000000      /* MAL SERR                         */
-#define UIC_MTDE       0x08000000      /* MAL TXDE                         */
-#define UIC_MRDE       0x04000000      /* MAL RXDE                         */
-#define UIC_MTE                0x02000000      /* MAL TXEOB                        */
-#define UIC_MRE                0x01000000      /* MAL RXEOB                        */
-#define UIC_MCTX0      0x00800000      /* MAL interrupt coalescence TX0    */
-#define UIC_MCTX1      0x00400000      /* MAL interrupt coalescence TX1    */
-#define UIC_MCTX2      0x00200000      /* MAL interrupt coalescence TX2    */
-#define UIC_MCTX3      0x00100000      /* MAL interrupt coalescence TX3    */
-#define UIC_MCTR0      0x00080000      /* MAL interrupt coalescence TR0    */
-#define UIC_MCTR1      0x00040000      /* MAL interrupt coalescence TR1    */
-#define UIC_MCTR2      0x00020000      /* MAL interrupt coalescence TR2    */
-#define UIC_MCTR3      0x00010000      /* MAL interrupt coalescence TR3    */
-#define UIC_ETH0       0x00008000      /* Ethernet 0                       */
-#define UIC_ETH1       0x00004000      /* Ethernet 1                       */
-#define UIC_ETH2       0x00002000      /* Ethernet 2                       */
-#define UIC_ETH3       0x00001000      /* Ethernet 3                       */
-#define UIC_EWU0       0x00000800      /* Ethernet 0 wakeup                */
-#define UIC_EWU1       0x00000400      /* Ethernet 1 wakeup                */
-#define UIC_EWU2       0x00000200      /* Ethernet 2 wakeup                */
-#define UIC_EWU3       0x00000100      /* Ethernet 3 wakeup                */
-#define UIC_EIR10      0x00000080      /* External interrupt 10            */
-#define UIC_EIR11      0x00000040      /* External interrupt 11            */
-#define UIC_RSVD2      0x00000020      /* Reserved                         */
-#define UIC_PLB4XAHB   0x00000010      /* PLB4XAHB / AHBARB error          */
-#define UIC_OTG                0x00000008      /* USB2.0 OTG                       */
-#define UIC_EHCI       0x00000004      /* USB2.0 Host EHCI                 */
-#define UIC_OHCI       0x00000002      /* USB2.0 Host OHCI                 */
-#define UIC_OHCISMI    0x00000001      /* USB2.0 Host OHCI SMI             */
-
-#elif defined(CONFIG_440EPX) || defined(CONFIG_440GRX) /* UIC2 */
-
-#define UIC_EIR5    0x80000000  /* External interrupt 5                 */
-#define UIC_EIR6    0x40000000  /* External interrupt 6                 */
-#define UIC_OPB     0x20000000  /* OPB to PLB bridge interrupt stat     */
-#define UIC_EIR2    0x10000000  /* External interrupt 2                 */
-#define UIC_EIR3    0x08000000  /* External interrupt 3                 */
-#define UIC_DDR2    0x04000000  /* DDR2 sdram                           */
-#define UIC_MCTX0   0x02000000  /* MAl intp coalescence TX0             */
-#define UIC_MCTX1   0x01000000  /* MAl intp coalescence TX1             */
-#define UIC_MCTR0   0x00800000  /* MAl intp coalescence TR0             */
-#define UIC_MCTR1   0x00400000  /* MAl intp coalescence TR1             */
-
-#endif /* CONFIG_440GX */
-
-/*---------------------------------------------------------------------------+
-|  Universal interrupt controller Base 0 interrupts (UICB0)
-+---------------------------------------------------------------------------*/
-#if defined(CONFIG_440GX)
-#define UICB0_UIC0CI   0x80000000      /* UIC0 Critical Interrupt          */
-#define UICB0_UIC0NCI  0x40000000      /* UIC0 Noncritical Interrupt       */
-#define UICB0_UIC1CI   0x20000000      /* UIC1 Critical Interrupt          */
-#define UICB0_UIC1NCI  0x10000000      /* UIC1 Noncritical Interrupt       */
-#define UICB0_UIC2CI   0x08000000      /* UIC2 Critical Interrupt          */
-#define UICB0_UIC2NCI  0x04000000      /* UIC2 Noncritical Interrupt       */
-
-#define UICB0_ALL      (UICB0_UIC0CI | UICB0_UIC0NCI | UICB0_UIC1CI | \
-                        UICB0_UIC1NCI | UICB0_UIC2CI | UICB0_UIC2NCI)
-
-#elif defined(CONFIG_460EX) || defined(CONFIG_460GT)
-
-#define UICB0_UIC1NCI  0x00000002      /* UIC1 Noncritical Interrupt       */
-#define UICB0_UIC1CI   0x00000001      /* UIC1 Critical Interrupt          */
-#define UICB0_UIC2NCI  0x00200000      /* UIC2 Noncritical Interrupt       */
-#define UICB0_UIC2CI   0x00100000      /* UIC2 Critical Interrupt          */
-#define UICB0_UIC3NCI  0x00008000      /* UIC3 Noncritical Interrupt       */
-#define UICB0_UIC3CI   0x00004000      /* UIC3 Critical Interrupt          */
-
-#define UICB0_ALL      (UICB0_UIC1CI | UICB0_UIC1NCI | UICB0_UIC2CI | \
-                        UICB0_UIC2NCI | UICB0_UIC3CI | UICB0_UIC3NCI)
-
-#elif defined(CONFIG_440EPX) || defined(CONFIG_440GRX)
-
-#define UICB0_UIC1CI   0x00000001      /* UIC1 Critical Interrupt          */
-#define UICB0_UIC1NCI  0x00000002      /* UIC1 Noncritical Interrupt       */
-#define UICB0_UIC2CI   0x00000004      /* UIC2 Critical Interrupt          */
-#define UICB0_UIC2NCI  0x00000008      /* UIC2 Noncritical Interrupt       */
-
-#define UICB0_ALL      (UICB0_UIC1CI | UICB0_UIC1NCI | \
-                        UICB0_UIC1CI | UICB0_UIC2NCI)
-
-#elif defined(CONFIG_440GP) || defined(CONFIG_440SP) || \
-    defined(CONFIG_440EP) || defined(CONFIG_440GR)
-
-#define UICB0_UIC1CI   0x00000001      /* UIC1 Critical Interrupt          */
-#define UICB0_UIC1NCI  0x00000002      /* UIC1 Noncritical Interrupt       */
-
-#define UICB0_ALL      (UICB0_UIC1CI | UICB0_UIC1NCI)
-
-#endif /* CONFIG_440GX */
-/*---------------------------------------------------------------------------+
-|  Universal interrupt controller interrupts
-+---------------------------------------------------------------------------*/
-#if defined(CONFIG_440SPE)
-/*#define UICB0_UIC0CI 0x80000000*/    /* UIC0 Critical Interrupt          */
-/*#define UICB0_UIC0NCI        0x40000000*/    /* UIC0 Noncritical Interrupt       */
-#define UICB0_UIC1CI   0x00000002      /* UIC1 Critical Interrupt          */
-#define UICB0_UIC1NCI  0x00000001      /* UIC1 Noncritical Interrupt       */
-#define UICB0_UIC2CI   0x00200000      /* UIC2 Critical Interrupt          */
-#define UICB0_UIC2NCI  0x00100000      /* UIC2 Noncritical Interrupt       */
-#define UICB0_UIC3CI   0x00008000      /* UIC3 Critical Interrupt          */
-#define UICB0_UIC3NCI  0x00004000      /* UIC3 Noncritical Interrupt       */
-
-#define UICB0_ALL              (UICB0_UIC1CI | UICB0_UIC1NCI | UICB0_UIC2CI | \
-                                                UICB0_UIC2NCI | UICB0_UIC3CI | UICB0_UIC3NCI)
-/*---------------------------------------------------------------------------+
-|  Universal interrupt controller 0 interrupts (UIC0)
-+---------------------------------------------------------------------------*/
-#define UIC_U0         0x80000000      /* UART 0                           */
-#define UIC_U1         0x40000000      /* UART 1                           */
-#define UIC_IIC0       0x20000000      /* IIC                              */
-#define UIC_IIC1       0x10000000      /* IIC                              */
-#define UIC_PIM                0x08000000      /* PCI inbound message              */
-#define UIC_PCRW       0x04000000      /* PCI command register write       */
-#define UIC_PPM                0x02000000      /* PCI power management             */
-#define UIC_PVPDA      0x01000000      /* PCIx 0 vpd access                */
-#define UIC_MSI0       0x00800000      /* PCIx MSI level 0                 */
-#define UIC_EIR15      0x00400000      /* External intp 15                 */
-#define UIC_PEMSI0     0x00080000      /* PCIe MSI level 0                 */
-#define UIC_PEMSI1     0x00040000      /* PCIe MSI level 1                 */
-#define UIC_PEMSI2     0x00020000      /* PCIe MSI level 2                 */
-#define UIC_PEMSI3     0x00010000      /* PCIe MSI level 3                 */
-#define UIC_EIR14      0x00002000      /* External interrupt 14            */
-#define UIC_D0CPFF     0x00001000      /* DMA0 cp fifo full                */
-#define UIC_D0CSNS     0x00000800      /* DMA0 cs fifo needs service       */
-#define UIC_D1CPFF     0x00000400      /* DMA1 cp fifo full                */
-#define UIC_D1CSNS     0x00000200      /* DMA1 cs fifo needs service       */
-#define UIC_I2OID      0x00000100      /* I2O inbound door bell            */
-#define UIC_I2OLNE     0x00000080      /* I2O Inbound Post List FIFO Not Empty */
-#define UIC_I20R0LL    0x00000040      /* I2O Region 0 Low Latency PLB Write */
-#define UIC_I2OR1LL    0x00000020      /* I2O Region 1 Low Latency PLB Write */
-#define UIC_I20R0HB    0x00000010      /* I2O Region 0 High Bandwidth PLB Write */
-#define UIC_I2OR1HB    0x00000008      /* I2O Region 1 High Bandwidth PLB Write */
-#define UIC_CPTCNT     0x00000004      /* GPT Count Timer                  */
-/*---------------------------------------------------------------------------+
-|  Universal interrupt controller 1 interrupts (UIC1)
-+---------------------------------------------------------------------------*/
-#define UIC_EIR13      0x80000000      /* externei intp 13                 */
-#define UIC_MS         0x40000000      /* MAL SERR                         */
-#define UIC_MTDE       0x20000000      /* MAL TXDE                         */
-#define UIC_MRDE       0x10000000      /* MAL RXDE                         */
-#define UIC_DEUE       0x08000000      /* DDR SDRAM ECC correct/uncorrectable error */
-#define UIC_EBCO       0x04000000      /* EBCO interrupt status            */
-#define UIC_MTE                0x02000000      /* MAL TXEOB                        */
-#define UIC_MRE                0x01000000      /* MAL RXEOB                        */
-#define UIC_MSI1       0x00800000      /* PCI MSI level 1                  */
-#define UIC_MSI2       0x00400000      /* PCI MSI level 2                  */
-#define UIC_MSI3       0x00200000      /* PCI MSI level 3                  */
-#define UIC_L2C                0x00100000      /* L2 cache                         */
-#define UIC_CT0                0x00080000      /* GPT compare timer 0              */
-#define UIC_CT1                0x00040000      /* GPT compare timer 1              */
-#define UIC_CT2                0x00020000      /* GPT compare timer 2              */
-#define UIC_CT3                0x00010000      /* GPT compare timer 3              */
-#define UIC_CT4                0x00008000      /* GPT compare timer 4              */
-#define UIC_EIR12      0x00004000      /* External interrupt 12            */
-#define UIC_EIR11      0x00002000      /* External interrupt 11            */
-#define UIC_EIR10      0x00001000      /* External interrupt 10            */
-#define UIC_EIR9       0x00000800      /* External interrupt 9             */
-#define UIC_EIR8       0x00000400      /* External interrupt 8             */
-#define UIC_DMAE       0x00000200      /* dma error                        */
-#define UIC_I2OE       0x00000100      /* i2o error                        */
-#define UIC_SRE                0x00000080      /* Serial ROM error                 */
-#define UIC_PCIXAE     0x00000040      /* Pcix0 async error                */
-#define UIC_EIR7       0x00000020      /* External interrupt 7             */
-#define UIC_EIR6       0x00000010      /* External interrupt 6             */
-#define UIC_ETH0       0x00000008      /* Ethernet 0                       */
-#define UIC_EWU0       0x00000004      /* Ethernet 0 wakeup                */
-#define UIC_ETH1       0x00000002      /* reserved                         */
-#define UIC_XOR                0x00000001      /* xor                              */
-
-/*---------------------------------------------------------------------------+
-|  Universal interrupt controller 2 interrupts (UIC2)
-+---------------------------------------------------------------------------*/
-#define UIC_PEOAL      0x80000000      /* PE0  AL                          */
-#define UIC_PEOVA      0x40000000      /* PE0  VPD access                  */
-#define UIC_PEOHRR     0x20000000      /* PE0 Host reset request rising    */
-#define UIC_PE0HRF     0x10000000      /* PE0 Host reset request falling   */
-#define UIC_PE0TCR     0x08000000      /* PE0 TCR                          */
-#define UIC_PE0BVCO    0x04000000      /* PE0 Busmaster VCO                */
-#define UIC_PE0DCRE    0x02000000      /* PE0 DCR error                    */
-#define UIC_PE1AL      0x00800000      /* PE1  AL                          */
-#define UIC_PE1VA      0x00400000      /* PE1  VPD access                  */
-#define UIC_PE1HRR     0x00200000      /* PE1 Host reset request rising    */
-#define UIC_PE1HRF     0x00100000      /* PE1 Host reset request falling   */
-#define UIC_PE1TCR     0x00080000      /* PE1 TCR                          */
-#define UIC_PE1BVCO    0x00040000      /* PE1 Busmaster VCO                */
-#define UIC_PE1DCRE    0x00020000      /* PE1 DCR error                    */
-#define UIC_PE2AL      0x00008000      /* PE2  AL                          */
-#define UIC_PE2VA      0x00004000      /* PE2  VPD access                  */
-#define UIC_PE2HRR     0x00002000      /* PE2 Host reset request rising    */
-#define UIC_PE2HRF     0x00001000      /* PE2 Host reset request falling   */
-#define UIC_PE2TCR     0x00000800      /* PE2 TCR                          */
-#define UIC_PE2BVCO    0x00000400      /* PE2 Busmaster VCO                */
-#define UIC_PE2DCRE    0x00000200      /* PE2 DCR error                    */
-#define UIC_EIR5       0x00000080      /* External interrupt 5             */
-#define UIC_EIR4       0x00000040      /* External interrupt 4             */
-#define UIC_EIR3       0x00000020      /* External interrupt 3             */
-#define UIC_EIR2       0x00000010      /* External interrupt 2             */
-#define UIC_EIR1       0x00000008      /* External interrupt 1             */
-#define UIC_EIR0       0x00000004      /* External interrupt 0             */
-#endif /* CONFIG_440SPE */
-
-/*-----------------------------------------------------------------------------+
-|  External Bus Controller Bit Settings
-+-----------------------------------------------------------------------------*/
-#define EBC_CFGADDR_MASK               0x0000003F
-
-#define EBC_BXCR_BAS_ENCODE(n) ((((unsigned long)(n))&0xFFF00000)<<0)
-#define EBC_BXCR_BS_MASK               0x000E0000
-#define EBC_BXCR_BS_1MB                        0x00000000
-#define EBC_BXCR_BS_2MB                        0x00020000
-#define EBC_BXCR_BS_4MB                        0x00040000
-#define EBC_BXCR_BS_8MB                        0x00060000
-#define EBC_BXCR_BS_16MB               0x00080000
-#define EBC_BXCR_BS_32MB               0x000A0000
-#define EBC_BXCR_BS_64MB               0x000C0000
-#define EBC_BXCR_BS_128MB              0x000E0000
-#define EBC_BXCR_BU_MASK               0x00018000
-#define EBC_BXCR_BU_R                  0x00008000
-#define EBC_BXCR_BU_W                  0x00010000
-#define EBC_BXCR_BU_RW                 0x00018000
-#define EBC_BXCR_BW_MASK               0x00006000
-#define EBC_BXCR_BW_8BIT               0x00000000
-#define EBC_BXCR_BW_16BIT              0x00002000
-#define EBC_BXCR_BW_32BIT              0x00006000
-#define EBC_BXAP_BME_ENABLED           0x80000000
-#define EBC_BXAP_BME_DISABLED          0x00000000
-#define EBC_BXAP_TWT_ENCODE(n)         ((((unsigned long)(n))&0xFF)<<23)
-#define EBC_BXAP_BCE_DISABLE           0x00000000
-#define EBC_BXAP_BCE_ENABLE            0x00400000
-#define EBC_BXAP_BCT_MASK              0x00300000
-#define EBC_BXAP_BCT_2TRANS            0x00000000
-#define EBC_BXAP_BCT_4TRANS            0x00100000
-#define EBC_BXAP_BCT_8TRANS            0x00200000
-#define EBC_BXAP_BCT_16TRANS           0x00300000
-#define EBC_BXAP_CSN_ENCODE(n)         ((((unsigned long)(n))&0x3)<<18)
-#define EBC_BXAP_OEN_ENCODE(n)         ((((unsigned long)(n))&0x3)<<16)
-#define EBC_BXAP_WBN_ENCODE(n)         ((((unsigned long)(n))&0x3)<<14)
-#define EBC_BXAP_WBF_ENCODE(n)         ((((unsigned long)(n))&0x3)<<12)
-#define EBC_BXAP_TH_ENCODE(n)          ((((unsigned long)(n))&0x7)<<9)
-#define EBC_BXAP_RE_ENABLED            0x00000100
-#define EBC_BXAP_RE_DISABLED           0x00000000
-#define EBC_BXAP_SOR_DELAYED           0x00000000
-#define EBC_BXAP_SOR_NONDELAYED                0x00000080
-#define EBC_BXAP_BEM_WRITEONLY         0x00000000
-#define EBC_BXAP_BEM_RW                        0x00000040
-#define EBC_BXAP_PEN_DISABLED          0x00000000
-
-#define EBC_CFG_LE_MASK                        0x80000000
-#define EBC_CFG_LE_UNLOCK              0x00000000
-#define EBC_CFG_LE_LOCK                        0x80000000
-#define EBC_CFG_PTD_MASK               0x40000000
-#define EBC_CFG_PTD_ENABLE             0x00000000
-#define EBC_CFG_PTD_DISABLE            0x40000000
-#define EBC_CFG_RTC_MASK               0x38000000
-#define EBC_CFG_RTC_16PERCLK           0x00000000
-#define EBC_CFG_RTC_32PERCLK           0x08000000
-#define EBC_CFG_RTC_64PERCLK           0x10000000
-#define EBC_CFG_RTC_128PERCLK          0x18000000
-#define EBC_CFG_RTC_256PERCLK          0x20000000
-#define EBC_CFG_RTC_512PERCLK          0x28000000
-#define EBC_CFG_RTC_1024PERCLK         0x30000000
-#define EBC_CFG_RTC_2048PERCLK         0x38000000
-#define EBC_CFG_ATC_MASK               0x04000000
-#define EBC_CFG_ATC_HI                 0x00000000
-#define EBC_CFG_ATC_PREVIOUS           0x04000000
-#define EBC_CFG_DTC_MASK               0x02000000
-#define EBC_CFG_DTC_HI                 0x00000000
-#define EBC_CFG_DTC_PREVIOUS           0x02000000
-#define EBC_CFG_CTC_MASK               0x01000000
-#define EBC_CFG_CTC_HI                 0x00000000
-#define EBC_CFG_CTC_PREVIOUS           0x01000000
-#define EBC_CFG_OEO_MASK               0x00800000
-#define EBC_CFG_OEO_HI                 0x00000000
-#define EBC_CFG_OEO_PREVIOUS           0x00800000
-#define EBC_CFG_EMC_MASK               0x00400000
-#define EBC_CFG_EMC_NONDEFAULT         0x00000000
-#define EBC_CFG_EMC_DEFAULT            0x00400000
-#define EBC_CFG_PME_MASK               0x00200000
-#define EBC_CFG_PME_DISABLE            0x00000000
-#define EBC_CFG_PME_ENABLE             0x00200000
-#define EBC_CFG_PMT_MASK               0x001F0000
-#define EBC_CFG_PMT_ENCODE(n)          ((((unsigned long)(n))&0x1F)<<12)
-#define EBC_CFG_PR_MASK                        0x0000C000
-#define EBC_CFG_PR_16                  0x00000000
-#define EBC_CFG_PR_32                  0x00004000
-#define EBC_CFG_PR_64                  0x00008000
-#define EBC_CFG_PR_128                 0x0000C000
-
 /*-----------------------------------------------------------------------------+
 |  SDR0 Bit Settings
 +-----------------------------------------------------------------------------*/
 #define SDR0_DDR0_TUNE_DECODE(n)       ((((unsigned long)(n))>>0)&0x2FF)
 #endif
 
-#if defined(CONFIG_440SPE)
+#if defined(CONFIG_440SPE) || defined(CONFIG_460SX)
 #define SDR0_CP440                     0x0180
 #define SDR0_CP440_ERPN_MASK           0x30000000
 #define SDR0_CP440_ERPN_MASK_HI                0x3000
 /*-----------------------------------------------------------------------------+
 |  Clocking
 +-----------------------------------------------------------------------------*/
-#if defined(CONFIG_460EX) || defined(CONFIG_460GT)
+#if defined(CONFIG_460EX) || defined(CONFIG_460GT) || \
+    defined(CONFIG_460SX)
 #define PLLSYS0_FWD_DIV_A_MASK 0x000000f0      /* Fwd Div A */
 #define PLLSYS0_FWD_DIV_B_MASK 0x0000000f      /* Fwd Div B */
 #define PLLSYS0_FB_DIV_MASK    0x0000ff00      /* Feedback divisor */
 #endif /* CONFIG_440GX */
 
 #if defined (CONFIG_440EPX) || defined (CONFIG_440GRX)
-/*--------------------------------------*/
-#define CPR0_PLLC                   0x40
-#define   CPR0_PLLC_RST_MASK           0x80000000
-#define   CPR0_PLLC_RST_PLLLOCKED      0x00000000
-#define   CPR0_PLLC_RST_PLLRESET       0x80000000
-#define   CPR0_PLLC_ENG_MASK           0x40000000
-#define   CPR0_PLLC_ENG_DISABLE        0x00000000
-#define   CPR0_PLLC_ENG_ENABLE         0x40000000
-#define   CPR0_PLLC_ENG_ENCODE(n)      ((((unsigned long)(n))&0x01)<<30)
-#define   CPR0_PLLC_ENG_DECODE(n)      ((((unsigned long)(n))>>30)&0x01)
-#define   CPR0_PLLC_SRC_MASK           0x20000000
-#define   CPR0_PLLC_SRC_PLLOUTA        0x00000000
-#define   CPR0_PLLC_SRC_PLLOUTB        0x20000000
-#define   CPR0_PLLC_SRC_ENCODE(n)      ((((unsigned long)(n))&0x01)<<29)
-#define   CPR0_PLLC_SRC_DECODE(n)      ((((unsigned long)(n))>>29)&0x01)
-#define   CPR0_PLLC_SEL_MASK           0x07000000
-#define   CPR0_PLLC_SEL_PLL            0x00000000
-#define   CPR0_PLLC_SEL_CPU            0x01000000
-#define   CPR0_PLLC_SEL_PER            0x05000000
-#define   CPR0_PLLC_SEL_ENCODE(n)      ((((unsigned long)(n))&0x07)<<24)
-#define   CPR0_PLLC_SEL_DECODE(n)      ((((unsigned long)(n))>>24)&0x07)
-#define   CPR0_PLLC_TUNE_MASK          0x000003FF
-#define   CPR0_PLLC_TUNE_ENCODE(n)     ((((unsigned long)(n))&0x3FF)<<0)
-#define   CPR0_PLLC_TUNE_DECODE(n)     ((((unsigned long)(n))>>0)&0x3FF)
-/*--------------------------------------*/
-#define CPR0_PLLD                   0x60
-#define   CPR0_PLLD_FBDV_MASK          0x1F000000
-#define   CPR0_PLLD_FBDV_ENCODE(n)     ((((unsigned long)(n))&0x1F)<<24)
-#define   CPR0_PLLD_FBDV_DECODE(n)     ((((((unsigned long)(n))>>24)-1)&0x1F)+1)
-#define   CPR0_PLLD_FWDVA_MASK         0x000F0000
-#define   CPR0_PLLD_FWDVA_ENCODE(n)    ((((unsigned long)(n))&0x0F)<<16)
-#define   CPR0_PLLD_FWDVA_DECODE(n)    ((((((unsigned long)(n))>>16)-1)&0x0F)+1)
-#define   CPR0_PLLD_FWDVB_MASK         0x00000700
-#define   CPR0_PLLD_FWDVB_ENCODE(n)    ((((unsigned long)(n))&0x07)<<8)
-#define   CPR0_PLLD_FWDVB_DECODE(n)    ((((((unsigned long)(n))>>8)-1)&0x07)+1)
-#define   CPR0_PLLD_LFBDV_MASK         0x0000003F
-#define   CPR0_PLLD_LFBDV_ENCODE(n)    ((((unsigned long)(n))&0x3F)<<0)
-#define   CPR0_PLLD_LFBDV_DECODE(n)    ((((((unsigned long)(n))>>0)-1)&0x3F)+1)
-/*--------------------------------------*/
-#define CPR0_PRIMAD                 0x80
-#define   CPR0_PRIMAD_PRADV0_MASK      0x07000000
-#define   CPR0_PRIMAD_PRADV0_ENCODE(n) ((((unsigned long)(n))&0x07)<<24)
-#define   CPR0_PRIMAD_PRADV0_DECODE(n) ((((((unsigned long)(n))>>24)-1)&0x07)+1)
-/*--------------------------------------*/
-#define CPR0_PRIMBD                 0xA0
-#define   CPR0_PRIMBD_PRBDV0_MASK      0x07000000
-#define   CPR0_PRIMBD_PRBDV0_ENCODE(n) ((((unsigned long)(n))&0x07)<<24)
-#define   CPR0_PRIMBD_PRBDV0_DECODE(n) ((((((unsigned long)(n))>>24)-1)&0x07)+1)
-/*--------------------------------------*/
-#if 0
-#define CPR0_CPM0_ER                0xB0    /* CPM Enable Register */
-#define CPR0_CPM0_FR                0xB1    /* CPM Force Register */
-#define CPR0_CPM0_SR                0xB2    /* CPM Status Register */
-#define CPR0_CPM0_IIC0               0x80000000    /* Inter-Intergrated Circuit0 */
-#define CPR0_CPM0_IIC1               0x40000000    /* Inter-Intergrated Circuit1 */
-#define CPR0_CPM0_PCI                0x20000000    /* Peripheral Component Interconnect */
-#define CPR0_CPM0_USB1H              0x08000000    /* USB1.1 Host */
-#define CPR0_CPM0_FPU                0x04000000    /* PPC440 FPU */
-#define CPR0_CPM0_CPU                0x02000000    /* PPC440x5 Processor Core */
-#define CPR0_CPM0_DMA                0x01000000    /* Direct Memory Access Controller */
-#define CPR0_CPM0_BGO                0x00800000    /* PLB to OPB Bridge */
-#define CPR0_CPM0_BGI                0x00400000    /* OPB to PLB Bridge */
-#define CPR0_CPM0_EBC                0x00200000    /* External Bus Controller */
-#define CPR0_CPM0_NDFC               0x00100000    /* Nand Flash Controller */
-#define CPR0_CPM0_MADMAL             0x00080000    /* DDR SDRAM Controller or MADMAL ??? */
-#define CPR0_CPM0_DMC                0x00080000    /* DDR SDRAM Controller or MADMAL ??? */
-#define CPR0_CPM0_PLB4               0x00040000    /* PLB4 Arbiter */
-#define CPR0_CPM0_PLB4x3x            0x00020000    /* PLB4 to PLB3 */
-#define CPR0_CPM0_PLB3x4x            0x00010000    /* PLB3 to PLB4 */
-#define CPR0_CPM0_PLB3               0x00008000    /* PLB3 Arbiter */
-#define CPR0_CPM0_PPM                0x00002000    /* PLB Performance Monitor */
-#define CPR0_CPM0_UIC1               0x00001000    /* Universal Interrupt Controller 1 */
-#define CPR0_CPM0_GPIO               0x00000800    /* General Purpose IO */
-#define CPR0_CPM0_GPT                0x00000400    /* General Purpose Timer */
-#define CPR0_CPM0_UART0              0x00000200    /* Universal Asynchronous Rcver/Xmitter 0 */
-#define CPR0_CPM0_UART1              0x00000100    /* Universal Asynchronous Rcver/Xmitter 1 */
-#define CPR0_CPM0_UIC0               0x00000080    /* Universal Interrupt Controller 0 */
-#define CPR0_CPM0_TMRCLK             0x00000040    /* CPU Timer */
-#define CPR0_CPM0_EMC0               0x00000020    /* Ethernet 0 */
-#define CPR0_CPM0_EMC1               0x00000010    /* Ethernet 1 */
-#define CPR0_CPM0_UART2              0x00000008    /* Universal Asynchronous Rcver/Xmitter 2 */
-#define CPR0_CPM0_UART3              0x00000004    /* Universal Asynchronous Rcver/Xmitter 3 */
-#define CPR0_CPM0_USB2D              0x00000002    /* USB2.0 Device */
-#define CPR0_CPM0_USB2H              0x00000001    /* USB2.0 Host */
+#define CPR0_ICFG_RLI_MASK     0x80000000
+#define CPR0_SPCID_SPCIDV0_MASK        0x03000000
+#define CPR0_PERD_PERDV0_MASK  0x07000000
 #endif
-/*--------------------------------------*/
-#define CPR0_OPBD                   0xC0
-#define   CPR0_OPBD_OPBDV0_MASK        0x03000000
-#define   CPR0_OPBD_OPBDV0_ENCODE(n)   ((((unsigned long)(n))&0x03)<<24)
-#define   CPR0_OPBD_OPBDV0_DECODE(n)   ((((((unsigned long)(n))>>24)-1)&0x03)+1)
-/*--------------------------------------*/
-#define CPR0_PERD                   0xE0
-#define   CPR0_PERD_PERDV0_MASK        0x07000000
-#define   CPR0_PERD_PERDV0_ENCODE(n)   ((((unsigned long)(n))&0x07)<<24)
-#define   CPR0_PERD_PERDV0_DECODE(n)   ((((((unsigned long)(n))>>24)-1)&0x07)+1)
-/*--------------------------------------*/
-#define CPR0_MALD                  0x100
-#define   CPR0_MALD_MALDV0_MASK        0x03000000
-#define   CPR0_MALD_MALDV0_ENCODE(n)   ((((unsigned long)(n))&0x03)<<24)
-#define   CPR0_MALD_MALDV0_DECODE(n)   ((((((unsigned long)(n))>>24)-1)&0x03)+1)
-/*--------------------------------------*/
-#define CPR0_SPCID                 0x120
-#define   CPR0_SPCID_SPCIDV0_MASK      0x03000000
-#define   CPR0_SPCID_SPCIDV0_ENCODE(n) ((((unsigned long)(n))&0x03)<<24)
-#define   CPR0_SPCID_SPCIDV0_DECODE(n) ((((((unsigned long)(n))>>24)-1)&0x03)+1)
-/*--------------------------------------*/
-#define CPR0_ICFG                  0x140
-#define   CPR0_ICFG_RLI_MASK           0x80000000
-#define   CPR0_ICFG_RLI_RESETCPR       0x00000000
-#define   CPR0_ICFG_RLI_PRESERVECPR    0x80000000
-#define   CPR0_ICFG_ICS_MASK           0x00000007
-#endif /* defined (CONFIG_440EPX) || defined (CONFIG_440GRX) */
 
 /*-----------------------------------------------------------------------------
 | IIC Register Offsets
 #define IICXTCNTLSS            0x0F
 #define IICDIRECTCNTL          0x10
 
-/*-----------------------------------------------------------------------------
-| UART Register Offsets
-'----------------------------------------------------------------------------*/
-#define DATA_REG               0x00
-#define DL_LSB                 0x00
-#define DL_MSB                 0x01
-#define INT_ENABLE             0x01
-#define FIFO_CONTROL           0x02
-#define LINE_CONTROL           0x03
-#define MODEM_CONTROL          0x04
-#define LINE_STATUS            0x05
-#define MODEM_STATUS           0x06
-#define SCRATCH                        0x07
-
 /*-----------------------------------------------------------------------------
 | PCI Internal Registers et. al. (accessed via plb)
 +----------------------------------------------------------------------------*/
  * GPIO macro register defines
  ******************************************************************************/
 #if defined(CONFIG_440GP) || defined(CONFIG_440GX) || \
-    defined(CONFIG_440SP) || defined(CONFIG_440SPE)
+    defined(CONFIG_440SP) || defined(CONFIG_440SPE) || \
+    defined(CONFIG_460SX)
 #define GPIO0_BASE             (CFG_PERIPHERAL_BASE+0x00000700)
 
 #define GPIO0_OR               (GPIO0_BASE+0x0)
index 1d06da8779d0087a16bbbe0966c7fd9c6751aad1..c71da6084405cedde696408679eedab84e134faf 100644 (file)
@@ -41,7 +41,8 @@
 
 #if defined(CONFIG_405EX) || \
     defined(CONFIG_440SP) || defined(CONFIG_440SPE) || \
-    defined(CONFIG_460EX) || defined(CONFIG_460GT)
+    defined(CONFIG_460EX) || defined(CONFIG_460GT) || \
+    defined(CONFIG_460SX)
 #define CONFIG_SDRAM_PPC4xx_IBM_DDR2   /* IBM DDR(2) controller */
 #endif
 
 #endif
 
 #include <asm/ppc4xx-sdram.h>
+#include <asm/ppc4xx-ebc.h>
+#if !defined(CONFIG_XILINX_440)
+#include <asm/ppc4xx-uic.h>
+#endif
 
 /*
  * Macro for generating register field mnemonics
index 4c97b36c05b42143e9b35d9280d44926e3419e4f..b74c6fcafde7255fac2f8cfa9d1169bd0637283a 100644 (file)
@@ -153,6 +153,20 @@ typedef struct emac_4xx_hw_st {
 #define SDR0_PFC1_EM_1000      (0x00200000)
 #endif
 
+/*
+ * XMII bridge configurations for those systems (e.g. 405EX(r)) that do
+ * not have a pin function control (PFC) register to otherwise determine
+ * the bridge configuration.
+ */
+#define EMAC_PHY_MODE_NONE             0
+#define EMAC_PHY_MODE_NONE_RGMII       1
+#define EMAC_PHY_MODE_RGMII_NONE       2
+#define EMAC_PHY_MODE_RGMII_RGMII      3
+#define EMAC_PHY_MODE_NONE_GMII                4
+#define EMAC_PHY_MODE_GMII_NONE                5
+#define EMAC_PHY_MODE_NONE_MII         6
+#define EMAC_PHY_MODE_MII_NONE         7
+
 /* ZMII Bridge Register addresses */
 #if defined(CONFIG_440EP) || defined(CONFIG_440GR) || \
     defined(CONFIG_440EPX) || defined(CONFIG_440GRX) || \
@@ -218,12 +232,12 @@ typedef struct emac_4xx_hw_st {
 #endif
 
 /* RGMII Function Enable (FER) Register Bit Definitions */
-/* Note: for EMAC 2 and 3 only, 440GX only */
 #define RGMII_FER_DIS          (0x00)
 #define RGMII_FER_RTBI         (0x04)
 #define RGMII_FER_RGMII                (0x05)
 #define RGMII_FER_TBI          (0x06)
 #define RGMII_FER_GMII         (0x07)
+#define RGMII_FER_MII          (RGMII_FER_GMII)
 
 #define RGMII_FER_V(__x)       ((__x - 2) * 4)
 
index 83d1d1d3a0d180d85a2e6d7af7c73ec15a2f5651..b6a7a91620f130f3198fc22fc3fc272f586f10ce 100644 (file)
@@ -174,7 +174,7 @@ uint32_t ZEXPORT crc32 (uint32_t crc, const Bytef *buf, uInt len)
 
 #if defined(CONFIG_CMD_JFFS2) || \
        (defined(CONFIG_CMD_NAND) \
-       && !defined(CFG_NAND_LEGACY))
+       && !defined(CONFIG_NAND_LEGACY))
 
 /* No ones complement version. JFFS2 (and other things ?)
  * don't use ones compliment in their CRC calculations.