]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Merge branch 'tom' of git://git.denx.de/u-boot-x86
authorTom Rini <trini@ti.com>
Tue, 8 Jul 2014 00:45:09 +0000 (20:45 -0400)
committerTom Rini <trini@ti.com>
Tue, 8 Jul 2014 00:45:09 +0000 (20:45 -0400)
140 files changed:
Makefile
README
arch/arm/config.mk
arch/arm/cpu/armv7/am33xx/ddr.c
arch/arm/cpu/armv7/am33xx/emif4.c
arch/arm/include/asm/arch-am33xx/cpu.h
arch/arm/include/asm/arch-am33xx/hardware_am43xx.h
arch/arm/include/asm/arch-am33xx/omap.h
arch/arm/include/asm/emif.h
arch/blackfin/include/asm/config-pre.h
arch/blackfin/lib/cache.c
arch/m68k/cpu/mcf523x/cpu_init.c
arch/m68k/cpu/mcf5445x/speed.c
arch/powerpc/cpu/mpc824x/start.S
arch/powerpc/cpu/mpc8xx/cpu.c
arch/powerpc/cpu/mpc8xx/cpu_init.c
arch/powerpc/cpu/mpc8xx/fec.c
arch/powerpc/cpu/mpc8xx/scc.c
arch/powerpc/cpu/mpc8xx/serial.c
arch/powerpc/cpu/mpc8xx/video.c
arch/powerpc/cpu/ppc4xx/speed.c
arch/sandbox/include/asm/sound.h [moved from arch/sandbox/include/asm/arch-sandbox/sound.h with 100% similarity]
board/RPXlite_dw/Makefile [deleted file]
board/RPXlite_dw/README [deleted file]
board/RPXlite_dw/RPXlite_dw.c [deleted file]
board/RPXlite_dw/flash.c [deleted file]
board/RPXlite_dw/u-boot.lds [deleted file]
board/RPXlite_dw/u-boot.lds.debug [deleted file]
board/fads/Makefile [deleted file]
board/fads/README [deleted file]
board/fads/fads.c [deleted file]
board/fads/fads.h [deleted file]
board/fads/flash.c [deleted file]
board/fads/lamp.c [deleted file]
board/fads/pcmcia.c [deleted file]
board/fads/u-boot.lds [deleted file]
board/gdsys/405ep/iocon.c
board/gdsys/common/Makefile
board/gdsys/common/dp501.c
board/gdsys/common/osd.c
board/gdsys/p1022/controlcenterd-id.c
board/gdsys/p1022/controlcenterd.c
board/gdsys/p1022/sdhc_boot.c
board/mpl/vcma9/lowlevel_init.S
board/netphone/Makefile [deleted file]
board/netphone/flash.c [deleted file]
board/netphone/netphone.c [deleted file]
board/netphone/phone_console.c [deleted file]
board/netphone/u-boot.lds [deleted file]
board/netphone/u-boot.lds.debug [deleted file]
board/netta/Makefile [deleted file]
board/netta/codec.c [deleted file]
board/netta/dsp.c [deleted file]
board/netta/flash.c [deleted file]
board/netta/netta.c [deleted file]
board/netta/pcmcia.c [deleted file]
board/netta/u-boot.lds [deleted file]
board/netta/u-boot.lds.debug [deleted file]
board/netta2/Makefile [deleted file]
board/netta2/flash.c [deleted file]
board/netta2/netta2.c [deleted file]
board/netta2/u-boot.lds [deleted file]
board/netta2/u-boot.lds.debug [deleted file]
board/quantum/Makefile [deleted file]
board/quantum/fpga.c [deleted file]
board/quantum/fpga.h [deleted file]
board/quantum/quantum.c [deleted file]
board/quantum/u-boot.lds [deleted file]
board/quantum/u-boot.lds.debug [deleted file]
board/rbc823/Makefile [deleted file]
board/rbc823/flash.c [deleted file]
board/rbc823/kbd.c [deleted file]
board/rbc823/rbc823.c [deleted file]
board/rbc823/u-boot.lds [deleted file]
board/snmc/qs850/Makefile [deleted file]
board/snmc/qs850/flash.c [deleted file]
board/snmc/qs850/qs850.c [deleted file]
board/snmc/qs850/u-boot.lds [deleted file]
board/snmc/qs860t/Makefile [deleted file]
board/snmc/qs860t/flash.c [deleted file]
board/snmc/qs860t/qs860t.c [deleted file]
board/snmc/qs860t/u-boot.lds [deleted file]
board/spc1920/Makefile [deleted file]
board/spc1920/hpi.c [deleted file]
board/spc1920/hpi.h [deleted file]
board/spc1920/pld.h [deleted file]
board/spc1920/spc1920.c [deleted file]
board/spc1920/u-boot.lds [deleted file]
board/ti/am43xx/board.c
board/ti/am43xx/board.h
board/ti/dra7xx/mux_data.h
board/v37/Makefile [deleted file]
board/v37/flash.c [deleted file]
board/v37/u-boot.lds [deleted file]
board/v37/v37.c [deleted file]
boards.cfg
common/env_fat.c
config.mk
doc/README.falcon
doc/README.scrapyard
doc/git-mailrc
drivers/i2c/Makefile
drivers/i2c/ihs_i2c.c [new file with mode: 0644]
drivers/pcmcia/Makefile
drivers/pcmcia/mpc8xx_pcmcia.c
drivers/pcmcia/rpx_pcmcia.c [deleted file]
drivers/sound/sandbox.c
drivers/tpm/tpm.c
drivers/video/mpc8xx_lcd.c
drivers/watchdog/bfin_wdt.c
include/common.h
include/commproc.h
include/configs/MPC86xADS.h [deleted file]
include/configs/MPC885ADS.h [deleted file]
include/configs/NETPHONE.h [deleted file]
include/configs/NETTA.h [deleted file]
include/configs/NETTA2.h [deleted file]
include/configs/QS823.h [deleted file]
include/configs/QS850.h [deleted file]
include/configs/QS860T.h [deleted file]
include/configs/RBC823.h [deleted file]
include/configs/RPXlite_DW.h [deleted file]
include/configs/at91sam9m10g45ek.h
include/configs/controlcenterd.h
include/configs/dlvision-10g.h
include/configs/io.h
include/configs/iocon.h
include/configs/neo.h
include/configs/omap3_beagle.h
include/configs/quantum.h [deleted file]
include/configs/spc1920.h [deleted file]
include/configs/v37.h [deleted file]
include/gdsys_fpga.h
include/image.h
include/lcd.h
include/pcmcia.h
include/status_led.h
mkconfig
post/cpu/mpc8xx/ether.c
post/cpu/mpc8xx/uart.c

index 686cab1460fc82f433edb4466de5498dbf8b7d31..b8cce74e3ebc1931d73516645c2fa6fdf1541eb8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -788,7 +788,8 @@ OBJCOPYFLAGS_u-boot.bin := -O binary
 binary_size_check: u-boot.bin System.map FORCE
        @file_size=`stat -c %s u-boot.bin` ; \
        map_size=$(shell cat System.map | \
-               awk '/_image_copy_start/ {start = $$1} /_image_binary_end/ {end = $$1} END {if (start != "" && end != "") print strtonum("0x" end) - strtonum("0x" start)}'); \
+               awk '/_image_copy_start/ {start = $$1} /_image_binary_end/ {end = $$1} END {if (start != "" && end != "") print "ibase=16; " toupper(end) " - " toupper(start)}' \
+               | bc); \
        if [ "" != "$$map_size" ]; then \
                if test $$map_size -ne $$file_size; then \
                        echo "System.map shows a binary size of $$map_size" >&2 ; \
@@ -1273,7 +1274,7 @@ $(mrproper-dirs):
 mrproper: clobber $(mrproper-dirs)
        $(call cmd,rmdirs)
        $(call cmd,rmfiles)
-       @rm -f arch/*/include/asm/arch arch/*/include/asm/proc
+       @rm -f arch/*/include/asm/arch
 
 # distclean
 #
diff --git a/README b/README
index 55c3fcdca4820794dd21e19394b91bd56a9f6131..4ac73996983add08d11a15875fa203a5f8fd3393 100644 (file)
--- a/README
+++ b/README
@@ -2288,6 +2288,21 @@ CBFS (Coreboot Filesystem) support
                    9 i2c buses for Exynos4 and 1 for S3C24X0 SoCs from Samsung)
                    with a fix speed from 100000 and the slave addr 0!
 
+               - drivers/i2c/ihs_i2c.c
+                 - activate this driver with CONFIG_SYS_I2C_IHS
+                 - CONFIG_SYS_I2C_IHS_CH0 activate hardware channel 0
+                 - CONFIG_SYS_I2C_IHS_SPEED_0 speed channel 0
+                 - CONFIG_SYS_I2C_IHS_SLAVE_0 slave addr channel 0
+                 - CONFIG_SYS_I2C_IHS_CH1 activate hardware channel 1
+                 - CONFIG_SYS_I2C_IHS_SPEED_1 speed channel 1
+                 - CONFIG_SYS_I2C_IHS_SLAVE_1 slave addr channel 1
+                 - CONFIG_SYS_I2C_IHS_CH2 activate hardware channel 2
+                 - CONFIG_SYS_I2C_IHS_SPEED_2 speed channel 2
+                 - CONFIG_SYS_I2C_IHS_SLAVE_2 slave addr channel 2
+                 - CONFIG_SYS_I2C_IHS_CH3 activate hardware channel 3
+                 - CONFIG_SYS_I2C_IHS_SPEED_3 speed channel 3
+                 - CONFIG_SYS_I2C_IHS_SLAVE_3 slave addr channel 3
+
                additional defines:
 
                CONFIG_SYS_NUM_I2C_BUSES
@@ -3254,6 +3269,11 @@ FIT uImage format:
                disabled. If a board need legacy image format support
                enable this through CONFIG_IMAGE_FORMAT_LEGACY
 
+               CONFIG_FIT_DISABLE_SHA256
+               Supporting SHA256 hashes has quite an impact on binary size.
+               For constrained systems sha256 hash support can be disabled
+               with this option.
+
 - Standalone program support:
                CONFIG_STANDALONE_LOAD_ADDR
 
@@ -4069,6 +4089,43 @@ to save the current settings.
          environment area within the total memory of your DataFlash placed
          at the specified address.
 
+- CONFIG_ENV_IS_IN_SPI_FLASH:
+
+       Define this if you have a SPI Flash memory device which you
+       want to use for the environment.
+
+       - CONFIG_ENV_OFFSET:
+       - CONFIG_ENV_SIZE:
+
+         These two #defines specify the offset and size of the
+         environment area within the SPI Flash. CONFIG_ENV_OFFSET must be
+         aligned to an erase sector boundary.
+
+       - CONFIG_ENV_SECT_SIZE:
+
+         Define the SPI flash's sector size.
+
+       - CONFIG_ENV_OFFSET_REDUND (optional):
+
+         This setting describes a second storage area of CONFIG_ENV_SIZE
+         size used to hold a redundant copy of the environment data, so
+         that there is a valid backup copy in case there is a power failure
+         during a "saveenv" operation. CONFIG_ENV_OFFSET_RENDUND must be
+         aligned to an erase sector boundary.
+
+       - CONFIG_ENV_SPI_BUS (optional):
+       - CONFIG_ENV_SPI_CS (optional):
+
+         Define the SPI bus and chip select. If not defined they will be 0.
+
+       - CONFIG_ENV_SPI_MAX_HZ (optional):
+
+         Define the SPI max work clock. If not defined then use 1MHz.
+
+       - CONFIG_ENV_SPI_MODE (optional):
+
+         Define the SPI work mode. If not defined then use SPI_MODE_3.
+
 - CONFIG_ENV_IS_IN_REMOTE:
 
        Define this if you have a remote memory space which you
@@ -4156,6 +4213,37 @@ but it can not erase, write this NOR flash by SRIO or PCIE interface.
          You will probably want to define these to avoid a really noisy system
          when storing the env in UBI.
 
+- CONFIG_ENV_IS_IN_FAT:
+       Define this if you want to use the FAT file system for the environment.
+
+       - FAT_ENV_INTERFACE:
+
+         Define this to a string that is the name of the block device.
+
+       - FAT_ENV_DEV_AND_PART:
+
+         Define this to a string to specify the partition of the device. It can
+         be as following:
+
+           "D:P", "D:0", "D", "D:" or "D:auto" (D, P are integers. And P >= 1)
+               - "D:P": device D partition P. Error occurs if device D has no
+                        partition table.
+               - "D:0": device D.
+               - "D" or "D:": device D partition 1 if device D has partition
+                              table, or the whole device D if has no partition
+                              table.
+               - "D:auto": first partition in device D with bootable flag set.
+                           If none, first valid paratition in device D. If no
+                           partition table then means device D.
+
+       - FAT_ENV_FILE:
+
+         It's a string of the FAT file name. This file use to store the
+         envrionment.
+
+       - CONFIG_FAT_WRITE:
+         This should be defined. Otherwise it cannot save the envrionment file.
+
 - CONFIG_ENV_IS_IN_MMC:
 
        Define this if you have an MMC device which you want to use for the
index 66ecc2ee4d16d4476616204212ec7b352f3a0422..5fa182536d78c233a9bdac17034c183062e92ee3 100644 (file)
@@ -116,6 +116,10 @@ else
 OBJCOPYFLAGS += -j .text -j .rodata -j .hash -j .data -j .got.plt -j .u_boot_list -j .rel.dyn
 endif
 
+ifdef CONFIG_OF_EMBED
+OBJCOPYFLAGS += -j .dtb.init.rodata
+endif
+
 ifneq ($(CONFIG_IMX_CONFIG),)
 ifdef CONFIG_SPL
 ifndef CONFIG_SPL_BUILD
index bbe9d1a8deaabaf3020b7c240f5cac60501d57e0..fc66872a3179257cb23d8083672f17a174a7df31 100644 (file)
@@ -94,6 +94,18 @@ void config_sdram_emif4d5(const struct emif_regs *regs, int nr)
        writel(regs->emif_rd_wr_exec_thresh,
               &emif_reg[nr]->emif_rd_wr_exec_thresh);
 
+       /*
+        * for most SOCs these registers won't need to be changed so only
+        * write to these registers if someone explicitly has set the
+        * register's value.
+        */
+       if(regs->emif_cos_config) {
+               writel(regs->emif_prio_class_serv_map, &emif_reg[nr]->emif_prio_class_serv_map);
+               writel(regs->emif_connect_id_serv_1_map, &emif_reg[nr]->emif_connect_id_serv_1_map);
+               writel(regs->emif_connect_id_serv_2_map, &emif_reg[nr]->emif_connect_id_serv_2_map);
+               writel(regs->emif_cos_config, &emif_reg[nr]->emif_cos_config);
+       }
+
        writel(regs->ref_ctrl, &emif_reg[nr]->emif_sdram_ref_ctrl);
        writel(regs->ref_ctrl, &emif_reg[nr]->emif_sdram_ref_ctrl_shdw);
        writel(regs->sdram_config, &emif_reg[nr]->emif_sdram_config);
index a7a3e88cd75b3d31f63311f3beebb175f2ea838f..8b7527c5b400a0c574f6ad0d47bfb7743b2ac31d 100644 (file)
@@ -115,7 +115,7 @@ void config_ddr(unsigned int pll, const struct ctrl_ioregs *ioregs,
 #endif
 #ifdef CONFIG_AM43XX
        writel(readl(&cm_device->cm_dll_ctrl) & ~0x1, &cm_device->cm_dll_ctrl);
-       while ((readl(&cm_device->cm_dll_ctrl) && CM_DLL_READYST) == 0)
+       while ((readl(&cm_device->cm_dll_ctrl) & CM_DLL_READYST) == 0)
                ;
        writel(0x80000000, &ddrctrl->ddrioctrl);
 
index aa10fab4dd8be99b936eaaf90066340ce98ac0db..8dd69b3c80ee3022cb657720f217b3aaf8eb4568 100644 (file)
@@ -489,6 +489,12 @@ struct ctrl_stat {
 #define OMAP_GPIO_SETDATAOUT           0x0194
 
 /* Control Device Register */
+
+ /* Control Device Register */
+#define MREQPRIO_0_SAB_INIT1_MASK      0xFFFFFF8F
+#define MREQPRIO_0_SAB_INIT0_MASK      0xFFFFFFF8
+#define MREQPRIO_1_DSS_MASK            0xFFFFFF8F
+
 struct ctrl_dev {
        unsigned int deviceid;          /* offset 0x00 */
        unsigned int resv1[7];
@@ -502,10 +508,25 @@ struct ctrl_dev {
        unsigned int macid1h;           /* offset 0x3c */
        unsigned int resv4[4];
        unsigned int miisel;            /* offset 0x50 */
-       unsigned int resv5[106];
+       unsigned int resv5[7];
+       unsigned int mreqprio_0;        /* offset 0x70 */
+       unsigned int mreqprio_1;        /* offset 0x74 */
+       unsigned int resv6[97];
        unsigned int efuse_sma;         /* offset 0x1FC */
 };
 
+/* Bandwidth Limiter Portion of the L3Fast Configuration Register */
+#define BW_LIMITER_BW_FRAC_MASK         0xFFFFFFE0
+#define BW_LIMITER_BW_INT_MASK          0xFFFFFFF0
+#define BW_LIMITER_BW_WATERMARK_MASK    0xFFFFF800
+
+struct l3f_cfg_bwlimiter {
+       u32 padding0[2];
+       u32 modena_init0_bw_fractional;
+       u32 modena_init0_bw_integer;
+       u32 modena_init0_watermark_0;
+};
+
 /* gmii_sel register defines */
 #define GMII1_SEL_MII          0x0
 #define GMII1_SEL_RMII         0x1
index 15399dcc747df4742510ef6a2e9006d604b62b67..b4703192499018bb4a184ab125d97a2a1c822c17 100644 (file)
@@ -13,6 +13,9 @@
 
 /* Module base addresses */
 
+/* L3 Fast Configuration Bandwidth Limiter Base Address */
+#define L3F_CFG_BWLIMITER              0x44005200
+
 /* UART Base Address */
 #define UART0_BASE                     0x44E09000
 
index 0855d16ce54a8c1fe8197d4f22e15fc0765aebd6..e5c0b0d08ff9ecd1ec1689234de428be26c1fc79 100644 (file)
@@ -29,6 +29,8 @@
 #define SRAM_SCRATCH_SPACE_ADDR        0x40337C00
 #define AM4372_BOARD_NAME_START        SRAM_SCRATCH_SPACE_ADDR
 #define AM4372_BOARD_NAME_END  SRAM_SCRATCH_SPACE_ADDR + 0xC
+#define AM4372_BOARD_VERSION_START     SRAM_SCRATCH_SPACE_ADDR + 0xD
+#define AM4372_BOARD_VERSION_END       SRAM_SCRATCH_SPACE_ADDR + 0x14
 #define QSPI_BASE              0x47900000
 #endif
 #endif
index 45668ca4dd737f7f0533f8bb363400dbf9f6e57d..b8d6bdca9b13ead9143d2758b0d9f1456845d523 100644 (file)
@@ -642,11 +642,16 @@ struct emif_reg_struct {
        u32 emif_ddr_phy_ctrl_1;
        u32 emif_ddr_phy_ctrl_1_shdw;
        u32 emif_ddr_phy_ctrl_2;
-       u32 padding7[12];
+       u32 padding7[4];
+       u32 emif_prio_class_serv_map;
+       u32 emif_connect_id_serv_1_map;
+       u32 emif_connect_id_serv_2_map;
+       u32 padding8[5];
        u32 emif_rd_wr_exec_thresh;
-       u32 padding8[7];
+       u32 emif_cos_config;
+       u32 padding9[6];
        u32 emif_ddr_phy_status[21];
-       u32 padding9[27];
+       u32 padding10[27];
        u32 emif_ddr_ext_phy_ctrl_1;
        u32 emif_ddr_ext_phy_ctrl_1_shdw;
        u32 emif_ddr_ext_phy_ctrl_2;
@@ -1137,6 +1142,10 @@ struct emif_regs {
        u32 emif_rd_wr_lvl_rmp_ctl;
        u32 emif_rd_wr_lvl_ctl;
        u32 emif_rd_wr_exec_thresh;
+       u32 emif_prio_class_serv_map;
+       u32 emif_connect_id_serv_1_map;
+       u32 emif_connect_id_serv_2_map;
+       u32 emif_cos_config;
 };
 
 struct lpddr2_mr_regs {
index d0fd537d88d0bb913c841b4eba68e011960b351d..2d8b293c3ea50825203ff7688985be6bb79b0d35 100644 (file)
@@ -9,9 +9,6 @@
 #ifndef __ASM_BLACKFIN_CONFIG_PRE_H__
 #define __ASM_BLACKFIN_CONFIG_PRE_H__
 
-/* Misc helper functions */
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
-
 /* Bootmode defines -- your config needs to select this via CONFIG_BFIN_BOOT_MODE.
  * Depending on your cpu, some of these may not be valid, check your HRM.
  * The actual values here are meaningless as long as they're unique.
index 0a321a448f4abda2faf9c727db50dec607fbb682..e8a0cb5deb2c15458f73054f8beb968d164d1125 100644 (file)
@@ -111,3 +111,13 @@ int dcache_status(void)
 {
        return bfin_read_DMEM_CONTROL() & ACACHE_BCACHE;
 }
+
+void invalidate_dcache_range(unsigned long start, unsigned long stop)
+{
+       blackfin_dcache_flush_invalidate_range((const void *)start, (const void *)stop);
+}
+
+void flush_dcache_range(unsigned long start, unsigned long stop)
+{
+       blackfin_dcache_flush_range((const void *)start, (const void *)stop);
+}
index 5a789540fc93bb4aaf069f2a55fa7689e827f7d1..af1fd560688ed24430356580e9aa3c261e4c4c33 100644 (file)
 #include <asm/fec.h>
 #endif
 
+/* The registers in fbcs_t struct can be 16-bit for CONFIG_M5235 or 32-bit wide otherwise. */
+#ifdef CONFIG_M5235
+#define out_be_fbcs_reg                out_be16
+#else
+#define out_be_fbcs_reg                out_be32
+#endif
+
 /*
  * Breath some life into the CPU...
  *
@@ -45,57 +52,57 @@ void cpu_init_f(void)
        out_8(&gpio->par_cs, 0);
 
 #if (defined(CONFIG_SYS_CS0_BASE) && defined(CONFIG_SYS_CS0_MASK) && defined(CONFIG_SYS_CS0_CTRL))
-       out_be32(&fbcs->csar0, CONFIG_SYS_CS0_BASE);
-       out_be32(&fbcs->cscr0, CONFIG_SYS_CS0_CTRL);
+       out_be_fbcs_reg(&fbcs->csar0, CONFIG_SYS_CS0_BASE);
+       out_be_fbcs_reg(&fbcs->cscr0, CONFIG_SYS_CS0_CTRL);
        out_be32(&fbcs->csmr0, CONFIG_SYS_CS0_MASK);
 #endif
 
 #if (defined(CONFIG_SYS_CS1_BASE) && defined(CONFIG_SYS_CS1_MASK) && defined(CONFIG_SYS_CS1_CTRL))
        setbits_8(&gpio->par_cs, GPIO_PAR_CS_CS1);
-       out_be32(&fbcs->csar1, CONFIG_SYS_CS1_BASE);
-       out_be32(&fbcs->cscr1, CONFIG_SYS_CS1_CTRL);
+       out_be_fbcs_reg(&fbcs->csar1, CONFIG_SYS_CS1_BASE);
+       out_be_fbcs_reg(&fbcs->cscr1, CONFIG_SYS_CS1_CTRL);
        out_be32(&fbcs->csmr1, CONFIG_SYS_CS1_MASK);
 #endif
 
 #if (defined(CONFIG_SYS_CS2_BASE) && defined(CONFIG_SYS_CS2_MASK) && defined(CONFIG_SYS_CS2_CTRL))
        setbits_8(&gpio->par_cs, GPIO_PAR_CS_CS2);
-       out_be32(&fbcs->csar2, CONFIG_SYS_CS2_BASE);
-       out_be32(&fbcs->cscr2, CONFIG_SYS_CS2_CTRL);
+       out_be_fbcs_reg(&fbcs->csar2, CONFIG_SYS_CS2_BASE);
+       out_be_fbcs_reg(&fbcs->cscr2, CONFIG_SYS_CS2_CTRL);
        out_be32(&fbcs->csmr2, CONFIG_SYS_CS2_MASK);
 #endif
 
 #if (defined(CONFIG_SYS_CS3_BASE) && defined(CONFIG_SYS_CS3_MASK) && defined(CONFIG_SYS_CS3_CTRL))
        setbits_8(&gpio->par_cs, GPIO_PAR_CS_CS3);
-       out_be32(&fbcs->csar3, CONFIG_SYS_CS3_BASE);
-       out_be32(&fbcs->cscr3, CONFIG_SYS_CS3_CTRL);
+       out_be_fbcs_reg(&fbcs->csar3, CONFIG_SYS_CS3_BASE);
+       out_be_fbcs_reg(&fbcs->cscr3, CONFIG_SYS_CS3_CTRL);
        out_be32(&fbcs->csmr3, CONFIG_SYS_CS3_MASK);
 #endif
 
 #if (defined(CONFIG_SYS_CS4_BASE) && defined(CONFIG_SYS_CS4_MASK) && defined(CONFIG_SYS_CS4_CTRL))
        setbits_8(&gpio->par_cs, GPIO_PAR_CS_CS4);
-       out_be32(&fbcs->csar4, CONFIG_SYS_CS4_BASE);
-       out_be32(&fbcs->cscr4, CONFIG_SYS_CS4_CTRL);
+       out_be_fbcs_reg(&fbcs->csar4, CONFIG_SYS_CS4_BASE);
+       out_be_fbcs_reg(&fbcs->cscr4, CONFIG_SYS_CS4_CTRL);
        out_be32(&fbcs->csmr4, CONFIG_SYS_CS4_MASK);
 #endif
 
 #if (defined(CONFIG_SYS_CS5_BASE) && defined(CONFIG_SYS_CS5_MASK) && defined(CONFIG_SYS_CS5_CTRL))
        setbits_8(&gpio->par_cs, GPIO_PAR_CS_CS5);
-       out_be32(&fbcs->csar5, CONFIG_SYS_CS5_BASE);
-       out_be32(&fbcs->cscr5, CONFIG_SYS_CS5_CTRL);
+       out_be_fbcs_reg(&fbcs->csar5, CONFIG_SYS_CS5_BASE);
+       out_be_fbcs_reg(&fbcs->cscr5, CONFIG_SYS_CS5_CTRL);
        out_be32(&fbcs->csmr5, CONFIG_SYS_CS5_MASK);
 #endif
 
 #if (defined(CONFIG_SYS_CS6_BASE) && defined(CONFIG_SYS_CS6_MASK) && defined(CONFIG_SYS_CS6_CTRL))
        setbits_8(&gpio->par_cs, GPIO_PAR_CS_CS6);
-       out_be32(&fbcs->csar6, CONFIG_SYS_CS6_BASE);
-       out_be32(&fbcs->cscr6, CONFIG_SYS_CS6_CTRL);
+       out_be_fbcs_reg(&fbcs->csar6, CONFIG_SYS_CS6_BASE);
+       out_be_fbcs_reg(&fbcs->cscr6, CONFIG_SYS_CS6_CTRL);
        out_be32(&fbcs->csmr6, CONFIG_SYS_CS6_MASK);
 #endif
 
 #if (defined(CONFIG_SYS_CS7_BASE) && defined(CONFIG_SYS_CS7_MASK) && defined(CONFIG_SYS_CS7_CTRL))
        setbits_8(&gpio->par_cs, GPIO_PAR_CS_CS7);
-       out_be32(&fbcs->csar7, CONFIG_SYS_CS7_BASE);
-       out_be32(&fbcs->cscr7, CONFIG_SYS_CS7_CTRL);
+       out_be_fbcs_reg(&fbcs->csar7, CONFIG_SYS_CS7_BASE);
+       out_be_fbcs_reg(&fbcs->cscr7, CONFIG_SYS_CS7_CTRL);
        out_be32(&fbcs->csmr7, CONFIG_SYS_CS7_MASK);
 #endif
 
index 07a9b359b5f9f76bd014a86ebf88e54ed9c68b37..4e363a419004bf12a54b457369e42a645a110cbd 100644 (file)
@@ -115,7 +115,7 @@ void setup_5441x_clocks(void)
        gd->cpu_clk = vco / temp;       /* cpu clock */
        gd->arch.flb_clk = vco / temp;  /* FlexBus clock */
        gd->arch.flb_clk >>= 1;
-       if (in_be16(ccm->misccr2) & 2)          /* fsys/4 */
+       if (in_be16(&ccm->misccr2) & 2)         /* fsys/4 */
                gd->arch.flb_clk >>= 1;
 
        temp = ((pdr & PLL_DR_OUTDIV2_BITS) >> 5) + 1;
index b1fb062a08f8db7b9b18a8b54ea033473ac2df06..55238df45628829ecdf474ffa5a41b98e6e1c77c 100644 (file)
@@ -56,9 +56,6 @@
        GOT_ENTRY(__init_end)
        GOT_ENTRY(__bss_end)
        GOT_ENTRY(__bss_start)
-#if defined(CONFIG_FADS)
-       GOT_ENTRY(environment)
-#endif
        END_GOT
 
 /*
index 5c96b5fe16e7e6bd2d4e0d9b9190c5c31a13fd7a..eb4432f6d7798be8d7b7ad5daae78810a3181ec6 100644 (file)
@@ -97,14 +97,8 @@ static int check_CPU (long clock, uint pvr, uint immr)
                pre = 'M'; m = 1;
                if (id_str == NULL)
                        id_str =
-# if defined(CONFIG_MPC852T)
-               "PC852T";
-# elif defined(CONFIG_MPC859T)
+# if defined(CONFIG_MPC859T)
                "PC859T";
-# elif defined(CONFIG_MPC859DSL)
-               "PC859DSL";
-# elif defined(CONFIG_MPC866T)
-               "PC866T";
 # else
                "PC866x"; /* Unknown chip from MPC866 family */
 # endif
index 9c3102dc69f2e93286ce102ff0108adbcb01f205..e51fec7260a263862067a4948ade95d79223e578 100644 (file)
@@ -138,8 +138,6 @@ void cpu_init_f (volatile immap_t * immr)
     defined(CONFIG_MHPC)       || \
     defined(CONFIG_R360MPI)    || \
     defined(CONFIG_RMU)                || \
-    defined(CONFIG_RPXLITE)    || \
-    defined(CONFIG_SPC1920)    || \
     defined(CONFIG_SPD823TS)
 
        memctl->memc_br0 = CONFIG_SYS_BR0_PRELIM;
@@ -206,10 +204,6 @@ void cpu_init_f (volatile immap_t * immr)
                __asm__ ("eieio");
        } while (immr->im_cpm.cp_cpcr & CPM_CR_FLG);
 
-#if defined(CONFIG_RPXLITE) && defined(CONFIG_ENV_IS_IN_NVRAM)
-       rpxlite_init ();
-#endif
-
 #ifdef CONFIG_SYS_RCCR                 /* must be done before cpm_load_patch() */
        /* write config value */
        immr->im_cpm.cp_rccr = CONFIG_SYS_RCCR;
index 65dfeabba438f82ce25e4716a7cecf200704bdf8..d12b3df4a15ad985da1b666d714dbcc6c893417e 100644 (file)
@@ -377,26 +377,6 @@ static void fec_pin_init(int fecidx)
         */
        immr->im_cpm.cp_fec1.fec_mii_speed = ((bd->bi_intfreq + 4999999) / 5000000) << 1;
 
-#if defined(CONFIG_NETTA) || defined(CONFIG_NETPHONE) || defined(CONFIG_NETTA2)
-       {
-               volatile fec_t *fecp;
-
-               /*
-                * only two FECs please
-                */
-               if ((unsigned int)fecidx >= 2)
-                       hang();
-
-               if (fecidx == 0)
-                       fecp = &immr->im_cpm.cp_fec1;
-               else
-                       fecp = &immr->im_cpm.cp_fec2;
-
-               /* our PHYs are the limit at 2.5 MHz */
-               fecp->fec_mii_speed <<= 1;
-       }
-#endif
-
 #if defined(CONFIG_MPC885_FAMILY) && defined(WANT_MII)
        /* use MDC for MII */
        immr->im_ioport.iop_pdpar |=  0x0080;
@@ -562,32 +542,6 @@ static int fec_init (struct eth_device *dev, bd_t * bd)
                (volatile fec_t *) (CONFIG_SYS_IMMR + efis->fecp_offset);
        int i;
 
-       if (efis->ether_index == 0) {
-#if defined(CONFIG_FADS)       /* FADS family uses FPGA (BCSR) to control PHYs */
-#if defined(CONFIG_MPC885ADS)
-               *(vu_char *) BCSR5 &= ~(BCSR5_MII1_EN | BCSR5_MII1_RST);
-#else
-               /* configure FADS for fast (FEC) ethernet, half-duplex */
-               /* The LXT970 needs about 50ms to recover from reset, so
-                * wait for it by discovering the PHY before leaving eth_init().
-                */
-               {
-                       volatile uint *bcsr4 = (volatile uint *) BCSR4;
-
-                       *bcsr4 = (*bcsr4 & ~(BCSR4_FETH_EN | BCSR4_FETHCFG1))
-                               | (BCSR4_FETHCFG0 | BCSR4_FETHFDE |
-                                  BCSR4_FETHRST);
-
-                       /* reset the LXT970 PHY */
-                       *bcsr4 &= ~BCSR4_FETHRST;
-                       udelay (10);
-                       *bcsr4 |= BCSR4_FETHRST;
-                       udelay (10);
-               }
-#endif /* CONFIG_MPC885ADS */
-#endif /* CONFIG_FADS */
-       }
-
 #if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
        /* the MII interface is connected to FEC1
         * so for the miiphy_xxx function to work we must
index 5da697366de23f0c9fd040d88ad4d94f514774ed..01029ff68a236c537f1f2b72ba740a5d3102c38a 100644 (file)
@@ -197,19 +197,6 @@ static int scc_init (struct eth_device *dev, bd_t * bis)
        reset_phy();
 #endif
 
-#ifdef CONFIG_FADS
-#if defined(CONFIG_MPC86xADS) || defined(CONFIG_MPC860T)
-       /* The MPC86xADS/FADS860T don't use the MODEM_EN or DATA_VOICE signals. */
-       *((uint *) BCSR4) &= ~BCSR4_ETHLOOP;
-       *((uint *) BCSR4) |= BCSR4_TFPLDL | BCSR4_TPSQEL;
-       *((uint *) BCSR1) &= ~BCSR1_ETHEN;
-#else
-       *((uint *) BCSR4) &= ~(BCSR4_ETHLOOP | BCSR4_MODEM_EN);
-       *((uint *) BCSR4) |= BCSR4_TFPLDL | BCSR4_TPSQEL | BCSR4_DATA_VOICE;
-       *((uint *) BCSR1) &= ~BCSR1_ETHEN;
-#endif
-#endif
-
        pram_ptr = (scc_enet_t *) & (immr->im_cpm.cp_dparam[PROFF_ENET]);
 
        rxIdx = 0;
@@ -461,20 +448,6 @@ static int scc_init (struct eth_device *dev, bd_t * bis)
 #error Configuration Error: exactly ONE of PB_ENET_TENA, PC_ENET_TENA must be defined
 #endif
 
-#ifdef CONFIG_RPXLITE
-       *((uchar *) BCSR0) |= BCSR0_ETHEN;
-#endif
-
-#if defined(CONFIG_QS860T)
-       /*
-        * PB27=FDE-, set output low for full duplex
-        * PB26=Link Test Enable, normally high output
-        */
-       immr->im_cpm.cp_pbdir |= 0x00000030;
-       immr->im_cpm.cp_pbdat |= 0x00000020;
-       immr->im_cpm.cp_pbdat &= ~0x00000010;
-#endif /* QS860T */
-
 #if defined(CONFIG_NETVIA)
 #if defined(PA_ENET_PDN)
        immr->im_ioport.iop_papar &= ~PA_ENET_PDN;
@@ -502,13 +475,6 @@ static int scc_init (struct eth_device *dev, bd_t * bis)
        immr->im_cpm.cp_scc[SCC_ENET].scc_gsmrl |=
                (SCC_GSMRL_ENR | SCC_GSMRL_ENT);
 
-       /*
-        * Work around transmit problem with first eth packet
-        */
-#if defined (CONFIG_FADS)
-       udelay (10000);         /* wait 10 ms */
-#endif
-
        return 1;
 }
 
index 932141144ce2e5a297b93a7d6edce43e1f9bb664..b1625fba16bdb5ff39bcf410ebc2aacc28c7efe7 100644 (file)
@@ -173,20 +173,6 @@ static int smc_init (void)
 # endif
 #endif
 
-#if defined(CONFIG_FADS)
-       /* Enable RS232 */
-#if defined(CONFIG_8xx_CONS_SMC1)
-       *((uint *) BCSR1) &= ~BCSR1_RS232EN_1;
-#else
-       *((uint *) BCSR1) &= ~BCSR1_RS232EN_2;
-#endif
-#endif /* CONFIG_FADS */
-
-#if defined(CONFIG_RPXLITE)
-       /* Enable Monitor Port Transceiver */
-       *((uchar *) BCSR0) |= BCSR0_ENMONXCVR ;
-#endif /* CONFIG_RPXLITE */
-
        /* Set the physical address of the host memory buffers in
         * the buffer descriptors.
         */
index fc351585bef8c989fe717205260fdea4febd24bd..2fd5b11fe409a64b5d7fc0ea9632f3e84ae3cd73 100644 (file)
@@ -798,22 +798,6 @@ static void video_encoder_init (void)
        i2c_init (CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
 #endif
 
-#ifdef CONFIG_FADS
-       /* Reset ADV7176 chip */
-       debug ("[VIDEO ENCODER] Resetting encoder...\n");
-       (*(int *) BCSR4) &= ~(1 << 21);
-
-       /* Wait for 5 ms inside the reset */
-       debug ("[VIDEO ENCODER] Waiting for encoder reset...\n");
-       udelay (5000);
-
-       /* Take ADV7176 out of reset */
-       (*(int *) BCSR4) |= 1 << 21;
-
-       /* Wait for 5 ms after the reset */
-       udelay (5000);
-#endif /* CONFIG_FADS */
-
        /* Send configuration */
 #ifdef DEBUG
        {
@@ -860,16 +844,6 @@ static void video_ctrl_init (void *memptr)
        debug ("[VIDEO CTRL] Turning off video controller...\n");
        SETBIT (immap->im_vid.vid_vccr, VIDEO_VCCR_VON, 0);
 
-#ifdef CONFIG_FADS
-       /* Turn on Video Port LED */
-       debug ("[VIDEO CTRL] Turning off video port led...\n");
-       SETBIT (*(int *) BCSR4, VIDEO_BCSR4_VIDLED_BIT, 1);
-
-       /* Disable internal clock */
-       debug ("[VIDEO CTRL] Disabling internal clock...\n");
-       SETBIT (*(int *) BCSR4, VIDEO_BCSR4_EXTCLK_BIT, 0);
-#endif
-
        /* Generate and make active a new video mode */
        debug ("[VIDEO CTRL] Generating video mode...\n");
        video_mode_generate ();
@@ -892,15 +866,6 @@ static void video_ctrl_init (void *memptr)
        immap->im_ioport.iop_pdpar = 0x1fff;
        immap->im_ioport.iop_pddir = 0x0000;
 
-#ifdef CONFIG_FADS
-       /* Turn on Video Port Clock - ONLY AFTER SET VCCR TO ENABLE EXTERNAL CLOCK */
-       debug ("[VIDEO CTRL] Turning on video clock...\n");
-       SETBIT (*(int *) BCSR4, VIDEO_BCSR4_EXTCLK_BIT, 1);
-
-       /* Turn on Video Port LED */
-       debug ("[VIDEO CTRL] Turning on video port led...\n");
-       SETBIT (*(int *) BCSR4, VIDEO_BCSR4_VIDLED_BIT, 0);
-#endif
 #ifdef CONFIG_RRVISION
        debug ("PC5->Output(1): enable PAL clock");
        immap->im_ioport.iop_pcpar &= ~(0x0400);
@@ -1153,9 +1118,7 @@ static void *video_logo (void)
 {
        u16 *screen = video_fb_address, width = VIDEO_COLS;
 #ifdef VIDEO_INFO
-# ifndef CONFIG_FADS
        char temp[32];
-# endif
        char info[80];
 #endif /* VIDEO_INFO */
 
@@ -1173,7 +1136,7 @@ static void *video_logo (void)
        sprintf (info, "    Wolfgang DENK, wd@denx.de");
        video_drawstring (VIDEO_INFO_X, VIDEO_INFO_Y + VIDEO_FONT_HEIGHT * 2,
                                        info);
-#ifndef CONFIG_FADS            /* all normal boards */
+
        /* leave one blank line */
 
        sprintf(info, "MPC823 CPU at %s MHz, %ld MiB RAM, %ld MiB Flash",
@@ -1182,15 +1145,6 @@ static void *video_logo (void)
                gd->bd->bi_flashsize >> 20 );
        video_drawstring (VIDEO_INFO_X, VIDEO_INFO_Y + VIDEO_FONT_HEIGHT * 4,
                                        info);
-#else                          /* FADS :-( */
-       sprintf (info, "MPC823 CPU at 50 MHz on FADS823 board");
-       video_drawstring (VIDEO_INFO_X, VIDEO_INFO_Y + VIDEO_FONT_HEIGHT,
-                                         info);
-
-       sprintf(info, "2MiB FLASH - 8MiB DRAM - 4MiB SRAM");
-       video_drawstring (VIDEO_INFO_X, VIDEO_INFO_Y + VIDEO_FONT_HEIGHT * 2,
-                                         info);
-#endif
 #endif
 
        return video_fb_address + VIDEO_LOGO_HEIGHT * VIDEO_LINE_LEN;
index 7e077d5a9f28a5216219d79ab6adfc0dd5e69466..4baee7774c50a976aadb4f38b2ee0a2798d91c15 100644 (file)
@@ -19,8 +19,6 @@ DECLARE_GLOBAL_DATA_PTR;
 #define DEBUGF(fmt,args...)
 #endif
 
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
-
 #if defined(CONFIG_405GP)
 
 void get_sys_info (PPC4xx_SYS_INFO * sysInfo)
diff --git a/board/RPXlite_dw/Makefile b/board/RPXlite_dw/Makefile
deleted file mode 100644 (file)
index eff33cf..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# (C) Copyright 2000-2006
-# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
-
-obj-y  = RPXlite_dw.o flash.o
diff --git a/board/RPXlite_dw/README b/board/RPXlite_dw/README
deleted file mode 100644 (file)
index 9e2d0f4..0000000
+++ /dev/null
@@ -1,161 +0,0 @@
-
-After following the step of Yoo. Jonghoon and Wolfgang Denk,
-I ported u-boot on RPXlite DW version board: RPXlite_DW or LITE_DW.
-
-There are at least three differences between the Yoo-ported RPXlite and the RPXlite_DW.
-
-Board(in U-Boot)       version(in EmbeddedPlanet)      CPU     SDRAM   FLASH
-RPXlite                                RPXlite CW              850     16MB    4MB
-RPXlite_DW             RPXlite DW(EP 823 H1 DW)        823e    64MB    16MB
-
-This fireware is specially coded for EmbeddedPlanet Co. Software Development
-Platform(RPXlite DW),which has a NEC NL6448BC20-08 LCD panel.
-
-It has the following three features:
-
-1. 64MHz/48MHz system frequence setting options.
-The default setting is 48MHz.To get a 64MHz u-boot,just add
-'64' in make command,like
-
-make distclean
-make RPXlite_DW_64_config
-make all
-
-2. CONFIG_ENV_IS_IN_FLASH/CONFIG_ENV_IS_IN_NVRAM
-
-The default environment parameter is stored in FLASH because it is a common choice for
-environment parameter.So I make NVRAM as backup parameter storeage.The reason why I
-didn't use EEPROM for ENV is that PlanetCore V2.0 use EEPROM as environment parameter
-home.Because of the possibility of using two firewares on this board,I didn't
-'disturb' EEPROM.To get NVRAM support,you may use the following build command:
-
-make distclean
-make RPXlite_DW_NVRAM_config
-make all
-
-3. LCD panel support
-
-To support the Platform better,I added LCD panel(NL6448BC20-08) function.
-For the convenience of debug, CONFIG_PERBOOT was supported. So you just
-perss ENTER if you want to get a serial console in boot downcounting.
-Then you can switch to LCD and serial console freely just typing
-'run lcd' or 'run ser'. They are only vaild when CONFIG_LCD was enabled.
-
-To get a LCD support u-boot,you can do the following:
-
-make distclean
-make RPXlite_DW_LCD_config
-make all
-
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-The basic make commands could be:
-
-make RPXlite_DW_config
-make RPXlite_DW_64_config
-make RPXlite_DW_LCD_config
-make RPXlite_DW_NVRAM_config
-
-BTW,you can combine the above features together and get a workable u-boot to meet your need.
-For example,to get a 64MHZ && ENV_IS_IN_FLASH && LCD panel support u-boot,you can type:
-
-make RPXlite_DW_NVRAM_64_LCD_config
-make all
-
-So other combining make commands could be:
-
-make RPXlite_DW_NVRAM_64_config
-make RPXlite_DW_NVRAM_LCD_config
-make RPXlite_DW_64_LCD_config
-
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-The boot process by "make RPXlite_DW_config" could be:
-
-U-Boot 1.1.2 (Aug 29 2004 - 15:11:27)
-
-CPU:   PPC823EZTnnB2 at 48 MHz: 16 kB I-Cache 8 kB D-Cache
-Board: RPXlite_DW
-DRAM:  64 MB
-FLASH: 16 MB
-*** Warning - bad CRC, using default environment
-
-In:    serial
-Out:   serial
-Err:   serial
-Net:   SCC ETHERNET
-u-boot>
-
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-A word on the U-Boot environment variable setting and usage :
-
-In the beginning, you could just need very simple default environment variable setting,
-like[include/configs/RPXlite.h] :
-
-#define CONFIG_BOOTCOMMAND                                                      \
-       "bootp; "                                                               \
-       "setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} "     \
-       "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; "   \
-       "bootm"
-
-This is enough for kernel NFS test. But as debug process goes on, you would expect
-to save some time on environment variable setting and u-boot/kernel updating.
-So the default environment variable setting would become more complicated. Just like
-the one I did in include/configs/RPXlite_DW.h.
-
-Two u-boot commands, ku and uu, should be careful to use. They were designed to update
-kernel and u-boot image file respectively. You must tftp your image to default address
-'100000' and then use them correctly. Yeah, you can create your own command to do this
-job. :-) The example u-boot image updating process could be :
-
-u-boot>t 100000 RPXlite_DW_LCD.bin
-Using SCC ETHERNET device
-TFTP from server 172.16.115.6; our IP address is 172.16.115.7
-Filename 'RPXlite_DW_LCD.bin'.
-Load address: 0x100000
-Loading: #############################
-done
-Bytes transferred = 144700 (2353c hex)
-u-boot>run uu
-Un-Protect Flash Sectors 0-4 in Bank # 1
-Erase Flash Sectors 0-4 in Bank # 1
-.... done
-Copy to Flash... done
-ff000000: 27051956 552d426f 6f742031 2e312e32    '..VU-Boot 1.1.2
-ff000010: 20284175 67203239 20323030 34202d20     (Aug 29 2004 -
-ff000020: 31353a32 303a3238 29000000 00000000    15:20:28).......
-ff000030: 00000000 00000000 00000000 00000000    ................
-ff000040: 00000000 00000000 00000000 00000000    ................
-ff000050: 00000000 00000000 00000000 00000000    ................
-ff000060: 00000000 00000000 00000000 00000000    ................
-ff000070: 00000000 00000000 00000000 00000000    ................
-ff000080: 00000000 00000000 00000000 00000000    ................
-ff000090: 00000000 00000000 00000000 00000000    ................
-ff0000a0: 00000000 00000000 00000000 00000000    ................
-ff0000b0: 00000000 00000000 00000000 00000000    ................
-ff0000c0: 00000000 00000000 00000000 00000000    ................
-ff0000d0: 00000000 00000000 00000000 00000000    ................
-ff0000e0: 00000000 00000000 00000000 00000000    ................
-ff0000f0: 00000000 00000000 00000000 00000000    ................
-u-boot updating finished
-u-boot>
-
-Also for environment updating, 'run eu' could let you erase OLD default environment variable
-and then use the working u-boot environment setting.
-
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Finally, if you want to keep the serial port to possible debug on spot for deployment, you
-just need to enable 'DEPLOYMENT' in RPXlite_DW.h as 'DEBUG' does. Only the special string
-defined by CONFIG_AUTOBOOT_STOP_STR like 'st' can stop the autoboot.
-
-I'd like to extend my heartfelt gratitute to kind people for helping me work it out.
-I would particually thank Wolfgang Denk for his nice help.
-
-Enjoy,
-
-Sam Song, samsongshu@yahoo.com.cn
-Institute of Electrical Machinery and Controls
-Shanghai University
-
-Oct. 11, 2004
diff --git a/board/RPXlite_dw/RPXlite_dw.c b/board/RPXlite_dw/RPXlite_dw.c
deleted file mode 100644 (file)
index 29d52de..0000000
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * (C) Copyright 2004
- * Sam Song, IEMC. SHU, samsongshu@yahoo.com.cn
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/*
- * Sam Song
- * U-Boot port on RPXlite DW board : RPXlite_DW or LITE_DW
- * Tested on working at 64MHz(CPU)/32MHz(BUS),48MHz/24MHz
- * with 64MB, 2 SDRAM Micron chips,MT48LC16M16A2-75.
- */
-
-#include <common.h>
-#include <mpc8xx.h>
-
-/* ------------------------------------------------------------------------- */
-static long int dram_size (long int, long int *, long int);
-/* ------------------------------------------------------------------------- */
-
-#define        _NOT_USED_      0xFFFFCC25
-
-const uint sdram_table[] =
-{
-       /*
-        * Single Read. (Offset 00h in UPMA RAM)
-        */
-       0x0F03CC04, 0x00ACCC24, 0x1FF74C20, /* last */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_,
-
-       /*
-        * Burst Read. (Offset 08h in UPMA RAM)
-        */
-       0x0F03CC04, 0x00ACCC24, 0x00FFCC20, 0x00FFCC20,
-       0x01FFCC20, 0x1FF74C20, /* last */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_,
-
-       /*
-        * Single Write. (Offset 18h in UPMA RAM)
-        */
-       0x0F03CC02, 0x00AC0C24, 0x1FF74C25, /* last */
-       _NOT_USED_, _NOT_USED_, 0x0FA00C34,0x0FFFCC35,
-       _NOT_USED_,
-
-       /*
-        * Burst Write. (Offset 20h in UPMA RAM)
-        */
-       0x0F03CC00, 0x00AC0C20, 0x00FFFC20, 0x00FFFC22,
-       0x01FFFC24, 0x1FF74C25, /* last */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_,
-
-       /*
-        * Refresh. (Offset 30h in UPMA RAM)
-        */
-       0x0FF0CC24, 0xFFFFCC24, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, 0xEFFB8C34, 0x0FF74C34,
-       0x0FFACCB4, 0x0FF5CC34, 0x0FFFCC34, 0x0FFFCCB4,
-       /* INIT sequence RAM WORDS
-        * SDRAM Initialization (offset 0x36 in UPMA RAM)
-        * The above definition uses the remaining space
-        * to establish an initialization sequence,
-        * which is executed by a RUN command.
-        * The sequence is COMMAND INHIBIT(NOP),Precharge,
-        * Load Mode Register,NOP,Auto Refresh.
-        */
-
-       /*
-        * Exception. (Offset 3Ch in UPMA RAM)
-        */
-       0x0FEA8C34, 0x1FB54C34, 0xFFFFCC34, _NOT_USED_
-};
-
-/*
- * Check Board Identity:
- */
-
-int checkboard (void)
-{
-       puts ("Board: RPXlite_DW\n") ;
-       return (0) ;
-}
-
-/* ------------------------------------------------------------------------- */
-
-phys_size_t initdram (int board_type)
-{
-       volatile immap_t     *immap  = (immap_t *)CONFIG_SYS_IMMR;
-       volatile memctl8xx_t *memctl = &immap->im_memctl;
-       long int size9;
-
-       upmconfig(UPMA, (uint *)sdram_table, sizeof(sdram_table)/sizeof(uint));
-
-       /* Refresh clock prescalar */
-       memctl->memc_mptpr = CONFIG_SYS_MPTPR ;
-
-       memctl->memc_mar  = 0x00000088;
-
-       /* Map controller banks 1 to the SDRAM bank */
-       memctl->memc_or1 = CONFIG_SYS_OR1_PRELIM;
-       memctl->memc_br1 = CONFIG_SYS_BR1_PRELIM;
-
-       memctl->memc_mamr = CONFIG_SYS_MAMR_9COL & (~(MAMR_PTAE)); /* no refresh yet */
-       /*Disable Periodic timer A. */
-
-       udelay(200);
-
-       /* perform SDRAM initializsation sequence */
-
-       memctl->memc_mcr  = 0x80002236; /* SDRAM bank 0 - refresh twice */
-
-       udelay(1);
-
-       memctl->memc_mamr |= MAMR_PTAE; /* enable refresh */
-
-       /*Enable Periodic timer A */
-
-       udelay (1000);
-
-        /* Check Bank 0 Memory Size
-         * try 9 column mode
-         */
-
-       size9 = dram_size (CONFIG_SYS_MAMR_9COL, SDRAM_BASE_PRELIM, SDRAM_MAX_SIZE);
-
-       /*
-        * Final mapping:
-        */
-
-       memctl->memc_or1 = ((-size9) & 0xFFFF0000) | CONFIG_SYS_OR_TIMING_SDRAM;
-
-       udelay (1000);
-
-       return (size9);
-}
-
-void rpxlite_init (void)
-{
-       /* Enable NVRAM */
-       *((uchar *) BCSR0) |= BCSR0_ENNVRAM;
-}
-
-/*
- * Check memory range for valid RAM. A simple memory test determines
- * the actually available RAM size between addresses `base' and
- * `base + maxsize'. Some (not all) hardware errors are detected:
- * - short between address lines
- * - short between data lines
- */
-static long int dram_size (long int mamr_value, long int *base,
-                          long int maxsize)
-{
-       volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
-       volatile memctl8xx_t *memctl = &immap->im_memctl;
-
-       memctl->memc_mamr = mamr_value;
-
-       return (get_ram_size (base, maxsize));
-}
diff --git a/board/RPXlite_dw/flash.c b/board/RPXlite_dw/flash.c
deleted file mode 100644 (file)
index c8de5ef..0000000
+++ /dev/null
@@ -1,474 +0,0 @@
-/*
- * (C) Copyright 2004
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/*
- * Yoo. Jonghoon, IPone, yooth@ipone.co.kr
- * U-Boot port on RPXlite board
- *
- * Some of flash control words are modified. (from 2x16bit device
- * to 4x8bit device)
- * RPXLite board I tested has only 4 AM29LV800BB devices. Other devices
- * are not tested.
- *
- * (?) Does an RPXLite board which
- *     does not use AM29LV800 flash memory exist ?
- *     I don't know...
- */
-
-/* Yes,Yoo.They do use other FLASH for the board.
- *
- * Sam Song, IEMC. SHU, samsongshu@yahoo.com.cn
- * U-Boot port on RPXlite DW version board
- *
- * By now,it uses 4 AM29DL323DB90VI devices(4x8bit).
- * The total FLASH has 16MB(4x4MB).
- * I just made some necessary changes on the basis of Wolfgang and Yoo's job.
- *
- * June 8, 2004 */
-
-#include <common.h>
-#include <mpc8xx.h>
-
-flash_info_t   flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH chips */
-
-/*-----------------------------------------------------------------------
- * Functions   vu_long : volatile unsigned long IN include/common.h
- */
-static ulong flash_get_size (vu_long *addr, flash_info_t *info);
-static int write_word (flash_info_t *info, ulong dest, ulong data);
-static void flash_get_offsets (ulong base, flash_info_t *info);
-
-unsigned long flash_init (void)
-{
-       unsigned long size_b0 ;
-       int i;
-
-       /* Init: no FLASHes known */
-       for (i=0; i<CONFIG_SYS_MAX_FLASH_BANKS; ++i) {
-               flash_info[i].flash_id = FLASH_UNKNOWN;
-       }
-
-       size_b0 = flash_get_size((vu_long *)CONFIG_SYS_FLASH_BASE, &flash_info[0]);
-       flash_get_offsets (CONFIG_SYS_FLASH_BASE, &flash_info[0]);
-
-#if CONFIG_SYS_MONITOR_BASE >= CONFIG_SYS_FLASH_BASE
-       /* If Monitor is in the cope of FLASH,then
-        * protect this area by default in case for
-        * other occupation. [SAM] */
-
-       /* monitor protection ON by default */
-       flash_protect(FLAG_PROTECT_SET,
-                     CONFIG_SYS_MONITOR_BASE,
-                     CONFIG_SYS_MONITOR_BASE+CONFIG_SYS_MONITOR_LEN-1,
-                     &flash_info[0]);
-#endif
-       flash_info[0].size = size_b0;
-       return (size_b0);
-}
-
-static void flash_get_offsets (ulong base, flash_info_t *info)
-{
-       int i;
-
-       /* set up sector start address table */
-       if (info->flash_id & FLASH_BTYPE) {
-               info->start[0] = base + 0x00000000;
-               info->start[1] = base + 0x00008000;
-               info->start[2] = base + 0x00010000;
-               info->start[3] = base + 0x00018000;
-               info->start[4] = base + 0x00020000;
-               info->start[5] = base + 0x00028000;
-               info->start[6] = base + 0x00030000;
-               info->start[7] = base + 0x00038000;
-
-               for (i = 8; i < info->sector_count; i++) {
-                       info->start[i] = base + ((i-7) * 0x00040000);
-               }
-       } else {
-               i = info->sector_count - 1;
-               info->start[i--] = base + info->size - 0x00010000;
-               info->start[i--] = base + info->size - 0x00018000;
-               info->start[i--] = base + info->size - 0x00020000;
-               for (; i >= 0; i--) {
-                       info->start[i] = base + i * 0x00040000;
-               }
-       }
-
-}
-
-void flash_print_info  (flash_info_t *info)
-{
-       int i;
-
-       if (info->flash_id == FLASH_UNKNOWN) {
-               printf ("missing or unknown FLASH type\n");
-               return;
-       }
-
-       switch (info->flash_id & FLASH_VENDMASK) {
-       case FLASH_MAN_AMD:     printf ("AMD ");                break;
-       case FLASH_MAN_FUJ:     printf ("FUJITSU ");            break;
-       default:                printf ("Unknown Vendor ");     break;
-       }
-
-       switch (info->flash_id & FLASH_TYPEMASK) {
-       case FLASH_AM400B:      printf ("AM29LV400B (4 Mbit, bottom boot sect)\n");
-                               break;
-       case FLASH_AM400T:      printf ("AM29LV400T (4 Mbit, top boot sector)\n");
-                               break;
-       case FLASH_AM800B:      printf ("AM29LV800B (8 Mbit, bottom boot sect)\n");
-                               break;
-       case FLASH_AM800T:      printf ("AM29LV800T (8 Mbit, top boot sector)\n");
-                               break;
-       case FLASH_AM160B:      printf ("AM29LV160B (16 Mbit, bottom boot sect)\n");
-                               break;
-       case FLASH_AM160T:      printf ("AM29LV160T (16 Mbit, top boot sector)\n");
-                               break;
-       case FLASH_AM320B:      printf ("AM29LV320B (32 Mbit, bottom boot sect)\n");
-                               break;
-       case FLASH_AM320T:      printf ("AM29LV320T (32 Mbit, top boot sector)\n");
-                               break;
-       case FLASH_AMDL323B:    printf ("AM29DL323B (32 Mbit, bottom boot sector)\n");
-                               break;
-       /* I just add the FLASH_AMDL323B for RPXlite_DW BOARD. [SAM]  */
-       default:                printf ("Unknown Chip Type\n");
-                               break;
-       }
-       printf ("  Size: %ld MB in %d Sectors\n",info->size >> 20, info->sector_count);
-       printf ("  Sector Start Addresses:");
-       for (i=0; i<info->sector_count; ++i) {
-               if ((i % 5) == 0)
-                       printf ("\n   ");
-               printf (" %08lX%s",info->start[i],info->protect[i] ? " (RO)" : "     ");
-       }
-       printf ("\n");
-       return;
-}
-
-static ulong flash_get_size (vu_long *addr, flash_info_t *info)
-{
-       short i;
-       ulong value;
-       ulong base = (ulong)addr;
-
-       /* Write auto select command: read Manufacturer ID */
-       addr[0xAAA] = 0x00AA00AA ;
-       addr[0x555] = 0x00550055 ;
-       addr[0xAAA] = 0x00900090 ;
-
-       value = addr[0] ;
-       switch (value & 0x00FF00FF) {
-       case AMD_MANUFACT:                      /* AMD_MANUFACT =0x00010001 in flash.h */
-               info->flash_id = FLASH_MAN_AMD; /* FLASH_MAN_AMD=0x00000000 in flash.h */
-               break;
-       case FUJ_MANUFACT:
-               info->flash_id = FLASH_MAN_FUJ;
-               break;
-       default:
-               info->flash_id = FLASH_UNKNOWN;
-               info->sector_count = 0;
-               info->size = 0;
-               return (0);                     /* no or unknown flash  */
-       }
-
-       value = addr[2] ;                       /* device ID            */
-       switch (value & 0x00FF00FF) {
-       case (AMD_ID_LV400T & 0x00FF00FF):
-               info->flash_id += FLASH_AM400T;
-               info->sector_count = 11;
-               info->size = 0x00100000;
-               break;                          /* => 1 MB              */
-       case (AMD_ID_LV400B & 0x00FF00FF):
-               info->flash_id += FLASH_AM400B;
-               info->sector_count = 11;
-               info->size = 0x00100000;
-               break;                          /* => 1 MB              */
-       case (AMD_ID_LV800T & 0x00FF00FF):
-               info->flash_id += FLASH_AM800T;
-               info->sector_count = 19;
-               info->size = 0x00200000;
-               break;                          /* => 2 MB              */
-       case (AMD_ID_LV800B & 0x00FF00FF):
-               info->flash_id += FLASH_AM800B;
-               info->sector_count = 19;
-               info->size = 0x00400000;        /* Size doubled by yooth */
-               break;                          /* => 4 MB               */
-       case (AMD_ID_LV160T & 0x00FF00FF):
-               info->flash_id += FLASH_AM160T;
-               info->sector_count = 35;
-               info->size = 0x00400000;
-               break;                          /* => 4 MB              */
-       case (AMD_ID_LV160B & 0x00FF00FF):
-               info->flash_id += FLASH_AM160B;
-               info->sector_count = 35;
-               info->size = 0x00400000;
-               break;                          /* => 4 MB              */
-       case (AMD_ID_DL323B & 0x00FF00FF):
-               info->flash_id += FLASH_AMDL323B;
-               info->sector_count = 71;
-               info->size = 0x01000000;
-               break;                          /* => 16 MB(4x4MB)  */
-       /* AMD_ID_DL323B= 0x22532253  FLASH_AMDL323B= 0x0013
-        * AMD_ID_DL323B could be found in <flash.h>.[SAM]
-        * So we could get : flash_id = 0x00000013.
-        * The first four-bit represents VEDOR ID,leaving others for FLASH ID. */
-       default:
-               info->flash_id = FLASH_UNKNOWN;
-               return (0);                     /* => no or unknown flash */
-
-       }
-       /* set up sector start address table */
-       if (info->flash_id & FLASH_BTYPE) {
-       /* FLASH_BTYPE=0x0001 mask for bottom boot sector type.If the last bit equals 1,
-        * it means bottom boot flash. GOOD IDEA! [SAM]
-        */
-
-       /* set sector offsets for bottom boot block type        */
-               info->start[0] = base + 0x00000000;
-               info->start[1] = base + 0x00008000;
-               info->start[2] = base + 0x00010000;
-               info->start[3] = base + 0x00018000;
-               info->start[4] = base + 0x00020000;
-               info->start[5] = base + 0x00028000;
-               info->start[6] = base + 0x00030000;
-               info->start[7] = base + 0x00038000;
-
-               for (i = 8; i < info->sector_count; i++) {
-                       info->start[i] = base + ((i-7) * 0x00040000) ;
-               }
-       } else {
-               /* set sector offsets for top boot block type           */
-               i = info->sector_count - 1;
-               info->start[i--] = base + info->size - 0x00010000;
-               info->start[i--] = base + info->size - 0x00018000;
-               info->start[i--] = base + info->size - 0x00020000;
-               for (; i >= 0; i--) {
-                       info->start[i] = base + i * 0x00040000;
-               }
-       }
-
-       /* check for protected sectors */
-       for (i = 0; i < info->sector_count; i++) {
-               /* read sector protection at sector address, (A7 .. A0) = 0x02 */
-               /* D0 = 1 if protected */
-               addr = (volatile unsigned long *)(info->start[i]);
-               /* info->protect[i] = addr[4] & 1 ; */
-               /* Mask it for disorder FLASH protection **[Sam]** */
-       }
-
-       /*
-        * Prevent writes to uninitialized FLASH.
-        */
-       if (info->flash_id != FLASH_UNKNOWN) {
-               addr = (volatile unsigned long *)info->start[0];
-
-               *addr = 0xF0F0F0F0;     /* reset bank */
-       }
-       return (info->size);
-}
-
-int    flash_erase (flash_info_t *info, int s_first, int s_last)
-{
-       vu_long *addr = (vu_long*)(info->start[0]);
-       int flag, prot, sect, l_sect;
-       ulong start, now, last;
-
-       if ((s_first < 0) || (s_first > s_last)) {
-               if (info->flash_id == FLASH_UNKNOWN) {
-                       printf ("- missing\n");
-               } else {
-                       printf ("- no sectors to erase\n");
-               }
-               return 1;
-       }
-
-       if ((info->flash_id == FLASH_UNKNOWN) ||
-           (info->flash_id > FLASH_AMD_COMP)) {
-               printf ("Can't erase unknown flash type %08lx - aborted\n",
-                       info->flash_id);
-               return 1;
-       }
-
-       prot = 0;
-       for (sect=s_first; sect<=s_last; ++sect) {
-               if (info->protect[sect]) {
-                       prot++;
-               }
-       }
-
-       if (prot) {
-               printf ("- Warning: %d protected sectors will not be erased!\n",
-                       prot);
-       } else {
-               printf ("\n");
-       }
-
-       l_sect = -1;
-
-       /* Disable interrupts which might cause a timeout here */
-       flag = disable_interrupts();
-
-       addr[0xAAA] = 0xAAAAAAAA;
-       addr[0x555] = 0x55555555;
-       addr[0xAAA] = 0x80808080;
-       addr[0xAAA] = 0xAAAAAAAA;
-       addr[0x555] = 0x55555555;
-
-       /* Start erase on unprotected sectors */
-       for (sect = s_first; sect<=s_last; sect++) {
-               if (info->protect[sect] == 0) { /* not protected */
-                       addr = (vu_long *)(info->start[sect]) ;
-                       addr[0] = 0x30303030 ;
-                       l_sect = sect;
-               }
-       }
-
-       /* re-enable interrupts if necessary */
-       if (flag)
-               enable_interrupts();
-
-       /* wait at least 80us - let's wait 1 ms */
-       udelay (1000);
-
-       /*
-        * We wait for the last triggered sector
-        */
-       if (l_sect < 0)
-               goto DONE;
-
-       start = get_timer (0);
-       last  = start;
-       addr = (vu_long *)(info->start[l_sect]);
-       while ((addr[0] & 0x80808080) != 0x80808080) {
-               if ((now = get_timer(start)) > CONFIG_SYS_FLASH_ERASE_TOUT) {
-                       printf ("Timeout\n");
-                       return 1;
-               }
-               /* show that we're waiting */
-               if ((now - last) > 1000) {      /* every second */
-                       putc ('.');
-                       last = now;
-               }
-       }
-
-DONE:
-       /* reset to read mode */
-       addr = (vu_long *)info->start[0];
-       addr[0] = 0xF0F0F0F0;   /* reset bank */
-
-       printf (" done\n");
-       return 0;
-}
-
-/*-----------------------------------------------------------------------
- * Copy memory to flash, returns:
- * 0 - OK
- * 1 - write timeout
- * 2 - Flash not erased
- */
-
-int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
-{
-       ulong cp, wp, data;
-       int i, l, rc;
-
-       wp = (addr & ~3);       /* get lower word aligned address */
-
-       /*
-        * handle unaligned start bytes
-        */
-       if ((l = addr - wp) != 0) {
-               data = 0;
-               for (i=0, cp=wp; i<l; ++i, ++cp) {
-                       data = (data << 8) | (*(uchar *)cp);
-               }
-               for (; i<4 && cnt>0; ++i) {
-                       data = (data << 8) | *src++;
-                       --cnt;
-                       ++cp;
-               }
-               for (; cnt==0 && i<4; ++i, ++cp) {
-                       data = (data << 8) | (*(uchar *)cp);
-               }
-
-               if ((rc = write_word(info, wp, data)) != 0) {
-                       return (rc);
-               }
-               wp += 4;
-       }
-
-       /*
-        * handle word aligned part
-        */
-       while (cnt >= 4) {
-               data = 0;
-               for (i=0; i<4; ++i) {
-                       data = (data << 8) | *src++;
-               }
-               if ((rc = write_word(info, wp, data)) != 0) {
-                       return (rc);
-               }
-               wp  += 4;
-               cnt -= 4;
-       }
-
-       if (cnt == 0) {
-               return (0);
-       }
-
-       /*
-        * handle unaligned tail bytes
-        */
-       data = 0;
-       for (i=0, cp=wp; i<4 && cnt>0; ++i, ++cp) {
-               data = (data << 8) | *src++;
-               --cnt;
-       }
-       for (; i<4; ++i, ++cp) {
-               data = (data << 8) | (*(uchar *)cp);
-       }
-       return (write_word(info, wp, data));
-}
-
-/*-----------------------------------------------------------------------
- * Write a word to Flash, returns:
- * 0 - OK
- * 1 - write timeout
- * 2 - Flash not erased
- */
-static int write_word (flash_info_t *info, ulong dest, ulong data)
-{
-       vu_long *addr = (vu_long *)(info->start[0]);
-       ulong start;
-       int flag;
-
-       /* Check if Flash is (sufficiently) erased */
-       if ((*((vu_long *)dest) & data) != data) {
-               return (2);
-       }
-       /* Disable interrupts which might cause a timeout here */
-       flag = disable_interrupts();
-
-       addr[0xAAA] = 0xAAAAAAAA;
-       addr[0x555] = 0x55555555;
-       addr[0xAAA] = 0xA0A0A0A0;
-
-       *((vu_long *)dest) = data;
-
-       /* re-enable interrupts if necessary */
-       if (flag)
-               enable_interrupts();
-
-       /* data polling for D7 */
-       start = get_timer (0);
-       while ((*((vu_long *)dest) & 0x80808080) != (data & 0x80808080)) {
-               if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT) {
-                       return (1);
-               }
-       }
-       return (0);
-}
diff --git a/board/RPXlite_dw/u-boot.lds b/board/RPXlite_dw/u-boot.lds
deleted file mode 100644 (file)
index 0eb2fba..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * (C) Copyright 2000-2010
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-OUTPUT_ARCH(powerpc)
-
-SECTIONS
-{
-  /* Read-only sections, merged into text segment: */
-  . = + SIZEOF_HEADERS;
-  .text      :
-  {
-    arch/powerpc/cpu/mpc8xx/start.o    (.text*)
-    arch/powerpc/cpu/mpc8xx/traps.o    (.text*)
-
-    *(.text*)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-
-  /* Read-write section, merged into data segment: */
-  . = (. + 0x00FF) & 0xFFFFFF00;
-  _erotext = .;
-  PROVIDE (erotext = .);
-  .reloc   :
-  {
-    _GOT2_TABLE_ = .;
-    KEEP(*(.got2))
-    KEEP(*(.got))
-    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
-    _FIXUP_TABLE_ = .;
-    KEEP(*(.fixup))
-  }
-  __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
-  __fixup_entries = (. - _FIXUP_TABLE_)>>2;
-
-  .data    :
-  {
-    *(.data*)
-    *(.sdata*)
-  }
-  _edata  =  .;
-  PROVIDE (edata = .);
-
-  . = .;
-
-  . = ALIGN(4);
-  .u_boot_list : {
-       KEEP(*(SORT(.u_boot_list*)));
-  }
-
-
-  . = .;
-  __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)       :
-  {
-   *(.bss*)
-   *(.sbss*)
-   *(COMMON)
-   . = ALIGN(4);
-  }
-  __bss_end = . ;
-  PROVIDE (end = .);
-}
diff --git a/board/RPXlite_dw/u-boot.lds.debug b/board/RPXlite_dw/u-boot.lds.debug
deleted file mode 100644 (file)
index 0ea27e8..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * (C) Copyright 2000-2004
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-OUTPUT_ARCH(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  /* Read-only sections, merged into text segment: */
-  . = + SIZEOF_HEADERS;
-  .interp : { *(.interp) }
-  .hash          : { *(.hash)          }
-  .dynsym        : { *(.dynsym)                }
-  .dynstr        : { *(.dynstr)                }
-  .rel.text      : { *(.rel.text)              }
-  .rela.text     : { *(.rela.text)     }
-  .rel.data      : { *(.rel.data)              }
-  .rela.data     : { *(.rela.data)     }
-  .rel.rodata    : { *(.rel.rodata)    }
-  .rela.rodata   : { *(.rela.rodata)   }
-  .rel.got       : { *(.rel.got)               }
-  .rela.got      : { *(.rela.got)              }
-  .rel.ctors     : { *(.rel.ctors)     }
-  .rela.ctors    : { *(.rela.ctors)    }
-  .rel.dtors     : { *(.rel.dtors)     }
-  .rela.dtors    : { *(.rela.dtors)    }
-  .rel.bss       : { *(.rel.bss)               }
-  .rela.bss      : { *(.rela.bss)              }
-  .rel.plt       : { *(.rel.plt)               }
-  .rela.plt      : { *(.rela.plt)              }
-  .init          : { *(.init)  }
-  .plt : { *(.plt) }
-  .text      :
-  {
-    /* WARNING - the following is hand-optimized to fit within */
-    /* the sector layout of our flash chips!   XXX FIXME XXX   */
-
-    arch/powerpc/cpu/mpc8xx/start.o    (.text)
-    common/dlmalloc.o  (.text)
-    lib/vsprintf.o     (.text)
-    lib/crc32.o                (.text)
-
-    . = env_offset;
-    common/env_embedded.o(.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.rodata)
-    *(.rodata1)
-    *(.rodata.str1.4)
-    *(.eh_frame)
-  }
-  .fini      : { *(.fini)    } =0
-  .ctors     : { *(.ctors)   }
-  .dtors     : { *(.dtors)   }
-
-  /* Read-write section, merged into data segment: */
-  . = (. + 0x0FFF) & 0xFFFFF000;
-  _erotext = .;
-  PROVIDE (erotext = .);
-  .reloc   :
-  {
-    *(.got)
-    _GOT2_TABLE_ = .;
-    *(.got2)
-    _FIXUP_TABLE_ = .;
-    *(.fixup)
-  }
-  __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
-  __fixup_entries = (. - _FIXUP_TABLE_)>>2;
-
-  .data    :
-  {
-    *(.data)
-    *(.data1)
-    *(.sdata)
-    *(.sdata2)
-    *(.dynamic)
-    CONSTRUCTORS
-  }
-  _edata  =  .;
-  PROVIDE (edata = .);
-
-
-  . = ALIGN(4);
-  .u_boot_list : {
-       KEEP(*(SORT(.u_boot_list*)));
-  }
-
-
-  __start___ex_table = .;
-  __ex_table : { *(__ex_table) }
-  __stop___ex_table = .;
-
-  . = ALIGN(4096);
-  __init_begin = .;
-  .text.init : { *(.text.init) }
-  .data.init : { *(.data.init) }
-  . = ALIGN(4096);
-  __init_end = .;
-
-  __bss_start = .;
-  .bss       :
-  {
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
-   *(COMMON)
-  }
-  __bss_end = . ;
-  PROVIDE (end = .);
-}
diff --git a/board/fads/Makefile b/board/fads/Makefile
deleted file mode 100644 (file)
index ea8b5c0..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# (C) Copyright 2000-2006
-# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
-
-obj-y  = fads.o flash.o lamp.o pcmcia.o
diff --git a/board/fads/README b/board/fads/README
deleted file mode 100644 (file)
index 0873682..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * (C) Copyright 2000
- * Dave Ellis, SIXNET, dge@sixnetio.com
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-Using the Motorola MPC8XXFADS development board
-===============================================
-
-CONFIGURATIONS
---------------
-
-There are ready-to-use default configurations available for the
-FADS823, FADS850SAR and FADS860T. The FADS860T configuration also
-works for the 855T processor.
-
-LOADING U-Boot INTO FADS FLASH MEMORY
---------------------------------------
-
-MPC8BUG can load U-Boot into the FLASH memory using LOADF.
-
-    loadf u-boot.srec 100000
-
-
-STARTING U-Boot FROM MPC8BUG
------------------------------
-
-To start U-Boot from MPC8BUG:
-
-1. Reset the board:
-    reset :h
-
-2. Change BR0 and OR0 back to their values at reset:
-    rms memc br0 00000001
-    rms memc or0 00000d34
-
-3. Modify DER so MPC8BUG gets control only when it should:
-    rms der 2002000f
-
-4. Start as if from reset:
-    go 100
-
-This is NOT exactly the same as starting U-Boot without
-MPC8BUG. MPC8BUG turns off the watchdog as part of the hard reset.
-After it does the reset it writes SYPCR (to disable the watchdog)
-and sets BR0 and OR0 to map the FLASH at 0x02800000 (and does lots
-of other initialization). That is why it is necessary to set BR0
-and OR0 to map the FLASH everywhere. U-Boot can't turn on the
-watchdog after that, since MPC8BUG has used the only chance to write
-to SYPCR.
-
-Here is a bizarre sequence of MPC8BUG and U-Boot commands that lets
-U-Boot write to SYPCR. It works with MPC8BUG 1.5 and an 855T
-processor (your mileage may vary). It is probably better (and a lot
-easier) just to accept having the watchdog disabled when the debug
-cable is connected.
-
-in MPC8BUG:
-  reset :h
-  rms memc br0 00000001
-  rms memc or0 00000d34
-  rms der 2000f
-  go 100
-
-Now U-Boot is running with the MPC8BUG value for SYPCR. Use the
-U-Boot 'reset' command to reset the board.
-  =>reset
-Next, in MPC8BUG:
-  rms der 2000f
-  go
-
-Now U-Boot is running with the U-Boot value for SYPCR.
diff --git a/board/fads/fads.c b/board/fads/fads.c
deleted file mode 100644 (file)
index fdb46b1..0000000
+++ /dev/null
@@ -1,870 +0,0 @@
-/*
- * (C) Copyright 2000-2004
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * Modified by, Yuli Barcohen, Arabella Software Ltd., yuli@arabellasw.com
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <config.h>
-#include <common.h>
-#include <mpc8xx.h>
-#include <pcmcia.h>
-
-#define        _NOT_USED_      0xFFFFFFFF
-
-/* ========================================================================= */
-
-#ifndef CONFIG_MPC885ADS /* No old DRAM on MPC885ADS */
-
-#if defined(CONFIG_DRAM_50MHZ)
-/* 50MHz tables */
-static const uint dram_60ns[] =
-{ 0x8fffec24, 0x0fffec04, 0x0cffec04, 0x00ffec04,
-  0x00ffec00, 0x37ffec47, _NOT_USED_, _NOT_USED_,
-  0x8fffec24, 0x0fffec04, 0x08ffec04, 0x00ffec0c,
-  0x03ffec00, 0x00ffec44, 0x00ffcc08, 0x0cffcc44,
-  0x00ffec0c, 0x03ffec00, 0x00ffec44, 0x00ffcc00,
-  0x3fffc847, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0x8fafcc24, 0x0fafcc04, 0x0cafcc00, 0x11bfcc47,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0x8fafcc24, 0x0fafcc04, 0x0cafcc00, 0x03afcc4c,
-  0x0cafcc00, 0x03afcc4c, 0x0cafcc00, 0x03afcc4c,
-  0x0cafcc00, 0x33bfcc4f, _NOT_USED_, _NOT_USED_,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0xc0ffcc84, 0x00ffcc04, 0x07ffcc04, 0x3fffcc06,
-  0xffffcc85, 0xffffcc05, _NOT_USED_, _NOT_USED_,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0x33ffcc07, _NOT_USED_, _NOT_USED_, _NOT_USED_ };
-
-static const uint dram_70ns[] =
-{ 0x8fffcc24, 0x0fffcc04, 0x0cffcc04, 0x00ffcc04,
-  0x00ffcc00, 0x37ffcc47, _NOT_USED_, _NOT_USED_,
-  0x8fffcc24, 0x0fffcc04, 0x0cffcc04, 0x00ffcc04,
-  0x00ffcc08, 0x0cffcc44, 0x00ffec0c, 0x03ffec00,
-  0x00ffec44, 0x00ffcc08, 0x0cffcc44, 0x00ffec04,
-  0x00ffec00, 0x3fffec47, _NOT_USED_, _NOT_USED_,
-  0x8fafcc24, 0x0fafcc04, 0x0cafcc00, 0x11bfcc47,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0x8fafcc24, 0x0fafcc04, 0x0cafcc00, 0x03afcc4c,
-  0x0cafcc00, 0x03afcc4c, 0x0cafcc00, 0x03afcc4c,
-  0x0cafcc00, 0x33bfcc4f, _NOT_USED_, _NOT_USED_,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0xe0ffcc84, 0x00ffcc04, 0x00ffcc04, 0x0fffcc04,
-  0x7fffcc06, 0xffffcc85, 0xffffcc05, _NOT_USED_,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0x33ffcc07, _NOT_USED_, _NOT_USED_, _NOT_USED_ };
-
-static const uint edo_60ns[] =
-{ 0x8ffbec24, 0x0ff3ec04, 0x0cf3ec04, 0x00f3ec04,
-  0x00f3ec00, 0x37f7ec47, _NOT_USED_, _NOT_USED_,
-  0x8fffec24, 0x0ffbec04, 0x0cf3ec04, 0x00f3ec0c,
-  0x0cf3ec00, 0x00f3ec4c, 0x0cf3ec00, 0x00f3ec4c,
-  0x0cf3ec00, 0x00f3ec44, 0x03f3ec00, 0x3ff7ec47,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0x8fffcc24, 0x0fefcc04, 0x0cafcc00, 0x11bfcc47,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0x8fffcc24, 0x0fefcc04, 0x0cafcc00, 0x03afcc4c,
-  0x0cafcc00, 0x03afcc4c, 0x0cafcc00, 0x03afcc4c,
-  0x0cafcc00, 0x33bfcc4f, _NOT_USED_, _NOT_USED_,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0xc0ffcc84, 0x00ffcc04, 0x07ffcc04, 0x3fffcc06,
-  0xffffcc85, 0xffffcc05, _NOT_USED_, _NOT_USED_,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0x33ffcc07, _NOT_USED_, _NOT_USED_, _NOT_USED_ };
-
-static const uint edo_70ns[] =
-{ 0x8ffbcc24, 0x0ff3cc04, 0x0cf3cc04, 0x00f3cc04,
-  0x00f3cc00, 0x37f7cc47, _NOT_USED_, _NOT_USED_,
-  0x8fffcc24, 0x0ffbcc04, 0x0cf3cc04, 0x00f3cc0c,
-  0x03f3cc00, 0x00f3cc44, 0x00f3ec0c, 0x0cf3ec00,
-  0x00f3ec4c, 0x03f3ec00, 0x00f3ec44, 0x00f3cc00,
-  0x33f7cc47, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0x8fffcc24, 0x0fefcc04, 0x0cafcc00, 0x11bfcc47,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0x8fffcc24, 0x0fefcc04, 0x0cafcc00, 0x03afcc4c,
-  0x0cafcc00, 0x03afcc4c, 0x0cafcc00, 0x03afcc4c,
-  0x0cafcc00, 0x33bfcc47, _NOT_USED_, _NOT_USED_,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0xe0ffcc84, 0x00ffcc04, 0x00ffcc04, 0x0fffcc04,
-  0x7fffcc04, 0xffffcc86, 0xffffcc05, _NOT_USED_,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0x33ffcc07, _NOT_USED_, _NOT_USED_, _NOT_USED_ };
-
-#elif defined(CONFIG_DRAM_25MHZ)
-
-/* 25MHz tables */
-
-static const uint dram_60ns[] =
-{ 0x0fffcc04, 0x08ffcc00, 0x33ffcc47, _NOT_USED_,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0x0fffcc24, 0x0fffcc04, 0x08ffcc00, 0x03ffcc4c,
-  0x08ffcc00, 0x03ffcc4c, 0x08ffcc00, 0x03ffcc4c,
-  0x08ffcc00, 0x33ffcc47, _NOT_USED_, _NOT_USED_,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0x0fafcc04, 0x08afcc00, 0x3fbfcc47, _NOT_USED_,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0x0fafcc04, 0x0cafcc00, 0x01afcc4c, 0x0cafcc00,
-  0x01afcc4c, 0x0cafcc00, 0x01afcc4c, 0x0cafcc00,
-  0x31bfcc43, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0x80ffcc84, 0x13ffcc04, 0xffffcc87, 0xffffcc05,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0x33ffcc07, _NOT_USED_, _NOT_USED_, _NOT_USED_ };
-
-static const uint dram_70ns[] =
-{ 0x0fffec04, 0x08ffec04, 0x00ffec00, 0x3fffcc47,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0x0fffcc24, 0x0fffcc04, 0x08ffcc00, 0x03ffcc4c,
-  0x08ffcc00, 0x03ffcc4c, 0x08ffcc00, 0x03ffcc4c,
-  0x08ffcc00, 0x33ffcc47, _NOT_USED_, _NOT_USED_,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0x0fafcc04, 0x08afcc00, 0x3fbfcc47, _NOT_USED_,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0x0fafcc04, 0x0cafcc00, 0x01afcc4c, 0x0cafcc00,
-  0x01afcc4c, 0x0cafcc00, 0x01afcc4c, 0x0cafcc00,
-  0x31bfcc43, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0xc0ffcc84, 0x01ffcc04, 0x7fffcc86, 0xffffcc05,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0x33ffcc07, _NOT_USED_, _NOT_USED_, _NOT_USED_ };
-
-static const uint edo_60ns[] =
-{ 0x0ffbcc04, 0x0cf3cc04, 0x00f3cc00, 0x33f7cc47,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0x0ffbcc04, 0x09f3cc0c, 0x09f3cc0c, 0x09f3cc0c,
-  0x08f3cc00, 0x3ff7cc47, _NOT_USED_, _NOT_USED_,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0x0fefcc04, 0x08afcc04, 0x00afcc00, 0x3fbfcc47,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0x0fefcc04, 0x08afcc00, 0x07afcc48, 0x08afcc48,
-  0x08afcc48, 0x39bfcc47, _NOT_USED_, _NOT_USED_,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0x80ffcc84, 0x13ffcc04, 0xffffcc87, 0xffffcc05,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0x33ffcc07, _NOT_USED_, _NOT_USED_, _NOT_USED_ };
-
-static const uint edo_70ns[] =
-{ 0x0ffbcc04, 0x0cf3cc04, 0x00f3cc00, 0x33f7cc47,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0x0ffbec04, 0x08f3ec04, 0x03f3ec48, 0x08f3cc00,
-  0x0ff3cc4c, 0x08f3cc00, 0x0ff3cc4c, 0x08f3cc00,
-  0x3ff7cc47, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0x0fefcc04, 0x08afcc04, 0x00afcc00, 0x3fbfcc47,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0x0fefcc04, 0x08afcc00, 0x07afcc4c, 0x08afcc00,
-  0x07afcc4c, 0x08afcc00, 0x07afcc4c, 0x08afcc00,
-  0x37bfcc47, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0xc0ffcc84, 0x01ffcc04, 0x7fffcc86, 0xffffcc05,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-  0x33ffcc07, _NOT_USED_, _NOT_USED_, _NOT_USED_ };
-#else
-#error dram not correctly defined - use CONFIG_DRAM_25MHZ or CONFIG_DRAM_50MHZ
-#endif
-
-/* ------------------------------------------------------------------------- */
-static int _draminit (uint base, uint noMbytes, uint edo, uint delay)
-{
-       volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
-       volatile memctl8xx_t *memctl = &immap->im_memctl;
-
-       /* init upm */
-
-       switch (delay) {
-       case 70:
-               if (edo) {
-                       upmconfig (UPMA, (uint *) edo_70ns,
-                                  sizeof (edo_70ns) / sizeof (uint));
-               } else {
-                       upmconfig (UPMA, (uint *) dram_70ns,
-                                  sizeof (dram_70ns) / sizeof (uint));
-               }
-
-               break;
-
-       case 60:
-               if (edo) {
-                       upmconfig (UPMA, (uint *) edo_60ns,
-                                  sizeof (edo_60ns) / sizeof (uint));
-               } else {
-                       upmconfig (UPMA, (uint *) dram_60ns,
-                                  sizeof (dram_60ns) / sizeof (uint));
-               }
-
-               break;
-
-       default:
-               return -1;
-       }
-
-       memctl->memc_mptpr = 0x0400;    /* divide by 16 */
-
-       switch (noMbytes) {
-       case 4:                         /* 4 Mbyte uses only CS2 */
-               memctl->memc_mamr = 0x13a01114; /* PTA 0x13 AMA 010 */
-               memctl->memc_or2 = 0xffc00800;  /* 4M */
-               break;
-
-       case 8:                         /* 8 Mbyte uses both CS3 and CS2 */
-               memctl->memc_mamr = 0x13a01114; /* PTA 0x13 AMA 010 */
-               memctl->memc_or3 = 0xffc00800;  /* 4M */
-               memctl->memc_br3 = 0x00400081 + base;
-               memctl->memc_or2 = 0xffc00800;  /* 4M */
-               break;
-
-       case 16:                        /* 16 Mbyte uses only CS2 */
-               memctl->memc_mamr = 0x13b01114; /* PTA 0x13 AMA 011 */
-               memctl->memc_or2 = 0xff000800;  /* 16M */
-               break;
-
-       case 32:                        /* 32 Mbyte uses both CS3 and CS2 */
-               memctl->memc_mamr = 0x13b01114; /* PTA 0x13 AMA 011 */
-               memctl->memc_or3 = 0xff000800;  /* 16M */
-               memctl->memc_br3 = 0x01000081 + base;
-               memctl->memc_or2 = 0xff000800;  /* 16M */
-               break;
-
-       default:
-               return -1;
-       }
-
-       memctl->memc_br2 = 0x81 + base; /* use upma */
-
-       *((uint *) BCSR1) &= ~BCSR1_DRAM_EN;    /* enable dram */
-
-       /* if no dimm is inserted, noMbytes is still detected as 8m, so
-        * sanity check top and bottom of memory */
-
-       /* check bytes / 2 because get_ram_size tests at base+bytes, which
-        * is not mapped */
-       if (noMbytes == 8)
-               if (get_ram_size ((long *) base, noMbytes << 19) != noMbytes << 19) {
-                       *((uint *) BCSR1) |= BCSR1_DRAM_EN;     /* disable dram */
-                       return -1;
-               }
-
-       return 0;
-}
-
-/* ------------------------------------------------------------------------- */
-
-static void _dramdisable(void)
-{
-       volatile immap_t     *immap = (immap_t *)CONFIG_SYS_IMMR;
-       volatile memctl8xx_t *memctl = &immap->im_memctl;
-
-       memctl->memc_br2 = 0x00000000;
-       memctl->memc_br3 = 0x00000000;
-
-       /* maybe we should turn off upma here or something */
-}
-#endif /* !CONFIG_MPC885ADS */
-
-/* ========================================================================= */
-
-#ifdef CONFIG_FADS /* SDRAM exists on FADS and newer boards */
-
-#if defined(CONFIG_SDRAM_100MHZ)
-
-/* ------------------------------------------------------------------------- */
-/* sdram table by Dan Malek                                                  */
-
-/* This has the stretched early timing so the 50 MHz
- * processor can make the 100 MHz timing.  This will
- * work at all processor speeds.
- */
-
-#ifdef SDRAM_ALT_INIT_SEQENCE
-# define SDRAM_MBMRVALUE0 0xc3802114 /* PTx=195,PTxE,AMx=0,DSx=1,A11,RLFx=1,WLFx=1,TLFx=4 */
-#define SDRAM_MBMRVALUE1 SDRAM_MBMRVALUE0
-# define SDRAM_MCRVALUE0  0x80808111   /* run upmb cs4 loop 1 addr 0x11 MRS */
-# define SDRAM_MCRVALUE1  SDRAM_MCRVALUE0  /* ??? why not 0x80808130? */
-#else
-# define SDRAM_MxMR_PTx         195
-# define UPM_MRS_ADDR           0x11
-# define UPM_REFRESH_ADDR       0x30    /* or 0x11 if we want to be like above? */
-#endif /* !SDRAM_ALT_INIT_SEQUENCE */
-
-static const uint sdram_table[] =
-{
-       /* single read. (offset 0 in upm RAM) */
-       0xefebfc24, 0x1f07fc24, 0xeeaefc04, 0x11adfc04,
-       0xefbbbc00, 0x1ff77c45, _NOT_USED_, _NOT_USED_,
-
-       /* burst read. (offset 8 in upm RAM) */
-       0xefebfc24, 0x1f07fc24, 0xeeaefc04, 0x10adfc04,
-       0xf0affc00, 0xf0affc00, 0xf1affc00, 0xefbbbc00,
-       0x1ff77c45,
-
-       /* precharge + MRS. (offset 11 in upm RAM) */
-       0xeffbbc04, 0x1ff77c34, 0xefeabc34,
-       0x1fb57c35, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-
-       /* single write. (offset 18 in upm RAM) */
-       0xefebfc24, 0x1f07fc24, 0xeeaebc00, 0x01b93c04,
-       0x1ff77c45, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-
-       /* burst write. (offset 20 in upm RAM) */
-       0xefebfc24, 0x1f07fc24, 0xeeaebc00, 0x10ad7c00,
-       0xf0affc00, 0xf0affc00, 0xe1bbbc04, 0x1ff77c45,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-
-       /* refresh. (offset 30 in upm RAM) */
-       0xeffafc84, 0x1ff5fc04, 0xfffffc04, 0xfffffc04,
-       0xfffffc84, 0xfffffc07, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-
-       /* exception. (offset 3c in upm RAM) */
-       0xeffffc06, 0x1ffffc07, _NOT_USED_, _NOT_USED_ };
-
-#elif defined(CONFIG_SDRAM_50MHZ)
-
-/* ------------------------------------------------------------------------- */
-/* sdram table stolen from the fads manual                                   */
-/* for chip MB811171622A-100                                                 */
-
-/* this table is for 32-50MHz operation */
-#ifdef SDRAM_ALT_INIT_SEQENCE
-# define SDRAM_MBMRVALUE0 0x80802114   /* PTx=128,PTxE,AMx=0,DSx=1,A11,RLFx=1,WLFx=1,TLFx=4 */
-# define SDRAM_MBMRVALUE1 0x80802118   /* PTx=128,PTxE,AMx=0,DSx=1,A11,RLFx=1,WLFx=1,TLFx=8 */
-# define SDRAM_MCRVALUE0  0x80808105   /* run upmb cs4 loop 1 addr 0x5 MRS */
-# define SDRAM_MCRVALUE1  0x80808130   /* run upmb cs4 loop 1 addr 0x30 REFRESH */
-# define SDRAM_MPTRVALUE  0x400
-#define SDRAM_MARVALUE   0x88
-#else
-# define SDRAM_MxMR_PTx         128
-# define UPM_MRS_ADDR           0x5
-# define UPM_REFRESH_ADDR       0x30
-#endif  /* !SDRAM_ALT_INIT_SEQUENCE */
-
-static const uint sdram_table[] =
-{
-       /* single read. (offset 0 in upm RAM) */
-       0x1f07fc04, 0xeeaefc04, 0x11adfc04, 0xefbbbc00,
-       0x1ff77c47,
-
-       /* precharge + MRS. (offset 5 in upm RAM) */
-       0x1ff77c34, 0xefeabc34, 0x1fb57c35,
-
-       /* burst read. (offset 8 in upm RAM) */
-       0x1f07fc04, 0xeeaefc04, 0x10adfc04, 0xf0affc00,
-       0xf0affc00, 0xf1affc00, 0xefbbbc00, 0x1ff77c47,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-
-       /* single write. (offset 18 in upm RAM) */
-       0x1f27fc04, 0xeeaebc00, 0x01b93c04, 0x1ff77c47,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-
-       /* burst write. (offset 20 in upm RAM) */
-       0x1f07fc04, 0xeeaebc00, 0x10ad7c00, 0xf0affc00,
-       0xf0affc00, 0xe1bbbc04, 0x1ff77c47, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-
-       /* refresh. (offset 30 in upm RAM) */
-       0x1ff5fc84, 0xfffffc04, 0xfffffc04, 0xfffffc04,
-       0xfffffc84, 0xfffffc07, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-
-       /* exception. (offset 3c in upm RAM) */
-       0x7ffffc07, _NOT_USED_, _NOT_USED_, _NOT_USED_ };
-
-/* ------------------------------------------------------------------------- */
-#else
-#error SDRAM not correctly configured
-#endif
-/* ------------------------------------------------------------------------- */
-
-/*
- * Memory Periodic Timer Prescaler
- */
-
-#define SDRAM_OR4VALUE   0x00000a00 /* SAM,GL5A/S=01,addr mask or'ed on later */
-#define SDRAM_BR4VALUE   0x000000c1 /* UPMB,base addr or'ed on later */
-
-/* ------------------------------------------------------------------------- */
-#ifdef SDRAM_ALT_INIT_SEQENCE
-/* ------------------------------------------------------------------------- */
-
-static int _initsdram(uint base, uint noMbytes)
-{
-       volatile immap_t     *immap = (immap_t *)CONFIG_SYS_IMMR;
-       volatile memctl8xx_t *memctl = &immap->im_memctl;
-
-       upmconfig(UPMB, (uint *)sdram_table,sizeof(sdram_table)/sizeof(uint));
-
-       memctl->memc_mptpr = SDRAM_MPTPRVALUE;
-
-       /* Configure the refresh (mostly).  This needs to be
-       * based upon processor clock speed and optimized to provide
-       * the highest level of performance.  For multiple banks,
-       * this time has to be divided by the number of banks.
-       * Although it is not clear anywhere, it appears the
-       * refresh steps through the chip selects for this UPM
-       * on each refresh cycle.
-       * We have to be careful changing
-       * UPM registers after we ask it to run these commands.
-       */
-
-       memctl->memc_mbmr = SDRAM_MBMRVALUE0;   /* TLF 4 */
-       memctl->memc_mar = SDRAM_MARVALUE;  /* MRS code */
-
-       udelay(200);
-
-       /* Now run the precharge/nop/mrs commands.
-       */
-
-       memctl->memc_mcr = 0x80808111;   /* run umpb cs4 1 count 1, addr 0x11 ??? (50MHz) */
-                                        /* run umpb cs4 1 count 1, addr 0x11 precharge+MRS (100MHz) */
-       udelay(200);
-
-       /* Run 8 refresh cycles */
-
-       memctl->memc_mcr = SDRAM_MCRVALUE0; /* run upmb cs4 loop 1 addr 0x5 precharge+MRS (50 MHz)*/
-                                           /* run upmb cs4 loop 1 addr 0x11 precharge+MRS (100MHz) */
-
-       udelay(200);
-
-       memctl->memc_mbmr = SDRAM_MBMRVALUE1; /* TLF 4 (100 MHz) or TLF 8 (50MHz) */
-       memctl->memc_mcr = SDRAM_MCRVALUE1; /* run upmb cs4 loop 1 addr 0x30 refr (50 MHz) */
-                                           /* run upmb cs4 loop 1 addr 0x11 precharge+MRS ??? (100MHz) */
-
-       udelay(200);
-
-       memctl->memc_mbmr = SDRAM_MBMRVALUE0;   /* TLF 4 */
-
-       memctl->memc_or4 = SDRAM_OR4VALUE | ~((noMbytes<<20)-1);
-       memctl->memc_br4 = SDRAM_BR4VALUE | base;
-
-       return 0;
-}
-
-/* ------------------------------------------------------------------------- */
-#else  /* !SDRAM_ALT_INIT_SEQUENCE */
-/* ------------------------------------------------------------------------- */
-
-/* refresh rate 15.6 us (= 64 ms / 4K = 62.4 / quad bursts) for <= 128 MBit     */
-# define MPTPR_2BK_4K        MPTPR_PTP_DIV16         /* setting for 2 banks  */
-# define MPTPR_1BK_4K        MPTPR_PTP_DIV32         /* setting for 1 bank   */
-
-/* refresh rate 7.8 us (= 64 ms / 8K = 31.2 / quad bursts) for 256 MBit         */
-# define MPTPR_2BK_8K        MPTPR_PTP_DIV8          /* setting for 2 banks  */
-# define MPTPR_1BK_8K        MPTPR_PTP_DIV16         /* setting for 1 bank   */
-
-/*
- * MxMR settings for SDRAM
- */
-
-/* 8 column SDRAM */
-# define SDRAM_MxMR_8COL ((SDRAM_MxMR_PTx << MBMR_PTB_SHIFT)  | MBMR_PTBE  |   \
-                       MBMR_AMB_TYPE_0 | MBMR_DSB_1_CYCL | MBMR_G0CLB_A11 |   \
-                       MBMR_RLFB_1X    | MBMR_WLFB_1X    | MBMR_TLFB_4X)
-/* 9 column SDRAM */
-# define SDRAM_MxMR_9COL ((SDRAM_MxMR_PTx << MBMR_PTB_SHIFT)  | MBMR_PTAE  |   \
-                       MBMR_AMB_TYPE_1 | MBMR_DSB_1_CYCL | MBMR_G0CLB_A10 |   \
-                       MBMR_RLFB_1X    | MBMR_WLFB_1X    | MBMR_TLFB_4X)
-
-static int _initsdram(uint base, uint noMbytes)
-{
-       volatile immap_t     *immap = (immap_t *)CONFIG_SYS_IMMR;
-       volatile memctl8xx_t *memctl = &immap->im_memctl;
-
-       upmconfig(UPMB, (uint *)sdram_table,sizeof(sdram_table)/sizeof(uint));
-
-       memctl->memc_mptpr = MPTPR_2BK_4K;
-       memctl->memc_mbmr  = SDRAM_MxMR_8COL & (~(MBMR_PTBE)); /* no refresh yet */
-
-       /* map CS 4 */
-       memctl->memc_or4 = SDRAM_OR4VALUE | ~((noMbytes<<20)-1);
-       memctl->memc_br4 = SDRAM_BR4VALUE | base;
-
-       /* Perform SDRAM initilization */
-# ifdef UPM_NOP_ADDR    /* not currently in UPM table */
-       /* step 1: nop */
-       memctl->memc_mar = 0x00000000;
-       memctl->memc_mcr = MCR_UPM_B | MCR_OP_RUN | MCR_MB_CS4 |
-                          MCR_MLCF(0) | UPM_NOP_ADDR;
-# endif
-
-       /* step 2: delay */
-       udelay(200);
-
-# ifdef UPM_PRECHARGE_ADDR /* merged with MRS in UPM table */
-       /* step 3: precharge */
-       memctl->memc_mar = 0x00000000;
-       memctl->memc_mcr = MCR_UPM_B | MCR_OP_RUN | MCR_MB_CS4 |
-                          MCR_MLCF(4) | UPM_PRECHARGE_ADDR;
-# endif
-
-       /* step 4: refresh */
-       memctl->memc_mar = 0x00000000;
-       memctl->memc_mcr = MCR_UPM_B | MCR_OP_RUN | MCR_MB_CS4 |
-                          MCR_MLCF(2) | UPM_REFRESH_ADDR;
-
-       /*
-        * note: for some reason, the UPM values we are using include
-        * precharge with MRS
-        */
-
-       /* step 5: mrs */
-       memctl->memc_mar = 0x00000088;
-       memctl->memc_mcr = MCR_UPM_B | MCR_OP_RUN | MCR_MB_CS4 |
-                          MCR_MLCF(1) | UPM_MRS_ADDR;
-
-# ifdef UPM_NOP_ADDR
-       memctl->memc_mar = 0x00000000;
-       memctl->memc_mcr = MCR_UPM_B | MCR_OP_RUN | MCR_MB_CS4 |
-                          MCR_MLCF(0) | UPM_NOP_ADDR;
-# endif
-       /*
-        * Enable refresh
-        */
-
-       memctl->memc_mbmr |= MBMR_PTBE;
-       return 0;
-}
-#endif  /* !SDRAM_ALT_INIT_SEQUENCE */
-
-/* ------------------------------------------------------------------------- */
-
-static void _sdramdisable(void)
-{
-       volatile immap_t     *immap = (immap_t *)CONFIG_SYS_IMMR;
-       volatile memctl8xx_t *memctl = &immap->im_memctl;
-
-       memctl->memc_br4 = 0x00000000;
-
-       /* maybe we should turn off upmb here or something */
-}
-
-/* ------------------------------------------------------------------------- */
-
-static int initsdram(uint base, uint *noMbytes)
-{
-       uint m = CONFIG_SYS_SDRAM_SIZE>>20;
-
-       /* _initsdram needs access to sdram */
-       *((uint *)BCSR1) |= BCSR1_SDRAM_EN; /* enable sdram */
-
-       if(!_initsdram(base, m))
-       {
-               *noMbytes += m;
-               return 0;
-       }
-       else
-       {
-               *((uint *)BCSR1) &= ~BCSR1_SDRAM_EN; /* disable sdram */
-
-               _sdramdisable();
-
-               return -1;
-       }
-}
-
-#endif /* CONFIG_FADS */
-
-/* ========================================================================= */
-
-phys_size_t initdram (int board_type)
-{
-       uint sdramsz = 0;       /* size of sdram in Mbytes */
-       uint m = 0;             /* size of dram in Mbytes */
-#ifndef CONFIG_MPC885ADS
-       uint base = 0;          /* base of dram in bytes */
-       uint k, s;
-#endif
-
-#ifdef CONFIG_FADS
-       if (!initsdram (0x00000000, &sdramsz)) {
-#ifndef CONFIG_MPC885ADS
-               base = sdramsz << 20;
-#endif
-               printf ("(%u MB SDRAM) ", sdramsz);
-       }
-#endif
-#ifndef CONFIG_MPC885ADS /* No old DRAM on MPC885ADS */
-       k = (*((uint *) BCSR2) >> 23) & 0x0f;
-
-       switch (k & 0x3) {
-               /* "MCM36100 / MT8D132X" */
-       case 0x00:
-               m = 4;
-               break;
-
-               /* "MCM36800 / MT16D832X" */
-       case 0x01:
-               m = 32;
-               break;
-               /* "MCM36400 / MT8D432X" */
-       case 0x02:
-               m = 16;
-               break;
-               /* "MCM36200 / MT16D832X ?" */
-       case 0x03:
-               m = 8;
-               break;
-
-       }
-
-       switch (k >> 2) {
-       case 0x02:
-               k = 70;
-               break;
-
-       case 0x03:
-               k = 60;
-               break;
-
-       default:
-               printf ("unknown dramdelay (0x%x) - defaulting to 70 ns", k);
-               k = 70;
-       }
-
-#ifdef CONFIG_FADS
-       /* the FADS is missing this bit, all rams treated as non-edo */
-       s = 0;
-#else
-       s = (*((uint *) BCSR2) >> 27) & 0x01;
-#endif
-
-       if (!_draminit (base, m, s, k)) {
-               printf ("%dM %dns %sDRAM: ", m, k, s ? "EDO " : "");
-       } else {
-               _dramdisable ();
-               m = 0;
-       }
-#endif /* !CONFIG_MPC885ADS */
-       m += sdramsz;                           /* add sdram size to total */
-
-       return (m << 20);
-}
-
-/* ------------------------------------------------------------------------- */
-
-int testdram (void)
-{
-    /* TODO: XXX XXX XXX */
-    printf ("test: 16 MB - ok\n");
-
-    return (0);
-}
-
-/* ========================================================================= */
-
-/*
- * Check Board Identity:
- */
-
-int checkboard (void)
-{
-#if   defined(CONFIG_MPC86xADS)
-       puts ("Board: MPC86xADS\n");
-#elif defined(CONFIG_MPC885ADS)
-       puts ("Board: MPC885ADS\n");
-#else /* Only old ADS/FADS have got revision ID in BCSR3 */
-       uint r =  (((*((uint *) BCSR3) >> 23) & 1) << 3)
-               | (((*((uint *) BCSR3) >> 19) & 1) << 2)
-               | (((*((uint *) BCSR3) >> 16) & 3));
-
-       puts ("Board: ");
-#if defined(CONFIG_FADS)
-       puts ("FADS");
-       checkdboard ();
-#else
-       puts ("ADS");
-#endif
-
-       puts (" rev ");
-
-       switch (r) {
-       case 0x00:
-               puts ("ENG\n");
-               break;
-       case 0x01:
-               puts ("PILOT\n");
-               break;
-       default:
-               printf ("unknown (0x%x)\n", r);
-               return -1;
-       }
-#endif /* CONFIG_MPC86xADS */
-
-       return 0;
-}
-
-/* ========================================================================= */
-
-#if defined(CONFIG_CMD_PCMCIA)
-
-#ifdef CONFIG_SYS_PCMCIA_MEM_ADDR
-volatile unsigned char *pcmcia_mem = (unsigned char*)CONFIG_SYS_PCMCIA_MEM_ADDR;
-#endif
-
-int pcmcia_init(void)
-{
-       volatile pcmconf8xx_t   *pcmp;
-       uint v, slota = 0, slotb = 0;
-
-       /*
-       ** Enable the PCMCIA for a Flash card.
-       */
-       pcmp = (pcmconf8xx_t *)(&(((immap_t *)CONFIG_SYS_IMMR)->im_pcmcia));
-
-#if 0
-       pcmp->pcmc_pbr0 = CONFIG_SYS_PCMCIA_MEM_ADDR;
-       pcmp->pcmc_por0 = 0xc00ff05d;
-#endif
-
-       /* Set all slots to zero by default. */
-       pcmp->pcmc_pgcra = 0;
-       pcmp->pcmc_pgcrb = 0;
-#ifdef CONFIG_PCMCIA_SLOT_A
-       pcmp->pcmc_pgcra = 0x40;
-#endif
-#ifdef CONFIG_PCMCIA_SLOT_B
-       pcmp->pcmc_pgcrb = 0x40;
-#endif
-
-       /* enable PCMCIA buffers */
-       *((uint *)BCSR1) &= ~BCSR1_PCCEN;
-
-       /* Check if any PCMCIA card is plugged in. */
-
-#ifdef CONFIG_PCMCIA_SLOT_A
-       slota = (pcmp->pcmc_pipr & 0x18000000) == 0 ;
-#endif
-#ifdef CONFIG_PCMCIA_SLOT_B
-       slotb = (pcmp->pcmc_pipr & 0x00001800) == 0 ;
-#endif
-
-       if (!(slota || slotb)) {
-               printf("No card present\n");
-               pcmp->pcmc_pgcra = 0;
-               pcmp->pcmc_pgcrb = 0;
-               return -1;
-       }
-       else
-               printf("Card present (");
-
-       v = 0;
-
-       /* both the ADS and the FADS have a 5V keyed pcmcia connector (?)
-       **
-       ** Paolo - Yes, but i have to insert some 3.3V card in that slot on
-       **         my FADS... :-)
-       */
-
-#if defined(CONFIG_MPC86x)
-       switch ((pcmp->pcmc_pipr >> 30) & 3)
-#elif defined(CONFIG_MPC823) || defined(CONFIG_MPC850)
-       switch ((pcmp->pcmc_pipr >> 14) & 3)
-#endif
-       {
-       case 0x03 :
-               printf("5V");
-               v = 5;
-               break;
-       case 0x01 :
-               printf("5V and 3V");
-#ifdef CONFIG_FADS
-               v = 3; /* User lower voltage if supported! */
-#else
-               v = 5;
-#endif
-               break;
-       case 0x00 :
-               printf("5V, 3V and x.xV");
-#ifdef CONFIG_FADS
-               v = 3; /* User lower voltage if supported! */
-#else
-               v = 5;
-#endif
-               break;
-       }
-
-       switch (v) {
-#ifdef CONFIG_FADS
-       case 3:
-               printf("; using 3V");
-               /*
-               ** Enable 3 volt Vcc.
-               */
-               *((uint *)BCSR1) &= ~BCSR1_PCCVCC1;
-               *((uint *)BCSR1) |= BCSR1_PCCVCC0;
-               break;
-#endif
-       case 5:
-               printf("; using 5V");
-#ifdef CONFIG_FADS
-               /*
-               ** Enable 5 volt Vcc.
-               */
-               *((uint *)BCSR1) &= ~BCSR1_PCCVCC0;
-               *((uint *)BCSR1) |= BCSR1_PCCVCC1;
-#endif
-               break;
-
-       default:
-               *((uint *)BCSR1) |= BCSR1_PCCEN;  /* disable pcmcia */
-
-               printf("; unknown voltage");
-               return -1;
-       }
-       printf(")\n");
-       /* disable pcmcia reset after a while */
-
-       udelay(20);
-
-#ifdef CONFIG_PCMCIA_SLOT_A
-       pcmp->pcmc_pgcra = 0;
-#endif
-#ifdef CONFIG_PCMCIA_SLOT_B
-       pcmp->pcmc_pgcrb = 0;
-#endif
-
-       /* If you using a real hd you should give a short
-       * spin-up time. */
-#ifdef CONFIG_DISK_SPINUP_TIME
-       udelay(CONFIG_DISK_SPINUP_TIME);
-#endif
-
-       return 0;
-}
-
-#endif
-
-/* ========================================================================= */
-
-#ifdef CONFIG_SYS_PC_IDE_RESET
-
-void ide_set_reset(int on)
-{
-       volatile immap_t *immr = (immap_t *)CONFIG_SYS_IMMR;
-
-       /*
-        * Configure PC for IDE Reset Pin
-        */
-       if (on) {               /* assert RESET */
-               immr->im_ioport.iop_pcdat &= ~(CONFIG_SYS_PC_IDE_RESET);
-       } else {                /* release RESET */
-               immr->im_ioport.iop_pcdat |=   CONFIG_SYS_PC_IDE_RESET;
-       }
-
-       /* program port pin as GPIO output */
-       immr->im_ioport.iop_pcpar &= ~(CONFIG_SYS_PC_IDE_RESET);
-       immr->im_ioport.iop_pcso  &= ~(CONFIG_SYS_PC_IDE_RESET);
-       immr->im_ioport.iop_pcdir |=   CONFIG_SYS_PC_IDE_RESET;
-}
-
-#endif /* CONFIG_SYS_PC_IDE_RESET */
diff --git a/board/fads/fads.h b/board/fads/fads.h
deleted file mode 100644 (file)
index 1be00b9..0000000
+++ /dev/null
@@ -1,468 +0,0 @@
-/*
- * (C) Copyright 2000-2004
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * Derived from FADS860T definitions by Magnus Damm, Helmut Buchsbaum,
- * and Dan Malek
- *
- * Modified by, Yuli Barcohen, Arabella Software Ltd., yuli@arabellasw.com
- *
- * This header file contains values common to all FADS family boards.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/****************************************************************************
- * Flash Memory Map as used by U-Boot:
- *
- *                          Start Address    Length
- * +-----------------------+ 0xFE00_0000     Start of Flash -----------------
- * |                       | 0xFE00_0100     Reset Vector
- * +                       + 0xFE0?_????
- * | U-Boot code           |
- * |                       |
- * +-----------------------+ 0xFE04_0000 (sector border)
- * |                       |
- * |                       |
- * | U-Boot environment    |
- * |                       |                                 ^
- * |                       |                                 | U-Boot
- * +=======================+ 0xFE08_0000 (sector border)    -----------------
- * | Available             |                                 | Applications
- * | ...                   |                                 v
- *
- *****************************************************************************/
-
-#if 0
-#define CONFIG_BOOTDELAY       -1      /* autoboot disabled            */
-#else
-#define CONFIG_BOOTDELAY       5       /* autoboot after 5 seconds     */
-#endif
-
-#define CONFIG_ENV_OVERWRITE
-
-#define CONFIG_NFSBOOTCOMMAND                                                  \
-    "dhcp;"                                                                    \
-    "setenv bootargs root=/dev/nfs rw nfsroot=$rootpath "                      \
-    "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:eth0:off;"             \
-    "bootm"
-
-#define CONFIG_BOOTCOMMAND                                                     \
-    "setenv bootargs root=/dev/mtdblock2 rw mtdparts=phys:1280K(ROM)ro,-(root) "\
-    "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:eth0:off;"             \
-    "bootm fe080000"
-
-#undef CONFIG_BOOTARGS
-
-#undef CONFIG_WATCHDOG                 /* watchdog disabled            */
-
-#if !defined(CONFIG_MPC885ADS)
-#define CONFIG_BZIP2    /* include support for bzip2 compressed images */
-#endif
-
-/*
- * New MPC86xADS and MPC885ADS provide two Ethernet connectivity options:
- * 10Mbit/s on SCC and 100Mbit/s on FEC. FADS provides SCC Ethernet on
- * motherboard and FEC Ethernet on daughterboard. All new PQ1 chips have
- * got FEC so FEC is the default.
- */
-#undef CONFIG_SCC1_ENET                /* Disable SCC1 ethernet */
-#define        CONFIG_FEC_ENET                 /* Use FEC ethernet  */
-
-#if defined(CONFIG_SCC1_ENET) && defined(CONFIG_FEC_ENET)
-#error Both CONFIG_SCC1_ENET and CONFIG_FEC_ENET configured
-#endif
-
-#ifdef CONFIG_FEC_ENET
-#define CONFIG_SYS_DISCOVER_PHY
-#define CONFIG_MII_INIT                1
-#endif
-
-
-/*
- * BOOTP options
- */
-#define CONFIG_BOOTP_BOOTFILESIZE
-#define CONFIG_BOOTP_BOOTPATH
-#define CONFIG_BOOTP_GATEWAY
-#define CONFIG_BOOTP_HOSTNAME
-
-
-#if !defined(FADS_COMMANDS_ALREADY_DEFINED)
-/*
- * Command line configuration.
- */
-#include <config_cmd_default.h>
-
-#define CONFIG_CMD_ASKENV
-#define CONFIG_CMD_DHCP
-#define CONFIG_CMD_ECHO
-#define CONFIG_CMD_IMMAP
-#define CONFIG_CMD_JFFS2
-#define CONFIG_CMD_MII
-#define CONFIG_CMD_PCMCIA
-#define CONFIG_CMD_PING
-
-#endif
-
-
-/*
- * Miscellaneous configurable options
- */
-#define CONFIG_SYS_HUSH_PARSER
-#define        CONFIG_SYS_LONGHELP                             /* #undef to save memory        */
-#if defined(CONFIG_CMD_KGDB)
-#define        CONFIG_SYS_CBSIZE               1024            /* Console I/O Buffer Size      */
-#else
-#define        CONFIG_SYS_CBSIZE               256             /* Console I/O Buffer Size      */
-#endif
-#define        CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) /* Print Buffer Size     */
-#define        CONFIG_SYS_MAXARGS              16              /* max number of command args   */
-#define CONFIG_SYS_BARGSIZE            CONFIG_SYS_CBSIZE       /* Boot Argument Buffer Size    */
-
-#define CONFIG_SYS_LOAD_ADDR           0x00100000
-
-/*
- * Low Level Configuration Settings
- * (address mappings, register initial values, etc.)
- * You should know what you are doing if you make changes here.
- */
-
-/*-----------------------------------------------------------------------
- * Internal Memory Mapped Register
- */
-#define CONFIG_SYS_IMMR                0xFF000000
-
-/*-----------------------------------------------------------------------
- * Definitions for initial stack pointer and data area (in DPRAM)
- */
-#define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
-#define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
-
-/*-----------------------------------------------------------------------
- * Start addresses for the final memory configuration
- * (Set up by the startup code)
- * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0
- */
-#define        CONFIG_SYS_SDRAM_BASE           0x00000000
-#if defined(CONFIG_MPC86xADS) || defined(CONFIG_MPC885ADS) /* New ADS or Duet */
-#define        CONFIG_SYS_SDRAM_SIZE           0x00800000      /* 8 Mbyte */
-/*
- * 2048        SDRAM rows
- * 1000        factor s -> ms
- * 64  PTP (pre-divider from MPTPR) from SDRAM example configuration
- * 4   Number of refresh cycles per period
- * 64  Refresh cycle in ms per number of rows
- */
-#define CONFIG_SYS_PTA_PER_CLK         ((2048 * 64 * 1000) / (4 * 64))
-#elif defined(CONFIG_FADS)                             /* Old/new FADS */
-#define        CONFIG_SYS_SDRAM_SIZE           0x00400000              /* 4 Mbyte */
-#else                                                  /* Old ADS */
-#define        CONFIG_SYS_SDRAM_SIZE           0x00000000              /* No SDRAM */
-#endif
-
-#define CONFIG_SYS_MEMTEST_START       0x0100000       /* memtest works on     */
-#if (CONFIG_SYS_SDRAM_SIZE)
-#define CONFIG_SYS_MEMTEST_END         CONFIG_SYS_SDRAM_SIZE   /* 1 ... SDRAM_SIZE     */
-#else
-#define CONFIG_SYS_MEMTEST_END         0x0400000       /* 1 ... 4 MB in DRAM   */
-#endif /* CONFIG_SYS_SDRAM_SIZE */
-
-/*
- * For booting Linux, the board info and command line data
- * have to be in the first 8 MB of memory, since this is
- * the maximum mapped by the Linux kernel during initialization.
- */
-#define        CONFIG_SYS_BOOTMAPSZ            (8 << 20)       /* Initial Memory map for Linux */
-
-#define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE
-#define        CONFIG_SYS_MONITOR_LEN          (256 << 10)     /* Reserve 256 KB for monitor   */
-
-#ifdef CONFIG_BZIP2
-#define        CONFIG_SYS_MALLOC_LEN           (2500 << 10)    /* Reserve ~2.5 MB for malloc() */
-#else
-#define        CONFIG_SYS_MALLOC_LEN           (384 << 10)     /* Reserve 384 kB for malloc()  */
-#endif /* CONFIG_BZIP2 */
-
-/*-----------------------------------------------------------------------
- * Flash organization
- */
-#define CONFIG_SYS_FLASH_BASE          CONFIG_SYS_MONITOR_BASE
-#define CONFIG_SYS_FLASH_SIZE          ((uint)(8 * 1024 * 1024))       /* max 8Mbyte   */
-
-#define CONFIG_SYS_MAX_FLASH_BANKS     4       /* max number of memory banks           */
-#define CONFIG_SYS_MAX_FLASH_SECT      8       /* max number of sectors on one chip    */
-
-#define CONFIG_SYS_FLASH_ERASE_TOUT    120000  /* Timeout for Flash Erase (in ms)      */
-#define CONFIG_SYS_FLASH_WRITE_TOUT    500     /* Timeout for Flash Write (in ms)      */
-
-#define        CONFIG_ENV_IS_IN_FLASH  1
-#define CONFIG_ENV_SECT_SIZE   0x40000 /* see README - env sector total size   */
-#define CONFIG_ENV_OFFSET              CONFIG_ENV_SECT_SIZE
-#define        CONFIG_ENV_SIZE         0x4000  /* Total Size of Environment            */
-#define        CONFIG_SYS_USE_PPCENV                   /* Environment embedded in sect .ppcenv */
-
-#define        CONFIG_SYS_DIRECT_FLASH_TFTP
-
-#if defined(CONFIG_CMD_JFFS2)
-
-/*
- * JFFS2 partitions
- *
- */
-/* No command line, one static partition, whole device */
-#undef CONFIG_CMD_MTDPARTS
-#define CONFIG_JFFS2_DEV               "nor0"
-#define CONFIG_JFFS2_PART_SIZE         0xFFFFFFFF
-#define CONFIG_JFFS2_PART_OFFSET       0x00000000
-
-/* mtdparts command line support */
-/* Note: fake mtd_id used, no linux mtd map file */
-/*
-#define CONFIG_CMD_MTDPARTS
-#define MTDIDS_DEFAULT         "nor0=fads0,nor1=fads-1,nor2=fads-2,nor3=fads-3"
-#define MTDPARTS_DEFAULT       "mtdparts=fads-0:-@1m(user1),fads-1:-(user2),fads-2:-(user3),fads-3:-(user4)"
-*/
-
-#define CONFIG_SYS_JFFS2_SORT_FRAGMENTS
-#endif
-
-/*-----------------------------------------------------------------------
- * Cache Configuration
- */
-#define CONFIG_SYS_CACHELINE_SIZE      16      /* For all MPC8xx CPUs                  */
-#define CONFIG_SYS_CACHELINE_SHIFT     4       /* log base 2 of the above value        */
-
-/*-----------------------------------------------------------------------
- * I2C configuration
- */
-#if defined(CONFIG_CMD_I2C)
-#define CONFIG_HARD_I2C                1       /* I2C with hardware support */
-#define CONFIG_SYS_I2C_SPEED           400000  /* I2C speed and slave address defaults */
-#define CONFIG_SYS_I2C_SLAVE           0x7F
-#endif
-
-/*-----------------------------------------------------------------------
- * SYPCR - System Protection Control                           11-9
- * SYPCR can only be written once after reset!
- *-----------------------------------------------------------------------
- * Software & Bus Monitor Timer max, Bus Monitor enable, SW Watchdog freeze
- */
-#if defined(CONFIG_WATCHDOG)
-#define CONFIG_SYS_SYPCR       (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | \
-                        SYPCR_SWE  | SYPCR_SWRI| SYPCR_SWP)
-#else
-#define CONFIG_SYS_SYPCR       (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | SYPCR_SWP)
-#endif
-
-/*-----------------------------------------------------------------------
- * SIUMCR - SIU Module Configuration                           11-6
- *-----------------------------------------------------------------------
- * PCMCIA config., multi-function pin tri-state
- */
-#define CONFIG_SYS_SIUMCR      (SIUMCR_DBGC00 | SIUMCR_DBPC00 | SIUMCR_MLRC01)
-
-/*-----------------------------------------------------------------------
- * TBSCR - Time Base Status and Control                                11-26
- *-----------------------------------------------------------------------
- * Clear Reference Interrupt Status, Timebase freezing enabled
- */
-#define CONFIG_SYS_TBSCR       (TBSCR_REFA | TBSCR_REFB | TBSCR_TBE)
-
-/*-----------------------------------------------------------------------
- * PISCR - Periodic Interrupt Status and Control               11-31
- *-----------------------------------------------------------------------
- * Clear Periodic Interrupt Status, Interrupt Timer freezing enabled
- */
-#define CONFIG_SYS_PISCR       (PISCR_PS | PISCR_PITF)
-
-/*-----------------------------------------------------------------------
- * SCCR - System Clock and reset Control Register              15-27
- *-----------------------------------------------------------------------
- * Set clock output, timebase and RTC source and divider,
- * power management and some other internal clocks
- */
-#define SCCR_MASK      SCCR_EBDF11
-#define CONFIG_SYS_SCCR        SCCR_TBS
-
-/*-----------------------------------------------------------------------
- * DER - Debug Enable Register
- *-----------------------------------------------------------------------
- * Set to zero to prevent the processor from entering debug mode
- */
-#define CONFIG_SYS_DER          0
-
-/* Because of the way the 860 starts up and assigns CS0 the entire
- * address space, we have to set the memory controller differently.
- * Normally, you write the option register first, and then enable the
- * chip select by writing the base register.  For CS0, you must write
- * the base register first, followed by the option register.
- */
-
-/*
- * Init Memory Controller:
- *
- * BR0/OR0 (Flash)
- * BR1/OR1 (BCSR)
- */
-/* the other CS:s are determined by looking at parameters in BCSRx */
-
-#define BCSR_ADDR              ((uint) 0xFF080000)
-
-#define CONFIG_SYS_PRELIM_OR_AM        0xFF800000      /* OR addr mask */
-
-/* FLASH timing: ACS = 10, TRLX = 1, CSNT = 1, SCY = 3, EHTR = 0 */
-#define CONFIG_SYS_OR_TIMING_FLASH     (OR_CSNT_SAM  | OR_ACS_DIV4 | OR_BI | OR_SCY_3_CLK | OR_TRLX)
-
-#define CONFIG_SYS_OR0_PRELIM  (CONFIG_SYS_PRELIM_OR_AM | CONFIG_SYS_OR_TIMING_FLASH)   /* 8 Mbyte until detected */
-#define CONFIG_SYS_BR0_PRELIM  ((CONFIG_SYS_FLASH_BASE & BR_BA_MSK) | BR_V )
-
-/* BCSRx - Board Control and Status Registers */
-#define CONFIG_SYS_OR1_PRELIM  0xFFFF8110              /* 64Kbyte address space */
-#define CONFIG_SYS_BR1_PRELIM  ((BCSR_ADDR) | BR_V)
-
-/* values according to the manual */
-
-#define        BCSR0                   ((uint) (BCSR_ADDR + 0x00))
-#define        BCSR1                   ((uint) (BCSR_ADDR + 0x04))
-#define        BCSR2                   ((uint) (BCSR_ADDR + 0x08))
-#define        BCSR3                   ((uint) (BCSR_ADDR + 0x0c))
-#define        BCSR4                   ((uint) (BCSR_ADDR + 0x10))
-
-/*
- * (F)ADS bitvalues by Helmut Buchsbaum
- *
- * See User's Manual for a proper
- * description of the following structures
- */
-
-#define BCSR0_ERB       ((uint)0x80000000)
-#define BCSR0_IP        ((uint)0x40000000)
-#define BCSR0_BDIS      ((uint)0x10000000)
-#define BCSR0_BPS_MASK  ((uint)0x0C000000)
-#define BCSR0_ISB_MASK  ((uint)0x01800000)
-#define BCSR0_DBGC_MASK ((uint)0x00600000)
-#define BCSR0_DBPC_MASK ((uint)0x00180000)
-#define BCSR0_EBDF_MASK ((uint)0x00060000)
-
-#define BCSR1_FLASH_EN           ((uint)0x80000000)
-#define BCSR1_DRAM_EN            ((uint)0x40000000)
-#define BCSR1_ETHEN              ((uint)0x20000000)
-#define BCSR1_IRDEN              ((uint)0x10000000)
-#define BCSR1_FLASH_CFG_EN       ((uint)0x08000000)
-#define BCSR1_CNT_REG_EN_PROTECT ((uint)0x04000000)
-#define BCSR1_BCSR_EN            ((uint)0x02000000)
-#define BCSR1_RS232EN_1          ((uint)0x01000000)
-#define BCSR1_PCCEN              ((uint)0x00800000)
-#define BCSR1_PCCVCC0            ((uint)0x00400000)
-#define BCSR1_PCCVPP_MASK        ((uint)0x00300000)
-#define BCSR1_DRAM_HALF_WORD     ((uint)0x00080000)
-#define BCSR1_RS232EN_2          ((uint)0x00040000)
-#define BCSR1_SDRAM_EN           ((uint)0x00020000)
-#define BCSR1_PCCVCC1            ((uint)0x00010000)
-
-#define BCSR1_PCCVCCON          BCSR1_PCCVCC0
-
-#define BCSR2_FLASH_PD_MASK      ((uint)0xF0000000)
-#define BCSR2_FLASH_PD_SHIFT     28
-#define BCSR2_DRAM_PD_MASK       ((uint)0x07800000)
-#define BCSR2_DRAM_PD_SHIFT      23
-#define BCSR2_EXTTOLI_MASK       ((uint)0x00780000)
-#define BCSR2_DBREVNR_MASK       ((uint)0x00030000)
-
-#define BCSR3_DBID_MASK          ((ushort)0x3800)
-#define BCSR3_CNT_REG_EN_PROTECT ((ushort)0x0400)
-#define BCSR3_BREVNR0            ((ushort)0x0080)
-#define BCSR3_FLASH_PD_MASK      ((ushort)0x0070)
-#define BCSR3_BREVN1             ((ushort)0x0008)
-#define BCSR3_BREVN2_MASK        ((ushort)0x0003)
-
-#define BCSR4_ETHLOOP            ((uint)0x80000000)
-#define BCSR4_TFPLDL             ((uint)0x40000000)
-#define BCSR4_TPSQEL             ((uint)0x20000000)
-#define BCSR4_SIGNAL_LAMP        ((uint)0x10000000)
-#if defined(CONFIG_MPC823)
-#define BCSR4_USB_EN             ((uint)0x08000000)
-#define BCSR4_USB_SPEED          ((uint)0x04000000)
-#define BCSR4_VCCO               ((uint)0x02000000)
-#define BCSR4_VIDEO_ON           ((uint)0x00800000)
-#define BCSR4_VDO_EKT_CLK_EN     ((uint)0x00400000)
-#define BCSR4_VIDEO_RST          ((uint)0x00200000)
-#define BCSR4_MODEM_EN           ((uint)0x00100000)
-#define BCSR4_DATA_VOICE         ((uint)0x00080000)
-#elif defined(CONFIG_MPC850)
-#define BCSR4_DATA_VOICE         ((uint)0x00080000)
-#elif defined(CONFIG_MPC860SAR)
-#define BCSR4_UTOPIA_EN          ((uint)0x08000000)
-#else /* MPC860T and other chips with FEC */
-#define BCSR4_FETH_EN            ((uint)0x08000000)
-#define BCSR4_FETHCFG0           ((uint)0x04000000)
-#define BCSR4_FETHFDE            ((uint)0x02000000)
-#define BCSR4_FETHCFG1           ((uint)0x00400000)
-#define BCSR4_FETHRST            ((uint)0x00200000)
-#endif
-
-/* BSCR5 exists on MPC86xADS and MPC885ADS only */
-
-#define CONFIG_SYS_PHYDEV_ADDR         (BCSR_ADDR + 0x20000)
-
-#define BCSR5                  (CONFIG_SYS_PHYDEV_ADDR + 0x300)
-
-#define BCSR5_MII2_EN          0x40
-#define BCSR5_MII2_RST         0x20
-#define BCSR5_T1_RST           0x10
-#define BCSR5_ATM155_RST       0x08
-#define BCSR5_ATM25_RST                0x04
-#define BCSR5_MII1_EN          0x02
-#define BCSR5_MII1_RST         0x01
-
-/* We don't use the 8259.
-*/
-#define NR_8259_INTS   0
-
-/*-----------------------------------------------------------------------
- * PCMCIA stuff
- *-----------------------------------------------------------------------
- */
-#define CONFIG_SYS_PCMCIA_MEM_ADDR     (0xE0000000)
-#define CONFIG_SYS_PCMCIA_MEM_SIZE     ( 64 << 20 )
-#define CONFIG_SYS_PCMCIA_DMA_ADDR     (0xE4000000)
-#define CONFIG_SYS_PCMCIA_DMA_SIZE     ( 64 << 20 )
-#define CONFIG_SYS_PCMCIA_ATTRB_ADDR   (0xE8000000)
-#define CONFIG_SYS_PCMCIA_ATTRB_SIZE   ( 64 << 20 )
-#define CONFIG_SYS_PCMCIA_IO_ADDR      (0xEC000000)
-#define CONFIG_SYS_PCMCIA_IO_SIZE      ( 64 << 20 )
-
-/*-----------------------------------------------------------------------
- * IDE/ATA stuff
- *-----------------------------------------------------------------------
- */
-#define CONFIG_MAC_PARTITION    1
-#define CONFIG_DOS_PARTITION    1
-#define CONFIG_ISO_PARTITION   1
-
-#undef CONFIG_ATAPI
-#if 0  /* does not make sense when CONFIG_CMD_IDE is not enabled, too */
-#define CONFIG_IDE_8xx_PCCARD  1       /* Use IDE with PC Card Adapter */
-#endif
-#undef CONFIG_IDE_8xx_DIRECT           /* Direct IDE    not supported  */
-#undef CONFIG_IDE_LED                  /* LED   for ide not supported  */
-#undef CONFIG_IDE_RESET                /* reset for ide not supported  */
-
-#define CONFIG_SYS_IDE_MAXBUS          1       /* max. 2 IDE busses    */
-#define CONFIG_SYS_IDE_MAXDEVICE       (CONFIG_SYS_IDE_MAXBUS*2) /* max. 2 drives per IDE bus */
-
-#define CONFIG_SYS_ATA_BASE_ADDR       CONFIG_SYS_PCMCIA_MEM_ADDR
-#define CONFIG_SYS_ATA_IDE0_OFFSET     0x0000
-
-/* Offset for data I/O                 */
-#define CONFIG_SYS_ATA_DATA_OFFSET     (CONFIG_SYS_PCMCIA_MEM_SIZE + 0x320)
-/* Offset for normal register accesses */
-#define CONFIG_SYS_ATA_REG_OFFSET      (2 * CONFIG_SYS_PCMCIA_MEM_SIZE + 0x320)
-/* Offset for alternate registers      */
-#define CONFIG_SYS_ATA_ALT_OFFSET      0x0000
-
-#define CONFIG_DISK_SPINUP_TIME 1000000
-/* #undef CONFIG_DISK_SPINUP_TIME */   /* usin  Compact Flash */
diff --git a/board/fads/flash.c b/board/fads/flash.c
deleted file mode 100644 (file)
index ea2f713..0000000
+++ /dev/null
@@ -1,544 +0,0 @@
-/*
- * (C) Copyright 2000
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <common.h>
-#include <mpc8xx.h>
-
-flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS];   /* info for FLASH chips */
-
-#if defined(CONFIG_ENV_IS_IN_FLASH)
-# ifndef  CONFIG_ENV_ADDR
-#  define CONFIG_ENV_ADDR      (CONFIG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET)
-# endif
-# ifndef  CONFIG_ENV_SIZE
-#  define CONFIG_ENV_SIZE      CONFIG_ENV_SECT_SIZE
-# endif
-# ifndef  CONFIG_ENV_SECT_SIZE
-#  define CONFIG_ENV_SECT_SIZE  CONFIG_ENV_SIZE
-# endif
-#endif
-
-#define QUAD_ID(id)    ((((ulong)(id) & 0xFF) << 24) | \
-                        (((ulong)(id) & 0xFF) << 16) | \
-                        (((ulong)(id) & 0xFF) << 8)  | \
-                        (((ulong)(id) & 0xFF) << 0)    \
-                       )
-
-/*-----------------------------------------------------------------------
- * Functions
- */
-static ulong flash_get_size (vu_long * addr, flash_info_t * info);
-static int write_word (flash_info_t * info, ulong dest, ulong data);
-
-/*-----------------------------------------------------------------------
- */
-unsigned long flash_init (void)
-{
-       volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
-       volatile memctl8xx_t *memctl = &immap->im_memctl;
-       vu_long *bcsr = (vu_long *)BCSR_ADDR;
-       unsigned long pd_size, total_size, bsize, or_am;
-       int i;
-
-       /* Init: no FLASHes known */
-       for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; ++i) {
-               flash_info[i].flash_id = FLASH_UNKNOWN;
-               flash_info[i].size = 0;
-               flash_info[i].sector_count = 0;
-               flash_info[i].start[0] = 0xFFFFFFFF; /* For TFTP */
-       }
-
-       switch ((bcsr[2] & BCSR2_FLASH_PD_MASK) >> BCSR2_FLASH_PD_SHIFT) {
-       case 2:
-       case 4:
-       case 6:
-               pd_size = 0x800000;
-               or_am = 0xFF800000;
-               break;
-
-       case 5:
-       case 7:
-               pd_size = 0x400000;
-               or_am = 0xFFC00000;
-               break;
-
-       case 8:
-               pd_size = 0x200000;
-               or_am = 0xFFE00000;
-               break;
-
-       default:
-               pd_size = 0;
-               or_am = 0xFFE00000;
-               printf("## Unsupported flash detected by BCSR: 0x%08lX\n", bcsr[2]);
-       }
-
-       total_size = 0;
-       for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS && total_size < pd_size; ++i) {
-               bsize = flash_get_size((vu_long *)(CONFIG_SYS_FLASH_BASE + total_size),
-                                      &flash_info[i]);
-
-               if (flash_info[i].flash_id == FLASH_UNKNOWN) {
-                       printf ("## Unknown FLASH on Bank %d - Size = 0x%08lx = %ld MB\n",
-                               i, bsize, bsize >> 20);
-               }
-
-               total_size += bsize;
-       }
-
-       if (total_size != pd_size) {
-               printf("## Detected flash size %lu conflicts with PD data %lu\n",
-                      total_size, pd_size);
-       }
-
-       /* Remap FLASH according to real size */
-       memctl->memc_or0 = or_am | CONFIG_SYS_OR_TIMING_FLASH;
-
-       for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS && flash_info[i].size != 0; ++i) {
-#if CONFIG_SYS_MONITOR_BASE >= CONFIG_SYS_FLASH_BASE
-               /* monitor protection ON by default */
-               if (CONFIG_SYS_MONITOR_BASE >= flash_info[i].start[0])
-                       flash_protect (FLAG_PROTECT_SET,
-                                      CONFIG_SYS_MONITOR_BASE,
-                                      CONFIG_SYS_MONITOR_BASE + monitor_flash_len - 1,
-                                      &flash_info[i]);
-#endif
-
-#ifdef CONFIG_ENV_IS_IN_FLASH
-               /* ENV protection ON by default */
-               if (CONFIG_ENV_ADDR >= flash_info[i].start[0])
-                       flash_protect (FLAG_PROTECT_SET,
-                                      CONFIG_ENV_ADDR,
-                                      CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1,
-                                      &flash_info[i]);
-#endif
-       }
-
-       return total_size;
-}
-
-/*-----------------------------------------------------------------------
- */
-void flash_print_info (flash_info_t * info)
-{
-       int i;
-
-       if (info->flash_id == FLASH_UNKNOWN) {
-               printf ("missing or unknown FLASH type\n");
-               return;
-       }
-
-       switch (info->flash_id & FLASH_VENDMASK) {
-       case FLASH_MAN_AMD:
-               printf ("AMD ");
-               break;
-       case FLASH_MAN_FUJ:
-               printf ("FUJITSU ");
-               break;
-       case FLASH_MAN_BM:
-               printf ("BRIGHT MICRO ");
-               break;
-       default:
-               printf ("Unknown Vendor ");
-               break;
-       }
-
-       switch (info->flash_id & FLASH_TYPEMASK) {
-       case FLASH_AM040:
-               printf ("29F040 or 29LV040 (4 Mbit, uniform sectors)\n");
-               break;
-       case FLASH_AM080:
-               printf ("29F080 or 29LV080 (8 Mbit, uniform sectors)\n");
-               break;
-       case FLASH_AM400B:
-               printf ("AM29LV400B (4 Mbit, bottom boot sect)\n");
-               break;
-       case FLASH_AM400T:
-               printf ("AM29LV400T (4 Mbit, top boot sector)\n");
-               break;
-       case FLASH_AM800B:
-               printf ("AM29LV800B (8 Mbit, bottom boot sect)\n");
-               break;
-       case FLASH_AM800T:
-               printf ("AM29LV800T (8 Mbit, top boot sector)\n");
-               break;
-       case FLASH_AM160B:
-               printf ("AM29LV160B (16 Mbit, bottom boot sect)\n");
-               break;
-       case FLASH_AM160T:
-               printf ("AM29LV160T (16 Mbit, top boot sector)\n");
-               break;
-       case FLASH_AM320B:
-               printf ("AM29LV320B (32 Mbit, bottom boot sect)\n");
-               break;
-       case FLASH_AM320T:
-               printf ("AM29LV320T (32 Mbit, top boot sector)\n");
-               break;
-       default:
-               printf ("Unknown Chip Type\n");
-               break;
-       }
-
-       printf ("  Size: %ld MB in %d Sectors\n", info->size >> 20,
-               info->sector_count);
-
-       printf ("  Sector Start Addresses:");
-
-       for (i = 0; i < info->sector_count; ++i) {
-               if ((i % 5) == 0) {
-                       printf ("\n   ");
-               }
-
-               printf (" %08lX%s",
-                       info->start[i], info->protect[i] ? " (RO)" : "     ");
-       }
-
-       printf ("\n");
-}
-
-/*-----------------------------------------------------------------------
- * The following code can not run from flash!
- */
-static ulong flash_get_size (vu_long * addr, flash_info_t * info)
-{
-       short i;
-
-       /* Write auto select command: read Manufacturer ID */
-       addr[0x0555] = 0xAAAAAAAA;
-       addr[0x02AA] = 0x55555555;
-       addr[0x0555] = 0x90909090;
-
-       switch (addr[0]) {
-       case QUAD_ID(AMD_MANUFACT):
-               info->flash_id = FLASH_MAN_AMD;
-               break;
-
-       case QUAD_ID(FUJ_MANUFACT):
-               info->flash_id = FLASH_MAN_FUJ;
-               break;
-
-       default:
-               info->flash_id = FLASH_UNKNOWN;
-               info->sector_count = 0;
-               info->size = 0;
-               break;
-       }
-
-       switch (addr[1]) {      /* device ID            */
-       case QUAD_ID(AMD_ID_F040B):
-       case QUAD_ID(AMD_ID_LV040B):
-               info->flash_id += FLASH_AM040;
-               info->sector_count = 8;
-               info->size = 0x00200000;
-               break;          /* => 2 MB              */
-
-       case QUAD_ID(AMD_ID_F080B):
-               info->flash_id += FLASH_AM080;
-               info->sector_count = 16;
-               info->size = 0x00400000;
-               break;          /* => 4 MB              */
-#if 0
-       case AMD_ID_LV400T:
-               info->flash_id += FLASH_AM400T;
-               info->sector_count = 11;
-               info->size = 0x00100000;
-               break;          /* => 1 MB              */
-
-       case AMD_ID_LV400B:
-               info->flash_id += FLASH_AM400B;
-               info->sector_count = 11;
-               info->size = 0x00100000;
-               break;          /* => 1 MB              */
-
-       case AMD_ID_LV800T:
-               info->flash_id += FLASH_AM800T;
-               info->sector_count = 19;
-               info->size = 0x00200000;
-               break;          /* => 2 MB              */
-
-       case AMD_ID_LV800B:
-               info->flash_id += FLASH_AM800B;
-               info->sector_count = 19;
-               info->size = 0x00200000;
-               break;          /* => 2 MB              */
-
-       case AMD_ID_LV160T:
-               info->flash_id += FLASH_AM160T;
-               info->sector_count = 35;
-               info->size = 0x00400000;
-               break;          /* => 4 MB              */
-
-       case AMD_ID_LV160B:
-               info->flash_id += FLASH_AM160B;
-               info->sector_count = 35;
-               info->size = 0x00400000;
-               break;          /* => 4 MB              */
-
-       case AMD_ID_LV320T:
-               info->flash_id += FLASH_AM320T;
-               info->sector_count = 67;
-               info->size = 0x00800000;
-               break;          /* => 8 MB              */
-
-       case AMD_ID_LV320B:
-               info->flash_id += FLASH_AM320B;
-               info->sector_count = 67;
-               info->size = 0x00800000;
-               break;          /* => 8 MB              */
-#endif /* 0 */
-       default:
-               info->flash_id = FLASH_UNKNOWN;
-               return (0);     /* => no or unknown flash */
-       }
-
-#if 0
-       /* set up sector start address table */
-       if (info->flash_id & FLASH_BTYPE) {
-               /* set sector offsets for bottom boot block type        */
-               info->start[0] = base + 0x00000000;
-               info->start[1] = base + 0x00008000;
-               info->start[2] = base + 0x0000C000;
-               info->start[3] = base + 0x00010000;
-               for (i = 4; i < info->sector_count; i++) {
-                       info->start[i] = base + (i * 0x00020000) - 0x00060000;
-               }
-       } else {
-               /* set sector offsets for top boot block type           */
-               i = info->sector_count - 1;
-               info->start[i--] = base + info->size - 0x00008000;
-               info->start[i--] = base + info->size - 0x0000C000;
-               info->start[i--] = base + info->size - 0x00010000;
-               for (; i >= 0; i--) {
-                       info->start[i] = base + i * 0x00020000;
-               }
-       }
-#else
-       /* set sector offsets for uniform sector type */
-       for (i = 0; i < info->sector_count; i++)
-               info->start[i] = (ulong)addr + (i * 0x00040000);
-#endif
-
-       /* check for protected sectors */
-       for (i = 0; i < info->sector_count; i++) {
-               /* read sector protection at sector address, (A7 .. A0) = 0x02 */
-               /* D0 = 1 if protected */
-               addr = (volatile unsigned long *) (info->start[i]);
-               info->protect[i] = addr[2] & 1;
-       }
-
-       if (info->flash_id != FLASH_UNKNOWN) {
-               addr = (volatile unsigned long *) info->start[0];
-               *addr = 0xF0F0F0F0;     /* reset bank */
-       }
-
-       return (info->size);
-}
-
-/*-----------------------------------------------------------------------
- */
-int flash_erase (flash_info_t * info, int s_first, int s_last)
-{
-       vu_long *addr = (vu_long *) (info->start[0]);
-       int flag, prot, sect, l_sect;
-       ulong start, now, last;
-
-       if ((s_first < 0) || (s_first > s_last)) {
-               if (info->flash_id == FLASH_UNKNOWN) {
-                       printf ("- missing\n");
-               } else {
-                       printf ("- no sectors to erase\n");
-               }
-               return ERR_INVAL;
-       }
-
-       if ((info->flash_id == FLASH_UNKNOWN) ||
-           (info->flash_id > FLASH_AMD_COMP)) {
-               printf ("Can't erase unknown flash type - aborted\n");
-               return ERR_UNKNOWN_FLASH_TYPE;
-       }
-
-       prot = 0;
-       for (sect = s_first; sect <= s_last; ++sect) {
-               if (info->protect[sect]) {
-                       prot++;
-               }
-       }
-
-       if (prot) {
-               printf ("- Warning: %d protected sectors will not be erased!\n", prot);
-       } else {
-               printf ("\n");
-       }
-
-       l_sect = -1;
-
-       /* Disable interrupts which might cause a timeout here */
-       flag = disable_interrupts ();
-
-       addr[0x0555] = 0xAAAAAAAA;
-       addr[0x02AA] = 0x55555555;
-       addr[0x0555] = 0x80808080;
-       addr[0x0555] = 0xAAAAAAAA;
-       addr[0x02AA] = 0x55555555;
-
-       /* Start erase on unprotected sectors */
-       for (sect = s_first; sect <= s_last; sect++) {
-               if (info->protect[sect] == 0) { /* not protected */
-                       addr = (vu_long *) (info->start[sect]);
-                       addr[0] = 0x30303030;
-                       l_sect = sect;
-               }
-       }
-
-       /* re-enable interrupts if necessary */
-       if (flag)
-               enable_interrupts ();
-
-       /* wait at least 80us - let's wait 1 ms */
-       udelay (1000);
-
-       /*
-        * We wait for the last triggered sector
-        */
-       if (l_sect < 0)
-               goto DONE;
-
-       start = get_timer (0);
-       last = start;
-       addr = (vu_long *) (info->start[l_sect]);
-       while ((addr[0] & 0xFFFFFFFF) != 0xFFFFFFFF)
-       {
-               if ((now = get_timer (start)) > CONFIG_SYS_FLASH_ERASE_TOUT) {
-                       printf ("Timeout\n");
-                       return ERR_TIMOUT;
-               }
-               /* show that we're waiting */
-               if ((now - last) > 1000) {      /* every second */
-                       putc ('.');
-                       last = now;
-               }
-       }
-
-      DONE:
-       /* reset to read mode */
-       addr = (volatile unsigned long *) info->start[0];
-       addr[0] = 0xF0F0F0F0;   /* reset bank */
-
-       printf (" done\n");
-
-       return 0;
-}
-
-/*-----------------------------------------------------------------------
- * Copy memory to flash, returns:
- * 0 - OK
- * 1 - write timeout
- * 2 - Flash not erased
- */
-int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt)
-{
-       ulong cp, wp, data;
-       int i, l, rc;
-
-       wp = (addr & ~3);       /* get lower word aligned address */
-
-       /*
-        * handle unaligned start bytes
-        */
-       if ((l = addr - wp) != 0) {
-               data = 0;
-               for (i = 0, cp = wp; i < l; ++i, ++cp) {
-                       data = (data << 8) | (*(uchar *) cp);
-               }
-               for (; i < 4 && cnt > 0; ++i) {
-                       data = (data << 8) | *src++;
-                       --cnt;
-                       ++cp;
-               }
-               for (; cnt == 0 && i < 4; ++i, ++cp) {
-                       data = (data << 8) | (*(uchar *) cp);
-               }
-
-               if ((rc = write_word (info, wp, data)) != 0) {
-                       return (rc);
-               }
-               wp += 4;
-       }
-
-       /*
-        * handle word aligned part
-        */
-       while (cnt >= 4) {
-               data = 0;
-               for (i = 0; i < 4; ++i) {
-                       data = (data << 8) | *src++;
-               }
-               if ((rc = write_word (info, wp, data)) != 0) {
-                       return (rc);
-               }
-               wp += 4;
-               cnt -= 4;
-       }
-
-       if (cnt == 0) {
-               return (0);
-       }
-
-       /*
-        * handle unaligned tail bytes
-        */
-       data = 0;
-       for (i = 0, cp = wp; i < 4 && cnt > 0; ++i, ++cp) {
-               data = (data << 8) | *src++;
-               --cnt;
-       }
-       for (; i < 4; ++i, ++cp) {
-               data = (data << 8) | (*(uchar *) cp);
-       }
-
-       return (write_word (info, wp, data));
-}
-
-/*-----------------------------------------------------------------------
- * Write a word to Flash, returns:
- * 0 - OK
- * 1 - write timeout
- * 2 - Flash not erased
- */
-static int write_word (flash_info_t * info, ulong dest, ulong data)
-{
-       vu_long *addr = (vu_long *) (info->start[0]);
-       ulong start;
-       int flag;
-
-       /* Check if Flash is (sufficiently) erased */
-       if ((*((vu_long *) dest) & data) != data) {
-               return ERR_NOT_ERASED;
-       }
-       /* Disable interrupts which might cause a timeout here */
-       flag = disable_interrupts ();
-
-       addr[0x0555] = 0xAAAAAAAA;
-       addr[0x02AA] = 0x55555555;
-       addr[0x0555] = 0xA0A0A0A0;
-
-       *((vu_long *) dest) = data;
-
-       /* re-enable interrupts if necessary */
-       if (flag)
-               enable_interrupts ();
-
-       /* data polling for D7 */
-       start = get_timer (0);
-       while ((*((vu_long *) dest) & 0x80808080) != (data & 0x80808080))
-       {
-               if (get_timer (start) > CONFIG_SYS_FLASH_WRITE_TOUT) {
-                       return ERR_TIMOUT;
-               }
-       }
-       return (0);
-}
diff --git a/board/fads/lamp.c b/board/fads/lamp.c
deleted file mode 100644 (file)
index ffcc2b3..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#include <config.h>
-
-#include <common.h>
-
-void
-signal_delay(unsigned int n)
-{
-  while (n--);
-}
-
-void
-signal_on(void)
-{
-  *((volatile uint *)BCSR4) &= ~(1<<(31-3)); /* led on */
-}
-
-void
-signal_off(void)
-{
-  *((volatile uint *)BCSR4) |= (1<<(31-3)); /* led off */
-}
-
-void
-slow_blink(unsigned int n)
-{
-  while (n--) {
-    signal_on();
-    signal_delay(0x00400000);
-    signal_off();
-    signal_delay(0x00400000);
-  }
-}
-
-void
-fast_blink(unsigned int n)
-{
-  while (n--) {
-    signal_on();
-    signal_delay(0x00100000);
-    signal_off();
-    signal_delay(0x00100000);
-  }
-}
diff --git a/board/fads/pcmcia.c b/board/fads/pcmcia.c
deleted file mode 100644 (file)
index 996f032..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-#include <common.h>
-#include <mpc8xx.h>
-#include <pcmcia.h>
-
-#undef CONFIG_PCMCIA
-
-#if defined(CONFIG_CMD_PCMCIA)
-#define        CONFIG_PCMCIA
-#endif
-
-#if defined(CONFIG_CMD_IDE) && defined(CONFIG_IDE_8xx_PCCARD)
-#define        CONFIG_PCMCIA
-#endif
-
-#ifdef CONFIG_PCMCIA
-
-#define        PCMCIA_BOARD_MSG "FADS"
-
-int pcmcia_voltage_set(int slot, int vcc, int vpp)
-{
-       u_long reg = 0;
-
-       switch(vpp) {
-               case 0: reg = 0; break;
-               case 50: reg = 1; break;
-               case 120: reg = 2; break;
-               default: return 1;
-       }
-
-       switch(vcc) {
-               case 0: reg = 0; break;
-#ifdef CONFIG_FADS
-       case 33: reg = BCSR1_PCCVCC0 | BCSR1_PCCVCC1; break;
-       case 50: reg = BCSR1_PCCVCC1; break;
-#endif
-       default: return 1;
-       }
-
-       /* first, turn off all power */
-
-#ifdef CONFIG_FADS
-       *((uint *)BCSR1) &= ~(BCSR1_PCCVCC0 | BCSR1_PCCVCC1);
-#endif
-       *((uint *)BCSR1) &= ~BCSR1_PCCVPP_MASK;
-
-       /* enable new powersettings */
-
-#ifdef CONFIG_FADS
-       *((uint *)BCSR1) |= reg;
-#endif
-
-       *((uint *)BCSR1) |= reg << 20;
-
-       return 0;
-}
-
-int pcmcia_hardware_enable(int slot)
-{
-       *((uint *)BCSR1) &= ~BCSR1_PCCEN;
-       return 0;
-}
-
-#if defined(CONFIG_CMD_PCMCIA)
-int pcmcia_hardware_disable(int slot)
-{
-       *((uint *)BCSR1) &= ~BCSR1_PCCEN;
-       return 0;
-}
-#endif
-
-#endif /* CONFIG_PCMCIA */
diff --git a/board/fads/u-boot.lds b/board/fads/u-boot.lds
deleted file mode 100644 (file)
index 3123a88..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * (C) Copyright 2000
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-OUTPUT_ARCH(powerpc)
-SECTIONS
-{
-  /* Read-only sections, merged into text segment: */
-  . = + SIZEOF_HEADERS;
-  .text      :
-  {
-    arch/powerpc/cpu/mpc8xx/start.o    (.text*)
-    arch/powerpc/cpu/mpc8xx/traps.o    (.text*)
-
-    /*. = DEFINED(env_offset) ? env_offset : .;*/
-    common/env_embedded.o      (.ppcenv*)
-
-    *(.text*)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-
-  /* Read-write section, merged into data segment: */
-  . = (. + 0x0FFF) & 0xFFFFF000;
-  _erotext = .;
-  PROVIDE (erotext = .);
-  .reloc   :
-  {
-    _GOT2_TABLE_ = .;
-    KEEP(*(.got2))
-    KEEP(*(.got))
-    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
-    _FIXUP_TABLE_ = .;
-    KEEP(*(.fixup))
-  }
-  __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
-  __fixup_entries = (. - _FIXUP_TABLE_)>>2;
-
-  .data    :
-  {
-    *(.data*)
-    *(.sdata*)
-  }
-  _edata  =  .;
-  PROVIDE (edata = .);
-
-  . = .;
-
-  . = ALIGN(4);
-  .u_boot_list : {
-       KEEP(*(SORT(.u_boot_list*)));
-  }
-
-
-  . = .;
-  __start___ex_table = .;
-  __ex_table : { *(__ex_table) }
-  __stop___ex_table = .;
-
-  . = ALIGN(4096);
-  __init_begin = .;
-  .text.init : { *(.text.init) }
-  .data.init : { *(.data.init) }
-  . = ALIGN(4096);
-  __init_end = .;
-
-  __bss_start = .;
-  .bss (NOLOAD)       :
-  {
-   *(.bss*)
-   *(.sbss*)
-   *(COMMON)
-   . = ALIGN(4);
-  }
-  __bss_end = . ;
-  PROVIDE (end = .);
-}
-ENTRY(_start)
index 7a98e41d0aacc2c444030924a5c6a7856184d37f..1bac97027d4b9f794bf7455aa01831daa2b74811 100644 (file)
@@ -374,11 +374,12 @@ int last_stage_init(void)
 
        FPGA_GET_REG(0, fpga_features, &fpga_features);
 
-       if (!legacy)
-               ch0_rgmii2_present = !pca9698_get_value(0x20, 30);
+       if (!legacy) {
+               /* Turn on Parade DP501 */
+               pca9698_direction_output(0x20, 9, 1);
 
-       print_fpga_info(0, ch0_rgmii2_present);
-       osd_probe(0);
+               ch0_rgmii2_present = !pca9698_get_value(0x20, 30);
+       }
 
        /* wait for FPGA done */
        for (k = 0; k < ARRAY_SIZE(mclink_controllers); ++k) {
@@ -408,13 +409,16 @@ int last_stage_init(void)
                }
        }
 
-       /* wait for slave-PLLs to be up and running */
+       /* give slave-PLLs and Parade DP501 some time to be up and running */
        udelay(500000);
 
        mclink_fpgacount = CONFIG_SYS_MCLINK_MAX;
        slaves = mclink_probe();
        mclink_fpgacount = 0;
 
+       print_fpga_info(0, ch0_rgmii2_present);
+       osd_probe(0);
+
        if (slaves <= 0)
                return 0;
 
index fb841e0b8f06ec90943cc288c2977e33585ec6b2..7f8b4277ebc279dbfe8af0ef5f73ea290b0ab4ee 100644 (file)
@@ -8,6 +8,6 @@
 obj-$(CONFIG_SYS_FPGA_COMMON) += fpga.o
 obj-$(CONFIG_IO) += miiphybb.o
 obj-$(CONFIG_IO64) += miiphybb.o
-obj-$(CONFIG_IOCON) += osd.o mclink.o
+obj-$(CONFIG_IOCON) += osd.o mclink.o dp501.o
 obj-$(CONFIG_DLVISION_10G) += osd.o
 obj-$(CONFIG_CONTROLCENTERD) += dp501.o
index 52f3ea167f1b1f4afd582be8ec356ee9f65f583c..7eb15ed0ba4b7d867f7f835d3feab4630f042a66 100644 (file)
@@ -54,14 +54,39 @@ static void dp501_link_training(u8 addr)
 void dp501_powerup(u8 addr)
 {
        dp501_clrbits(addr, 0x0a, 0x30); /* power on encoder */
+       dp501_setbits(addr, 0x0a, 0x0e); /* block HDCP and MCCS on I2C bride*/
        i2c_reg_write(addr, 0x27, 0x30); /* Hardware auto detect DVO timing */
        dp501_setbits(addr, 0x72, 0x80); /* DPCD read enable */
        dp501_setbits(addr, 0x30, 0x20); /* RS polynomial select */
        i2c_reg_write(addr, 0x71, 0x20); /* Enable Aux burst write */
        dp501_setbits(addr, 0x78, 0x30); /* Disable HPD2 IRQ */
        dp501_clrbits(addr, 0x2f, 0x40); /* Link FIFO reset selection */
+       dp501_clrbits(addr, 0x60, 0x20); /* Enable scrambling */
+
+#ifdef CONFIG_SYS_DP501_VCAPCTRL0
+       i2c_reg_write(addr, 0x24, CONFIG_SYS_DP501_VCAPCTRL0);
+#else
        i2c_reg_write(addr, 0x24, 0xc0); /* SDR mode 0, ext. H/VSYNC */
+#endif
+
+#ifdef CONFIG_SYS_DP501_DIFFERENTIAL
+       i2c_reg_write(addr + 2, 0x24, 0x10); /* clock input differential */
+       i2c_reg_write(addr + 2, 0x25, 0x04);
+       i2c_reg_write(addr + 2, 0x26, 0x10);
+#else
        i2c_reg_write(addr + 2, 0x24, 0x02); /* clock input single ended */
+#endif
+
+       i2c_reg_write(addr + 2, 0x00, 0x18); /* driving strength */
+       i2c_reg_write(addr + 2, 0x03, 0x06); /* driving strength */
+       i2c_reg_write(addr, 0x2c, 0x00); /* configure N value */
+       i2c_reg_write(addr, 0x2d, 0x00); /* configure N value */
+       i2c_reg_write(addr, 0x2e, 0x0c); /* configure N value */
+       i2c_reg_write(addr, 0x76, 0xff); /* clear all interrupt */
+       dp501_setbits(addr, 0x78, 0x03); /* clear all interrupt */
+       i2c_reg_write(addr, 0x75, 0xf8); /* aux channel reset */
+       i2c_reg_write(addr, 0x75, 0x00); /* clear aux channel reset */
+       i2c_reg_write(addr, 0x87, 0x70); /* set retry counter as 7 */
 
        if (dp501_detect_cable_adapter(addr)) {
                printf("DVI/HDMI cable adapter detected\n");
@@ -69,16 +94,6 @@ void dp501_powerup(u8 addr)
                dp501_clrbits(addr, 0x00, 0x08); /* DVI/HDMI HDCP operation */
        } else {
                printf("no DVI/HDMI cable adapter detected\n");
-               i2c_reg_write(addr + 2, 0x00, 0x18); /* driving strength */
-               i2c_reg_write(addr + 2, 0x03, 0x06); /* driving strength */
-               i2c_reg_write(addr, 0x2c, 0x00); /* configure N value */
-               i2c_reg_write(addr, 0x2d, 0x00); /* configure N value */
-               i2c_reg_write(addr, 0x2e, 0x0c); /* configure N value */
-               i2c_reg_write(addr, 0x76, 0xff); /* clear all interrupt */
-               dp501_setbits(addr, 0x78, 0x03); /* clear all interrupt */
-               i2c_reg_write(addr, 0x75, 0xf8); /* aux channel reset */
-               i2c_reg_write(addr, 0x75, 0x00); /* clear aux channel reset */
-               i2c_reg_write(addr, 0x87, 0x70); /* set retry counter as 7 */
                dp501_setbits(addr, 0x00, 0x08); /* for DP HDCP operation */
 
                dp501_link_training(addr);
index c49cd9a619e152da94a354ae94afafe7e1298855..1c765e4cbfb3ffb7daea200d73b24ccbfd0382b9 100644 (file)
@@ -9,6 +9,7 @@
 #include <i2c.h>
 #include <malloc.h>
 
+#include "dp501.h"
 #include <gdsys_fpga.h>
 
 #define CH7301_I2C_ADDR 0x75
@@ -24,6 +25,8 @@
 #define SIL1178_MASTER_I2C_ADDRESS 0x38
 #define SIL1178_SLAVE_I2C_ADDRESS 0x39
 
+#define DP501_I2C_ADDR 0x08
+
 #define PIXCLK_640_480_60 25180000
 
 enum {
@@ -54,51 +57,23 @@ u16 *buf;
 
 unsigned int max_osd_screen = CONFIG_SYS_OSD_SCREENS - 1;
 
-#ifdef CONFIG_SYS_CH7301
-int ch7301_i2c[] = CONFIG_SYS_CH7301_I2C;
+#ifdef CONFIG_SYS_ICS8N3QV01_I2C
+int ics8n3qv01_i2c[] = CONFIG_SYS_ICS8N3QV01_I2C;
 #endif
 
-#if defined(CONFIG_SYS_ICS8N3QV01) || defined(CONFIG_SYS_SIL1178)
-static void fpga_iic_write(unsigned screen, u8 slave, u8 reg, u8 data)
-{
-       u16 val;
-
-       do {
-               FPGA_GET_REG(screen, extended_interrupt, &val);
-       } while (val & (1 << 12));
-
-       FPGA_SET_REG(screen, i2c.write_mailbox_ext, reg | (data << 8));
-       FPGA_SET_REG(screen, i2c.write_mailbox, 0xc400 | (slave << 1));
-}
+#ifdef CONFIG_SYS_CH7301_I2C
+int ch7301_i2c[] = CONFIG_SYS_CH7301_I2C;
+#endif
 
-static u8 fpga_iic_read(unsigned screen, u8 slave, u8 reg)
-{
-       unsigned int ctr = 0;
-       u16 val;
-
-       do {
-               FPGA_GET_REG(screen, extended_interrupt, &val);
-       } while (val & (1 << 12));
-
-       FPGA_SET_REG(screen, extended_interrupt, 1 << 14);
-       FPGA_SET_REG(screen, i2c.write_mailbox_ext, reg);
-       FPGA_SET_REG(screen, i2c.write_mailbox, 0xc000 | (slave << 1));
-
-       FPGA_GET_REG(screen, extended_interrupt, &val);
-       while (!(val & (1 << 14))) {
-               udelay(100000);
-               if (ctr++ > 5) {
-                       printf("iic receive timeout\n");
-                       break;
-               }
-               FPGA_GET_REG(screen, extended_interrupt, &val);
-       }
+#ifdef CONFIG_SYS_SIL1178_I2C
+int sil1178_i2c[] = CONFIG_SYS_SIL1178_I2C;
+#endif
 
-       FPGA_GET_REG(screen, i2c.read_mailbox_ext, &val);
-       return val >> 8;
-}
+#ifdef CONFIG_SYS_DP501_I2C
+int dp501_i2c[] = CONFIG_SYS_DP501_I2C;
 #endif
 
+
 #ifdef CONFIG_SYS_MPC92469AC
 static void mpc92469ac_calc_parameters(unsigned int fout,
        unsigned int *post_div, unsigned int *feedback_div)
@@ -151,9 +126,9 @@ static void mpc92469ac_set(unsigned screen, unsigned int fout)
 }
 #endif
 
-#ifdef CONFIG_SYS_ICS8N3QV01
+#ifdef CONFIG_SYS_ICS8N3QV01_I2C
 
-static unsigned int ics8n3qv01_get_fout_calc(unsigned screen, unsigned index)
+static unsigned int ics8n3qv01_get_fout_calc(unsigned index)
 {
        unsigned long long n;
        unsigned long long mint;
@@ -164,11 +139,11 @@ static unsigned int ics8n3qv01_get_fout_calc(unsigned screen, unsigned index)
        if (index > 3)
                return 0;
 
-       reg_a = fpga_iic_read(screen, ICS8N3QV01_I2C_ADDR, 0 + index);
-       reg_b = fpga_iic_read(screen, ICS8N3QV01_I2C_ADDR, 4 + index);
-       reg_c = fpga_iic_read(screen, ICS8N3QV01_I2C_ADDR, 8 + index);
-       reg_d = fpga_iic_read(screen, ICS8N3QV01_I2C_ADDR, 12 + index);
-       reg_f = fpga_iic_read(screen, ICS8N3QV01_I2C_ADDR, 20 + index);
+       reg_a = i2c_reg_read(ICS8N3QV01_I2C_ADDR, 0 + index);
+       reg_b = i2c_reg_read(ICS8N3QV01_I2C_ADDR, 4 + index);
+       reg_c = i2c_reg_read(ICS8N3QV01_I2C_ADDR, 8 + index);
+       reg_d = i2c_reg_read(ICS8N3QV01_I2C_ADDR, 12 + index);
+       reg_f = i2c_reg_read(ICS8N3QV01_I2C_ADDR, 20 + index);
 
        mint = ((reg_a >> 1) & 0x1f) | (reg_f & 0x20);
        mfrac = ((reg_a & 0x01) << 17) | (reg_b << 9) | (reg_c << 1)
@@ -216,7 +191,7 @@ static void ics8n3qv01_calc_parameters(unsigned int fout,
        *_n = n;
 }
 
-static void ics8n3qv01_set(unsigned screen, unsigned int fout)
+static void ics8n3qv01_set(unsigned int fout)
 {
        unsigned int n;
        unsigned int mint;
@@ -226,7 +201,7 @@ static void ics8n3qv01_set(unsigned screen, unsigned int fout)
        long long off_ppm;
        u8 reg0, reg4, reg8, reg12, reg18, reg20;
 
-       fout_calc = ics8n3qv01_get_fout_calc(screen, 1);
+       fout_calc = ics8n3qv01_get_fout_calc(1);
        off_ppm = (fout_calc - ICS8N3QV01_F_DEFAULT_1) * 1000000
                  / ICS8N3QV01_F_DEFAULT_1;
        printf("       PLL is off by %lld ppm\n", off_ppm);
@@ -234,28 +209,28 @@ static void ics8n3qv01_set(unsigned screen, unsigned int fout)
                    / ICS8N3QV01_F_DEFAULT_1;
        ics8n3qv01_calc_parameters(fout_prog, &mint, &mfrac, &n);
 
-       reg0 = fpga_iic_read(screen, ICS8N3QV01_I2C_ADDR, 0) & 0xc0;
+       reg0 = i2c_reg_read(ICS8N3QV01_I2C_ADDR, 0) & 0xc0;
        reg0 |= (mint & 0x1f) << 1;
        reg0 |= (mfrac >> 17) & 0x01;
-       fpga_iic_write(screen, ICS8N3QV01_I2C_ADDR, 0, reg0);
+       i2c_reg_write(ICS8N3QV01_I2C_ADDR, 0, reg0);
 
        reg4 = mfrac >> 9;
-       fpga_iic_write(screen, ICS8N3QV01_I2C_ADDR, 4, reg4);
+       i2c_reg_write(ICS8N3QV01_I2C_ADDR, 4, reg4);
 
        reg8 = mfrac >> 1;
-       fpga_iic_write(screen, ICS8N3QV01_I2C_ADDR, 8, reg8);
+       i2c_reg_write(ICS8N3QV01_I2C_ADDR, 8, reg8);
 
        reg12 = mfrac << 7;
        reg12 |= n & 0x7f;
-       fpga_iic_write(screen, ICS8N3QV01_I2C_ADDR, 12, reg12);
+       i2c_reg_write(ICS8N3QV01_I2C_ADDR, 12, reg12);
 
-       reg18 = fpga_iic_read(screen, ICS8N3QV01_I2C_ADDR, 18) & 0x03;
+       reg18 = i2c_reg_read(ICS8N3QV01_I2C_ADDR, 18) & 0x03;
        reg18 |= 0x20;
-       fpga_iic_write(screen, ICS8N3QV01_I2C_ADDR, 18, reg18);
+       i2c_reg_write(ICS8N3QV01_I2C_ADDR, 18, reg18);
 
-       reg20 = fpga_iic_read(screen, ICS8N3QV01_I2C_ADDR, 20) & 0x1f;
+       reg20 = i2c_reg_read(ICS8N3QV01_I2C_ADDR, 20) & 0x1f;
        reg20 |= mint & (1 << 5);
-       fpga_iic_write(screen, ICS8N3QV01_I2C_ADDR, 20, reg20);
+       i2c_reg_write(ICS8N3QV01_I2C_ADDR, 20, reg20);
 }
 #endif
 
@@ -315,9 +290,9 @@ int osd_probe(unsigned screen)
        u16 version;
        u16 features;
        u8 value;
-#ifdef CONFIG_SYS_CH7301
        int old_bus = i2c_get_bus_num();
-#endif
+       bool pixclock_present = false;
+       bool output_driver_present = false;
 
        FPGA_GET_REG(0, osd.version, &version);
        FPGA_GET_REG(0, osd.features, &features);
@@ -332,50 +307,76 @@ int osd_probe(unsigned screen)
        printf("OSD%d:  Digital-OSD version %01d.%02d, %d" "x%d characters\n",
                screen, version/100, version%100, base_width, base_height);
 
-#ifdef CONFIG_SYS_CH7301
-       i2c_set_bus_num(ch7301_i2c[screen]);
-       value = i2c_reg_read(CH7301_I2C_ADDR, CH7301_DID);
-       if (value != 0x17) {
-               printf("       Probing CH7301 failed, DID %02x\n", value);
-               i2c_set_bus_num(old_bus);
-               return -1;
-       }
-       i2c_reg_write(CH7301_I2C_ADDR, CH7301_TPCP, 0x08);
-       i2c_reg_write(CH7301_I2C_ADDR, CH7301_TPD, 0x16);
-       i2c_reg_write(CH7301_I2C_ADDR, CH7301_TPF, 0x60);
-       i2c_reg_write(CH7301_I2C_ADDR, CH7301_DC, 0x09);
-       i2c_reg_write(CH7301_I2C_ADDR, CH7301_PM, 0xc0);
-       i2c_set_bus_num(old_bus);
-#endif
+       /* setup pixclock */
 
 #ifdef CONFIG_SYS_MPC92469AC
+       pixclock_present = true;
        mpc92469ac_set(screen, PIXCLK_640_480_60);
 #endif
 
-#ifdef CONFIG_SYS_ICS8N3QV01
-       ics8n3qv01_set(screen, PIXCLK_640_480_60);
+#ifdef CONFIG_SYS_ICS8N3QV01_I2C
+       i2c_set_bus_num(ics8n3qv01_i2c[screen]);
+       if (!i2c_probe(ICS8N3QV01_I2C_ADDR)) {
+               ics8n3qv01_set(PIXCLK_640_480_60);
+               pixclock_present = true;
+       }
 #endif
 
-#ifdef CONFIG_SYS_SIL1178
-       value = fpga_iic_read(screen, SIL1178_SLAVE_I2C_ADDRESS, 0x02);
-       if (value != 0x06) {
-               printf("       Probing CH7301 SIL1178, DEV_IDL %02x\n", value);
-               return -1;
+       if (!pixclock_present)
+               printf("       no pixelclock found\n");
+
+       /* setup output driver */
+
+#ifdef CONFIG_SYS_CH7301_I2C
+       i2c_set_bus_num(ch7301_i2c[screen]);
+       if (!i2c_probe(CH7301_I2C_ADDR)) {
+               value = i2c_reg_read(CH7301_I2C_ADDR, CH7301_DID);
+               if (value == 0x17) {
+                       i2c_reg_write(CH7301_I2C_ADDR, CH7301_TPCP, 0x08);
+                       i2c_reg_write(CH7301_I2C_ADDR, CH7301_TPD, 0x16);
+                       i2c_reg_write(CH7301_I2C_ADDR, CH7301_TPF, 0x60);
+                       i2c_reg_write(CH7301_I2C_ADDR, CH7301_DC, 0x09);
+                       i2c_reg_write(CH7301_I2C_ADDR, CH7301_PM, 0xc0);
+                       output_driver_present = true;
+               }
+       }
+#endif
+
+#ifdef CONFIG_SYS_SIL1178_I2C
+       i2c_set_bus_num(sil1178_i2c[screen]);
+       if (!i2c_probe(SIL1178_SLAVE_I2C_ADDRESS)) {
+               value = i2c_reg_read(SIL1178_SLAVE_I2C_ADDRESS, 0x02);
+               if (value == 0x06) {
+                       /*
+                        * magic initialization sequence,
+                        * adapted from datasheet
+                        */
+                       i2c_reg_write(SIL1178_SLAVE_I2C_ADDRESS, 0x08, 0x36);
+                       i2c_reg_write(SIL1178_MASTER_I2C_ADDRESS, 0x0f, 0x44);
+                       i2c_reg_write(SIL1178_MASTER_I2C_ADDRESS, 0x0f, 0x4c);
+                       i2c_reg_write(SIL1178_MASTER_I2C_ADDRESS, 0x0e, 0x10);
+                       i2c_reg_write(SIL1178_MASTER_I2C_ADDRESS, 0x0a, 0x80);
+                       i2c_reg_write(SIL1178_MASTER_I2C_ADDRESS, 0x09, 0x30);
+                       i2c_reg_write(SIL1178_MASTER_I2C_ADDRESS, 0x0c, 0x89);
+                       i2c_reg_write(SIL1178_MASTER_I2C_ADDRESS, 0x0d, 0x60);
+                       i2c_reg_write(SIL1178_MASTER_I2C_ADDRESS, 0x08, 0x36);
+                       i2c_reg_write(SIL1178_MASTER_I2C_ADDRESS, 0x08, 0x37);
+                       output_driver_present = true;
+               }
        }
-       /* magic initialization sequence adapted from datasheet */
-       fpga_iic_write(screen, SIL1178_SLAVE_I2C_ADDRESS, 0x08, 0x36);
-       fpga_iic_write(screen, SIL1178_MASTER_I2C_ADDRESS, 0x0f, 0x44);
-       fpga_iic_write(screen, SIL1178_MASTER_I2C_ADDRESS, 0x0f, 0x4c);
-       fpga_iic_write(screen, SIL1178_MASTER_I2C_ADDRESS, 0x0e, 0x10);
-       fpga_iic_write(screen, SIL1178_MASTER_I2C_ADDRESS, 0x0a, 0x80);
-       fpga_iic_write(screen, SIL1178_MASTER_I2C_ADDRESS, 0x09, 0x30);
-       fpga_iic_write(screen, SIL1178_MASTER_I2C_ADDRESS, 0x0c, 0x89);
-       fpga_iic_write(screen, SIL1178_MASTER_I2C_ADDRESS, 0x0d, 0x60);
-       fpga_iic_write(screen, SIL1178_MASTER_I2C_ADDRESS, 0x08, 0x36);
-       fpga_iic_write(screen, SIL1178_MASTER_I2C_ADDRESS, 0x08, 0x37);
 #endif
 
-       FPGA_SET_REG(screen, videocontrol, 0x0002);
+#ifdef CONFIG_SYS_DP501_I2C
+       i2c_set_bus_num(dp501_i2c[screen]);
+       if (!i2c_probe(DP501_I2C_ADDR)) {
+               dp501_powerup(DP501_I2C_ADDR);
+               output_driver_present = true;
+       }
+#endif
+
+       if (!output_driver_present)
+               printf("       no output driver found\n");
+
        FPGA_SET_REG(screen, osd.control, 0x0049);
 
        FPGA_SET_REG(screen, osd.xy_size, ((32 - 1) << 8) | (16 - 1));
@@ -385,6 +386,8 @@ int osd_probe(unsigned screen)
        if (screen > max_osd_screen)
                max_osd_screen = screen;
 
+       i2c_set_bus_num(old_bus);
+
        return 0;
 }
 
index 7e13c9051cbc815762f930df38678b8bb0770d1a..70eff912aa6bc7d99634d101e7b54225c61f98b4 100644 (file)
@@ -86,6 +86,11 @@ enum {
        ESDHC_BOOT_IMAGE_ENTRY_OFS      = 0x60,
 };
 
+enum {
+       I2C_SOC_0 = 0,
+       I2C_SOC_1 = 1,
+};
+
 struct key_program {
        uint32_t magic;
        uint32_t code_crc;
@@ -1156,7 +1161,7 @@ static void ccdm_hang(void)
        int j;
 #endif
 
-       I2C_SET_BUS(0);
+       I2C_SET_BUS(I2C_SOC_0);
        pca9698_direction_output(0x22, 0, 0); /* Finder */
        pca9698_direction_output(0x22, 4, 0); /* Status */
 
@@ -1189,8 +1194,8 @@ int startup_ccdm_id_module(void)
        int result = 0;
        unsigned int orig_i2c_bus;
 
-       orig_i2c_bus = I2C_GET_BUS();
-       I2C_SET_BUS(1);
+       orig_i2c_bus = i2c_get_bus_num();
+       i2c_set_bus_num(I2C_SOC_1);
 
        /* goto end; */
 
@@ -1216,7 +1221,7 @@ int startup_ccdm_id_module(void)
 failure:
        result = 1;
 end:
-       I2C_SET_BUS(orig_i2c_bus);
+       i2c_set_bus_num(orig_i2c_bus);
        if (result)
                ccdm_hang();
 
index 642b807e801bca8e01d4348d33cab210583e3fce..f76d968962711a5612633b13a24b54d8ca826390 100644 (file)
@@ -382,9 +382,9 @@ static void hydra_initialize(void)
                fpga = pci_map_bar(devno, PCI_BASE_ADDRESS_0,
                        PCI_REGION_MEM);
 
-               versions = readl(fpga->versions);
-               fpga_version = readl(fpga->fpga_version);
-               fpga_features = readl(fpga->fpga_features);
+               versions = readl(&fpga->versions);
+               fpga_version = readl(&fpga->fpga_version);
+               fpga_features = readl(&fpga->fpga_features);
 
                hardware_version = versions & 0xf;
                feature_uart_channels = (fpga_features >> 6) & 0x1f;
index e4323181fc677cf6a9e1294fd56dbe29ead825c5..fd0e910d7ba7cd08a3f9fee88f9ff52e5c9b7c4f 100644 (file)
@@ -32,7 +32,7 @@
 #define ESDHC_BOOT_IMAGE_SIZE  0x48
 #define ESDHC_BOOT_IMAGE_ADDR  0x50
 
-int mmc_get_env_addr(struct mmc *mmc, u32 *env_addr)
+int mmc_get_env_addr(struct mmc *mmc, int copy, u32 *env_addr)
 {
        u8 *tmp_buf;
        u32 blklen, code_offset, code_len, n;
index cca9c0c880bc95338b3339b3a009c9b86e167eea..ee9b7a9d3e56351f54fe722cdb5c597e63405f4b 100644 (file)
@@ -229,7 +229,7 @@ lowlevel_init:
        bne     0b
 
        /* PLD access is now possible */
-       /* r3 = SDRAMDATA
+       /* r3 = SDRAMDATA */
        /* r13 = pointer to MEM controller regs */
        ldr     r1, =PLD_BASE
        mov     r4, #SDRAMENTRY_SIZE
diff --git a/board/netphone/Makefile b/board/netphone/Makefile
deleted file mode 100644 (file)
index ba34605..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# (C) Copyright 2000-2006
-# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
-
-obj-y  = netphone.o flash.o phone_console.o
diff --git a/board/netphone/flash.c b/board/netphone/flash.c
deleted file mode 100644 (file)
index 91bd968..0000000
+++ /dev/null
@@ -1,513 +0,0 @@
-/*
- * (C) Copyright 2000-2004
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <common.h>
-#include <mpc8xx.h>
-
-flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS];   /* info for FLASH chips    */
-
-/*-----------------------------------------------------------------------
- * Functions
- */
-static ulong flash_get_size(vu_long * addr, flash_info_t * info);
-static int write_byte(flash_info_t * info, ulong dest, uchar data);
-static void flash_get_offsets(ulong base, flash_info_t * info);
-
-/*-----------------------------------------------------------------------
- */
-
-unsigned long flash_init(void)
-{
-       volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
-       volatile memctl8xx_t *memctl = &immap->im_memctl;
-       unsigned long size;
-#if CONFIG_NETPHONE_VERSION == 2
-       unsigned long size1;
-#endif
-       int i;
-
-       /* Init: no FLASHes known */
-       for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; ++i)
-               flash_info[i].flash_id = FLASH_UNKNOWN;
-
-       size = flash_get_size((vu_long *) FLASH_BASE0_PRELIM, &flash_info[0]);
-
-       if (flash_info[0].flash_id == FLASH_UNKNOWN) {
-               printf ("## Unknown FLASH on Bank 0 - Size = 0x%08lx = %ld MB\n",
-                       size, size << 20);
-       }
-
-       /* Remap FLASH according to real size */
-       memctl->memc_or0 = CONFIG_SYS_OR_TIMING_FLASH | (-size & 0xFFFF8000);
-       memctl->memc_br0 = (CONFIG_SYS_FLASH_BASE & BR_BA_MSK) | (memctl->memc_br0 & ~(BR_BA_MSK));
-
-       /* Re-do sizing to get full correct info */
-       size = flash_get_size((vu_long *) CONFIG_SYS_FLASH_BASE, &flash_info[0]);
-
-       flash_get_offsets(CONFIG_SYS_FLASH_BASE, &flash_info[0]);
-
-       /* monitor protection ON by default */
-       flash_protect(FLAG_PROTECT_SET,
-                       CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FLASH_BASE + monitor_flash_len - 1,
-                       &flash_info[0]);
-
-       flash_protect ( FLAG_PROTECT_SET,
-                       CONFIG_ENV_ADDR,
-                       CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1,
-                       &flash_info[0]);
-
-#ifdef CONFIG_ENV_ADDR_REDUND
-       flash_protect ( FLAG_PROTECT_SET,
-                       CONFIG_ENV_ADDR_REDUND,
-                       CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1,
-                       &flash_info[0]);
-#endif
-
-       flash_info[0].size = size;
-
-#if CONFIG_NETPHONE_VERSION == 2
-       size1 = flash_get_size((vu_long *) FLASH_BASE4_PRELIM, &flash_info[1]);
-       if (size1 > 0) {
-               if (flash_info[1].flash_id == FLASH_UNKNOWN)
-                       printf("## Unknown FLASH on Bank 1 - Size = 0x%08lx = %ld MB\n", size1, size1 << 20);
-
-               /* Remap FLASH according to real size */
-               memctl->memc_or4 = CONFIG_SYS_OR_TIMING_FLASH | (-size1 & 0xFFFF8000);
-               memctl->memc_br4 = (CONFIG_SYS_FLASH_BASE4 & BR_BA_MSK) | (memctl->memc_br4 & ~(BR_BA_MSK));
-
-               /* Re-do sizing to get full correct info */
-               size1 = flash_get_size((vu_long *) CONFIG_SYS_FLASH_BASE4, &flash_info[1]);
-
-               flash_get_offsets(CONFIG_SYS_FLASH_BASE4, &flash_info[1]);
-
-               size += size1;
-       } else
-               memctl->memc_br4 &= ~BR_V;
-#endif
-
-       return (size);
-}
-
-/*-----------------------------------------------------------------------
- */
-static void flash_get_offsets(ulong base, flash_info_t * info)
-{
-       int i;
-
-       /* set up sector start address table */
-       if ((info->flash_id & FLASH_TYPEMASK) == FLASH_AM040) {
-               for (i = 0; i < info->sector_count; i++) {
-                       info->start[i] = base + (i * 0x00010000);
-               }
-       } else if (info->flash_id & FLASH_BTYPE) {
-               /* set sector offsets for bottom boot block type    */
-               info->start[0] = base + 0x00000000;
-               info->start[1] = base + 0x00004000;
-               info->start[2] = base + 0x00006000;
-               info->start[3] = base + 0x00008000;
-               for (i = 4; i < info->sector_count; i++) {
-                       info->start[i] = base + (i * 0x00010000) - 0x00030000;
-               }
-       } else {
-               /* set sector offsets for top boot block type       */
-               i = info->sector_count - 1;
-               info->start[i--] = base + info->size - 0x00004000;
-               info->start[i--] = base + info->size - 0x00006000;
-               info->start[i--] = base + info->size - 0x00008000;
-               for (; i >= 0; i--) {
-                       info->start[i] = base + i * 0x00010000;
-               }
-       }
-}
-
-/*-----------------------------------------------------------------------
- */
-void flash_print_info(flash_info_t * info)
-{
-       int i;
-
-       if (info->flash_id == FLASH_UNKNOWN) {
-               printf("missing or unknown FLASH type\n");
-               return;
-       }
-
-       switch (info->flash_id & FLASH_VENDMASK) {
-       case FLASH_MAN_AMD:
-               printf("AMD ");
-               break;
-       case FLASH_MAN_FUJ:
-               printf("FUJITSU ");
-               break;
-       case FLASH_MAN_MX:
-               printf("MXIC ");
-               break;
-       default:
-               printf("Unknown Vendor ");
-               break;
-       }
-
-       switch (info->flash_id & FLASH_TYPEMASK) {
-       case FLASH_AM040:
-               printf("AM29LV040B (4 Mbit, bottom boot sect)\n");
-               break;
-       case FLASH_AM400B:
-               printf("AM29LV400B (4 Mbit, bottom boot sect)\n");
-               break;
-       case FLASH_AM400T:
-               printf("AM29LV400T (4 Mbit, top boot sector)\n");
-               break;
-       case FLASH_AM800B:
-               printf("AM29LV800B (8 Mbit, bottom boot sect)\n");
-               break;
-       case FLASH_AM800T:
-               printf("AM29LV800T (8 Mbit, top boot sector)\n");
-               break;
-       case FLASH_AM160B:
-               printf("AM29LV160B (16 Mbit, bottom boot sect)\n");
-               break;
-       case FLASH_AM160T:
-               printf("AM29LV160T (16 Mbit, top boot sector)\n");
-               break;
-       case FLASH_AM320B:
-               printf("AM29LV320B (32 Mbit, bottom boot sect)\n");
-               break;
-       case FLASH_AM320T:
-               printf("AM29LV320T (32 Mbit, top boot sector)\n");
-               break;
-       default:
-               printf("Unknown Chip Type\n");
-               break;
-       }
-
-       printf("  Size: %ld MB in %d Sectors\n", info->size >> 20, info->sector_count);
-
-       printf("  Sector Start Addresses:");
-       for (i = 0; i < info->sector_count; ++i) {
-               if ((i % 5) == 0)
-                       printf("\n   ");
-               printf(" %08lX%s", info->start[i], info->protect[i] ? " (RO)" : "     ");
-       }
-       printf("\n");
-}
-
-/*-----------------------------------------------------------------------
- */
-
-
-/*-----------------------------------------------------------------------
- */
-
-/*
- * The following code cannot be run from FLASH!
- */
-
-static ulong flash_get_size(vu_long * addr, flash_info_t * info)
-{
-       short i;
-       uchar mid;
-       uchar pid;
-       vu_char *caddr = (vu_char *) addr;
-       ulong base = (ulong) addr;
-
-       /* Write auto select command: read Manufacturer ID */
-       caddr[0x0555] = 0xAA;
-       caddr[0x02AA] = 0x55;
-       caddr[0x0555] = 0x90;
-
-       mid = caddr[0];
-       switch (mid) {
-       case (AMD_MANUFACT & 0xFF):
-               info->flash_id = FLASH_MAN_AMD;
-               break;
-       case (FUJ_MANUFACT & 0xFF):
-               info->flash_id = FLASH_MAN_FUJ;
-               break;
-       case (MX_MANUFACT & 0xFF):
-               info->flash_id = FLASH_MAN_MX;
-               break;
-       case (STM_MANUFACT & 0xFF):
-               info->flash_id = FLASH_MAN_STM;
-               break;
-       default:
-               info->flash_id = FLASH_UNKNOWN;
-               info->sector_count = 0;
-               info->size = 0;
-               return (0);                             /* no or unknown flash  */
-       }
-
-       pid = caddr[1];                         /* device ID        */
-       switch (pid) {
-       case (AMD_ID_LV400T & 0xFF):
-               info->flash_id += FLASH_AM400T;
-               info->sector_count = 11;
-               info->size = 0x00080000;
-               break;                                  /* => 512 kB        */
-
-       case (AMD_ID_LV400B & 0xFF):
-               info->flash_id += FLASH_AM400B;
-               info->sector_count = 11;
-               info->size = 0x00080000;
-               break;                                  /* => 512 kB        */
-
-       case (AMD_ID_LV800T & 0xFF):
-               info->flash_id += FLASH_AM800T;
-               info->sector_count = 19;
-               info->size = 0x00100000;
-               break;                                  /* => 1 MB      */
-
-       case (AMD_ID_LV800B & 0xFF):
-               info->flash_id += FLASH_AM800B;
-               info->sector_count = 19;
-               info->size = 0x00100000;
-               break;                                  /* => 1 MB      */
-
-       case (AMD_ID_LV160T & 0xFF):
-               info->flash_id += FLASH_AM160T;
-               info->sector_count = 35;
-               info->size = 0x00200000;
-               break;                                  /* => 2 MB      */
-
-       case (AMD_ID_LV160B & 0xFF):
-               info->flash_id += FLASH_AM160B;
-               info->sector_count = 35;
-               info->size = 0x00200000;
-               break;                                  /* => 2 MB      */
-
-       case (AMD_ID_LV040B & 0xFF):
-               info->flash_id += FLASH_AM040;
-               info->sector_count = 8;
-               info->size = 0x00080000;
-               break;
-
-       case (STM_ID_M29W040B & 0xFF):
-               info->flash_id += FLASH_AM040;
-               info->sector_count = 8;
-               info->size = 0x00080000;
-               break;
-
-#if 0                                                  /* enable when device IDs are available */
-       case (AMD_ID_LV320T & 0xFF):
-               info->flash_id += FLASH_AM320T;
-               info->sector_count = 67;
-               info->size = 0x00400000;
-               break;                                  /* => 4 MB      */
-
-       case (AMD_ID_LV320B & 0xFF):
-               info->flash_id += FLASH_AM320B;
-               info->sector_count = 67;
-               info->size = 0x00400000;
-               break;                                  /* => 4 MB      */
-#endif
-       default:
-               info->flash_id = FLASH_UNKNOWN;
-               return (0);                             /* => no or unknown flash */
-
-       }
-
-       printf(" ");
-       /* set up sector start address table */
-       if ((info->flash_id & FLASH_TYPEMASK) == FLASH_AM040) {
-               for (i = 0; i < info->sector_count; i++) {
-                       info->start[i] = base + (i * 0x00010000);
-               }
-       } else if (info->flash_id & FLASH_BTYPE) {
-               /* set sector offsets for bottom boot block type    */
-               info->start[0] = base + 0x00000000;
-               info->start[1] = base + 0x00004000;
-               info->start[2] = base + 0x00006000;
-               info->start[3] = base + 0x00008000;
-               for (i = 4; i < info->sector_count; i++) {
-                       info->start[i] = base + (i * 0x00010000) - 0x00030000;
-               }
-       } else {
-               /* set sector offsets for top boot block type       */
-               i = info->sector_count - 1;
-               info->start[i--] = base + info->size - 0x00004000;
-               info->start[i--] = base + info->size - 0x00006000;
-               info->start[i--] = base + info->size - 0x00008000;
-               for (; i >= 0; i--) {
-                       info->start[i] = base + i * 0x00010000;
-               }
-       }
-
-       /* check for protected sectors */
-       for (i = 0; i < info->sector_count; i++) {
-               /* read sector protection: D0 = 1 if protected */
-               caddr = (volatile unsigned char *)(info->start[i]);
-               info->protect[i] = caddr[2] & 1;
-       }
-
-       /*
-        * Prevent writes to uninitialized FLASH.
-        */
-       if (info->flash_id != FLASH_UNKNOWN) {
-               caddr = (vu_char *) info->start[0];
-
-               caddr[0x0555] = 0xAA;
-               caddr[0x02AA] = 0x55;
-               caddr[0x0555] = 0xF0;
-
-               udelay(20000);
-       }
-
-       return (info->size);
-}
-
-
-/*-----------------------------------------------------------------------
- */
-
-int flash_erase(flash_info_t * info, int s_first, int s_last)
-{
-       vu_char *addr = (vu_char *) (info->start[0]);
-       int flag, prot, sect, l_sect;
-       ulong start, now, last;
-
-       if ((s_first < 0) || (s_first > s_last)) {
-               if (info->flash_id == FLASH_UNKNOWN) {
-                       printf("- missing\n");
-               } else {
-                       printf("- no sectors to erase\n");
-               }
-               return 1;
-       }
-
-       if ((info->flash_id == FLASH_UNKNOWN) ||
-           (info->flash_id > FLASH_AMD_COMP)) {
-               printf("Can't erase unknown flash type %08lx - aborted\n", info->flash_id);
-               return 1;
-       }
-
-       prot = 0;
-       for (sect = s_first; sect <= s_last; ++sect) {
-               if (info->protect[sect]) {
-                       prot++;
-               }
-       }
-
-       if (prot) {
-               printf("- Warning: %d protected sectors will not be erased!\n", prot);
-       } else {
-               printf("\n");
-       }
-
-       l_sect = -1;
-
-       /* Disable interrupts which might cause a timeout here */
-       flag = disable_interrupts();
-
-       addr[0x0555] = 0xAA;
-       addr[0x02AA] = 0x55;
-       addr[0x0555] = 0x80;
-       addr[0x0555] = 0xAA;
-       addr[0x02AA] = 0x55;
-
-       /* Start erase on unprotected sectors */
-       for (sect = s_first; sect <= s_last; sect++) {
-               if (info->protect[sect] == 0) { /* not protected */
-                       addr = (vu_char *) (info->start[sect]);
-                       addr[0] = 0x30;
-                       l_sect = sect;
-               }
-       }
-
-       /* re-enable interrupts if necessary */
-       if (flag)
-               enable_interrupts();
-
-       /* wait at least 80us - let's wait 1 ms */
-       udelay(1000);
-
-       /*
-        * We wait for the last triggered sector
-        */
-       if (l_sect < 0)
-               goto DONE;
-
-       start = get_timer(0);
-       last = start;
-       addr = (vu_char *) (info->start[l_sect]);
-       while ((addr[0] & 0x80) != 0x80) {
-               if ((now = get_timer(start)) > CONFIG_SYS_FLASH_ERASE_TOUT) {
-                       printf("Timeout\n");
-                       return 1;
-               }
-               /* show that we're waiting */
-               if ((now - last) > 1000) {      /* every second */
-                       putc('.');
-                       last = now;
-               }
-       }
-
-DONE:
-       /* reset to read mode */
-       addr = (vu_char *) info->start[0];
-       addr[0] = 0xF0;                         /* reset bank */
-
-       printf(" done\n");
-       return 0;
-}
-
-/*-----------------------------------------------------------------------
- * Copy memory to flash, returns:
- * 0 - OK
- * 1 - write timeout
- * 2 - Flash not erased
- */
-
-int write_buff(flash_info_t * info, uchar * src, ulong addr, ulong cnt)
-{
-       int rc;
-
-       while (cnt > 0) {
-               if ((rc = write_byte(info, addr++, *src++)) != 0) {
-                       return (rc);
-               }
-               --cnt;
-       }
-
-       return (0);
-}
-
-/*-----------------------------------------------------------------------
- * Write a word to Flash, returns:
- * 0 - OK
- * 1 - write timeout
- * 2 - Flash not erased
- */
-static int write_byte(flash_info_t * info, ulong dest, uchar data)
-{
-       vu_char *addr = (vu_char *) (info->start[0]);
-       ulong start;
-       int flag;
-
-       /* Check if Flash is (sufficiently) erased */
-       if ((*((vu_char *) dest) & data) != data) {
-               return (2);
-       }
-       /* Disable interrupts which might cause a timeout here */
-       flag = disable_interrupts();
-
-       addr[0x0555] = 0xAA;
-       addr[0x02AA] = 0x55;
-       addr[0x0555] = 0xA0;
-
-       *((vu_char *) dest) = data;
-
-       /* re-enable interrupts if necessary */
-       if (flag)
-               enable_interrupts();
-
-       /* data polling for D7 */
-       start = get_timer(0);
-       while ((*((vu_char *) dest) & 0x80) != (data & 0x80)) {
-               if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT) {
-                       return (1);
-               }
-       }
-       return (0);
-}
diff --git a/board/netphone/netphone.c b/board/netphone/netphone.c
deleted file mode 100644 (file)
index 8ff4489..0000000
+++ /dev/null
@@ -1,690 +0,0 @@
-/*
- * (C) Copyright 2000-2004
- * Pantelis Antoniou, Intracom S.A., panto@intracom.gr
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/*
- * Pantelis Antoniou, Intracom S.A., panto@intracom.gr
- * U-Boot port on NetTA4 board
- */
-
-#include <common.h>
-#include <miiphy.h>
-#include <sed156x.h>
-#include <status_led.h>
-
-#include "mpc8xx.h"
-
-#ifdef CONFIG_HW_WATCHDOG
-#include <watchdog.h>
-#endif
-
-int fec8xx_miiphy_read(char *devname, unsigned char addr,
-               unsigned char  reg, unsigned short *value);
-int fec8xx_miiphy_write(char *devname, unsigned char  addr,
-               unsigned char  reg, unsigned short value);
-
-/****************************************************************/
-
-/* some sane bit macros */
-#define _BD(_b)                                (1U << (31-(_b)))
-#define _BDR(_l, _h)                   (((((1U << (31-(_l))) - 1) << 1) | 1) & ~((1U << (31-(_h))) - 1))
-
-#define _BW(_b)                                (1U << (15-(_b)))
-#define _BWR(_l, _h)                   (((((1U << (15-(_l))) - 1) << 1) | 1) & ~((1U << (15-(_h))) - 1))
-
-#define _BB(_b)                                (1U << (7-(_b)))
-#define _BBR(_l, _h)                   (((((1U << (7-(_l))) - 1) << 1) | 1) & ~((1U << (7-(_h))) - 1))
-
-#define _B(_b)                         _BD(_b)
-#define _BR(_l, _h)                    _BDR(_l, _h)
-
-/****************************************************************/
-
-/*
- * Check Board Identity:
- *
- * Return 1 always.
- */
-
-int checkboard(void)
-{
-       printf ("Intracom NetPhone V%d\n", CONFIG_NETPHONE_VERSION);
-       return (0);
-}
-
-/****************************************************************/
-
-#define _NOT_USED_     0xFFFFFFFF
-
-/****************************************************************/
-
-#define CS_0000                0x00000000
-#define CS_0001                0x10000000
-#define CS_0010                0x20000000
-#define CS_0011                0x30000000
-#define CS_0100                0x40000000
-#define CS_0101                0x50000000
-#define CS_0110                0x60000000
-#define CS_0111                0x70000000
-#define CS_1000                0x80000000
-#define CS_1001                0x90000000
-#define CS_1010                0xA0000000
-#define CS_1011                0xB0000000
-#define CS_1100                0xC0000000
-#define CS_1101                0xD0000000
-#define CS_1110                0xE0000000
-#define CS_1111                0xF0000000
-
-#define BS_0000                0x00000000
-#define BS_0001                0x01000000
-#define BS_0010                0x02000000
-#define BS_0011                0x03000000
-#define BS_0100                0x04000000
-#define BS_0101                0x05000000
-#define BS_0110                0x06000000
-#define BS_0111                0x07000000
-#define BS_1000                0x08000000
-#define BS_1001                0x09000000
-#define BS_1010                0x0A000000
-#define BS_1011                0x0B000000
-#define BS_1100                0x0C000000
-#define BS_1101                0x0D000000
-#define BS_1110                0x0E000000
-#define BS_1111                0x0F000000
-
-#define GPL0_AAAA      0x00000000
-#define GPL0_AAA0      0x00200000
-#define GPL0_AAA1      0x00300000
-#define GPL0_000A      0x00800000
-#define GPL0_0000      0x00A00000
-#define GPL0_0001      0x00B00000
-#define GPL0_111A      0x00C00000
-#define GPL0_1110      0x00E00000
-#define GPL0_1111      0x00F00000
-
-#define GPL1_0000      0x00000000
-#define GPL1_0001      0x00040000
-#define GPL1_1110      0x00080000
-#define GPL1_1111      0x000C0000
-
-#define GPL2_0000      0x00000000
-#define GPL2_0001      0x00010000
-#define GPL2_1110      0x00020000
-#define GPL2_1111      0x00030000
-
-#define GPL3_0000      0x00000000
-#define GPL3_0001      0x00004000
-#define GPL3_1110      0x00008000
-#define GPL3_1111      0x0000C000
-
-#define GPL4_0000      0x00000000
-#define GPL4_0001      0x00001000
-#define GPL4_1110      0x00002000
-#define GPL4_1111      0x00003000
-
-#define GPL5_0000      0x00000000
-#define GPL5_0001      0x00000400
-#define GPL5_1110      0x00000800
-#define GPL5_1111      0x00000C00
-#define LOOP           0x00000080
-
-#define EXEN           0x00000040
-
-#define AMX_COL                0x00000000
-#define AMX_ROW                0x00000020
-#define AMX_MAR                0x00000030
-
-#define NA             0x00000008
-
-#define UTA            0x00000004
-
-#define TODT           0x00000002
-
-#define LAST           0x00000001
-
-#define A10_AAAA       GPL0_AAAA
-#define A10_AAA0       GPL0_AAA0
-#define A10_AAA1       GPL0_AAA1
-#define A10_000A       GPL0_000A
-#define A10_0000       GPL0_0000
-#define A10_0001       GPL0_0001
-#define A10_111A       GPL0_111A
-#define A10_1110       GPL0_1110
-#define A10_1111       GPL0_1111
-
-#define RAS_0000       GPL1_0000
-#define RAS_0001       GPL1_0001
-#define RAS_1110       GPL1_1110
-#define RAS_1111       GPL1_1111
-
-#define CAS_0000       GPL2_0000
-#define CAS_0001       GPL2_0001
-#define CAS_1110       GPL2_1110
-#define CAS_1111       GPL2_1111
-
-#define WE_0000                GPL3_0000
-#define WE_0001                GPL3_0001
-#define WE_1110                GPL3_1110
-#define WE_1111                GPL3_1111
-
-/* #define CAS_LATENCY 3  */
-#define CAS_LATENCY    2
-
-const uint sdram_table[0x40] = {
-
-#if CAS_LATENCY == 3
-       /* RSS */
-       CS_0001 | BS_1111 | A10_AAAA | RAS_0001 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* ACT   */
-       CS_1111 | BS_1111 | A10_0000 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* NOP   */
-       CS_0000 | BS_1111 | A10_0001 | RAS_1111 | CAS_0001 | WE_1111 | AMX_COL | UTA,                   /* READ  */
-       CS_0001 | BS_0001 | A10_1111 | RAS_0001 | CAS_1111 | WE_0001 | AMX_COL | UTA,                   /* PALL  */
-       CS_1111 | BS_1111 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_1111 | BS_1111 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA | TODT | LAST,     /* NOP   */
-       _NOT_USED_, _NOT_USED_,
-
-       /* RBS */
-       CS_0001 | BS_1111 | A10_AAAA | RAS_0001 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* ACT   */
-       CS_1111 | BS_1111 | A10_0000 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* NOP   */
-       CS_0001 | BS_1111 | A10_0001 | RAS_1111 | CAS_0001 | WE_1111 | AMX_COL | UTA,                   /* READ  */
-       CS_1111 | BS_0000 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* NOP   */
-       CS_1111 | BS_0000 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_1111 | BS_0000 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_0001 | BS_0001 | A10_1111 | RAS_0001 | CAS_1111 | WE_0001 | AMX_COL,                         /* PALL  */
-       CS_1111 | BS_1111 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | TODT | LAST,           /* NOP   */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-
-       /* WSS */
-       CS_0001 | BS_1111 | A10_AAAA | RAS_0001 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* ACT   */
-       CS_1111 | BS_1111 | A10_0000 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_0000 | BS_0001 | A10_0000 | RAS_1111 | CAS_0001 | WE_0000 | AMX_COL | UTA,                   /* WRITE */
-       CS_0001 | BS_1111 | A10_1111 | RAS_0001 | CAS_1111 | WE_0001 | AMX_COL | UTA,                   /* PALL  */
-       CS_1111 | BS_1111 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA | TODT | LAST,     /* NOP   */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_,
-
-       /* WBS */
-       CS_0001 | BS_1111 | A10_AAAA | RAS_0001 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* ACT   */
-       CS_1111 | BS_1111 | A10_0000 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_0001 | BS_0000 | A10_0000 | RAS_1111 | CAS_0001 | WE_0000 | AMX_COL,                         /* WRITE */
-       CS_1111 | BS_0000 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_1111 | BS_0000 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_1111 | BS_0001 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* NOP   */
-       CS_1111 | BS_1111 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* NOP   */
-       CS_0001 | BS_1111 | A10_1111 | RAS_0001 | CAS_1111 | WE_0001 | AMX_COL | UTA,                   /* PALL  */
-       CS_1111 | BS_1111 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA | TODT | LAST,     /* NOP   */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_,
-#endif
-
-#if CAS_LATENCY == 2
-       /* RSS */
-       CS_0001 | BS_1111 | A10_AAAA | RAS_0001 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* ACT   */
-       CS_1110 | BS_1110 | A10_0000 | RAS_1111 | CAS_1110 | WE_1111 | AMX_COL | UTA,                   /* NOP   */
-       CS_0001 | BS_0001 | A10_0000 | RAS_1111 | CAS_0001 | WE_1111 | AMX_COL | UTA,                   /* READ  */
-       CS_1110 | BS_1111 | A10_0001 | RAS_1110 | CAS_1111 | WE_1110 | AMX_COL,                         /* NOP   */
-       CS_0001 | BS_1111 | A10_1111 | RAS_0001 | CAS_1111 | WE_0001 | AMX_COL | UTA | TODT | LAST,     /* PALL  */
-       _NOT_USED_,
-       _NOT_USED_, _NOT_USED_,
-
-       /* RBS */
-       CS_0001 | BS_1111 | A10_AAAA | RAS_0001 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* ACT   */
-       CS_1110 | BS_1110 | A10_0000 | RAS_1111 | CAS_1110 | WE_1111 | AMX_COL | UTA,                   /* NOP   */
-       CS_0001 | BS_0000 | A10_0000 | RAS_1111 | CAS_0001 | WE_1111 | AMX_COL | UTA,                   /* READ  */
-       CS_1111 | BS_0000 | A10_0000 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_1111 | BS_0000 | A10_0000 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_1111 | BS_0001 | A10_0000 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_1110 | BS_1111 | A10_0001 | RAS_1110 | CAS_1111 | WE_1110 | AMX_COL,                         /* NOP   */
-       CS_0001 | BS_1111 | A10_1111 | RAS_0001 | CAS_1111 | WE_0001 | AMX_COL | UTA | TODT | LAST,     /* PALL  */
-       _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-
-       /* WSS */
-       CS_0001 | BS_1111 | A10_AAA0 | RAS_0001 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* ACT   */
-       CS_1110 | BS_1110 | A10_0000 | RAS_1111 | CAS_1110 | WE_1110 | AMX_COL,                         /* NOP   */
-       CS_0000 | BS_0001 | A10_0001 | RAS_1110 | CAS_0001 | WE_0000 | AMX_COL | UTA,                   /* WRITE */
-       CS_0001 | BS_1111 | A10_1111 | RAS_0001 | CAS_1111 | WE_0001 | AMX_COL | UTA | TODT | LAST,     /* PALL  */
-       _NOT_USED_,
-       _NOT_USED_, _NOT_USED_,
-       _NOT_USED_,
-
-       /* WBS */
-       CS_0001 | BS_1111 | A10_AAAA | RAS_0001 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* ACT   */
-       CS_1110 | BS_1110 | A10_0000 | RAS_1111 | CAS_1110 | WE_1110 | AMX_COL,                         /* NOP   */
-       CS_0001 | BS_0000 | A10_0000 | RAS_1111 | CAS_0001 | WE_0001 | AMX_COL,                         /* WRITE */
-       CS_1111 | BS_0000 | A10_0000 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_1111 | BS_0000 | A10_0000 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_1110 | BS_0001 | A10_0001 | RAS_1110 | CAS_1111 | WE_1110 | AMX_COL | UTA,                   /* NOP   */
-       CS_0001 | BS_1111 | A10_1111 | RAS_0001 | CAS_1111 | WE_0001 | AMX_COL | UTA | TODT | LAST,     /* PALL  */
-       _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_,
-
-#endif
-
-       /* UPT */
-       CS_0001 | BS_1111 | A10_1111 | RAS_0001 | CAS_0001 | WE_1111 | AMX_COL | UTA | LOOP,            /* ATRFR */
-       CS_1111 | BS_1111 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* NOP   */
-       CS_1111 | BS_1111 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* NOP   */
-       CS_1111 | BS_1111 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* NOP   */
-       CS_1111 | BS_1111 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA | LOOP,            /* NOP   */
-       CS_1111 | BS_1111 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA | TODT | LAST,     /* NOP   */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_,
-
-       /* EXC */
-       CS_0001 | BS_1111 | A10_1111 | RAS_0001 | CAS_1111 | WE_0001 | AMX_COL | UTA | LAST,
-       _NOT_USED_,
-
-       /* REG */
-       CS_1110 | BS_1111 | A10_1110 | RAS_1110 | CAS_1110 | WE_1110 | AMX_MAR | UTA,
-       CS_0001 | BS_1111 | A10_0001 | RAS_0001 | CAS_0001 | WE_0001 | AMX_MAR | UTA | LAST,
-};
-
-#if CONFIG_NETPHONE_VERSION == 2
-static const uint nandcs_table[0x40] = {
-       /* RSS */
-       CS_1000 | GPL4_1111 | GPL5_1111 | UTA,
-       CS_0000 | GPL4_1110 | GPL5_1111 | UTA,
-       CS_0000 | GPL4_0000 | GPL5_1111 | UTA,
-       CS_0000 | GPL4_0000 | GPL5_1111 | UTA,
-       CS_0000 | GPL4_0000 | GPL5_1111,
-       CS_0000 | GPL4_0001 | GPL5_1111 | UTA,
-       CS_0000 | GPL4_1111 | GPL5_1111 | UTA,
-       CS_0011 | GPL4_1111 | GPL5_1111 | UTA | LAST,   /* NOP   */
-
-       /* RBS */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-
-       /* WSS */
-       CS_1000 | GPL4_1111 | GPL5_1110 | UTA,
-       CS_0000 | GPL4_1111 | GPL5_0000 | UTA,
-       CS_0000 | GPL4_1111 | GPL5_0000 | UTA,
-       CS_0000 | GPL4_1111 | GPL5_0000 | UTA,
-       CS_0000 | GPL4_1111 | GPL5_0001 | UTA,
-       CS_0000 | GPL4_1111 | GPL5_1111 | UTA,
-       CS_0000 | GPL4_1111 | GPL5_1111,
-       CS_0011 | GPL4_1111 | GPL5_1111 | UTA | LAST,
-
-       /* WBS */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-
-       /* UPT */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-
-       /* EXC */
-       CS_0001 | LAST,
-       _NOT_USED_,
-
-       /* REG */
-       CS_1110 ,
-       CS_0001 | LAST,
-};
-#endif
-
-/* 0xC8 = 0b11001000 , CAS3, >> 2 = 0b00 11 0 010 */
-/* 0x88 = 0b10001000 , CAS2, >> 2 = 0b00 10 0 010 */
-#define MAR_SDRAM_INIT         ((CAS_LATENCY << 6) | 0x00000008LU)
-
-/* 8 */
-#define CONFIG_SYS_MAMR        ((CONFIG_SYS_MAMR_PTA << MAMR_PTA_SHIFT)  | MAMR_PTAE       |   \
-                        MAMR_AMA_TYPE_0 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A11 |   \
-                        MAMR_RLFA_1X    | MAMR_WLFA_1X    | MAMR_TLFA_4X)
-
-void check_ram(unsigned int addr, unsigned int size)
-{
-       unsigned int i, j, v, vv;
-       volatile unsigned int *p;
-       unsigned int pv;
-
-       p = (unsigned int *)addr;
-       pv = (unsigned int)p;
-       for (i = 0; i < size / sizeof(unsigned int); i++, pv += sizeof(unsigned int))
-               *p++ = pv;
-
-       p = (unsigned int *)addr;
-       for (i = 0; i < size / sizeof(unsigned int); i++) {
-               v = (unsigned int)p;
-               vv = *p;
-               if (vv != v) {
-                       printf("%p: read %08x instead of %08x\n", p, vv, v);
-                       hang();
-               }
-               p++;
-       }
-
-       for (j = 0; j < 5; j++) {
-               switch (j) {
-                       case 0: v = 0x00000000; break;
-                       case 1: v = 0xffffffff; break;
-                       case 2: v = 0x55555555; break;
-                       case 3: v = 0xaaaaaaaa; break;
-                       default:v = 0xdeadbeef; break;
-               }
-               p = (unsigned int *)addr;
-               for (i = 0; i < size / sizeof(unsigned int); i++) {
-                       *p = v;
-                       vv = *p;
-                       if (vv != v) {
-                               printf("%p: read %08x instead of %08x\n", p, vv, v);
-                               hang();
-                       }
-                       *p = ~v;
-                       p++;
-               }
-       }
-}
-
-phys_size_t initdram(int board_type)
-{
-       volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
-       volatile memctl8xx_t *memctl = &immap->im_memctl;
-       long int size;
-
-       upmconfig(UPMB, (uint *) sdram_table, sizeof(sdram_table) / sizeof(sdram_table[0]));
-
-       /*
-        * Preliminary prescaler for refresh
-        */
-       memctl->memc_mptpr = MPTPR_PTP_DIV8;
-
-       memctl->memc_mar = MAR_SDRAM_INIT;      /* 32-bit address to be output on the address bus if AMX = 0b11 */
-
-       /*
-        * Map controller bank 3 to the SDRAM bank at preliminary address.
-        */
-       memctl->memc_or3 = CONFIG_SYS_OR3_PRELIM;
-       memctl->memc_br3 = CONFIG_SYS_BR3_PRELIM;
-
-       memctl->memc_mbmr = CONFIG_SYS_MAMR & ~MAMR_PTAE;       /* no refresh yet */
-
-       udelay(200);
-
-       /* perform SDRAM initialisation sequence */
-       memctl->memc_mcr = MCR_OP_RUN | MCR_UPM_B | MCR_MB_CS3 | MCR_MLCF(1) | MCR_MAD(0x3C);   /* precharge all                */
-       udelay(1);
-
-       memctl->memc_mcr = MCR_OP_RUN | MCR_UPM_B | MCR_MB_CS3 | MCR_MLCF(2) | MCR_MAD(0x30);   /* refresh 2 times(0)           */
-       udelay(1);
-
-       memctl->memc_mcr = MCR_OP_RUN | MCR_UPM_B | MCR_MB_CS3 | MCR_MLCF(1) | MCR_MAD(0x3E);   /* exception program (write mar)*/
-       udelay(1);
-
-       memctl->memc_mbmr |= MAMR_PTAE; /* enable refresh */
-
-       udelay(10000);
-
-       {
-               u32 d1, d2;
-
-               d1 = 0xAA55AA55;
-               *(volatile u32 *)0 = d1;
-               d2 = *(volatile u32 *)0;
-               if (d1 != d2) {
-                       printf("DRAM fails: wrote 0x%08x read 0x%08x\n", d1, d2);
-                       hang();
-               }
-
-               d1 = 0x55AA55AA;
-               *(volatile u32 *)0 = d1;
-               d2 = *(volatile u32 *)0;
-               if (d1 != d2) {
-                       printf("DRAM fails: wrote 0x%08x read 0x%08x\n", d1, d2);
-                       hang();
-               }
-       }
-
-       size = get_ram_size((long *)0, SDRAM_MAX_SIZE);
-
-       if (size == 0) {
-               printf("SIZE is zero: LOOP on 0\n");
-               for (;;) {
-                       *(volatile u32 *)0 = 0;
-                       (void)*(volatile u32 *)0;
-               }
-       }
-
-       return size;
-}
-
-/* ------------------------------------------------------------------------- */
-
-void reset_phys(void)
-{
-       int phyno;
-       unsigned short v;
-
-       udelay(10000);
-       /* reset the damn phys */
-       mii_init();
-
-       for (phyno = 0; phyno < 32; ++phyno) {
-               fec8xx_miiphy_read(NULL, phyno, MII_PHYSID1, &v);
-               if (v == 0xFFFF)
-                       continue;
-               fec8xx_miiphy_write(NULL, phyno, MII_BMCR, BMCR_PDOWN);
-               udelay(10000);
-               fec8xx_miiphy_write(NULL, phyno, MII_BMCR,
-                               BMCR_RESET | BMCR_ANENABLE);
-               udelay(10000);
-       }
-}
-
-/* ------------------------------------------------------------------------- */
-
-/* GP = general purpose, SP = special purpose (on chip peripheral) */
-
-/* bits that can have a special purpose or can be configured as inputs/outputs */
-#define PA_GP_INMASK   0
-#define PA_GP_OUTMASK  (_BW(3) | _BW(7) | _BW(10) | _BW(14) | _BW(15))
-#define PA_SP_MASK     0
-#define PA_ODR_VAL     0
-#define PA_GP_OUTVAL   (_BW(3) | _BW(14) | _BW(15))
-#define PA_SP_DIRVAL   0
-
-#define PB_GP_INMASK   _B(28)
-#define PB_GP_OUTMASK  (_B(19) | _B(23) | _B(26) | _B(27) | _B(29) | _B(30))
-#define PB_SP_MASK     (_BR(22, 25))
-#define PB_ODR_VAL     0
-#define PB_GP_OUTVAL   (_B(26) | _B(27) | _B(29) | _B(30))
-#define PB_SP_DIRVAL   0
-
-#if CONFIG_NETPHONE_VERSION == 1
-#define PC_GP_INMASK   _BW(12)
-#define PC_GP_OUTMASK  (_BW(10) | _BW(11) | _BW(13) | _BW(15))
-#elif CONFIG_NETPHONE_VERSION == 2
-#define PC_GP_INMASK   (_BW(13) | _BW(15))
-#define PC_GP_OUTMASK  (_BW(10) | _BW(11) | _BW(12))
-#endif
-#define PC_SP_MASK     0
-#define PC_SOVAL       0
-#define PC_INTVAL      0
-#define PC_GP_OUTVAL   (_BW(10) | _BW(11))
-#define PC_SP_DIRVAL   0
-
-#if CONFIG_NETPHONE_VERSION == 1
-#define PE_GP_INMASK   _B(31)
-#define PE_GP_OUTMASK  (_B(17) | _B(18) |_B(20) | _B(24) | _B(27) | _B(28) | _B(29) | _B(30))
-#define PE_GP_OUTVAL   (_B(20) | _B(24) | _B(27) | _B(28))
-#elif CONFIG_NETPHONE_VERSION == 2
-#define PE_GP_INMASK   _BR(28, 31)
-#define PE_GP_OUTMASK  (_B(17) | _B(18) |_B(20) | _B(24) | _B(27))
-#define PE_GP_OUTVAL   (_B(20) | _B(24) | _B(27))
-#endif
-#define PE_SP_MASK     0
-#define PE_ODR_VAL     0
-#define PE_SP_DIRVAL   0
-
-int board_early_init_f(void)
-{
-       volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
-       volatile iop8xx_t *ioport = &immap->im_ioport;
-       volatile cpm8xx_t *cpm = &immap->im_cpm;
-       volatile memctl8xx_t *memctl = &immap->im_memctl;
-
-       /* NAND chip select */
-#if CONFIG_NETPHONE_VERSION == 1
-       memctl->memc_or1 = ((0xFFFFFFFFLU & ~(NAND_SIZE - 1)) | OR_CSNT_SAM | OR_BI | OR_SCY_8_CLK | OR_EHTR | OR_TRLX);
-       memctl->memc_br1 = ((NAND_BASE & BR_BA_MSK) | BR_PS_8 | BR_V);
-#elif CONFIG_NETPHONE_VERSION == 2
-       upmconfig(UPMA, (uint *) nandcs_table, sizeof(nandcs_table) / sizeof(nandcs_table[0]));
-       memctl->memc_or1 = ((0xFFFFFFFFLU & ~(NAND_SIZE - 1)) | OR_BI | OR_G5LS);
-       memctl->memc_br1 = ((NAND_BASE & BR_BA_MSK) | BR_PS_8 | BR_V | BR_MS_UPMA);
-       memctl->memc_mamr = 0;  /* all clear */
-#endif
-
-       /* DSP chip select */
-       memctl->memc_or2 = ((0xFFFFFFFFLU & ~(DSP_SIZE - 1)) | OR_CSNT_SAM | OR_BI | OR_ACS_DIV2 | OR_SETA | OR_TRLX);
-       memctl->memc_br2 = ((DSP_BASE & BR_BA_MSK) | BR_PS_16 | BR_V);
-
-#if CONFIG_NETPHONE_VERSION == 1
-       memctl->memc_br4 &= ~BR_V;
-#endif
-       memctl->memc_br5 &= ~BR_V;
-       memctl->memc_br6 &= ~BR_V;
-       memctl->memc_br7 &= ~BR_V;
-
-       ioport->iop_padat       = PA_GP_OUTVAL;
-       ioport->iop_paodr       = PA_ODR_VAL;
-       ioport->iop_padir       = PA_GP_OUTMASK | PA_SP_DIRVAL;
-       ioport->iop_papar       = PA_SP_MASK;
-
-       cpm->cp_pbdat           = PB_GP_OUTVAL;
-       cpm->cp_pbodr           = PB_ODR_VAL;
-       cpm->cp_pbdir           = PB_GP_OUTMASK | PB_SP_DIRVAL;
-       cpm->cp_pbpar           = PB_SP_MASK;
-
-       ioport->iop_pcdat       = PC_GP_OUTVAL;
-       ioport->iop_pcdir       = PC_GP_OUTMASK | PC_SP_DIRVAL;
-       ioport->iop_pcso        = PC_SOVAL;
-       ioport->iop_pcint       = PC_INTVAL;
-       ioport->iop_pcpar       = PC_SP_MASK;
-
-       cpm->cp_pedat           = PE_GP_OUTVAL;
-       cpm->cp_peodr           = PE_ODR_VAL;
-       cpm->cp_pedir           = PE_GP_OUTMASK | PE_SP_DIRVAL;
-       cpm->cp_pepar           = PE_SP_MASK;
-
-       return 0;
-}
-
-#ifdef CONFIG_HW_WATCHDOG
-
-void hw_watchdog_reset(void)
-{
-       /* XXX add here the really funky stuff */
-}
-
-#endif
-
-#ifdef CONFIG_SHOW_ACTIVITY
-
-static volatile int left_to_poll = PHONE_CONSOLE_POLL_HZ;      /* poll */
-
-/* called from timer interrupt every 1/CONFIG_SYS_HZ sec */
-void board_show_activity(ulong timestamp)
-{
-       if (left_to_poll > -PHONE_CONSOLE_POLL_HZ)
-               --left_to_poll;
-}
-
-extern void phone_console_do_poll(void);
-
-static void do_poll(void)
-{
-       unsigned int base;
-
-       while (left_to_poll <= 0) {
-               phone_console_do_poll();
-               base = left_to_poll + PHONE_CONSOLE_POLL_HZ;
-               do {
-                       left_to_poll = base;
-               } while (base != left_to_poll);
-       }
-}
-
-/* called when looping */
-void show_activity(int arg)
-{
-       do_poll();
-}
-
-#endif
-
-#if defined(CONFIG_SYS_CONSOLE_IS_IN_ENV) && defined(CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE)
-int overwrite_console(void)
-{
-       /* printf("overwrite_console called\n"); */
-       return 0;
-}
-#endif
-
-extern int drv_phone_init(void);
-extern int drv_phone_use_me(void);
-extern int drv_phone_is_idle(void);
-
-int misc_init_r(void)
-{
-       return drv_phone_init();
-}
-
-int last_stage_init(void)
-{
-       int i;
-
-#if CONFIG_NETPHONE_VERSION == 2
-       /* assert peripheral reset */
-       ((volatile immap_t *)CONFIG_SYS_IMMR)->im_ioport.iop_pcdat &= ~_BW(12);
-       for (i = 0; i < 10; i++)
-               udelay(1000);
-       ((volatile immap_t *)CONFIG_SYS_IMMR)->im_ioport.iop_pcdat |=  _BW(12);
-#endif
-       reset_phys();
-
-       /* check in order to enable the local console */
-       left_to_poll = PHONE_CONSOLE_POLL_HZ;
-       i = CONFIG_SYS_HZ * 2;
-       while (i > 0) {
-
-               if (tstc()) {
-                       getc();
-                       break;
-               }
-
-               do_poll();
-
-               if (drv_phone_use_me()) {
-                       status_led_set(0, STATUS_LED_ON);
-                       while (!drv_phone_is_idle()) {
-                               do_poll();
-                               udelay(1000000 / CONFIG_SYS_HZ);
-                       }
-
-                       console_assign(stdin, "phone");
-                       console_assign(stdout, "phone");
-                       console_assign(stderr, "phone");
-                       setenv("bootdelay", "-1");
-                       break;
-               }
-
-               udelay(1000000 / CONFIG_SYS_HZ);
-               i--;
-               left_to_poll--;
-       }
-       left_to_poll = PHONE_CONSOLE_POLL_HZ;
-
-       return 0;
-}
diff --git a/board/netphone/phone_console.c b/board/netphone/phone_console.c
deleted file mode 100644 (file)
index d195a39..0000000
+++ /dev/null
@@ -1,1128 +0,0 @@
-/*
- * (C) Copyright 2004 Intracom S.A.
- * Pantelis Antoniou <panto@intracom.gr>
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/*
- * phone_console.c
- *
- * A phone based console
- *
- * Virtual display of 80x24 characters.
- * The actual display is much smaller and panned to show the virtual one.
- * Input is made by a numeric keypad utilizing the input method of
- * mobile phones. Sorry no T9 lexicons...
- *
- */
-
-#include <common.h>
-
-#include <version.h>
-#include <linux/types.h>
-#include <stdio_dev.h>
-
-#include <sed156x.h>
-
-/*************************************************************************************************/
-
-#define ROWS   24
-#define COLS   80
-
-#define REFRESH_HZ             (CONFIG_SYS_HZ/50)      /* refresh every 20ms */
-#define BLINK_HZ               (CONFIG_SYS_HZ/2)       /* cursor blink every 500ms */
-
-/*************************************************************************************************/
-
-#define DISPLAY_BACKLIT_PORT   ((volatile immap_t *)CONFIG_SYS_IMMR)->im_ioport.iop_pcdat
-#define DISPLAY_BACKLIT_MASK   0x0010
-
-/*************************************************************************************************/
-
-#define KP_STABLE_HZ           (CONFIG_SYS_HZ/100)     /* stable for 10ms */
-#define KP_REPEAT_DELAY_HZ     (CONFIG_SYS_HZ/4)       /* delay before repeat 250ms */
-#define KP_REPEAT_HZ           (CONFIG_SYS_HZ/20)      /* repeat every 50ms */
-#define KP_FORCE_DELAY_HZ      (CONFIG_SYS_HZ/2)       /* key was force pressed */
-#define KP_IDLE_DELAY_HZ       (CONFIG_SYS_HZ/2)       /* key was released and idle */
-
-#if CONFIG_NETPHONE_VERSION == 1
-#define KP_SPI_RXD_PORT (((volatile immap_t *)CONFIG_SYS_IMMR)->im_ioport.iop_pcdat)
-#define KP_SPI_RXD_MASK 0x0008
-
-#define KP_SPI_TXD_PORT (((volatile immap_t *)CONFIG_SYS_IMMR)->im_ioport.iop_pcdat)
-#define KP_SPI_TXD_MASK 0x0004
-
-#define KP_SPI_CLK_PORT (((volatile immap_t *)CONFIG_SYS_IMMR)->im_ioport.iop_pcdat)
-#define KP_SPI_CLK_MASK 0x0001
-#elif CONFIG_NETPHONE_VERSION == 2
-#define KP_SPI_RXD_PORT (((volatile immap_t *)CONFIG_SYS_IMMR)->im_cpm.cp_pbdat)
-#define KP_SPI_RXD_MASK 0x00000008
-
-#define KP_SPI_TXD_PORT (((volatile immap_t *)CONFIG_SYS_IMMR)->im_cpm.cp_pbdat)
-#define KP_SPI_TXD_MASK 0x00000004
-
-#define KP_SPI_CLK_PORT (((volatile immap_t *)CONFIG_SYS_IMMR)->im_cpm.cp_pbdat)
-#define KP_SPI_CLK_MASK 0x00000002
-#endif
-
-#define KP_CS_PORT     (((volatile immap_t *)CONFIG_SYS_IMMR)->im_cpm.cp_pedat)
-#define KP_CS_MASK     0x00000010
-
-#define KP_SPI_RXD() (KP_SPI_RXD_PORT & KP_SPI_RXD_MASK)
-
-#define KP_SPI_TXD(x) \
-       do { \
-               if (x) \
-                       KP_SPI_TXD_PORT |=  KP_SPI_TXD_MASK; \
-               else \
-                       KP_SPI_TXD_PORT &= ~KP_SPI_TXD_MASK; \
-       } while(0)
-
-#define KP_SPI_CLK(x) \
-       do { \
-               if (x) \
-                       KP_SPI_CLK_PORT |=  KP_SPI_CLK_MASK; \
-               else \
-                       KP_SPI_CLK_PORT &= ~KP_SPI_CLK_MASK; \
-       } while(0)
-
-#define KP_SPI_CLK_TOGGLE() (KP_SPI_CLK_PORT ^= KP_SPI_CLK_MASK)
-
-#define KP_SPI_BIT_DELAY()     /* no delay */
-
-#define KP_CS(x) \
-       do { \
-               if (x) \
-                       KP_CS_PORT |=  KP_CS_MASK; \
-               else \
-                       KP_CS_PORT &= ~KP_CS_MASK; \
-       } while(0)
-
-#define KP_ROWS 7
-#define KP_COLS 4
-
-#define KP_ROWS_MASK   ((1 << KP_ROWS) - 1)
-#define KP_COLS_MASK   ((1 << KP_COLS) - 1)
-
-#define SCAN           0
-#define SCAN_FILTER    1
-#define SCAN_COL       2
-#define SCAN_COL_FILTER 3
-#define PRESSED                4
-
-#define KP_F1  0       /* leftmost dot (tab)   */
-#define KP_F2  1       /* middle left dot      */
-#define KP_F3  2       /* up                   */
-#define KP_F4  3       /* middle right dot     */
-#define KP_F5  4       /* rightmost dot        */
-#define KP_F6  5       /* C                    */
-#define KP_F7  6       /* left                 */
-#define KP_F8  7       /* down                 */
-#define KP_F9  8       /* right                */
-#define KP_F10 9       /* enter                */
-#define KP_F11 10      /* R                    */
-#define KP_F12 11      /* save                 */
-#define KP_F13 12      /* redial               */
-#define KP_F14 13      /* speaker              */
-#define KP_F15 14      /* unused               */
-#define KP_F16 15      /* unused               */
-
-#define KP_RELEASE             -1      /* key depressed                                */
-#define KP_FORCE               -2      /* key was pressed for more than force hz       */
-#define KP_IDLE                        -3      /* key was released and idle                    */
-
-#define KP_1   '1'
-#define KP_2   '2'
-#define KP_3   '3'
-#define KP_4   '4'
-#define KP_5   '5'
-#define KP_6   '6'
-#define KP_7   '7'
-#define KP_8   '8'
-#define KP_9   '9'
-#define KP_0   '0'
-#define KP_STAR '*'
-#define KP_HASH '#'
-
-/*************************************************************************************************/
-
-static int curs_disabled;
-static int curs_col, curs_row;
-static int disp_col, disp_row;
-
-static int width, height;
-
-/* the simulated vty buffer */
-static char vty_buf[ROWS * COLS];
-static char last_visible_buf[ROWS * COLS];     /* worst case */
-static char *last_visible_curs_ptr;
-static int last_visible_curs_rev;
-static int blinked_state;
-static int last_input_mode;
-static int refresh_time;
-static int blink_time;
-static char last_fast_punct;
-
-/*************************************************************************************************/
-
-#define IM_SMALL       0
-#define IM_CAPITAL     1
-#define IM_NUMBER      2
-
-static int input_mode;
-static char fast_punct;
-static int tab_indicator;
-static const char *fast_punct_list = ",.:;*";
-
-static const char *input_mode_txt[] = { "abc", "ABC", "123" };
-
-static const char *punct = ".,!;?'\"-()@/:_+&%*=<>$[]{}\\~^#|";
-static const char *whspace = " 0\n";
-/* per mode character select (for 2-9) */
-static const char *digits_sel[2][8] = {
-       {       /* small */
-               "abc2",                                 /* 2 */
-               "def3",                                 /* 3 */
-               "ghi4",                                 /* 4 */
-               "jkl5",                                 /* 5 */
-               "mno6",                                 /* 6 */
-               "pqrs7",                                /* 7 */
-               "tuv8",                                 /* 8 */
-               "wxyz9",                                /* 9 */
-       }, {    /* capital */
-               "ABC2",                                 /* 2 */
-               "DEF3",                                 /* 3 */
-               "GHI4",                                 /* 4 */
-               "JKL5",                                 /* 5 */
-               "MNO6",                                 /* 6 */
-               "PQRS7",                                /* 7 */
-               "TUV8",                                 /* 8 */
-               "WXYZ9",                                /* 9 */
-       }
-};
-
-/*****************************************************************************/
-
-static void update(void);
-static void ensure_visible(int col, int row, int dx, int dy);
-
-static void console_init(void)
-{
-       curs_disabled = 0;
-       curs_col = 0;
-       curs_row = 0;
-
-       disp_col = 0;
-       disp_row = 0;
-
-       input_mode = IM_SMALL;
-       fast_punct = ',';
-       last_fast_punct = '\0';
-       refresh_time = REFRESH_HZ;
-       blink_time = BLINK_HZ;
-
-       memset(vty_buf, ' ', sizeof(vty_buf));
-
-       memset(last_visible_buf, ' ', sizeof(last_visible_buf));
-       last_visible_curs_ptr = NULL;
-       last_input_mode = -1;
-       last_visible_curs_rev = 0;
-
-       blinked_state = 0;
-
-       sed156x_init();
-       width = sed156x_text_width;
-       height = sed156x_text_height - 1;
-
-       tab_indicator = 0;
-}
-
-/*****************************************************************************/
-
-void phone_putc(const char c);
-
-/*****************************************************************************/
-
-static int  queued_char = -1;
-static int  enabled = 0;
-
-/*****************************************************************************/
-
-/* flush buffers */
-int phone_start(void)
-{
-       console_init();
-
-       update();
-       sed156x_sync();
-
-       enabled = 1;
-       queued_char = 'U' - '@';
-
-       /* backlit on */
-       DISPLAY_BACKLIT_PORT &= ~DISPLAY_BACKLIT_MASK;
-
-       return 0;
-}
-
-int phone_stop(void)
-{
-       enabled = 0;
-
-       sed156x_clear();
-       sed156x_sync();
-
-       /* backlit off */
-       DISPLAY_BACKLIT_PORT |= DISPLAY_BACKLIT_MASK;
-
-       return 0;
-}
-
-void phone_puts(const char *s)
-{
-       int count = strlen(s);
-
-       while (count--)
-               phone_putc(*s++);
-}
-
-int phone_tstc(void)
-{
-       return queued_char >= 0 ? 1 : 0;
-}
-
-int phone_getc(void)
-{
-       int r;
-
-       if (queued_char < 0)
-               return -1;
-
-       r = queued_char;
-       queued_char = -1;
-
-       return r;
-}
-
-/*****************************************************************************/
-
-int drv_phone_init(void)
-{
-       struct stdio_dev console_dev;
-
-       console_init();
-
-       memset(&console_dev, 0, sizeof(console_dev));
-       strcpy(console_dev.name, "phone");
-       console_dev.ext = DEV_EXT_VIDEO;        /* Video extensions */
-       console_dev.flags = DEV_FLAGS_OUTPUT | DEV_FLAGS_INPUT | DEV_FLAGS_SYSTEM;
-       console_dev.start = phone_start;
-       console_dev.stop = phone_stop;
-       console_dev.putc = phone_putc;  /* 'putc' function */
-       console_dev.puts = phone_puts;  /* 'puts' function */
-       console_dev.tstc = phone_tstc;  /* 'tstc' function */
-       console_dev.getc = phone_getc;  /* 'getc' function */
-
-       if (stdio_register(&console_dev) == 0)
-               return 1;
-
-       return 0;
-}
-
-static int use_me;
-
-int drv_phone_use_me(void)
-{
-       return use_me;
-}
-
-static void kp_do_poll(void);
-
-void phone_console_do_poll(void)
-{
-       int i, x, y;
-
-       kp_do_poll();
-
-       if (enabled) {
-               /* do the blink */
-               blink_time -= PHONE_CONSOLE_POLL_HZ;
-               if (blink_time <= 0) {
-                       blink_time += BLINK_HZ;
-                       if (last_visible_curs_ptr) {
-                               i = last_visible_curs_ptr - last_visible_buf;
-                               x = i % width; y = i / width;
-                               sed156x_reverse_at(x, y, 1);
-                               last_visible_curs_rev ^= 1;
-                       }
-               }
-
-               /* do the refresh */
-               refresh_time -= PHONE_CONSOLE_POLL_HZ;
-               if (refresh_time <= 0) {
-                       refresh_time += REFRESH_HZ;
-                       sed156x_sync();
-               }
-       }
-
-}
-
-static int last_scancode = -1;
-static int forced_scancode = 0;
-static int input_state = -1;
-static int input_scancode = -1;
-static int input_selected_char = -1;
-static char input_covered_char;
-
-static void putchar_at_cursor(char c)
-{
-       vty_buf[curs_row * COLS + curs_col] = c;
-       ensure_visible(curs_col, curs_row, 1, 1);
-}
-
-static char getchar_at_cursor(void)
-{
-       return vty_buf[curs_row * COLS + curs_col];
-}
-
-static void queue_input_char(char c)
-{
-       if (c <= 0)
-               return;
-
-       queued_char = c;
-}
-
-static void terminate_input(void)
-{
-       if (input_state < 0)
-               return;
-
-       if (input_selected_char >= 0)
-               queue_input_char(input_selected_char);
-
-       input_state = -1;
-       input_selected_char = -1;
-       putchar_at_cursor(input_covered_char);
-
-       curs_disabled = 0;
-       blink_time = BLINK_HZ;
-       update();
-}
-
-static void handle_enabled_scancode(int scancode)
-{
-       char c;
-       int new_disp_col, new_disp_row;
-       const char *sel;
-
-
-       switch (scancode) {
-
-                       /* key was released */
-               case KP_RELEASE:
-                       forced_scancode = 0;
-                       break;
-
-                       /* key was forced */
-               case KP_FORCE:
-
-                       switch (last_scancode) {
-                               case '#':
-                                       if (input_mode == IM_NUMBER) {
-                                               input_mode = IM_CAPITAL;
-                                               /* queue backspace to erase # */
-                                               queue_input_char('\b');
-                                       } else {
-                                               input_mode = IM_NUMBER;
-                                               fast_punct = '*';
-                                       }
-                                       update();
-                                       break;
-
-                               case '0': case '1':
-                               case '2': case '3': case '4': case '5':
-                               case '6': case '7': case '8': case '9':
-
-                                       if (input_state < 0)
-                                               break;
-
-                                       input_selected_char = last_scancode;
-                                       putchar_at_cursor((char)input_selected_char);
-                                       terminate_input();
-
-                                       break;
-
-                               default:
-                                       break;
-                       }
-
-                       break;
-
-                       /* release and idle */
-               case KP_IDLE:
-                       input_scancode = -1;
-                       if (input_state < 0)
-                               break;
-                       terminate_input();
-                       break;
-
-                       /* change input mode */
-               case '#':
-                       if (last_scancode == '#')       /* no repeat */
-                               break;
-
-                       if (input_mode == IM_NUMBER) {
-                               input_scancode = scancode;
-                               input_state = 0;
-                               input_selected_char = scancode;
-                               input_covered_char = getchar_at_cursor();
-                               putchar_at_cursor((char)input_selected_char);
-                               terminate_input();
-                               break;
-                       }
-
-                       if (input_mode == IM_SMALL)
-                               input_mode = IM_CAPITAL;
-                       else
-                               input_mode = IM_SMALL;
-
-                       update();
-                       break;
-
-               case '*':
-                       /* no repeat */
-                       if (last_scancode == scancode)
-                               break;
-
-                       if (input_state >= 0)
-                               terminate_input();
-
-                       input_scancode = fast_punct;
-                       input_state = 0;
-                       input_selected_char = input_scancode;
-                       input_covered_char = getchar_at_cursor();
-                       putchar_at_cursor((char)input_selected_char);
-                       terminate_input();
-
-                       break;
-
-               case '0': case '1':
-               case '2': case '3': case '4': case '5':
-               case '6': case '7': case '8': case '9':
-
-                       /* no repeat */
-                       if (last_scancode == scancode)
-                               break;
-
-                       if (input_mode == IM_NUMBER) {
-                               input_scancode = scancode;
-                               input_state = 0;
-                               input_selected_char = scancode;
-                               input_covered_char = getchar_at_cursor();
-                               putchar_at_cursor((char)input_selected_char);
-                               terminate_input();
-                               break;
-                       }
-
-                       if (input_state >= 0 && input_scancode != scancode)
-                               terminate_input();
-
-                       if (input_state < 0) {
-                               curs_disabled = 1;
-                               input_scancode = scancode;
-                               input_state = 0;
-                               input_covered_char = getchar_at_cursor();
-                       } else
-                               input_state++;
-
-                       if (scancode == '0')
-                               sel = whspace;
-                       else if (scancode == '1')
-                               sel = punct;
-                       else
-                               sel = digits_sel[input_mode][scancode - '2'];
-                       c = *(sel + input_state);
-                       if (c == '\0') {
-                               input_state = 0;
-                               c = *sel;
-                       }
-
-                       input_selected_char = (int)c;
-                       putchar_at_cursor((char)input_selected_char);
-                       update();
-
-                       break;
-
-                       /* move visible display */
-               case KP_F3: case KP_F8: case KP_F7: case KP_F9:
-
-                       new_disp_col = disp_col;
-                       new_disp_row = disp_row;
-
-                       switch (scancode) {
-                                       /* up */
-                               case KP_F3:
-                                       if (new_disp_row <= 0)
-                                               break;
-                                       new_disp_row--;
-                                       break;
-
-                                       /* down */
-                               case KP_F8:
-                                       if (new_disp_row >= ROWS - height)
-                                               break;
-                                       new_disp_row++;
-                                       break;
-
-                                       /* left */
-                               case KP_F7:
-                                       if (new_disp_col <= 0)
-                                               break;
-                                       new_disp_col--;
-                                       break;
-
-                                       /* right */
-                               case KP_F9:
-                                       if (new_disp_col >= COLS - width)
-                                               break;
-                                       new_disp_col++;
-                                       break;
-                       }
-
-                       /* no change? */
-                       if (disp_col == new_disp_col && disp_row == new_disp_row)
-                               break;
-
-                       disp_col = new_disp_col;
-                       disp_row = new_disp_row;
-                       update();
-
-                       break;
-
-               case KP_F6:     /* backspace */
-                       /* inputing something; no backspace sent, just cancel input */
-                       if (input_state >= 0) {
-                               input_selected_char = -1;       /* cancel */
-                               terminate_input();
-                               break;
-                       }
-                       queue_input_char('\b');
-                       break;
-
-               case KP_F10:    /* enter */
-                       /* inputing something; first cancel input */
-                       if (input_state >= 0)
-                               terminate_input();
-                       queue_input_char('\r');
-                       break;
-
-               case KP_F11:    /* R -> Ctrl-C (abort) */
-                       if (input_state >= 0)
-                               terminate_input();
-                       queue_input_char('C' - 'Q');    /* ctrl-c */
-                       break;
-
-               case KP_F5:     /* F% -> Ctrl-U (clear line) */
-                       if (input_state >= 0)
-                               terminate_input();
-                       queue_input_char('U' - 'Q');    /* ctrl-c */
-                       break;
-
-
-               case KP_F1:     /* tab */
-                       /* inputing something; first cancel input */
-                       if (input_state >= 0)
-                               terminate_input();
-                       queue_input_char('\t');
-                       break;
-
-               case KP_F2:     /* change fast punct */
-                       sel = strchr(fast_punct_list, fast_punct);
-                       if (sel == NULL)
-                               sel = &fast_punct_list[0];
-                       sel++;
-                       if (*sel == '\0')
-                               sel = &fast_punct_list[0];
-                       fast_punct = *sel;
-                       update();
-                       break;
-
-
-       }
-
-       if (scancode != KP_FORCE && scancode != KP_IDLE)        /* don't record forced or idle scancode */
-               last_scancode = scancode;
-}
-
-static void scancode_action(int scancode)
-{
-#if 0
-       if (scancode == KP_RELEASE)
-               printf(" RELEASE\n");
-       else if (scancode == KP_FORCE)
-               printf(" FORCE\n");
-       else if (scancode == KP_IDLE)
-               printf(" IDLE\n");
-       else if (scancode < 32)
-               printf(" F%d", scancode + 1);
-       else
-               printf(" %c", (char)scancode);
-       printf("\n");
-#endif
-
-       if (enabled) {
-               handle_enabled_scancode(scancode);
-               return;
-       }
-
-       if (scancode == KP_FORCE && last_scancode == '*')
-               use_me = 1;
-
-       last_scancode = scancode;
-}
-
-/**************************************************************************************/
-
-/* update the display; make sure to update only the differences */
-static void update(void)
-{
-       int i;
-       char *s, *e, *t, *r, *b, *cp;
-
-       if (input_mode != last_input_mode)
-               sed156x_output_at(sed156x_text_width - 3, sed156x_text_height - 1, input_mode_txt[input_mode], 3);
-
-       if (tab_indicator == 0) {
-               sed156x_output_at(0, sed156x_text_height - 1, "\\t", 2);
-               tab_indicator = 1;
-       }
-
-       if (fast_punct != last_fast_punct)
-               sed156x_output_at(4, sed156x_text_height - 1, &fast_punct, 1);
-
-       if (curs_disabled ||
-               curs_col < disp_col || curs_col >= (disp_col + width) ||
-               curs_row < disp_row || curs_row >= (disp_row + height)) {
-               cp = NULL;
-       } else
-               cp = last_visible_buf + (curs_row - disp_row) * width + (curs_col - disp_col);
-
-
-       /* printf("(%d,%d) (%d,%d) %s\n", curs_col, curs_row, disp_col, disp_row, cp ? "YES" : "no"); */
-
-       /* clear previous cursor */
-       if (last_visible_curs_ptr && last_visible_curs_rev == 0) {
-               i = last_visible_curs_ptr - last_visible_buf;
-               sed156x_reverse_at(i % width, i / width, 1);
-       }
-
-       b = vty_buf + disp_row * COLS + disp_col;
-       t = last_visible_buf;
-       for (i = 0; i < height; i++) {
-               s = b;
-               e = b + width;
-               /* update only the differences */
-               do {
-                       while (s < e && *s == *t) {
-                               s++;
-                               t++;
-                       }
-                       if (s == e)     /* no more */
-                               break;
-
-                       /* find run */
-                       r = s;
-                       while (s < e && *s != *t)
-                               *t++ = *s++;
-
-                       /* and update */
-                       sed156x_output_at(r - b, i, r, s - r);
-
-               } while (s < e);
-
-               b += COLS;
-       }
-
-       /* set cursor */
-       if (cp) {
-               last_visible_curs_ptr = cp;
-               i = last_visible_curs_ptr - last_visible_buf;
-               sed156x_reverse_at(i % width, i / width, 1);
-               last_visible_curs_rev = 0;
-       } else {
-               last_visible_curs_ptr = NULL;
-       }
-
-       last_input_mode = input_mode;
-       last_fast_punct = fast_punct;
-}
-
-/* ensure visibility; the trick is to minimize the screen movement */
-static void ensure_visible(int col, int row, int dx, int dy)
-{
-       int x1, y1, x2, y2, a1, b1, a2, b2;
-
-       /* clamp visible region */
-       if (col < 0) {
-               dx -= col;
-               col = 0;
-               if (dx <= 0)
-                       dx = 1;
-       }
-
-       if (row < 0) {
-               dy -= row;
-               row = 0;
-               if (dy <= 0)
-                       dy = 1;
-       }
-
-       if (col + dx > COLS)
-               dx = COLS - col;
-
-       if (row + dy > ROWS)
-               dy = ROWS - row;
-
-
-       /* move to easier to use vars */
-       x1 = disp_col;   y1 = disp_row;
-       x2 = x1 + width; y2 = y1 + height;
-       a1 = col;        b1 = row;
-       a2 = a1 + dx;    b2 = b1 + dy;
-
-       /* printf("(%d,%d) - (%d,%d) : (%d, %d) - (%d, %d)\n", x1, y1, x2, y2, a1, b1, a2, b2); */
-
-       if (a2 > x2) {
-               /* move to the right */
-               x2 = a2;
-               x1 = x2 - width;
-               if (x1 < 0) {
-                       x1 = 0;
-                       x2 = width;
-               }
-       } else if (a1 < x1) {
-               /* move to the left */
-               x1 = a1;
-               x2 = x1 + width;
-               if (x2 > COLS) {
-                       x2 = COLS;
-                       x1 = x2 - width;
-               }
-       }
-
-       if (b2 > y2) {
-               /* move down */
-               y2 = b2;
-               y1 = y2 - height;
-               if (y1 < 0) {
-                       y1 = 0;
-                       y2 = height;
-               }
-       } else if (b1 < y1) {
-               /* move up */
-               y1 = b1;
-               y2 = y1 + width;
-               if (y2 > ROWS) {
-                       y2 = ROWS;
-                       y1 = y2 - height;
-               }
-       }
-
-       /* printf("(%d,%d) - (%d,%d) : (%d, %d) - (%d, %d)\n", x1, y1, x2, y2, a1, b1, a2, b2); */
-
-       /* no movement? */
-       if (disp_col == x1 && disp_row == y1)
-               return;
-
-       disp_col = x1;
-       disp_row = y1;
-}
-
-/**************************************************************************************/
-
-static void newline(void)
-{
-       curs_col = 0;
-       if (curs_row + 1 < ROWS)
-               curs_row++;
-       else {
-               memmove(vty_buf, vty_buf + COLS, COLS * (ROWS - 1));
-               memset(vty_buf + (ROWS - 1) * COLS, ' ', COLS);
-       }
-}
-
-void phone_putc(const char c)
-{
-       int i;
-
-       if (input_mode != -1) {
-               input_selected_char = -1;
-               terminate_input();
-       }
-
-       curs_disabled = 1;
-       update();
-
-       blink_time = BLINK_HZ;
-
-       switch (c) {
-               case '\a':              /* ignore bell            */
-               case '\r':              /* ignore carriage return */
-                       break;
-
-               case '\n':              /* next line */
-                       newline();
-                       ensure_visible(curs_col, curs_row, 1, 1);
-                       break;
-
-               case 9: /* tab 8 */
-                       /* move to tab */
-                       i = curs_col;
-                       i |=  0x0008;
-                       i &= ~0x0007;
-
-                       if (i < COLS)
-                               curs_col = i;
-                       else
-                               newline();
-
-                       ensure_visible(curs_col, curs_row, 1, 1);
-                       break;
-
-               case 8:         /* backspace */
-                       if (curs_col <= 0)
-                               break;
-                       curs_col--;
-
-                       /* make sure that we see a couple of characters before */
-                       if (curs_col > 4)
-                               ensure_visible(curs_col - 4, curs_row, 4, 1);
-                       else
-                               ensure_visible(curs_col, curs_row, 1, 1);
-
-                       break;
-
-               default:                /* draw the char */
-                       putchar_at_cursor(c);
-
-                       /*
-                        * check for newline
-                        */
-                       if (curs_col + 1 < COLS)
-                               curs_col++;
-                       else
-                               newline();
-
-                       ensure_visible(curs_col, curs_row, 1, 1);
-
-                       break;
-       }
-
-       curs_disabled = 0;
-       blink_time = BLINK_HZ;
-       update();
-}
-
-/**************************************************************************************/
-
-static inline unsigned int kp_transfer(unsigned int val)
-{
-       unsigned int rx;
-       int b;
-
-       rx = 0; b = 8;
-       while (--b >= 0) {
-               KP_SPI_TXD(val & 0x80);
-               val <<= 1;
-               KP_SPI_CLK_TOGGLE();
-               KP_SPI_BIT_DELAY();
-               rx <<= 1;
-               if (KP_SPI_RXD())
-                       rx |= 1;
-               KP_SPI_CLK_TOGGLE();
-               KP_SPI_BIT_DELAY();
-       }
-
-       return rx;
-}
-
-unsigned int kp_data_transfer(unsigned int val)
-{
-       KP_SPI_CLK(1);
-       KP_CS(0);
-       val = kp_transfer(val);
-       KP_CS(1);
-
-       return val;
-}
-
-unsigned int kp_get_col_mask(unsigned int row_mask)
-{
-       unsigned int val, col_mask;
-
-       val = 0x80 | (row_mask & 0x7F);
-       (void)kp_data_transfer(val);
-#if CONFIG_NETPHONE_VERSION == 1
-       col_mask = kp_data_transfer(val) & 0x0F;
-#elif CONFIG_NETPHONE_VERSION == 2
-       col_mask = ((volatile immap_t *)CONFIG_SYS_IMMR)->im_cpm.cp_pedat & 0x0f;
-       /* XXX FUCK FUCK FUCK FUCK FUCK!!!! */
-       col_mask = ((col_mask & 0x08) >> 3) |   /* BKBR1 */
-                  ((col_mask & 0x04) << 1) |   /* BKBR2 */
-                   (col_mask & 0x02) |         /* BKBR3 */
-                  ((col_mask & 0x01) << 2);    /* BKBR4 */
-
-#endif
-       /* printf("col_mask(row_mask = 0x%x) -> col_mask = 0x%x\n", row_mask, col_mask); */
-
-       return col_mask;
-}
-
-/**************************************************************************************/
-
-static const int kp_scancodes[KP_ROWS * KP_COLS] = {
-       KP_F1,   KP_F3,   KP_F4,  KP_F2,
-       KP_F6,   KP_F8,   KP_F9,  KP_F7,
-       KP_1,    KP_3,    KP_F11, KP_2,
-       KP_4,    KP_6,    KP_F12, KP_5,
-       KP_7,    KP_9,    KP_F13, KP_8,
-       KP_STAR, KP_HASH, KP_F14, KP_0,
-       KP_F5,   KP_F15,  KP_F16, KP_F10,
-};
-
-static const int kp_repeats[KP_ROWS * KP_COLS] = {
-       0, 1, 0, 0,
-       0, 1, 1, 1,
-       1, 1, 0, 1,
-       1, 1, 0, 1,
-       1, 1, 0, 1,
-       1, 1, 0, 1,
-       0, 0, 0, 1,
-};
-
-static int kp_state = SCAN;
-static int kp_last_col_mask;
-static int kp_cur_row, kp_cur_col;
-static int kp_scancode;
-static int kp_stable;
-static int kp_repeat;
-static int kp_repeat_time;
-static int kp_force_time;
-static int kp_idle_time;
-
-static void kp_do_poll(void)
-{
-       unsigned int col_mask;
-       int col;
-
-       switch (kp_state) {
-               case SCAN:
-                       if (kp_idle_time > 0) {
-                               kp_idle_time -= PHONE_CONSOLE_POLL_HZ;
-                               if (kp_idle_time <= 0)
-                                       scancode_action(KP_IDLE);
-                       }
-
-                       col_mask = kp_get_col_mask(KP_ROWS_MASK);
-                       if (col_mask == KP_COLS_MASK)
-                               break;  /* nothing */
-                       kp_last_col_mask = col_mask;
-                       kp_stable = 0;
-                       kp_state = SCAN_FILTER;
-                       break;
-
-               case SCAN_FILTER:
-                       col_mask = kp_get_col_mask(KP_ROWS_MASK);
-                       if (col_mask != kp_last_col_mask) {
-                               kp_state = SCAN;
-                               break;
-                       }
-
-                       kp_stable += PHONE_CONSOLE_POLL_HZ;
-                       if (kp_stable < KP_STABLE_HZ)
-                               break;
-
-                       kp_cur_row = 0;
-                       kp_stable = 0;
-                       kp_state = SCAN_COL;
-
-                       (void)kp_get_col_mask(1 << kp_cur_row);
-                       break;
-
-               case SCAN_COL:
-                       col_mask = kp_get_col_mask(1 << kp_cur_row);
-                       if (col_mask == KP_COLS_MASK) {
-                               if (++kp_cur_row >= KP_ROWS) {
-                                       kp_state = SCAN;
-                                       break;
-                               }
-                               kp_get_col_mask(1 << kp_cur_row);
-                               break;
-                       }
-                       kp_last_col_mask = col_mask;
-                       kp_stable = 0;
-                       kp_state = SCAN_COL_FILTER;
-                       break;
-
-               case SCAN_COL_FILTER:
-                       col_mask = kp_get_col_mask(1 << kp_cur_row);
-                       if (col_mask != kp_last_col_mask || col_mask == KP_COLS_MASK) {
-                               kp_state = SCAN;
-                               break;
-                       }
-
-                       kp_stable += PHONE_CONSOLE_POLL_HZ;
-                       if (kp_stable < KP_STABLE_HZ)
-                               break;
-
-                       for (col = 0; col < KP_COLS; col++)
-                               if ((col_mask & (1 << col)) == 0)
-                                       break;
-                       kp_cur_col = col;
-                       kp_state = PRESSED;
-                       kp_scancode = kp_scancodes[kp_cur_row * KP_COLS + kp_cur_col];
-                       kp_repeat = kp_repeats[kp_cur_row * KP_COLS + kp_cur_col];
-
-                       if (kp_repeat)
-                               kp_repeat_time = KP_REPEAT_DELAY_HZ;
-                       kp_force_time = KP_FORCE_DELAY_HZ;
-
-                       scancode_action(kp_scancode);
-
-                       break;
-
-               case PRESSED:
-                       col_mask = kp_get_col_mask(1 << kp_cur_row);
-                       if (col_mask != kp_last_col_mask) {
-                               kp_state = SCAN;
-                               scancode_action(KP_RELEASE);
-                               kp_idle_time = KP_IDLE_DELAY_HZ;
-                               break;
-                       }
-
-                       if (kp_repeat) {
-                               kp_repeat_time -= PHONE_CONSOLE_POLL_HZ;
-                               if (kp_repeat_time <= 0) {
-                                       kp_repeat_time += KP_REPEAT_HZ;
-                                       scancode_action(kp_scancode);
-                               }
-                       }
-
-                       if (kp_force_time > 0) {
-                               kp_force_time -= PHONE_CONSOLE_POLL_HZ;
-                               if (kp_force_time <= 0)
-                                       scancode_action(KP_FORCE);
-                       }
-
-                       break;
-       }
-}
-
-/**************************************************************************************/
-
-int drv_phone_is_idle(void)
-{
-       return kp_state == SCAN;
-}
diff --git a/board/netphone/u-boot.lds b/board/netphone/u-boot.lds
deleted file mode 100644 (file)
index 0dff5a4..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * (C) Copyright 2000-2010
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-OUTPUT_ARCH(powerpc)
-
-SECTIONS
-{
-  /* Read-only sections, merged into text segment: */
-  . = + SIZEOF_HEADERS;
-  .text        :
-  {
-    arch/powerpc/cpu/mpc8xx/start.o    (.text*)
-    arch/powerpc/cpu/mpc8xx/traps.o    (.text*)
-
-    *(.text*)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-
-  /* Read-write section, merged into data segment: */
-  . = (. + 0x00FF) & 0xFFFFFF00;
-  _erotext = .;
-  PROVIDE (erotext = .);
-  .reloc   :
-  {
-    _GOT2_TABLE_ = .;
-    KEEP(*(.got2))
-    KEEP(*(.got))
-    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
-    _FIXUP_TABLE_ = .;
-    KEEP(*(.fixup))
-  }
-  __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
-  __fixup_entries = (. - _FIXUP_TABLE_)>>2;
-
-  .data    :
-  {
-    *(.data*)
-    *(.sdata*)
-  }
-  _edata  =  .;
-  PROVIDE (edata = .);
-
-  . = .;
-
-  . = ALIGN(4);
-  .u_boot_list : {
-       KEEP(*(SORT(.u_boot_list*)));
-  }
-
-
-  . = .;
-  __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)       :
-  {
-   *(.bss*)
-   *(.sbss*)
-   *(COMMON)
-   . = ALIGN(4);
-  }
-  __bss_end = . ;
-  PROVIDE (end = .);
-}
diff --git a/board/netphone/u-boot.lds.debug b/board/netphone/u-boot.lds.debug
deleted file mode 100644 (file)
index a198cf9..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * (C) Copyright 2000-2004
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-OUTPUT_ARCH(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  /* Read-only sections, merged into text segment: */
-  . = + SIZEOF_HEADERS;
-  .interp : { *(.interp) }
-  .hash          : { *(.hash)          }
-  .dynsym        : { *(.dynsym)                }
-  .dynstr        : { *(.dynstr)                }
-  .rel.text      : { *(.rel.text)              }
-  .rela.text     : { *(.rela.text)     }
-  .rel.data      : { *(.rel.data)              }
-  .rela.data     : { *(.rela.data)     }
-  .rel.rodata    : { *(.rel.rodata)    }
-  .rela.rodata   : { *(.rela.rodata)   }
-  .rel.got       : { *(.rel.got)               }
-  .rela.got      : { *(.rela.got)              }
-  .rel.ctors     : { *(.rel.ctors)     }
-  .rela.ctors    : { *(.rela.ctors)    }
-  .rel.dtors     : { *(.rel.dtors)     }
-  .rela.dtors    : { *(.rela.dtors)    }
-  .rel.bss       : { *(.rel.bss)               }
-  .rela.bss      : { *(.rela.bss)              }
-  .rel.plt       : { *(.rel.plt)               }
-  .rela.plt      : { *(.rela.plt)              }
-  .init          : { *(.init)  }
-  .plt : { *(.plt) }
-  .text      :
-  {
-    /* WARNING - the following is hand-optimized to fit within */
-    /* the sector layout of our flash chips!   XXX FIXME XXX   */
-
-    arch/powerpc/cpu/mpc8xx/start.o            (.text)
-    common/dlmalloc.o          (.text)
-    lib/vsprintf.o     (.text)
-    lib/crc32.o                (.text)
-
-    . = env_offset;
-    common/env_embedded.o(.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.rodata)
-    *(.rodata1)
-    *(.rodata.str1.4)
-    *(.eh_frame)
-  }
-  .fini      : { *(.fini)    } =0
-  .ctors     : { *(.ctors)   }
-  .dtors     : { *(.dtors)   }
-
-  /* Read-write section, merged into data segment: */
-  . = (. + 0x0FFF) & 0xFFFFF000;
-  _erotext = .;
-  PROVIDE (erotext = .);
-  .reloc   :
-  {
-    *(.got)
-    _GOT2_TABLE_ = .;
-    *(.got2)
-    _FIXUP_TABLE_ = .;
-    *(.fixup)
-  }
-  __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
-  __fixup_entries = (. - _FIXUP_TABLE_)>>2;
-
-  .data    :
-  {
-    *(.data)
-    *(.data1)
-    *(.sdata)
-    *(.sdata2)
-    *(.dynamic)
-    CONSTRUCTORS
-  }
-  _edata  =  .;
-  PROVIDE (edata = .);
-
-
-  . = ALIGN(4);
-  .u_boot_list : {
-       KEEP(*(SORT(.u_boot_list*)));
-  }
-
-
-  __start___ex_table = .;
-  __ex_table : { *(__ex_table) }
-  __stop___ex_table = .;
-
-  . = ALIGN(4096);
-  __init_begin = .;
-  .text.init : { *(.text.init) }
-  .data.init : { *(.data.init) }
-  . = ALIGN(4096);
-  __init_end = .;
-
-  __bss_start = .;
-  .bss       :
-  {
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
-   *(COMMON)
-  }
-  __bss_end = . ;
-  PROVIDE (end = .);
-}
diff --git a/board/netta/Makefile b/board/netta/Makefile
deleted file mode 100644 (file)
index 98bac7e..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# (C) Copyright 2000-2006
-# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
-
-obj-y  = netta.o flash.o dsp.o codec.o pcmcia.o
diff --git a/board/netta/codec.c b/board/netta/codec.c
deleted file mode 100644 (file)
index e303aa4..0000000
+++ /dev/null
@@ -1,1481 +0,0 @@
-/*
- * CODEC
- */
-
-#include <common.h>
-#include <post.h>
-
-#include "mpc8xx.h"
-
-/***********************************************/
-
-#define MAX_DUSLIC     4
-
-#define NUM_CHANNELS   2
-#define MAX_SLICS      (MAX_DUSLIC * NUM_CHANNELS)
-
-/***********************************************/
-
-#define SOP_READ_CH_0          0xC4  /* Read SOP Register for Channel A  */
-#define SOP_READ_CH_1          0xCC  /* Read SOP Register for Channel B  */
-#define SOP_WRITE_CH_0         0x44  /* Write SOP Register for Channel A */
-#define SOP_WRITE_CH_1         0x4C  /* Write SOP Register for Channel B */
-
-#define COP_READ_CH_0          0xC5
-#define COP_READ_CH_1          0xCD
-#define COP_WRITE_CH_0         0x45
-#define COP_WRITE_CH_1         0x4D
-
-#define POP_READ_CH_0          0xC6
-#define POP_READ_CH_1          0xCE
-#define POP_WRITE_CH_0         0x46
-#define POP_WRITE_CH_1         0x4E
-
-#define RST_CMD_DUSLIC_CHIP    0x40  /* OR 0x48 */
-#define RST_CMD_DUSLIC_CH_A    0x41
-#define RST_CMD_DUSLIC_CH_B    0x49
-
-#define PCM_RESYNC_CMD_CH_A    0x42
-#define PCM_RESYNC_CMD_CH_B    0x4A
-
-#define ACTIVE_HOOK_LEV_4      0
-#define ACTIVE_HOOK_LEV_12     1
-
-#define SLIC_P_NORMAL          0x01
-
-/************************************************/
-
-#define CODSP_WR       0x00
-#define CODSP_RD       0x80
-#define CODSP_OP       0x40
-#define CODSP_ADR(x)   (((unsigned char)(x) & 7) << 3)
-#define CODSP_M(x)     ((unsigned char)(x) & 7)
-#define CODSP_CMD(x)   ((unsigned char)(x) & 7)
-
-/************************************************/
-
-/* command indication ops */
-#define CODSP_M_SLEEP_PWRDN    7
-#define CODSP_M_PWRDN_HIZ      0
-#define CODSP_M_ANY_ACT                2
-#define CODSP_M_RING           5
-#define CODSP_M_ACT_MET                6
-#define CODSP_M_GND_START      4
-#define CODSP_M_RING_PAUSE     1
-
-/* single byte commands */
-#define CODSP_CMD_SOFT_RESET   CODSP_CMD(0)
-#define CODSP_CMD_RESET_CH     CODSP_CMD(1)
-#define CODSP_CMD_RESYNC       CODSP_CMD(2)
-
-/* two byte commands */
-#define CODSP_CMD_SOP          CODSP_CMD(4)
-#define CODSP_CMD_COP          CODSP_CMD(5)
-#define CODSP_CMD_POP          CODSP_CMD(6)
-
-/************************************************/
-
-/* read as 4-bytes */
-#define CODSP_INTREG_INT_CH    0x80000000
-#define CODSP_INTREG_HOOK      0x40000000
-#define CODSP_INTREG_GNDK      0x20000000
-#define CODSP_INTREG_GNDP      0x10000000
-#define CODSP_INTREG_ICON      0x08000000
-#define CODSP_INTREG_VRTLIM    0x04000000
-#define CODSP_INTREG_OTEMP     0x02000000
-#define CODSP_INTREG_SYNC_FAIL 0x01000000
-#define CODSP_INTREG_LM_THRES  0x00800000
-#define CODSP_INTREG_READY     0x00400000
-#define CODSP_INTREG_RSTAT     0x00200000
-#define CODSP_INTREG_LM_OK     0x00100000
-#define CODSP_INTREG_IO4_DU    0x00080000
-#define CODSP_INTREG_IO3_DU    0x00040000
-#define CODSP_INTREG_IO2_DU    0x00020000
-#define CODSP_INTREG_IO1_DU    0x00010000
-#define CODSP_INTREG_DTMF_OK   0x00008000
-#define CODSP_INTREG_DTMF_KEY4 0x00004000
-#define CODSP_INTREG_DTMF_KEY3 0x00002000
-#define CODSP_INTREG_DTMF_KEY2 0x00001000
-#define CODSP_INTREG_DTMF_KEY1 0x00000800
-#define CODSP_INTREG_DTMF_KEY0 0x00000400
-#define CODSP_INTREG_UTDR_OK   0x00000200
-#define CODSP_INTREG_UTDX_OK   0x00000100
-#define CODSP_INTREG_EDSP_FAIL 0x00000080
-#define CODSP_INTREG_CIS_BOF   0x00000008
-#define CODSP_INTREG_CIS_BUF   0x00000004
-#define CODSP_INTREG_CIS_REQ   0x00000002
-#define CODSP_INTREG_CIS_ACT   0x00000001
-
-/************************************************/
-
-/* ======== SOP REG ADDRESSES =======*/
-
-#define REVISION_ADDR          0x00
-#define PCMC1_ADDR             0x05
-#define XCR_ADDR               0x06
-#define INTREG1_ADDR           0x07
-#define INTREG2_ADDR           0x08
-#define INTREG3_ADDR           0x09
-#define INTREG4_ADDR           0x0A
-#define LMRES1_ADDR            0x0D
-#define MASK_ADDR              0x11
-#define IOCTL3_ADDR            0x14
-#define BCR1_ADDR              0x15
-#define BCR2_ADDR              0x16
-#define BCR3_ADDR              0x17
-#define BCR4_ADDR              0x18
-#define BCR5_ADDR              0x19
-#define DSCR_ADDR              0x1A
-#define LMCR1_ADDR             0x1C
-#define LMCR2_ADDR             0x1D
-#define LMCR3_ADDR             0x1E
-#define OFR1_ADDR              0x1F
-#define PCMR1_ADDR             0x21
-#define PCMX1_ADDR             0x25
-#define TSTR3_ADDR             0x2B
-#define TSTR4_ADDR             0x2C
-#define TSTR5_ADDR             0x2D
-
-/* ========= POP REG ADDRESSES ========*/
-
-#define CIS_DAT_ADDR           0x00
-
-#define LEC_LEN_ADDR           0x3A
-#define LEC_POWR_ADDR          0x3B
-#define LEC_DELP_ADDR          0x3C
-#define LEC_DELQ_ADDR          0x3D
-#define LEC_GAIN_XI_ADDR       0x3E
-#define LEC_GAIN_RI_ADDR       0x3F
-#define LEC_GAIN_XO_ADDR       0x40
-#define LEC_RES_1_ADDR         0x41
-#define LEC_RES_2_ADDR         0x42
-
-#define NLP_POW_LPF_ADDR       0x30
-#define NLP_POW_LPS_ADDR       0x31
-#define NLP_BN_LEV_X_ADDR      0x32
-#define NLP_BN_LEV_R_ADDR      0x33
-#define NLP_BN_INC_ADDR                0x34
-#define NLP_BN_DEC_ADDR                0x35
-#define NLP_BN_MAX_ADDR                0x36
-#define NLP_BN_ADJ_ADDR                0x37
-#define NLP_RE_MIN_ERLL_ADDR   0x38
-#define NLP_RE_EST_ERLL_ADDR   0x39
-#define NLP_SD_LEV_X_ADDR      0x3A
-#define NLP_SD_LEV_R_ADDR      0x3B
-#define NLP_SD_LEV_BN_ADDR     0x3C
-#define NLP_SD_LEV_RE_ADDR     0x3D
-#define NLP_SD_OT_DT_ADDR      0x3E
-#define NLP_ERL_LIN_LP_ADDR    0x3F
-#define NLP_ERL_LEC_LP_ADDR    0x40
-#define NLP_CT_LEV_RE_ADDR     0x41
-#define NLP_CTRL_ADDR          0x42
-
-#define UTD_CF_H_ADDR          0x4B
-#define UTD_CF_L_ADDR          0x4C
-#define UTD_BW_H_ADDR          0x4D
-#define UTD_BW_L_ADDR          0x4E
-#define UTD_NLEV_ADDR          0x4F
-#define UTD_SLEV_H_ADDR                0x50
-#define UTD_SLEV_L_ADDR                0x51
-#define UTD_DELT_ADDR          0x52
-#define UTD_RBRK_ADDR          0x53
-#define UTD_RTIME_ADDR         0x54
-#define UTD_EBRK_ADDR          0x55
-#define UTD_ETIME_ADDR         0x56
-
-#define DTMF_LEV_ADDR          0x30
-#define DTMF_TWI_ADDR          0x31
-#define DTMF_NCF_H_ADDR                0x32
-#define DTMF_NCF_L_ADDR                0x33
-#define DTMF_NBW_H_ADDR                0x34
-#define DTMF_NBW_L_ADDR                0x35
-#define DTMF_GAIN_ADDR         0x36
-#define DTMF_RES1_ADDR         0x37
-#define DTMF_RES2_ADDR         0x38
-#define DTMF_RES3_ADDR         0x39
-
-#define CIS_LEV_H_ADDR         0x43
-#define CIS_LEV_L_ADDR         0x44
-#define CIS_BRS_ADDR           0x45
-#define CIS_SEIZ_H_ADDR                0x46
-#define CIS_SEIZ_L_ADDR                0x47
-#define CIS_MARK_H_ADDR                0x48
-#define CIS_MARK_L_ADDR                0x49
-#define CIS_LEC_MODE_ADDR      0x4A
-
-/*=====================================*/
-
-#define HOOK_LEV_ACT_START_ADDR 0x89
-#define RO1_START_ADDR         0x70
-#define RO2_START_ADDR         0x95
-#define RO3_START_ADDR         0x96
-
-#define TG1_FREQ_START_ADDR    0x38
-#define TG1_GAIN_START_ADDR    0x39
-#define TG1_BANDPASS_START_ADDR 0x3B
-#define TG1_BANDPASS_END_ADDR  0x3D
-
-#define TG2_FREQ_START_ADDR    0x40
-#define TG2_GAIN_START_ADDR    0x41
-#define TG2_BANDPASS_START_ADDR 0x43
-#define TG2_BANDPASS_END_ADDR  0x45
-
-/*====================================*/
-
-#define PCM_HW_B               0x80
-#define PCM_HW_A               0x00
-#define PCM_TIME_SLOT_0                0x00   /*  Byte 0 of PCM Frame (by default is assigned to channel A ) */
-#define PCM_TIME_SLOT_1                0x01   /*  Byte 1 of PCM Frame (by default is assigned to channel B ) */
-#define PCM_TIME_SLOT_4                0x04   /*  Byte 4 of PCM Frame (Corresponds to B1 of the Second GCI ) */
-
-#define         RX_LEV_ADDR    0x28
-#define         TX_LEV_ADDR    0x30
-#define         Ik1_ADDR       0x83
-
-#define         AR_ROW         3 /* Is the row (AR Params) of the ac_Coeff array in SMS_CODEC_Defaults struct  */
-#define         AX_ROW         6 /* Is the row (AX Params) of the ac_Coeff array in SMS_CODEC_Defaults struct  */
-#define         DCF_ROW        0 /* Is the row (DCF Params) of the dc_Coeff array in SMS_CODEC_Defaults struct */
-
-/* Mark the start byte of Duslic parameters that we use with configurator */
-#define         Ik1_START_BYTE         3
-#define         RX_LEV_START_BYTE      0
-#define         TX_LEV_START_BYTE      0
-
-/************************************************/
-
-#define INTREG4_CIS_ACT                (1 << 0)
-
-#define BCR1_SLEEP             0x20
-#define BCR1_REVPOL            0x10
-#define BCR1_ACTR              0x08
-#define BCR1_ACTL              0x04
-#define BCR1_SLIC_MASK         0x03
-
-#define BCR2_HARD_POL_REV      0x40
-#define BCR2_TTX               0x20
-#define BCR2_TTX_12K           0x10
-#define BCR2_HIMAN             0x08
-#define BCR2_PDOT              0x01
-
-#define BCR3_PCMX_EN           (1 << 4)
-
-#define BCR5_DTMF_EN           (1 << 0)
-#define BCR5_DTMF_SRC          (1 << 1)
-#define BCR5_LEC_EN            (1 << 2)
-#define BCR5_LEC_OUT           (1 << 3)
-#define BCR5_CIS_EN            (1 << 4)
-#define BCR5_CIS_AUTO          (1 << 5)
-#define BCR5_UTDX_EN           (1 << 6)
-#define BCR5_UTDR_EN           (1 << 7)
-
-#define DSCR_TG1_EN            (1 << 0)
-#define DSCR_TG2_EN            (1 << 1)
-#define DSCR_PTG               (1 << 2)
-#define DSCR_COR8              (1 << 3)
-#define DSCR_DG_KEY(x)         (((x) & 0x0F) << 4)
-
-#define CIS_LEC_MODE_CIS_V23   (1 << 0)
-#define CIS_LEC_MODE_CIS_FRM   (1 << 1)
-#define CIS_LEC_MODE_NLP_EN    (1 << 2)
-#define CIS_LEC_MODE_UTDR_SUM  (1 << 4)
-#define CIS_LEC_MODE_UTDX_SUM  (1 << 5)
-#define CIS_LEC_MODE_LEC_FREEZE (1 << 6)
-#define CIS_LEC_MODE_LEC_ADAPT (1 << 7)
-
-#define TSTR4_COR_64           (1 << 5)
-
-#define TSTR3_AC_DLB_8K                (1 << 2)
-#define TSTR3_AC_DLB_32K       (1 << 3)
-#define TSTR3_AC_DLB_4M                (1 << 5)
-
-
-#define LMCR1_TEST_EN          (1 << 7)
-#define LMCR1_LM_EN            (1 << 6)
-#define LMCR1_LM_THM           (1 << 5)
-#define LMCR1_LM_ONCE          (1 << 2)
-#define LMCR1_LM_MASK          (1 << 1)
-
-#define LMCR2_LM_RECT                  (1 << 5)
-#define LMCR2_LM_SEL_VDD               0x0D
-#define LMCR2_LM_SEL_IO3               0x0A
-#define LMCR2_LM_SEL_IO4               0x0B
-#define LMCR2_LM_SEL_IO4_MINUS_IO3     0x0F
-
-#define LMCR3_RTR_SEL          (1 << 6)
-
-#define LMCR3_RNG_OFFSET_NONE  0x00
-#define LMCR3_RNG_OFFSET_1     0x01
-#define LMCR3_RNG_OFFSET_2     0x02
-#define LMCR3_RNG_OFFSET_3     0x03
-
-#define TSTR5_DC_HOLD          (1 << 3)
-
-/************************************************/
-
-#define TARGET_ONHOOK_BATH_x100                4600    /* 46.0 Volt */
-#define TARGET_ONHOOK_BATL_x100                2500    /* 25.0 Volt */
-#define TARGET_V_DIVIDER_RATIO_x100    21376L  /* (R1+R2)/R2 = 213.76 */
-#define DIVIDER_RATIO_ACCURx100                (22 * 100)
-#define V_AD_x10000                    10834L  /* VAD = 1.0834 */
-#define TARGET_VDDx100                 330     /* VDD = 3.3 * 10 */
-#define VDD_MAX_DIFFx100               20      /* VDD Accur = 0.2*100 */
-
-#define RMS_MULTIPLIERx100             111     /* pi/(2xsqrt(2)) = 1.11*/
-#define K_INTDC_RECT_ON                        4       /* When Rectifier is ON this value is necessary(2^4) */
-#define K_INTDC_RECT_OFF               2       /* 2^2 */
-#define RNG_FREQ                       25
-#define SAMPLING_FREQ                  (2000L)
-#define N_SAMPLES                      (SAMPLING_FREQ/RNG_FREQ)     /* for Ring Freq =25Hz (40ms Integration Period)[Sampling rate 2KHz -->1 Sample every 500us] */
-#define HOOK_THRESH_RING_START_ADDR    0x8B
-#define RING_PARAMS_START_ADDR         0x70
-
-#define V_OUT_BATH_MAX_DIFFx100                300     /* 3.0 x100 */
-#define V_OUT_BATL_MAX_DIFFx100                400     /* 4.0 x100 */
-#define MAX_V_RING_MEANx100            50
-#define TARGET_V_RING_RMSx100          2720
-#define V_RMS_RING_MAX_DIFFx100                250
-
-#define LM_OK_SRC_IRG_2                        (1 << 4)
-
-/************************************************/
-
-#define PORTB          (((volatile immap_t *)CONFIG_SYS_IMMR)->im_cpm.cp_pbdat)
-#define PORTC          (((volatile immap_t *)CONFIG_SYS_IMMR)->im_ioport.iop_pcdat)
-#define PORTD          (((volatile immap_t *)CONFIG_SYS_IMMR)->im_ioport.iop_pddat)
-
-#define _PORTD_SET(mask, state) \
-       do { \
-               if (state) \
-                       PORTD |= mask; \
-               else \
-                       PORTD &= ~mask; \
-       } while (0)
-
-#define _PORTB_SET(mask, state) \
-       do { \
-               if (state) \
-                       PORTB |= mask; \
-               else \
-                       PORTB &= ~mask; \
-       } while (0)
-
-#define _PORTB_TGL(mask) do { PORTB ^= mask; } while (0)
-#define _PORTB_GET(mask) (!!(PORTB & mask))
-
-#define _PORTC_GET(mask) (!!(PORTC & mask))
-
-/* port B */
-#define SPI_RXD                (1 << (31 - 28))
-#define SPI_TXD                (1 << (31 - 29))
-#define SPI_CLK                (1 << (31 - 30))
-
-/* port C */
-#define COM_HOOK1      (1 << (15 - 9))
-#define COM_HOOK2      (1 << (15 - 10))
-
-#ifndef CONFIG_NETTA_SWAPHOOK
-
-#define COM_HOOK3      (1 << (15 - 11))
-#define COM_HOOK4      (1 << (15 - 12))
-
-#else
-
-#define COM_HOOK3      (1 << (15 - 12))
-#define COM_HOOK4      (1 << (15 - 11))
-
-#endif
-
-/* port D */
-#define SPIENC1                (1 << (15 - 9))
-#define SPIENC2                (1 << (15 - 10))
-#define SPIENC3                (1 << (15 - 11))
-#define SPIENC4                (1 << (15 - 14))
-
-#define SPI_DELAY() udelay(1)
-
-static inline unsigned int __SPI_Transfer(unsigned int tx)
-{
-       unsigned int rx;
-       int b;
-
-       rx = 0; b = 8;
-       while (--b >= 0) {
-               _PORTB_SET(SPI_TXD, tx & 0x80);
-               tx <<= 1;
-               _PORTB_TGL(SPI_CLK);
-               SPI_DELAY();
-               rx <<= 1;
-               rx |= _PORTB_GET(SPI_RXD);
-               _PORTB_TGL(SPI_CLK);
-               SPI_DELAY();
-       }
-
-       return rx;
-}
-
-static const char *codsp_dtmf_map = "D1234567890*#ABC";
-
-static const int spienc_mask_tab[4] = { SPIENC1, SPIENC2, SPIENC3, SPIENC4 };
-static const int com_hook_mask_tab[4] = { COM_HOOK1, COM_HOOK2, COM_HOOK3, COM_HOOK4 };
-
-static unsigned int codsp_send(int duslic_id, const unsigned char *cmd, int cmdlen, unsigned char *res, int reslen)
-{
-       unsigned int rx;
-       int i;
-
-       /* just some sanity checks */
-       if (cmd == 0 || cmdlen < 0)
-               return -1;
-
-       _PORTD_SET(spienc_mask_tab[duslic_id], 0);
-
-       /* first 2 bytes are without response */
-       i = 2;
-       while (i-- > 0 && cmdlen-- > 0)
-               __SPI_Transfer(*cmd++);
-
-       while (cmdlen-- > 0) {
-               rx = __SPI_Transfer(*cmd++);
-               if (res != 0 && reslen-- > 0)
-                       *res++ = (unsigned char)rx;
-       }
-       if (res != 0) {
-               while (reslen-- > 0)
-                       *res++ = __SPI_Transfer(0xFF);
-       }
-
-       _PORTD_SET(spienc_mask_tab[duslic_id], 1);
-
-       return 0;
-}
-
-/****************************************************************************/
-
-void codsp_set_ciop_m(int duslic_id, int channel, unsigned char m)
-{
-       unsigned char cmd = CODSP_WR | CODSP_ADR(channel) | CODSP_M(m);
-       codsp_send(duslic_id, &cmd, 1, 0, 0);
-}
-
-void codsp_reset_chip(int duslic_id)
-{
-       static const unsigned char cmd = CODSP_WR | CODSP_OP | CODSP_CMD_SOFT_RESET;
-       codsp_send(duslic_id, &cmd, 1, 0, 0);
-}
-
-void codsp_reset_channel(int duslic_id, int channel)
-{
-       unsigned char cmd = CODSP_WR | CODSP_OP | CODSP_ADR(channel) | CODSP_CMD_RESET_CH;
-       codsp_send(duslic_id, &cmd, 1, 0, 0);
-}
-
-void codsp_resync_channel(int duslic_id, int channel)
-{
-       unsigned char cmd = CODSP_WR | CODSP_OP | CODSP_ADR(channel) | CODSP_CMD_RESYNC;
-       codsp_send(duslic_id, &cmd, 1, 0, 0);
-}
-
-/****************************************************************************/
-
-void codsp_write_sop_char(int duslic_id, int channel, unsigned char regno, unsigned char val)
-{
-       unsigned char cmd[3];
-
-       cmd[0] = CODSP_WR | CODSP_OP | CODSP_ADR(channel) | CODSP_CMD_SOP;
-       cmd[1] = regno;
-       cmd[2] = val;
-
-       codsp_send(duslic_id, cmd, 3, 0, 0);
-}
-
-void codsp_write_sop_short(int duslic_id, int channel, unsigned char regno, unsigned short val)
-{
-       unsigned char cmd[4];
-
-       cmd[0] = CODSP_WR | CODSP_OP | CODSP_ADR(channel) | CODSP_CMD_SOP;
-       cmd[1] = regno;
-       cmd[2] = (unsigned char)(val >> 8);
-       cmd[3] = (unsigned char)val;
-
-       codsp_send(duslic_id, cmd, 4, 0, 0);
-}
-
-void codsp_write_sop_int(int duslic_id, int channel, unsigned char regno, unsigned int val)
-{
-       unsigned char cmd[6];
-
-       cmd[0] = CODSP_WR | CODSP_ADR(channel) | CODSP_CMD_SOP;
-       cmd[1] = regno;
-       cmd[2] = (unsigned char)(val >> 24);
-       cmd[3] = (unsigned char)(val >> 16);
-       cmd[4] = (unsigned char)(val >> 8);
-       cmd[5] = (unsigned char)val;
-
-       codsp_send(duslic_id, cmd, 6, 0, 0);
-}
-
-unsigned char codsp_read_sop_char(int duslic_id, int channel, unsigned char regno)
-{
-       unsigned char cmd[3];
-       unsigned char res[2];
-
-       cmd[0] = CODSP_RD | CODSP_OP | CODSP_ADR(channel) | CODSP_CMD_SOP;
-       cmd[1] = regno;
-
-       codsp_send(duslic_id, cmd, 2, res, 2);
-
-       return res[1];
-}
-
-unsigned short codsp_read_sop_short(int duslic_id, int channel, unsigned char regno)
-{
-       unsigned char cmd[2];
-       unsigned char res[3];
-
-       cmd[0] = CODSP_RD | CODSP_OP | CODSP_ADR(channel) | CODSP_CMD_SOP;
-       cmd[1] = regno;
-
-       codsp_send(duslic_id, cmd, 2, res, 3);
-
-       return ((unsigned short)res[1] << 8) | res[2];
-}
-
-unsigned int codsp_read_sop_int(int duslic_id, int channel, unsigned char regno)
-{
-       unsigned char cmd[2];
-       unsigned char res[5];
-
-       cmd[0] = CODSP_RD | CODSP_OP | CODSP_ADR(channel) | CODSP_CMD_SOP;
-       cmd[1] = regno;
-
-       codsp_send(duslic_id, cmd, 2, res, 5);
-
-       return ((unsigned int)res[1] << 24) | ((unsigned int)res[2] << 16) | ((unsigned int)res[3] << 8) | res[4];
-}
-
-/****************************************************************************/
-
-void codsp_write_cop_block(int duslic_id, int channel, unsigned char addr, const unsigned char *block)
-{
-       unsigned char cmd[10];
-
-       cmd[0] = CODSP_WR | CODSP_OP | CODSP_ADR(channel) | CODSP_CMD_COP;
-       cmd[1] = addr;
-       memcpy(cmd + 2, block, 8);
-       codsp_send(duslic_id, cmd, 10, 0, 0);
-}
-
-void codsp_write_cop_char(int duslic_id, int channel, unsigned char addr, unsigned char val)
-{
-       unsigned char cmd[3];
-
-       cmd[0] = CODSP_WR | CODSP_OP | CODSP_ADR(channel) | CODSP_CMD_COP;
-       cmd[1] = addr;
-       cmd[2] = val;
-       codsp_send(duslic_id, cmd, 3, 0, 0);
-}
-
-void codsp_write_cop_short(int duslic_id, int channel, unsigned char addr, unsigned short val)
-{
-       unsigned char cmd[4];
-
-       cmd[0] = CODSP_WR | CODSP_OP | CODSP_ADR(channel) | CODSP_CMD_COP;
-       cmd[1] = addr;
-       cmd[2] = (unsigned char)(val >> 8);
-       cmd[3] = (unsigned char)val;
-
-       codsp_send(duslic_id, cmd, 4, 0, 0);
-}
-
-void codsp_read_cop_block(int duslic_id, int channel, unsigned char addr, unsigned char *block)
-{
-       unsigned char cmd[2];
-       unsigned char res[9];
-
-       cmd[0] = CODSP_RD | CODSP_OP | CODSP_ADR(channel) | CODSP_CMD_COP;
-       cmd[1] = addr;
-       codsp_send(duslic_id, cmd, 2, res, 9);
-       memcpy(block, res + 1, 8);
-}
-
-unsigned char codsp_read_cop_char(int duslic_id, int channel, unsigned char addr)
-{
-       unsigned char cmd[2];
-       unsigned char res[2];
-
-       cmd[0] = CODSP_RD | CODSP_OP | CODSP_ADR(channel) | CODSP_CMD_COP;
-       cmd[1] = addr;
-       codsp_send(duslic_id, cmd, 2, res, 2);
-       return res[1];
-}
-
-unsigned short codsp_read_cop_short(int duslic_id, int channel, unsigned char addr)
-{
-       unsigned char cmd[2];
-       unsigned char res[3];
-
-       cmd[0] = CODSP_RD | CODSP_OP | CODSP_ADR(channel) | CODSP_CMD_COP;
-       cmd[1] = addr;
-
-       codsp_send(duslic_id, cmd, 2, res, 3);
-
-       return ((unsigned short)res[1] << 8) | res[2];
-}
-
-/****************************************************************************/
-
-#define MAX_POP_BLOCK  50
-
-void codsp_write_pop_block (int duslic_id, int channel, unsigned char addr,
-                           const unsigned char *block, int len)
-{
-       unsigned char cmd[2 + MAX_POP_BLOCK];
-
-       if (len > MAX_POP_BLOCK)        /* truncate */
-               len = MAX_POP_BLOCK;
-
-       cmd[0] = CODSP_WR | CODSP_OP | CODSP_ADR (channel) | CODSP_CMD_POP;
-       cmd[1] = addr;
-       memcpy (cmd + 2, block, len);
-       codsp_send (duslic_id, cmd, 2 + len, 0, 0);
-}
-
-void codsp_write_pop_char (int duslic_id, int channel, unsigned char regno,
-                          unsigned char val)
-{
-       unsigned char cmd[3];
-
-       cmd[0] = CODSP_WR | CODSP_OP | CODSP_ADR (channel) | CODSP_CMD_POP;
-       cmd[1] = regno;
-       cmd[2] = val;
-
-       codsp_send (duslic_id, cmd, 3, 0, 0);
-}
-
-void codsp_write_pop_short (int duslic_id, int channel, unsigned char regno,
-                           unsigned short val)
-{
-       unsigned char cmd[4];
-
-       cmd[0] = CODSP_WR | CODSP_OP | CODSP_ADR (channel) | CODSP_CMD_POP;
-       cmd[1] = regno;
-       cmd[2] = (unsigned char) (val >> 8);
-       cmd[3] = (unsigned char) val;
-
-       codsp_send (duslic_id, cmd, 4, 0, 0);
-}
-
-void codsp_write_pop_int (int duslic_id, int channel, unsigned char regno,
-                         unsigned int val)
-{
-       unsigned char cmd[6];
-
-       cmd[0] = CODSP_WR | CODSP_ADR (channel) | CODSP_CMD_POP;
-       cmd[1] = regno;
-       cmd[2] = (unsigned char) (val >> 24);
-       cmd[3] = (unsigned char) (val >> 16);
-       cmd[4] = (unsigned char) (val >> 8);
-       cmd[5] = (unsigned char) val;
-
-       codsp_send (duslic_id, cmd, 6, 0, 0);
-}
-
-unsigned char codsp_read_pop_char (int duslic_id, int channel,
-                                  unsigned char regno)
-{
-       unsigned char cmd[3];
-       unsigned char res[2];
-
-       cmd[0] = CODSP_RD | CODSP_OP | CODSP_ADR (channel) | CODSP_CMD_POP;
-       cmd[1] = regno;
-
-       codsp_send (duslic_id, cmd, 2, res, 2);
-
-       return res[1];
-}
-
-unsigned short codsp_read_pop_short (int duslic_id, int channel,
-                                    unsigned char regno)
-{
-       unsigned char cmd[2];
-       unsigned char res[3];
-
-       cmd[0] = CODSP_RD | CODSP_OP | CODSP_ADR (channel) | CODSP_CMD_POP;
-       cmd[1] = regno;
-
-       codsp_send (duslic_id, cmd, 2, res, 3);
-
-       return ((unsigned short) res[1] << 8) | res[2];
-}
-
-unsigned int codsp_read_pop_int (int duslic_id, int channel,
-                                unsigned char regno)
-{
-       unsigned char cmd[2];
-       unsigned char res[5];
-
-       cmd[0] = CODSP_RD | CODSP_OP | CODSP_ADR (channel) | CODSP_CMD_POP;
-       cmd[1] = regno;
-
-       codsp_send (duslic_id, cmd, 2, res, 5);
-
-       return (((unsigned int) res[1] << 24) |
-               ((unsigned int) res[2] << 16) |
-               ((unsigned int) res[3] <<  8) |
-               res[4] );
-}
-/****************************************************************************/
-
-struct _coeffs {
-       unsigned char addr;
-       unsigned char values[8];
-};
-
-struct _coeffs ac_coeffs[11] = {
-       { 0x60, {0xAD,0xDA,0xB5,0x9B,0xC7,0x2A,0x9D,0x00} }, /* 0x60 IM-Filter part 1 */
-       { 0x68, {0x10,0x00,0xA9,0x82,0x0D,0x77,0x0A,0x00} }, /* 0x68 IM-Filter part 2 */
-       { 0x18, {0x08,0xC0,0xD2,0xAB,0xA5,0xE2,0xAB,0x07} }, /* 0x18 FRR-Filter       */
-       { 0x28, {0x44,0x93,0xF5,0x92,0x88,0x00,0x00,0x00} }, /* 0x28 AR-Filter        */
-       { 0x48, {0x96,0x38,0x29,0x96,0xC9,0x2B,0x8B,0x00} }, /* 0x48 LPR-Filter       */
-       { 0x20, {0x08,0xB0,0xDA,0x9D,0xA7,0xFA,0x93,0x06} }, /* 0x20 FRX-Filter       */
-       { 0x30, {0xBA,0xAC,0x00,0x01,0x85,0x50,0xC0,0x1A} }, /* 0x30 AX-Filter        */
-       { 0x50, {0x96,0x38,0x29,0xF5,0xFA,0x2B,0x8B,0x00} }, /* 0x50 LPX-Filter       */
-       { 0x00, {0x00,0x08,0x08,0x81,0x00,0x80,0x00,0x08} }, /* 0x00 TH-Filter part 1 */
-       { 0x08, {0x81,0x00,0x80,0x00,0xD7,0x33,0xBA,0x01} }, /* 0x08 TH-Filter part 2 */
-       { 0x10, {0xB3,0x6C,0xDC,0xA3,0xA4,0xE5,0x88,0x00} }  /* 0x10 TH-Filter part 3 */
-};
-
-struct _coeffs ac_coeffs_0dB[11] = {
-       { 0x60, {0xAC,0x2A,0xB5,0x9A,0xB7,0x2A,0x9D,0x00} },
-       { 0x68, {0x10,0x00,0xA9,0x82,0x0D,0x83,0x0A,0x00} },
-       { 0x18, {0x08,0x20,0xD4,0xA4,0x65,0xEE,0x92,0x07} },
-       { 0x28, {0x2B,0xAB,0x36,0xA5,0x88,0x00,0x00,0x00} },
-       { 0x48, {0xAB,0xE9,0x4E,0x32,0xAB,0x25,0xA5,0x03} },
-       { 0x20, {0x08,0x20,0xDB,0x9C,0xA7,0xFA,0xB4,0x07} },
-       { 0x30, {0xF3,0x10,0x07,0x60,0x85,0x40,0xC0,0x1A} },
-       { 0x50, {0x96,0x38,0x29,0x97,0x39,0x19,0x8B,0x00} },
-       { 0x00, {0x00,0x08,0x08,0x81,0x00,0x80,0x00,0x08} },
-       { 0x08, {0x81,0x00,0x80,0x00,0x47,0x3C,0xD2,0x01} },
-       { 0x10, {0x62,0xDB,0x4A,0x87,0x73,0x28,0x88,0x00} }
-};
-
-struct _coeffs dc_coeffs[9] = {
-       { 0x80, {0x25,0x59,0x9C,0x23,0x24,0x23,0x32,0x1C} }, /* 0x80 DC-Parameter     */
-       { 0x70, {0x90,0x30,0x1B,0xC0,0x33,0x43,0xAC,0x02} }, /* 0x70 Ringing          */
-       { 0x90, {0x3F,0xC3,0x2E,0x3A,0x80,0x90,0x00,0x09} }, /* 0x90 LP-Filters       */
-       { 0x88, {0xAF,0x80,0x27,0x7B,0x01,0x4C,0x7B,0x02} }, /* 0x88 Hook Levels      */
-       { 0x78, {0x00,0xC0,0x6D,0x7A,0xB3,0x78,0x89,0x00} }, /* 0x78 Ramp Generator   */
-       { 0x58, {0xA5,0x44,0x34,0xDB,0x0E,0xA2,0x2A,0x00} }, /* 0x58 TTX              */
-       { 0x38, {0x33,0x49,0x9A,0x65,0xBB,0x00,0x00,0x00} }, /* 0x38 TG1              */
-       { 0x40, {0x33,0x49,0x9A,0x65,0xBB,0x00,0x00,0x00} }, /* 0x40 TG2              */
-       { 0x98, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} }  /* 0x98 Reserved         */
-};
-
-void program_coeffs(int duslic_id, int channel, struct _coeffs *coeffs, int tab_size)
-{
-       int i;
-
-       for (i = 0; i < tab_size; i++)
-       codsp_write_cop_block(duslic_id, channel, coeffs[i].addr, coeffs[i].values);
-}
-
-#define SS_OPEN_CIRCUIT                        0
-#define SS_RING_PAUSE                  1
-#define SS_ACTIVE                      2
-#define SS_ACTIVE_HIGH                 3
-#define SS_ACTIVE_RING                 4
-#define SS_RINGING                     5
-#define SS_ACTIVE_WITH_METERING                6
-#define SS_ONHOOKTRNSM                 7
-#define SS_STANDBY                     8
-#define SS_MAX                         8
-
-static void codsp_set_slic(int duslic_id, int channel, int state)
-{
-       unsigned char v;
-
-       v = codsp_read_sop_char(duslic_id, channel, BCR1_ADDR);
-
-       switch (state) {
-
-               case SS_ACTIVE:
-                       codsp_write_sop_char(duslic_id, channel, BCR1_ADDR, (v & ~BCR1_ACTR) | BCR1_ACTL);
-                       codsp_set_ciop_m(duslic_id, channel, CODSP_M_ANY_ACT);
-                       break;
-
-               case SS_ACTIVE_HIGH:
-                       codsp_write_sop_char(duslic_id, channel, BCR1_ADDR, v & ~(BCR1_ACTR | BCR1_ACTL));
-                       codsp_set_ciop_m(duslic_id, channel, CODSP_M_ANY_ACT);
-                       break;
-
-               case SS_ACTIVE_RING:
-               case SS_ONHOOKTRNSM:
-                       codsp_write_sop_char(duslic_id, channel, BCR1_ADDR, (v & ~BCR1_ACTL) | BCR1_ACTR);
-                       codsp_set_ciop_m(duslic_id, channel, CODSP_M_ANY_ACT);
-                       break;
-
-               case SS_STANDBY:
-                       codsp_write_sop_char(duslic_id, channel, BCR1_ADDR, v & ~(BCR1_ACTL | BCR1_ACTR));
-                       codsp_set_ciop_m(duslic_id, channel, CODSP_M_SLEEP_PWRDN);
-                       break;
-
-               case SS_OPEN_CIRCUIT:
-                       codsp_set_ciop_m(duslic_id, channel, CODSP_M_PWRDN_HIZ);
-                       break;
-
-               case SS_RINGING:
-                       codsp_set_ciop_m(duslic_id, channel, CODSP_M_RING);
-                       break;
-
-               case SS_RING_PAUSE:
-                       codsp_set_ciop_m(duslic_id, channel, CODSP_M_RING_PAUSE);
-                       break;
-       }
-}
-
-const unsigned char Ring_Sin_28Vrms_25Hz[8] = { 0x90, 0x30, 0x1B, 0xC0, 0xC3, 0x9C, 0x88, 0x00 };
-const unsigned char Max_HookRingTh[3] = { 0x7B, 0x41, 0x62 };
-
-void retrieve_slic_state(int slic_id)
-{
-       int duslic_id = slic_id >> 1;
-       int channel = slic_id & 1;
-
-       /* Retrieve the state of the SLICs */
-       codsp_write_sop_char(duslic_id, channel, LMCR2_ADDR, 0x00);
-
-       /* wait at least 1000us to clear the LM_OK and 500us to set the LM_OK ==> for the LM to make the first Measurement */
-       udelay(10000);
-
-       codsp_write_sop_char(duslic_id, channel, LMCR1_ADDR, LMCR1_LM_THM | LMCR1_LM_MASK);
-       codsp_set_slic(duslic_id, channel, SS_ACTIVE_HIGH);
-       codsp_write_sop_char(duslic_id, channel, LMCR3_ADDR, 0x40);
-
-       /* Program Default Hook Ring thresholds */
-       codsp_write_cop_block(duslic_id, channel, dc_coeffs[1].addr, dc_coeffs[1].values);
-
-       /* Now program Hook Threshold while Ring and ac RingTrip to max values */
-       codsp_write_cop_block(duslic_id, channel, dc_coeffs[3].addr, dc_coeffs[3].values);
-
-       codsp_write_sop_short(duslic_id, channel, OFR1_ADDR, 0x0000);
-
-       udelay(40000);
-}
-
-int wait_level_metering_finish(int duslic_id, int channel)
-{
-       int cnt;
-
-       for (cnt = 0; cnt < 1000 &&
-               (codsp_read_sop_char(duslic_id, channel, INTREG2_ADDR) & LM_OK_SRC_IRG_2) == 0; cnt++) { }
-
-       return cnt != 1000;
-}
-
-int measure_on_hook_voltages(int slic_id, long *vdd,
-               long *v_oh_H, long *v_oh_L, long *ring_mean_v, long *ring_rms_v)
-{
-       short LM_Result, Offset_Compensation;   /* Signed 16 bit */
-       long int VDD, VDD_diff, V_in, V_out, Divider_Ratio, Vout_diff ;
-       unsigned char err_mask = 0;
-       int duslic_id = slic_id >> 1;
-       int channel = slic_id & 1;
-       int i;
-
-       /* measure VDD */
-       /* Now select the VDD level Measurement (but first of all Hold the DC characteristic) */
-       codsp_write_sop_char(duslic_id, channel, TSTR5_ADDR, TSTR5_DC_HOLD);
-
-       /* Activate Test Mode ==> To Enable DC Hold !!! */
-       /* (else the LMRES is treated as Feeding Current and the Feeding voltage changes */
-       /* imediatelly (after 500us when the LMRES Registers is updated for the first time after selection of (IO4-IO3) measurement !!!!))*/
-       codsp_write_sop_char(duslic_id, channel, LMCR1_ADDR, LMCR1_TEST_EN | LMCR1_LM_THM | LMCR1_LM_MASK);
-
-       udelay(40000);
-
-       /* Now I Can select what to measure by DC Level Meter (select IO4-IO3) */
-       codsp_write_sop_char(duslic_id, channel, LMCR2_ADDR, LMCR2_LM_SEL_VDD);
-
-       /* wait at least 1000us to clear the LM_OK and 500us to set the LM_OK ==> for the LM to make the first Measurement */
-       udelay(10000);
-
-       /* Now Read the LM Result Registers */
-       LM_Result = codsp_read_sop_short(duslic_id, channel, LMRES1_ADDR);
-       VDD = (-1)*((((long int)LM_Result) * 390L ) >> 15) ;    /* VDDx100 */
-
-       *vdd = VDD;
-
-       VDD_diff = VDD - TARGET_VDDx100;
-
-       if (VDD_diff < 0)
-               VDD_diff = -VDD_diff;
-
-       if (VDD_diff > VDD_MAX_DIFFx100)
-               err_mask |= 1;
-
-       Divider_Ratio = TARGET_V_DIVIDER_RATIO_x100;
-
-       codsp_write_sop_char(duslic_id, channel, LMCR2_ADDR, 0x00);
-       codsp_write_sop_char(duslic_id, channel, LMCR1_ADDR, LMCR1_LM_THM | LMCR1_LM_MASK);
-
-       codsp_set_slic(duslic_id, channel, SS_ACTIVE_HIGH); /* Go back to ONHOOK Voltage */
-
-       udelay(40000);
-
-       codsp_write_sop_char(duslic_id, channel,
-               LMCR1_ADDR, LMCR1_TEST_EN | LMCR1_LM_THM | LMCR1_LM_MASK);
-
-       udelay(40000);
-
-       /* Now I Can select what to measure by DC Level Meter (select IO4-IO3) */
-       codsp_write_sop_char(duslic_id, channel, LMCR2_ADDR, LMCR2_LM_SEL_IO4_MINUS_IO3);
-
-       /* wait at least 1000us to clear the LM_OK and 500us to set the LM_OK ==> for the LM to make the first Measurement */
-       udelay(10000);
-
-       /* Now Read the LM Result Registers */
-       LM_Result = codsp_read_sop_short(duslic_id, channel, LMRES1_ADDR);
-       V_in = (-1)* ((((long int)LM_Result) * V_AD_x10000 ) >> 15) ;  /* Vin x 10000*/
-
-       V_out = (V_in * Divider_Ratio) / 10000L ;       /* Vout x100 */
-
-       *v_oh_H = V_out;
-
-       Vout_diff = V_out - TARGET_ONHOOK_BATH_x100;
-
-       if (Vout_diff < 0)
-               Vout_diff = -Vout_diff;
-
-       if (Vout_diff > V_OUT_BATH_MAX_DIFFx100)
-               err_mask |= 2;
-
-       codsp_set_slic(duslic_id, channel, SS_ACTIVE); /* Go back to ONHOOK Voltage */
-
-       udelay(40000);
-
-       /* Now Read the LM Result Registers */
-       LM_Result = codsp_read_sop_short(duslic_id, channel, LMRES1_ADDR);
-
-       V_in = (-1)* ((((long int)LM_Result) * V_AD_x10000 ) >> 15) ;  /* Vin x 10000*/
-
-       V_out = (V_in * Divider_Ratio) / 10000L ;       /* Vout x100 */
-
-       *v_oh_L = V_out;
-
-       Vout_diff = V_out - TARGET_ONHOOK_BATL_x100;
-
-       if (Vout_diff < 0)
-               Vout_diff = -Vout_diff;
-
-       if (Vout_diff > V_OUT_BATL_MAX_DIFFx100)
-               err_mask |= 4;
-
-       /* perform ring tests */
-
-       codsp_write_sop_char(duslic_id, channel, LMCR2_ADDR, 0x00);
-       codsp_write_sop_char(duslic_id, channel, LMCR1_ADDR, LMCR1_LM_THM | LMCR1_LM_MASK);
-
-       udelay(40000);
-
-       codsp_write_sop_char(duslic_id, channel, LMCR3_ADDR, LMCR3_RTR_SEL | LMCR3_RNG_OFFSET_NONE);
-
-       /* Now program RO1 =0V , Ring Amplitude and frequency and shift factor K = 1 (LMDC=0x0088)*/
-       codsp_write_cop_block(duslic_id, channel, RING_PARAMS_START_ADDR, Ring_Sin_28Vrms_25Hz);
-
-       /* By Default RO1 is selected when ringing RNG-OFFSET = 00 */
-
-       /* Now program Hook Threshold while Ring and ac RingTrip to max values */
-       for(i = 0; i < sizeof(Max_HookRingTh); i++)
-               codsp_write_cop_char(duslic_id, channel, HOOK_THRESH_RING_START_ADDR + i, Max_HookRingTh[i]);
-
-       codsp_write_sop_short(duslic_id, channel, OFR1_ADDR, 0x0000);
-
-       codsp_set_slic(duslic_id, channel, SS_RING_PAUSE); /* Start Ringing */
-
-       /* select source for the levelmeter to be IO4-IO3 */
-       codsp_write_sop_char(duslic_id, channel, LMCR2_ADDR, LMCR2_LM_SEL_IO4_MINUS_IO3);
-
-       udelay(40000);
-
-       /* Before Enabling Level Meter Programm the apropriate shift factor K_INTDC=(4 if Rectifier Enabled and 2 if Rectifier Disabled) */
-       codsp_write_cop_char(duslic_id, channel, RING_PARAMS_START_ADDR + 7, K_INTDC_RECT_OFF);
-
-       udelay(10000);
-
-       /* Enable LevelMeter to Integrate only once (Rectifier Disabled) */
-       codsp_write_sop_char(duslic_id, channel,
-                       LMCR1_ADDR, LMCR1_LM_THM | LMCR1_LM_MASK | LMCR1_LM_EN | LMCR1_LM_ONCE);
-
-       udelay(40000); /* Integration Period == Ring Period = 40ms (for 25Hz Ring) */
-
-       if (wait_level_metering_finish(duslic_id, channel)) {
-
-               udelay(10000); /* To be sure that Integration Results are Valid wait at least 500us !!! */
-
-               /* Now Read the LM Result Registers (Will be valid until LM_EN becomes zero again( after that the Result is updated every 500us) ) */
-               Offset_Compensation = codsp_read_sop_short(duslic_id, channel, LMRES1_ADDR);
-               Offset_Compensation = (-1) * ((Offset_Compensation * (1 << K_INTDC_RECT_OFF)) / N_SAMPLES);
-
-               /* Disable LevelMeter ==> In order to be able to restart Integrator again (for the next integration) */
-               codsp_write_sop_char(duslic_id, channel, LMCR1_ADDR, LMCR1_LM_THM | LMCR1_LM_MASK | LMCR1_LM_ONCE);
-
-               /* Now programm Integrator Offset Registers !!! */
-               codsp_write_sop_short(duslic_id, channel, OFR1_ADDR, Offset_Compensation);
-
-               codsp_set_slic(duslic_id, channel, SS_RINGING); /* Start Ringing */
-
-               udelay(40000);
-
-               /* Reenable Level Meter Integrator (The Result will be valid after Integration Period=Ring Period and until LN_EN become zero again) */
-               codsp_write_sop_char(duslic_id, channel,
-                               LMCR1_ADDR, LMCR1_LM_THM | LMCR1_LM_MASK | LMCR1_LM_EN | LMCR1_LM_ONCE);
-
-               udelay(40000); /* Integration Period == Ring Period = 40ms (for 25Hz Ring) */
-
-               /* Poll the LM_OK bit to see when Integration Result is Ready */
-               if (wait_level_metering_finish(duslic_id, channel)) {
-
-                       udelay(10000); /* wait at least 500us to be sure that the Integration Result are valid !!! */
-
-                       /* Now Read the LM Result Registers (They will hold their value until LM_EN become zero again */
-                       /*                                  ==>After that Result Regs will be updated every 500us !!!) */
-                       LM_Result = codsp_read_sop_short(duslic_id, channel, LMRES1_ADDR);
-                       V_in = (-1) * ( ( (((long int)LM_Result) * V_AD_x10000) / N_SAMPLES) >> (15 - K_INTDC_RECT_OFF)) ;  /* Vin x 10000*/
-
-                       V_out = (V_in * Divider_Ratio) / 10000L ;       /* Vout x100 */
-
-                       if (V_out < 0)
-                               V_out= -V_out;
-
-                       if (V_out > MAX_V_RING_MEANx100)
-                               err_mask |= 8;
-
-                       *ring_mean_v = V_out;
-               } else {
-                       err_mask |= 8;
-                       *ring_mean_v = 0;
-               }
-       } else {
-               err_mask |= 8;
-               *ring_mean_v = 0;
-       }
-
-       /* Disable LevelMeter ==> In order to be able to restart Integrator again (for the next integration) */
-       codsp_write_sop_char(duslic_id, channel, LMCR1_ADDR,
-               LMCR1_LM_THM | LMCR1_LM_MASK | LMCR1_LM_ONCE);
-       codsp_write_sop_short(duslic_id, channel, OFR1_ADDR, 0x0000);
-
-       codsp_set_slic(duslic_id, channel, SS_RING_PAUSE); /* Start Ringing */
-
-       /* Now Enable Rectifier */
-       /* select source for the levelmeter to be IO4-IO3 */
-       codsp_write_sop_char(duslic_id, channel, LMCR2_ADDR,
-               LMCR2_LM_SEL_IO4_MINUS_IO3 | LMCR2_LM_RECT);
-
-       /* Program the apropriate shift factor K_INTDC (in order to avoid Overflow at Integtation Result !!!) */
-       codsp_write_cop_char(duslic_id, channel, RING_PARAMS_START_ADDR + 7, K_INTDC_RECT_ON);
-
-       udelay(40000);
-
-       /* Reenable Level Meter Integrator (The Result will be valid after Integration Period=Ring Period and until LN_EN become zero again) */
-       codsp_write_sop_char(duslic_id, channel, LMCR1_ADDR,
-                       LMCR1_LM_THM | LMCR1_LM_MASK | LMCR1_LM_EN | LMCR1_LM_ONCE);
-
-       udelay(40000);
-
-       /* Poll the LM_OK bit to see when Integration Result is Ready */
-       if (wait_level_metering_finish(duslic_id, channel)) {
-
-               udelay(10000);
-
-               /* Now Read the LM Result Registers (They will hold their value until LM_EN become zero again */
-               /*                                  ==>After that Result Regs will be updated every 500us !!!) */
-               Offset_Compensation = codsp_read_sop_short(duslic_id, channel, LMRES1_ADDR);
-               Offset_Compensation = (-1) * ((Offset_Compensation * (1 << K_INTDC_RECT_ON)) / N_SAMPLES);
-
-               /* Disable LevelMeter ==> In order to be able to restart Integrator again (for the next integration) */
-               codsp_write_sop_char(duslic_id, channel, LMCR1_ADDR, LMCR1_LM_THM | LMCR1_LM_MASK | LMCR1_LM_ONCE);
-
-               /* Now programm Integrator Offset Registers !!! */
-               codsp_write_sop_short(duslic_id, channel, OFR1_ADDR, Offset_Compensation);
-
-               /* Be sure that a Ring is generated !!!! */
-               codsp_set_slic(duslic_id, channel, SS_RINGING); /* Start Ringing again */
-
-               udelay(40000);
-
-               /* Reenable Level Meter Integrator (The Result will be valid after Integration Period=Ring Period and until LN_EN become zero again) */
-               codsp_write_sop_char(duslic_id, channel, LMCR1_ADDR,
-                               LMCR1_LM_THM | LMCR1_LM_MASK | LMCR1_LM_EN | LMCR1_LM_ONCE);
-
-               udelay(40000);
-
-               /* Poll the LM_OK bit to see when Integration Result is Ready */
-               if (wait_level_metering_finish(duslic_id, channel)) {
-
-                       udelay(10000);
-
-                       /* Now Read the LM Result Registers (They will hold their value until LM_EN become zero again */
-                       /*                                  ==>After that Result Regs will be updated every 500us !!!) */
-                       LM_Result = codsp_read_sop_short(duslic_id, channel, LMRES1_ADDR);
-                       V_in = (-1) *  ( ( (((long int)LM_Result) * V_AD_x10000) / N_SAMPLES) >> (15 - K_INTDC_RECT_ON) ) ;  /* Vin x 10000*/
-
-                       V_out = (((V_in * Divider_Ratio) / 10000L) * RMS_MULTIPLIERx100) / 100 ;        /* Vout_RMS x100 */
-                       if (V_out < 0)
-                               V_out = -V_out;
-
-                       Vout_diff = (V_out - TARGET_V_RING_RMSx100);
-
-                       if (Vout_diff < 0)
-                               Vout_diff = -Vout_diff;
-
-                       if (Vout_diff > V_RMS_RING_MAX_DIFFx100)
-                               err_mask |= 16;
-
-                       *ring_rms_v = V_out;
-               } else {
-                       err_mask |= 16;
-                       *ring_rms_v = 0;
-               }
-       } else {
-               err_mask |= 16;
-               *ring_rms_v = 0;
-       }
-       /* Disable LevelMeter ==> In order to be able to restart Integrator again (for the next integration) */
-       codsp_write_sop_char(duslic_id, channel, LMCR1_ADDR, LMCR1_LM_THM | LMCR1_LM_MASK);
-
-       retrieve_slic_state(slic_id);
-
-       return(err_mask);
-}
-
-int test_dtmf(int slic_id)
-{
-       unsigned char code;
-       unsigned char b;
-       unsigned int intreg;
-       int duslic_id = slic_id >> 1;
-       int channel = slic_id & 1;
-
-       for (code = 0; code < 16; code++) {
-               b = codsp_read_sop_char(duslic_id, channel, DSCR_ADDR);
-               codsp_write_sop_char(duslic_id, channel, DSCR_ADDR,
-                       (b & ~(DSCR_PTG | DSCR_DG_KEY(15))) | DSCR_DG_KEY(code) | DSCR_TG1_EN | DSCR_TG2_EN);
-               udelay(80000);
-
-               intreg = codsp_read_sop_int(duslic_id, channel, INTREG1_ADDR);
-               if ((intreg & CODSP_INTREG_INT_CH) == 0)
-                       break;
-
-               if ((intreg & CODSP_INTREG_DTMF_OK) == 0 ||
-                               codsp_dtmf_map[(intreg >> 10) & 15] != codsp_dtmf_map[code])
-                       break;
-
-               b = codsp_read_sop_char(duslic_id, channel, DSCR_ADDR);
-               codsp_write_sop_char(duslic_id, channel, DSCR_ADDR,
-                               b & ~(DSCR_COR8 | DSCR_TG1_EN | DSCR_TG2_EN));
-
-               udelay(80000);
-
-               intreg = codsp_read_sop_int(duslic_id, channel, INTREG1_ADDR); /* for dtmf_pause irq */
-       }
-
-       if (code != 16) {
-               b = codsp_read_sop_char(duslic_id, channel, DSCR_ADDR); /* stop dtmf */
-               codsp_write_sop_char(duslic_id, channel, DSCR_ADDR,
-                               b & ~(DSCR_COR8 | DSCR_TG1_EN | DSCR_TG2_EN));
-               return(1);
-       }
-
-       return(0);
-}
-
-void data_up_persist_time(int duslic_id, int channel, int time_ms)
-{
-       unsigned char b;
-
-       b = codsp_read_sop_char(duslic_id, channel, IOCTL3_ADDR);
-       b = (b & 0x0F) | ((time_ms & 0x0F) << 4);
-       codsp_write_sop_char(duslic_id, channel, IOCTL3_ADDR, b);
-}
-
-static void program_dtmf_params(int duslic_id, int channel)
-{
-       unsigned char b;
-
-       codsp_write_pop_char(duslic_id, channel, DTMF_LEV_ADDR, 0x10);
-       codsp_write_pop_char(duslic_id, channel, DTMF_TWI_ADDR, 0x0C);
-       codsp_write_pop_char(duslic_id, channel, DTMF_NCF_H_ADDR, 0x79);
-       codsp_write_pop_char(duslic_id, channel, DTMF_NCF_L_ADDR, 0x10);
-       codsp_write_pop_char(duslic_id, channel, DTMF_NBW_H_ADDR, 0x02);
-       codsp_write_pop_char(duslic_id, channel, DTMF_NBW_L_ADDR, 0xFB);
-       codsp_write_pop_char(duslic_id, channel, DTMF_GAIN_ADDR, 0x91);
-       codsp_write_pop_char(duslic_id, channel, DTMF_RES1_ADDR, 0x00);
-       codsp_write_pop_char(duslic_id, channel, DTMF_RES2_ADDR, 0x00);
-       codsp_write_pop_char(duslic_id, channel, DTMF_RES3_ADDR, 0x00);
-
-       b = codsp_read_sop_char(duslic_id, channel, BCR5_ADDR);
-       codsp_write_sop_char(duslic_id, channel, BCR5_ADDR, b | BCR5_DTMF_EN);
-}
-
-static void codsp_channel_full_reset(int duslic_id, int channel)
-{
-
-       program_coeffs(duslic_id, channel, ac_coeffs, sizeof(ac_coeffs) / sizeof(struct _coeffs));
-       program_coeffs(duslic_id, channel, dc_coeffs, sizeof(dc_coeffs) / sizeof(struct _coeffs));
-
-       /* program basic configuration registers */
-       codsp_write_sop_char(duslic_id, channel, BCR1_ADDR, 0x01);
-       codsp_write_sop_char(duslic_id, channel, BCR2_ADDR, 0x41);
-       codsp_write_sop_char(duslic_id, channel, BCR3_ADDR, 0x43);
-       codsp_write_sop_char(duslic_id, channel, BCR4_ADDR, 0x00);
-       codsp_write_sop_char(duslic_id, channel, BCR5_ADDR, 0x00);
-
-       codsp_write_sop_char(duslic_id, channel, DSCR_ADDR, 0x04);              /* PG */
-
-       program_dtmf_params(duslic_id, channel);
-
-       codsp_write_sop_char(duslic_id, channel, LMCR3_ADDR, 0x40);     /* RingTRip_SEL */
-
-       data_up_persist_time(duslic_id, channel, 4);
-
-       codsp_write_sop_char(duslic_id, channel, MASK_ADDR, 0xFF);     /* All interrupts masked */
-
-       codsp_set_slic(duslic_id, channel, SS_ACTIVE_HIGH);
-}
-
-static int codsp_chip_full_reset(int duslic_id)
-{
-       int i, cnt;
-       int intreg[NUM_CHANNELS];
-       unsigned char pcm_resync;
-       unsigned char revision;
-
-       codsp_reset_chip(duslic_id);
-
-       udelay(2000);
-
-       for (i = 0; i < NUM_CHANNELS; i++)
-               intreg[i] = codsp_read_sop_int(duslic_id, i, INTREG1_ADDR);
-
-       udelay(1500);
-
-       if (_PORTC_GET(com_hook_mask_tab[duslic_id]) == 0) {
-               printf("_HOOK(%d) stayed low\n", duslic_id);
-               return -1;
-       }
-
-       for (pcm_resync = 0, i = 0; i < NUM_CHANNELS; i++) {
-               if (intreg[i] & CODSP_INTREG_SYNC_FAIL)
-                       pcm_resync |= 1 << i;
-       }
-
-       for (cnt = 0; cnt < 5 && pcm_resync; cnt++) {
-               for (i = 0; i < NUM_CHANNELS; i++)
-                       codsp_resync_channel(duslic_id, i);
-
-               udelay(2000);
-
-               pcm_resync = 0;
-
-               for (i = 0; i < NUM_CHANNELS; i++) {
-                       if (codsp_read_sop_int(duslic_id, i, INTREG1_ADDR) & CODSP_INTREG_SYNC_FAIL)
-                               pcm_resync |= 1 << i;
-               }
-       }
-
-       if (cnt == 5) {
-               printf("PCM_Resync(%u) not completed\n", duslic_id);
-               return -2;
-       }
-
-       revision = codsp_read_sop_char(duslic_id, 0, REVISION_ADDR);
-       printf("DuSLIC#%d hardware version %d.%d\r\n", duslic_id, (revision & 0xF0) >> 4, revision & 0x0F);
-
-       codsp_write_sop_char(duslic_id, 0, XCR_ADDR, 0x80);     /* EDSP_EN */
-
-       for (i = 0; i < NUM_CHANNELS; i++) {
-               codsp_write_sop_char(duslic_id, i, PCMC1_ADDR, 0x01);
-               codsp_channel_full_reset(duslic_id, i);
-       }
-
-       return 0;
-}
-
-int slic_self_test(int duslic_mask)
-{
-       int slic;
-       int i;
-       int r;
-       long vdd, v_oh_H, v_oh_L, ring_mean_v, ring_rms_v;
-       const char *err_txt[] = { "VDD", "V_OH_H", "V_OH_L", "V_RING_MEAN", "V_RING_RMS" };
-       int error = 0;
-
-       for (slic = 0; slic < MAX_SLICS; slic++) { /* voltages self test */
-               if (duslic_mask & (1 << (slic >> 1))) {
-                       r = measure_on_hook_voltages(slic, &vdd,
-                               &v_oh_H, &v_oh_L, &ring_mean_v, &ring_rms_v);
-
-                       printf("SLIC %u measured voltages (x100):\n\t"
-                                   "VDD = %ld\tV_OH_H = %ld\tV_OH_L = %ld\tV_RING_MEAN = %ld\tV_RING_RMS = %ld\n",
-                                   slic, vdd, v_oh_H, v_oh_L, ring_mean_v, ring_rms_v);
-
-                       if (r != 0)
-                               error |= 1 << slic;
-
-                       for (i = 0; i < 5; i++)
-                               if (r & (1 << i))
-                                       printf("\t%s out of range\n", err_txt[i]);
-               }
-       }
-
-       for (slic = 0; slic < MAX_SLICS; slic++) { /* voice path self test */
-               if (duslic_mask & (1 << (slic >> 1))) {
-                       printf("SLIC %u VOICE PATH...CHECKING", slic);
-                       printf("\rSLIC %u VOICE PATH...%s\n", slic,
-                               (r = test_dtmf(slic)) != 0 ? "FAILED  " : "PASSED  ");
-
-                       if (r != 0)
-                               error |= 1 << slic;
-               }
-       }
-
-       return(error);
-}
-
-#if defined(CONFIG_NETTA_ISDN)
-
-#define SPIENS1                (1 << (31 - 15))
-#define SPIENS2                (1 << (31 - 19))
-
-static const int spiens_mask_tab[2] = { SPIENS1, SPIENS2 };
-int s_initialized = 0;
-
-static inline unsigned int s_transfer_internal(int s_id, unsigned int address, unsigned int value)
-{
-       unsigned int rx, v;
-
-       _PORTB_SET(spiens_mask_tab[s_id], 0);
-
-       rx = __SPI_Transfer(address);
-
-       switch (address & 0xF0) {
-       case 0x60:      /* write byte register */
-       case 0x70:
-               rx = __SPI_Transfer(value);
-               break;
-
-       case 0xE0:      /* read R6 register */
-               v = __SPI_Transfer(0);
-
-               rx = (rx << 8) | v;
-
-               break;
-
-       case 0xF0:      /* read byte register */
-               rx = __SPI_Transfer(0);
-
-               break;
-       }
-
-       _PORTB_SET(spiens_mask_tab[s_id], 1);
-
-       return rx;
-}
-
-static void s_write_BR(int s_id, unsigned int regno, unsigned int val)
-{
-       unsigned int address;
-
-       address = 0x70 | (regno & 15);
-       val &= 0xff;
-
-       (void)s_transfer_internal(s_id, address, val);
-}
-
-static void s_write_OR(int s_id, unsigned int regno, unsigned int val)
-{
-       unsigned int address;
-
-       address = 0x70 | (regno & 15);
-       val &= 0xff;
-
-       (void)s_transfer_internal(s_id, address, val);
-}
-
-static void s_write_NR(int s_id, unsigned int regno, unsigned int val)
-{
-       unsigned int address;
-
-       address = (regno & 7) << 4;
-       val &= 0xf;
-
-       (void)s_transfer_internal(s_id, address | val, 0x00);
-}
-
-#define BR7_IFR                        0x08    /* IDL2 free run */
-#define BR7_ICSLSB             0x04    /* IDL2 clock speed LSB */
-
-#define BR15_OVRL_REG_EN       0x80
-#define OR7_D3VR               0x80    /* disable 3V regulator */
-
-#define OR8_TEME               0x10    /* TE mode enable */
-#define OR8_MME                        0x08    /* master mode enable */
-
-void s_initialize(void)
-{
-       int s_id;
-
-       for (s_id = 0; s_id < 2; s_id++) {
-               s_write_BR(s_id, 7, BR7_IFR | BR7_ICSLSB);
-               s_write_BR(s_id, 15, BR15_OVRL_REG_EN);
-               s_write_OR(s_id, 8, OR8_TEME | OR8_MME);
-               s_write_OR(s_id, 7, OR7_D3VR);
-               s_write_OR(s_id, 6, 0);
-               s_write_BR(s_id, 15, 0);
-               s_write_NR(s_id, 3, 0);
-       }
-}
-
-#endif
-
-int board_post_codec(int flags)
-{
-       int j;
-       int r;
-       int duslic_mask;
-
-       printf("board_post_dsp\n");
-
-#if defined(CONFIG_NETTA_ISDN)
-       if (s_initialized == 0) {
-               s_initialize();
-               s_initialized = 1;
-
-               printf("s_initialized\n");
-
-               udelay(20000);
-       }
-#endif
-       duslic_mask = 0;
-
-       for (j = 0; j < MAX_DUSLIC; j++) {
-               if (codsp_chip_full_reset(j) < 0)
-                       printf("Error initializing DuSLIC#%d\n", j);
-               else
-                       duslic_mask |= 1 << j;
-       }
-
-       if (duslic_mask != 0) {
-               printf("Testing SLICs...\n");
-
-               r = slic_self_test(duslic_mask);
-               for (j = 0; j < MAX_SLICS; j++) {
-                       if (duslic_mask & (1 << (j >> 1)))
-                               printf("SLIC %u...%s\n", j, r & (1 << j) ? "FAULTY" : "OK");
-               }
-       }
-       printf("DuSLIC self test finished\n");
-
-       return 0;       /* return -1 on error */
-}
diff --git a/board/netta/dsp.c b/board/netta/dsp.c
deleted file mode 100644 (file)
index cd57647..0000000
+++ /dev/null
@@ -1,1208 +0,0 @@
-/*
- * Intracom TI6711/TI6412 DSP
- */
-
-#include <common.h>
-#include <post.h>
-
-#include "mpc8xx.h"
-
-struct ram_range {
-       u32 start;
-       u32 size;
-};
-
-#if defined(CONFIG_NETTA_6412)
-
-static const struct ram_range int_ram[] = {
-       { 0x00000000U, 0x00040000U },
-};
-
-static const struct ram_range ext_ram[] = {
-       { 0x80000000U, 0x00100000U },
-};
-
-static const struct ram_range ranges[] = {
-       { 0x00000000U, 0x00040000U },
-       { 0x80000000U, 0x00100000U },
-};
-
-static inline u16 bit_invert(u16 d)
-{
-       register u8 i;
-       register u16 r;
-       register u16 bit;
-
-       r = 0;
-       for (i = 0; i < 16; i++) {
-               bit = d & (1 << i);
-               if (bit != 0)
-                       r |= 1 << (15 - i);
-       }
-       return r;
-}
-
-#else
-
-static const struct ram_range int_ram[] = {
-       { 0x00000000U, 0x00010000U },
-};
-
-static const struct ram_range ext_ram[] = {
-       { 0x80000000U, 0x00100000U },
-};
-
-static const struct ram_range ranges[] = {
-       { 0x00000000U, 0x00010000U },
-       { 0x80000000U, 0x00100000U },
-};
-
-#endif
-
-/*******************************************************************************************************/
-
-static inline int addr_in_int_ram(u32 addr)
-{
-       int i;
-
-       for (i = 0; i < sizeof(int_ram)/sizeof(int_ram[0]); i++)
-               if (addr >= int_ram[i].start && addr < int_ram[i].start + int_ram[i].size)
-                       return 1;
-
-       return 0;
-}
-
-static inline int addr_in_ext_ram(u32 addr)
-{
-       int i;
-
-       for (i = 0; i < sizeof(ext_ram)/sizeof(ext_ram[0]); i++)
-               if (addr >= ext_ram[i].start && addr < ext_ram[i].start + ext_ram[i].size)
-                       return 1;
-
-       return 0;
-}
-
-/*******************************************************************************************************/
-
-#define DSP_HPIC       0x0
-#define DSP_HPIA       0x4
-#define DSP_HPID1      0x8
-#define DSP_HPID2      0xC
-
-static u32 dummy_delay;
-static volatile u32 *ti6711_delay = &dummy_delay;
-
-static inline void dsp_go_slow(void)
-{
-       volatile memctl8xx_t *memctl = &((immap_t *)CONFIG_SYS_IMMR)->im_memctl;
-#if defined(CONFIG_NETTA_6412)
-       memctl->memc_or6 |= OR_SCY_15_CLK | OR_TRLX;
-#else
-       memctl->memc_or2 |= OR_SCY_15_CLK | OR_TRLX;
-#endif
-       memctl->memc_or5 |= OR_SCY_15_CLK | OR_TRLX;
-
-       ti6711_delay = (u32 *)DUMMY_BASE;
-}
-
-static inline void dsp_go_fast(void)
-{
-       volatile memctl8xx_t *memctl = &((immap_t *)CONFIG_SYS_IMMR)->im_memctl;
-#if defined(CONFIG_NETTA_6412)
-       memctl->memc_or6 = (memctl->memc_or6 & ~(OR_SCY_15_CLK | OR_TRLX)) | OR_SCY_0_CLK;
-#else
-       memctl->memc_or2 = (memctl->memc_or2 & ~(OR_SCY_15_CLK | OR_TRLX)) | OR_SCY_3_CLK;
-#endif
-       memctl->memc_or5 = (memctl->memc_or5 & ~(OR_SCY_15_CLK | OR_TRLX)) | OR_SCY_0_CLK;
-
-       ti6711_delay = &dummy_delay;
-}
-
-/*******************************************************************************************************/
-
-static inline void dsp_delay(void)
-{
-       /* perform ti6711_delay chip select read to have a small delay */
-       (void) *(volatile u32 *)ti6711_delay;
-}
-
-static inline u16 dsp_read_hpic(void)
-{
-#if defined(CONFIG_NETTA_6412)
-       return bit_invert(*((volatile u16 *)DSP_BASE));
-#else
-       return *((volatile u16 *)DSP_BASE);
-#endif
-}
-
-static inline void dsp_write_hpic(u16 val)
-{
-#if defined(CONFIG_NETTA_6412)
-       *((volatile u16 *)DSP_BASE) = bit_invert(val);
-#else
-       *((volatile u16 *)DSP_BASE) = val;
-#endif
-}
-
-static inline void dsp_reset(void)
-{
-#if defined(CONFIG_NETTA_6412)
-       ((volatile immap_t *)CONFIG_SYS_IMMR)->im_ioport.iop_pddat &= ~(1 << (15 - 15));
-       udelay(500);
-       ((volatile immap_t *)CONFIG_SYS_IMMR)->im_ioport.iop_pddat |=  (1 << (15 - 15));
-       udelay(500);
-#else
-       ((volatile immap_t *)CONFIG_SYS_IMMR)->im_ioport.iop_pddat &= ~(1 << (15 - 7));
-       udelay(250);
-       ((volatile immap_t *)CONFIG_SYS_IMMR)->im_ioport.iop_pddat |=  (1 << (15 - 7));
-       udelay(250);
-#endif
-}
-
-static inline u32 dsp_read_hpic_word(u32 addr)
-{
-       u32 val;
-       volatile u16 *p;
-#if defined(CONFIG_NETTA_6412)
-       p = (volatile u16 *)((volatile u8 *)DSP_BASE + addr);
-
-       val = ((u32) bit_invert(p[0]) << 16);
-       /* dsp_delay(); */
-
-       val |= bit_invert(p[1]);
-       /* dsp_delay(); */
-#else
-       p = (volatile u16 *)((volatile u8 *)DSP_BASE + addr);
-
-       val = ((u32) p[0] << 16);
-       dsp_delay();
-
-       val |= p[1];
-       dsp_delay();
-#endif
-       return val;
-}
-
-static inline u16 dsp_read_hpic_hi_hword(u32 addr)
-{
-#if defined(CONFIG_NETTA_6412)
-       return bit_invert(*(volatile u16 *)((volatile u8 *)DSP_BASE + addr));
-#else
-       return *(volatile u16 *)((volatile u8 *)DSP_BASE + addr);
-#endif
-}
-
-static inline u16 dsp_read_hpic_lo_hword(u32 addr)
-{
-#if defined(CONFIG_NETTA_6412)
-       return bit_invert(*(volatile u16 *)((volatile u8 *)DSP_BASE + addr + 2));
-#else
-       return *(volatile u16 *)((volatile u8 *)DSP_BASE + addr + 2);
-#endif
-}
-
-static inline void dsp_wait_hrdy(void)
-{
-       int i;
-
-       i = 0;
-#if defined(CONFIG_NETTA_6412)
-       while (i < 1000 && (dsp_read_hpic_word(DSP_HPIC) & 0x08) == 0) {
-#else
-       while (i < 1000 && (dsp_read_hpic() & 0x08) == 0) {
-#endif
-               dsp_delay();
-               i++;
-       }
-}
-
-static inline void dsp_write_hpic_word(u32 addr, u32 val)
-{
-       volatile u16 *p;
-#if defined(CONFIG_NETTA_6412)
-       p = (volatile u16 *)((volatile u8 *)DSP_BASE + addr);
-       p[0] = bit_invert((u16)(val >> 16));
-       /* dsp_delay(); */
-
-       p[1] = bit_invert((u16)val);
-       /* dsp_delay(); */
-#else
-       p = (volatile u16 *)((volatile u8 *)DSP_BASE + addr);
-       p[0] = (u16)(val >> 16);
-       dsp_delay();
-
-       p[1] = (u16)val;
-       dsp_delay();
-#endif
-}
-
-static inline void dsp_write_hpic_hi_hword(u32 addr, u16 val_h)
-{
-#if defined(CONFIG_NETTA_6412)
-       *(volatile u16 *)((volatile u8 *)DSP_BASE + addr) = bit_invert(val_h);
-#else
-
-       *(volatile u16 *)((volatile u8 *)DSP_BASE + addr) = val_h;
-#endif
-}
-
-static inline void dsp_write_hpic_lo_hword(u32 addr, u16 val_l)
-{
-#if defined(CONFIG_NETTA_6412)
-       *(volatile u16 *)((volatile u8 *)DSP_BASE + addr + 2) = bit_invert(val_l);
-#else
-       *(volatile u16 *)((volatile u8 *)DSP_BASE + addr + 2) = val_l;
-#endif
-}
-
-/********************************************************************/
-
-static inline void c62_write_word(u32 addr, u32 val)
-{
-       dsp_write_hpic_hi_hword(DSP_HPIA, (u16)(addr >> 16));
-#if !defined(CONFIG_NETTA_6412)
-       dsp_delay();
-#endif
-       dsp_write_hpic_lo_hword(DSP_HPIA, (u16)addr);
-#if !defined(CONFIG_NETTA_6412)
-       dsp_delay();
-#endif
-
-       dsp_wait_hrdy();
-#if !defined(CONFIG_NETTA_6412)
-       dsp_delay();
-#endif
-       dsp_write_hpic_hi_hword(DSP_HPID2, (u16)(val >> 16));
-#if !defined(CONFIG_NETTA_6412)
-       dsp_delay();
-
-       /* dsp_wait_hrdy();
-       dsp_delay(); */
-#endif
-       dsp_write_hpic_lo_hword(DSP_HPID2, (u16)val);
-#if !defined(CONFIG_NETTA_6412)
-       dsp_delay();
-#endif
-}
-
-static u32 c62_read_word(u32 addr)
-{
-       u32 val;
-
-       dsp_write_hpic_hi_hword(DSP_HPIA, (u16)(addr >> 16));
-#if !defined(CONFIG_NETTA_6412)
-       dsp_delay();
-#endif
-       dsp_write_hpic_lo_hword(DSP_HPIA, (u16)addr);
-#if !defined(CONFIG_NETTA_6412)
-       dsp_delay();
-#endif
-
-       /* FETCH */
-#if defined(CONFIG_NETTA_6412)
-       dsp_write_hpic_word(DSP_HPIC, 0x00100010);
-#else
-       dsp_write_hpic(0x10);
-       dsp_delay();
-#endif
-       dsp_wait_hrdy();
-#if !defined(CONFIG_NETTA_6412)
-       dsp_delay();
-#endif
-       val = (u32)dsp_read_hpic_hi_hword(DSP_HPID2) << 16;
-#if !defined(CONFIG_NETTA_6412)
-       dsp_delay();
-
-       /* dsp_wait_hrdy();
-       dsp_delay(); */
-#endif
-       val |= dsp_read_hpic_lo_hword(DSP_HPID2);
-#if !defined(CONFIG_NETTA_6412)
-       dsp_delay();
-#endif
-       return val;
-}
-
-static inline void c62_read(u32 addr, u32 *buffer, int numdata)
-{
-       int i;
-
-       if (numdata <= 0)
-               return;
-
-       for (i = 0; i < numdata; i++) {
-               *buffer++ = c62_read_word(addr);
-               addr += 4;
-       }
-}
-
-static inline u32 c62_checksum(u32 addr, int numdata)
-{
-       int i;
-       u32 chksum;
-
-       chksum = 0;
-       for (i = 0; i < numdata; i++) {
-               chksum += c62_read_word(addr);
-               addr += 4;
-       }
-
-       return chksum;
-}
-
-static inline void c62_write(u32 addr, const u32 *buffer, int numdata)
-{
-       int i;
-
-       if (numdata <= 0)
-               return;
-
-       for (i = 0; i < numdata; i++) {
-               c62_write_word(addr, *buffer++);
-               addr += 4;
-       }
-}
-
-static inline int c62_write_word_validated(u32 addr, u32 val)
-{
-       c62_write_word(addr, val);
-       return c62_read_word(addr) == val ? 0 : -1;
-}
-
-static inline int c62_write_validated(u32 addr, const u32 *buffer, int numdata)
-{
-       int i, r;
-
-       if (numdata <= 0)
-               return 0;
-
-       for (i = 0; i < numdata; i++) {
-               r = c62_write_word_validated(addr, *buffer++);
-               if (r < 0)
-                       return r;
-               addr += 4;
-       }
-       return 0;
-}
-
-#if defined(CONFIG_NETTA_6412)
-
-#define DRAM_REGS_BASE 0x1800000
-
-#define GBLCTL DRAM_REGS_BASE
-#define CECTL1 (DRAM_REGS_BASE + 0x4)
-#define CECTL0 (DRAM_REGS_BASE + 0x8)
-#define CECTL2 (DRAM_REGS_BASE + 0x10)
-#define CECTL3 (DRAM_REGS_BASE + 0x14)
-#define SDCTL  (DRAM_REGS_BASE + 0x18)
-#define SDTIM  (DRAM_REGS_BASE + 0x1C)
-#define SDEXT  (DRAM_REGS_BASE + 0x20)
-#define SESEC1 (DRAM_REGS_BASE + 0x44)
-#define SESEC0 (DRAM_REGS_BASE + 0x48)
-#define SESEC2 (DRAM_REGS_BASE + 0x50)
-#define SESEC3 (DRAM_REGS_BASE + 0x54)
-
-#define MAR128 0x1848200
-#define MAR129 0x1848204
-
-void dsp_dram_initialize(void)
-{
-       c62_write_word(GBLCTL, 0x120E4);
-       c62_write_word(CECTL1, 0x18);
-       c62_write_word(CECTL0, 0xD0);
-       c62_write_word(CECTL2, 0x18);
-       c62_write_word(CECTL3, 0x18);
-       c62_write_word(SDCTL, 0x47115000);
-       c62_write_word(SDTIM, 1536);
-       c62_write_word(SDEXT, 0x534A9);
-#if 0
-       c62_write_word(SESEC1, 0);
-       c62_write_word(SESEC0, 0);
-       c62_write_word(SESEC2, 0);
-       c62_write_word(SESEC3, 0);
-#endif
-       c62_write_word(MAR128, 1);
-       c62_write_word(MAR129, 0);
-}
-
-#endif
-
-static inline void dsp_init_hpic(void)
-{
-       int i;
-       volatile u16 *p;
-#if defined(CONFIG_NETTA_6412)
-       dsp_go_fast();
-#else
-       dsp_go_slow();
-#endif
-       i = 0;
-#if defined(CONFIG_NETTA_6412)
-       while (i < 1000 && (dsp_read_hpic_word(DSP_HPIC) & 0x08) == 0) {
-#else
-       while (i < 1000 && (dsp_read_hpic() & 0x08) == 0) {
-#endif
-               dsp_delay();
-               i++;
-       }
-
-       if (i == 1000)
-               printf("HRDY stuck\n");
-
-       dsp_delay();
-
-       /* write control register */
-       p = (volatile u16 *)DSP_BASE;
-       p[0] = 0x0000;
-       dsp_delay();
-       p[1] = 0x0000;
-       dsp_delay();
-
-#if !defined(CONFIG_NETTA_6412)
-       dsp_go_fast();
-#endif
-}
-
-/***********************************************************************************************************/
-
-#if !defined(CONFIG_NETTA_6412)
-
-static const u8 bootstrap_rbin[5084] = {
-       0x52, 0x42, 0x49, 0x4e, 0xc5, 0xa9, 0x9f, 0x1a, 0x00, 0x00, 0x00, 0x02,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00,
-       0x00, 0x00, 0x11, 0xc0, 0x00, 0x17, 0x94, 0x2a, 0x00, 0x00, 0x00, 0x6a,
-       0x00, 0x00, 0x03, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
-       0x00, 0x18, 0x00, 0xe2, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xe2,
-       0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xe2, 0x00, 0x00, 0x60, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x18, 0x00, 0xe2, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xe2,
-       0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xe2, 0x00, 0x00, 0x60, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x18, 0x00, 0xe2, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xe2,
-       0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xe2, 0x00, 0x00, 0x60, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x18, 0x00, 0xe2, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xe2,
-       0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xe2, 0x00, 0x00, 0x60, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x18, 0x00, 0xe2, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xe2,
-       0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xe2, 0x00, 0x00, 0x60, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x17, 0x94, 0x2a, 0x00, 0x00, 0x00, 0x6a, 0x00, 0x00, 0x03, 0x62,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x18, 0x00, 0xe2,
-       0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xe2, 0x00, 0x00, 0x60, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x18, 0x00, 0xe2, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xe2,
-       0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xe2, 0x00, 0x00, 0x60, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x18, 0x00, 0xe2, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xe2,
-       0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xe2, 0x00, 0x00, 0x60, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x18, 0x00, 0xe2, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xe2,
-       0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xe2, 0x00, 0x00, 0x60, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x18, 0x00, 0xe2, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xe2,
-       0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xe2, 0x00, 0x00, 0x60, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x18, 0x00, 0xe2, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x90, 0x10, 0x5a,
-       0x00, 0x19, 0x2e, 0x28, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x64,
-       0x02, 0x00, 0x00, 0xaa, 0x02, 0x10, 0xac, 0xe2, 0x00, 0x00, 0x20, 0x00,
-       0x00, 0x00, 0x02, 0x64, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x9f, 0x7a,
-       0x30, 0x00, 0x08, 0x10, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x04, 0x28,
-       0x00, 0x00, 0xc6, 0x69, 0x02, 0x16, 0x4c, 0xa2, 0x02, 0x00, 0x90, 0x7a,
-       0x00, 0x10, 0x02, 0xe4, 0x00, 0x00, 0x60, 0x00, 0x00, 0x02, 0xd6, 0xc8,
-       0x00, 0x10, 0x02, 0xf4, 0x03, 0x10, 0x02, 0xe6, 0x00, 0x00, 0x60, 0x00,
-       0x03, 0x1a, 0xf7, 0xca, 0x03, 0x10, 0x02, 0xf6, 0x00, 0x00, 0x04, 0x28,
-       0x00, 0x00, 0xc6, 0x69, 0x02, 0x16, 0x4c, 0xa2, 0x02, 0x00, 0x90, 0x7a,
-       0x02, 0x90, 0x02, 0xe6, 0x00, 0x00, 0x60, 0x00, 0x02, 0x97, 0xcf, 0x5a,
-       0x02, 0x90, 0x02, 0xf6, 0x02, 0x90, 0x02, 0xe6, 0x00, 0x00, 0x60, 0x00,
-       0x02, 0x96, 0x10, 0xca, 0x02, 0x90, 0x02, 0xf6, 0x00, 0x0c, 0x03, 0x62,
-       0x00, 0x00, 0x80, 0x00, 0x02, 0x90, 0x10, 0x5a, 0x00, 0x00, 0x04, 0x28,
-       0x00, 0x00, 0xc6, 0x69, 0x02, 0x16, 0x4c, 0xa2, 0x02, 0x00, 0x90, 0x7a,
-       0x03, 0x10, 0x02, 0xe6, 0x00, 0x00, 0x60, 0x00, 0x03, 0x18, 0x2f, 0xda,
-       0x03, 0x10, 0x02, 0xf6, 0x03, 0x10, 0x02, 0xe6, 0x00, 0x00, 0x60, 0x00,
-       0x03, 0x1a, 0x10, 0x8a, 0x03, 0x10, 0x02, 0xf6, 0x00, 0x19, 0x2e, 0x28,
-       0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x64, 0x03, 0x00, 0x00, 0xaa,
-       0x02, 0x98, 0xac, 0xe2, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x02, 0x64,
-       0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xbf, 0x7a, 0x22, 0x90, 0x02, 0xe6,
-       0x00, 0x00, 0x60, 0x00, 0x22, 0x96, 0xd6, 0x8a, 0x22, 0x90, 0x02, 0xf6,
-       0x22, 0x90, 0x02, 0xe6, 0x00, 0x00, 0x60, 0x00, 0x22, 0x96, 0xf7, 0x8a,
-       0x22, 0x90, 0x02, 0xf6, 0x00, 0x0c, 0x03, 0x62, 0x00, 0x00, 0x80, 0x00,
-       0x00, 0x0c, 0x03, 0x62, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0c, 0x03, 0x62,
-       0x00, 0x00, 0x80, 0x00, 0x00, 0x19, 0x2e, 0x28, 0x00, 0x00, 0x00, 0x68,
-       0x00, 0x00, 0x02, 0x64, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x02, 0x64,
-       0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x4f, 0x58, 0x02, 0x00, 0x12, 0x2a,
-       0x02, 0x00, 0xc8, 0x6a, 0x02, 0x90, 0x02, 0xe6, 0x00, 0x00, 0x60, 0x00,
-       0x02, 0x95, 0x8c, 0xca, 0x02, 0x90, 0x02, 0xf6, 0x00, 0x00, 0x12, 0x28,
-       0x00, 0x00, 0xc8, 0x68, 0x02, 0x00, 0x02, 0x66, 0x00, 0x00, 0x60, 0x00,
-       0x02, 0x11, 0xad, 0xca, 0x02, 0x00, 0x02, 0x76, 0x92, 0x00, 0x12, 0x2a,
-       0x92, 0x00, 0xc8, 0x6a, 0x92, 0x90, 0x02, 0xe6, 0x00, 0x00, 0x60, 0x00,
-       0x92, 0x95, 0x6b, 0xca, 0x92, 0x90, 0x02, 0xf6, 0x80, 0x00, 0x12, 0x28,
-       0x80, 0x00, 0xc8, 0x68, 0x82, 0x00, 0x02, 0x66, 0x80, 0x00, 0x12, 0x28,
-       0x80, 0x00, 0xc8, 0x68, 0x00, 0x00, 0x20, 0x00, 0x82, 0x11, 0x6b, 0x8a,
-       0x82, 0x00, 0x02, 0x76, 0x02, 0x00, 0x12, 0x2a, 0x02, 0x00, 0xc8, 0x6a,
-       0x02, 0x90, 0x02, 0xe6, 0x00, 0x00, 0x60, 0x00, 0x02, 0x95, 0x4a, 0xca,
-       0x02, 0x90, 0x02, 0xf6, 0x90, 0x00, 0x12, 0x28, 0x90, 0x00, 0xc8, 0x68,
-       0x92, 0x00, 0x02, 0x66, 0x00, 0x00, 0x60, 0x00, 0x92, 0x11, 0x29, 0xca,
-       0x92, 0x00, 0x02, 0x76, 0x82, 0x00, 0x12, 0x2a, 0x82, 0x00, 0xc8, 0x6a,
-       0x82, 0x10, 0x02, 0xe6, 0x80, 0x00, 0x12, 0x28, 0x80, 0x00, 0xc8, 0x68,
-       0x00, 0x00, 0x20, 0x00, 0x82, 0x11, 0x29, 0x8a, 0x82, 0x00, 0x02, 0x76,
-       0x00, 0x00, 0x12, 0x28, 0x00, 0x00, 0xc8, 0x68, 0x02, 0x00, 0x02, 0x66,
-       0x00, 0x00, 0x60, 0x00, 0x02, 0x11, 0x08, 0xca, 0x02, 0x00, 0x02, 0x76,
-       0x02, 0x00, 0x12, 0x2a, 0x02, 0x00, 0xc8, 0x6a, 0x02, 0x90, 0x02, 0xe6,
-       0x00, 0x00, 0x60, 0x00, 0x02, 0x97, 0x6f, 0x5a, 0x02, 0x90, 0x02, 0xf6,
-       0x00, 0x00, 0x12, 0x28, 0x00, 0x00, 0xc8, 0x68, 0x01, 0x80, 0x02, 0x64,
-       0x00, 0x00, 0x60, 0x00, 0x02, 0x0e, 0xff, 0x5a, 0x02, 0x00, 0x02, 0x76,
-       0x02, 0x00, 0x12, 0x2a, 0x02, 0x00, 0xc8, 0x6a, 0x00, 0x10, 0x02, 0xe4,
-       0x00, 0x00, 0x60, 0x00, 0x02, 0x83, 0xbf, 0x5a, 0x02, 0x90, 0x02, 0xf6,
-       0x00, 0x00, 0x12, 0x28, 0x00, 0x00, 0xc8, 0x68, 0x01, 0x80, 0x02, 0x64,
-       0x00, 0x00, 0x60, 0x00, 0x02, 0x0f, 0xdf, 0x5a, 0x02, 0x00, 0x02, 0x76,
-       0x00, 0x00, 0x04, 0x28, 0x00, 0x00, 0xc8, 0x68, 0x02, 0x00, 0x02, 0x66,
-       0x00, 0x00, 0x60, 0x00, 0x02, 0x12, 0xf7, 0xca, 0x02, 0x00, 0x02, 0x76,
-       0x02, 0x00, 0x04, 0x2a, 0x02, 0x00, 0xc8, 0x6a, 0x02, 0x90, 0x02, 0xe6,
-       0x00, 0x00, 0x60, 0x00, 0x02, 0x96, 0xd6, 0xca, 0x02, 0x90, 0x02, 0xf6,
-       0x00, 0x00, 0x04, 0x28, 0x00, 0x00, 0xc8, 0x68, 0x02, 0x00, 0x02, 0x66,
-       0x00, 0x00, 0x04, 0x28, 0x00, 0x00, 0xc8, 0x68, 0x00, 0x00, 0x20, 0x00,
-       0x02, 0x10, 0x85, 0xca, 0x02, 0x00, 0x02, 0x76, 0x00, 0x00, 0x04, 0x28,
-       0x00, 0x00, 0xc8, 0x68, 0x02, 0x80, 0x02, 0x66, 0x02, 0x00, 0x04, 0x2a,
-       0x02, 0x00, 0xc8, 0x6a, 0x00, 0x00, 0x20, 0x00, 0x02, 0x96, 0x95, 0xca,
-       0x02, 0x90, 0x02, 0xf6, 0x00, 0x00, 0x04, 0x28, 0x00, 0x00, 0xc8, 0x68,
-       0x01, 0x80, 0x02, 0x64, 0x00, 0x00, 0x60, 0x00, 0x02, 0x0f, 0xdf, 0x5a,
-       0x02, 0x00, 0x02, 0x76, 0x02, 0x00, 0x04, 0x2a, 0x02, 0x00, 0xc8, 0x6a,
-       0x02, 0x90, 0x02, 0xe6, 0x00, 0x00, 0x60, 0x00, 0x02, 0x96, 0x10, 0xca,
-       0x02, 0x90, 0x02, 0xf6, 0x00, 0x00, 0x04, 0x28, 0x00, 0x00, 0xc8, 0x68,
-       0x02, 0x00, 0x02, 0x66, 0x00, 0x00, 0x60, 0x00, 0x02, 0x11, 0xef, 0xca,
-       0x02, 0x00, 0x02, 0x76, 0x00, 0x00, 0x04, 0x28, 0x00, 0x00, 0xc8, 0x68,
-       0x02, 0x80, 0x02, 0x66, 0x02, 0x00, 0x04, 0x2a, 0x02, 0x00, 0xc8, 0x6a,
-       0x00, 0x00, 0x20, 0x00, 0x02, 0x95, 0xae, 0xca, 0x02, 0x90, 0x02, 0xf6,
-       0x02, 0x00, 0x06, 0x2a, 0x02, 0x00, 0xc8, 0x6a, 0x02, 0x10, 0x02, 0xe6,
-       0x00, 0x00, 0x06, 0x28, 0x00, 0x00, 0xc8, 0x68, 0x00, 0x00, 0x20, 0x00,
-       0x02, 0x10, 0x21, 0x0a, 0x02, 0x00, 0x02, 0x76, 0x00, 0x00, 0x06, 0x28,
-       0x00, 0x00, 0xc8, 0x68, 0x01, 0x80, 0x02, 0x64, 0x00, 0x00, 0x06, 0x28,
-       0x00, 0x00, 0xc8, 0x68, 0x00, 0x00, 0x20, 0x00, 0x01, 0x8d, 0xae, 0xc8,
-       0x01, 0x8d, 0x0c, 0x88, 0x01, 0x80, 0x02, 0x74, 0x00, 0x00, 0x06, 0x28,
-       0x00, 0x00, 0xc8, 0x68, 0x02, 0x00, 0x02, 0x66, 0x00, 0x00, 0x06, 0x28,
-       0x00, 0x00, 0xc8, 0x68, 0x00, 0x00, 0x20, 0x00, 0x02, 0x10, 0xa7, 0xca,
-       0x02, 0x00, 0x02, 0x76, 0x00, 0x00, 0x06, 0x28, 0x00, 0x00, 0xc8, 0x68,
-       0x00, 0x00, 0x02, 0x64, 0x02, 0x00, 0x06, 0x2a, 0x02, 0x00, 0xc8, 0x6a,
-       0x00, 0x00, 0x20, 0x00, 0x00, 0x02, 0x31, 0xc8, 0x00, 0x02, 0x10, 0x88,
-       0x00, 0x10, 0x02, 0xf4, 0x00, 0x00, 0x06, 0x28, 0x00, 0x00, 0xc8, 0x68,
-       0x02, 0x80, 0x02, 0x66, 0x02, 0x00, 0x06, 0x2a, 0x02, 0x00, 0xc8, 0x6a,
-       0x00, 0x00, 0x20, 0x00, 0x02, 0x96, 0x74, 0xca, 0x02, 0x90, 0x02, 0xf6,
-       0x00, 0x00, 0x06, 0x28, 0x00, 0x00, 0xc8, 0x68, 0x02, 0x80, 0x02, 0x66,
-       0x02, 0x00, 0x06, 0x2a, 0x02, 0x00, 0xc8, 0x6a, 0x00, 0x00, 0x20, 0x00,
-       0x02, 0x96, 0x52, 0x8a, 0x02, 0x90, 0x02, 0xf6, 0x02, 0x00, 0x08, 0x2a,
-       0x02, 0x00, 0xc8, 0x6a, 0x02, 0x10, 0x02, 0xe6, 0x00, 0x00, 0x08, 0x28,
-       0x00, 0x00, 0xc8, 0x68, 0x00, 0x00, 0x20, 0x00, 0x02, 0x10, 0x21, 0x0a,
-       0x02, 0x00, 0x02, 0x76, 0x00, 0x00, 0x08, 0x28, 0x00, 0x00, 0xc8, 0x68,
-       0x00, 0x00, 0x02, 0x64, 0x02, 0x00, 0x08, 0x2a, 0x02, 0x00, 0xc8, 0x6a,
-       0x00, 0x00, 0x20, 0x00, 0x00, 0x01, 0xae, 0xc8, 0x00, 0x01, 0x0c, 0x88,
-       0x00, 0x10, 0x02, 0xf4, 0x02, 0x00, 0x08, 0x2a, 0x02, 0x00, 0xc8, 0x6a,
-       0x02, 0x10, 0x02, 0xe6, 0x00, 0x00, 0x08, 0x28, 0x00, 0x00, 0xc8, 0x68,
-       0x00, 0x00, 0x20, 0x00, 0x02, 0x10, 0xa7, 0xca, 0x02, 0x00, 0x02, 0x76,
-       0x02, 0x00, 0x08, 0x2a, 0x02, 0x00, 0xc8, 0x6a, 0x02, 0x90, 0x02, 0xe6,
-       0x02, 0x00, 0x08, 0x2a, 0x02, 0x00, 0xc8, 0x6a, 0x00, 0x00, 0x20, 0x00,
-       0x02, 0x96, 0x31, 0xca, 0x02, 0x96, 0x10, 0x8a, 0x02, 0x90, 0x02, 0xf6,
-       0x02, 0x00, 0x08, 0x2a, 0x02, 0x00, 0xc8, 0x6a, 0x02, 0x10, 0x02, 0xe6,
-       0x00, 0x00, 0x08, 0x28, 0x00, 0x00, 0xc8, 0x68, 0x00, 0x00, 0x20, 0x00,
-       0x02, 0x12, 0x74, 0xca, 0x02, 0x00, 0x02, 0x76, 0x02, 0x00, 0x08, 0x2a,
-       0x02, 0x00, 0xc8, 0x6a, 0x02, 0x90, 0x02, 0xe6, 0x02, 0x00, 0x08, 0x2a,
-       0x02, 0x00, 0xc8, 0x6a, 0x00, 0x00, 0x20, 0x00, 0x02, 0x96, 0x52, 0x8a,
-       0x02, 0x90, 0x02, 0xf6, 0x90, 0x00, 0x1b, 0x10, 0x90, 0x19, 0x2e, 0x28,
-       0x90, 0x00, 0x00, 0x68, 0x90, 0x00, 0x02, 0x64, 0x00, 0x00, 0x20, 0x00,
-       0x00, 0x00, 0x0a, 0x28, 0x00, 0x00, 0xc8, 0x68, 0x01, 0x80, 0x02, 0x64,
-       0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x0a, 0x28, 0x01, 0x8f, 0xbd, 0x88,
-       0x00, 0x00, 0xc8, 0x68, 0x01, 0x80, 0x02, 0x74, 0x00, 0x00, 0x0a, 0x28,
-       0x00, 0x00, 0xc8, 0x68, 0x00, 0x00, 0x02, 0x64, 0x02, 0x00, 0x0a, 0x2a,
-       0x02, 0x00, 0xc8, 0x6a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x03, 0x9c, 0x88,
-       0x00, 0x10, 0x02, 0xf4, 0x02, 0x00, 0x0a, 0x2a, 0x02, 0x00, 0xc8, 0x6a,
-       0x00, 0x10, 0x02, 0xe4, 0x02, 0x00, 0x0a, 0x2a, 0x02, 0x00, 0xc8, 0x6a,
-       0x00, 0x00, 0x20, 0x00, 0x00, 0x03, 0x1b, 0xc8, 0x00, 0x02, 0x17, 0x88,
-       0x00, 0x10, 0x02, 0xf4, 0x00, 0x19, 0x2e, 0x28, 0x00, 0x00, 0x00, 0x68,
-       0x00, 0x00, 0x02, 0x64, 0x02, 0x00, 0x0a, 0x2a, 0x02, 0x00, 0xc8, 0x6a,
-       0x02, 0x10, 0x02, 0xe6, 0x00, 0x00, 0x00, 0x00, 0x01, 0x82, 0x42, 0x64,
-       0x00, 0x00, 0x0a, 0x28, 0x00, 0x00, 0xc8, 0x68, 0x00, 0x00, 0x00, 0x00,
-       0x02, 0x10, 0x07, 0xca, 0x02, 0x0c, 0x9f, 0xfa, 0x02, 0x00, 0x02, 0x76,
-       0x00, 0x19, 0x2e, 0x28, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x64,
-       0x00, 0x00, 0x60, 0x00, 0x03, 0x00, 0x80, 0x58, 0x03, 0x00, 0x10, 0x2a,
-       0x02, 0x04, 0x03, 0xe2, 0x02, 0x18, 0x56, 0x15, 0x02, 0x93, 0xcf, 0x5a,
-       0x00, 0x94, 0x03, 0xa2, 0x02, 0x18, 0x56, 0x14, 0x00, 0x00, 0x20, 0x01,
-       0x00, 0x00, 0x00, 0x00, 0x02, 0x98, 0x56, 0x15, 0x00, 0x90, 0x4a, 0x58,
-       0x81, 0x98, 0xa0, 0x14, 0x04, 0x04, 0x00, 0x59, 0x00, 0x00, 0x06, 0x12,
-       0x00, 0x90, 0x4a, 0x59, 0x02, 0x98, 0x56, 0x15, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x1b, 0x40, 0x5b, 0x03, 0x80, 0x00, 0xf9, 0x02, 0x00, 0x00, 0xa9,
-       0x81, 0x98, 0xa0, 0x14, 0x01, 0x20, 0x00, 0x59, 0x04, 0x04, 0x01, 0xa1,
-       0x20, 0x00, 0x02, 0x13, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x10, 0x6c, 0xe1,
-       0x00, 0x94, 0x4a, 0x59, 0x02, 0x98, 0x56, 0x14, 0xa3, 0x9c, 0x0f, 0xf9,
-       0x20, 0x03, 0xe0, 0x5b, 0x81, 0x98, 0xa0, 0x14, 0x04, 0x04, 0x00, 0x59,
-       0x01, 0x20, 0x01, 0xa0, 0x00, 0x94, 0x4a, 0x59, 0xa0, 0x10, 0x6c, 0xe0,
-       0xa3, 0x9c, 0x0f, 0xf9, 0x81, 0x98, 0x60, 0x14, 0x04, 0x04, 0x00, 0x59,
-       0x01, 0x20, 0x01, 0xa0, 0x00, 0x94, 0x4a, 0x59, 0xa0, 0x10, 0x6c, 0xe0,
-       0xa3, 0x9c, 0x0f, 0xf9, 0x81, 0x98, 0x20, 0x14, 0x02, 0x84, 0x00, 0x59,
-       0x01, 0x20, 0x01, 0xa0, 0xa0, 0x10, 0x6c, 0xe0, 0x01, 0x14, 0x01, 0xa1,
-       0xa3, 0x9c, 0x0f, 0xf8, 0x00, 0x90, 0x03, 0xa2, 0xa0, 0x10, 0x6c, 0xe0,
-       0xa3, 0x9c, 0x0f, 0xf8, 0x02, 0x00, 0x0c, 0x2b, 0x00, 0x00, 0x00, 0xa8,
-       0x02, 0x00, 0xc8, 0x6b, 0x00, 0x00, 0x01, 0xe8, 0x00, 0x10, 0x02, 0xf4,
-       0x02, 0x00, 0x0e, 0x2a, 0x02, 0x00, 0xc8, 0x6a, 0x03, 0x90, 0x02, 0xf4,
-       0x00, 0x00, 0x10, 0x28, 0x00, 0x00, 0xc8, 0x68, 0x03, 0x80, 0x02, 0x74,
-       0x00, 0x0c, 0x03, 0x62, 0x00, 0x00, 0x80, 0x00, 0x00, 0x19, 0x2e, 0x28,
-       0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x64, 0x00, 0x00, 0x60, 0x00,
-       0x00, 0x00, 0x02, 0x64, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x2f, 0x58,
-       0x02, 0x00, 0x12, 0x2a, 0x02, 0x00, 0xc6, 0x6a, 0x02, 0x90, 0x02, 0xe6,
-       0x00, 0x00, 0x60, 0x00, 0x02, 0x95, 0x8c, 0xca, 0x02, 0x90, 0x02, 0xf6,
-       0x00, 0x00, 0x12, 0x28, 0x00, 0x00, 0xc6, 0x68, 0x02, 0x00, 0x02, 0x66,
-       0x00, 0x00, 0x60, 0x00, 0x02, 0x11, 0xad, 0xca, 0x02, 0x00, 0x02, 0x76,
-       0x92, 0x00, 0x12, 0x2a, 0x92, 0x00, 0xc6, 0x6a, 0x92, 0x90, 0x02, 0xe6,
-       0x00, 0x00, 0x60, 0x00, 0x92, 0x95, 0x6b, 0xca, 0x92, 0x90, 0x02, 0xf6,
-       0x80, 0x00, 0x12, 0x28, 0x80, 0x00, 0xc6, 0x68, 0x82, 0x00, 0x02, 0x66,
-       0x80, 0x00, 0x12, 0x28, 0x80, 0x00, 0xc6, 0x68, 0x00, 0x00, 0x20, 0x00,
-       0x82, 0x11, 0x6b, 0x8a, 0x82, 0x00, 0x02, 0x76, 0x02, 0x00, 0x12, 0x2a,
-       0x02, 0x00, 0xc6, 0x6a, 0x02, 0x90, 0x02, 0xe6, 0x00, 0x00, 0x60, 0x00,
-       0x02, 0x95, 0x4a, 0xca, 0x02, 0x90, 0x02, 0xf6, 0x90, 0x00, 0x12, 0x28,
-       0x90, 0x00, 0xc6, 0x68, 0x92, 0x00, 0x02, 0x66, 0x00, 0x00, 0x60, 0x00,
-       0x92, 0x11, 0x29, 0xca, 0x92, 0x00, 0x02, 0x76, 0x82, 0x00, 0x12, 0x2a,
-       0x82, 0x00, 0xc6, 0x6a, 0x82, 0x10, 0x02, 0xe6, 0x80, 0x00, 0x12, 0x28,
-       0x80, 0x00, 0xc6, 0x68, 0x00, 0x00, 0x20, 0x00, 0x82, 0x11, 0x29, 0x8a,
-       0x82, 0x00, 0x02, 0x76, 0x00, 0x00, 0x12, 0x28, 0x00, 0x00, 0xc6, 0x68,
-       0x02, 0x00, 0x02, 0x66, 0x00, 0x00, 0x60, 0x00, 0x02, 0x11, 0x08, 0xca,
-       0x02, 0x00, 0x02, 0x76, 0x02, 0x00, 0x12, 0x2a, 0x02, 0x00, 0xc6, 0x6a,
-       0x02, 0x90, 0x02, 0xe6, 0x00, 0x00, 0x60, 0x00, 0x02, 0x97, 0x6f, 0x5a,
-       0x02, 0x90, 0x02, 0xf6, 0x00, 0x00, 0x12, 0x28, 0x00, 0x00, 0xc6, 0x68,
-       0x01, 0x80, 0x02, 0x64, 0x00, 0x00, 0x60, 0x00, 0x02, 0x0e, 0xff, 0x5a,
-       0x02, 0x00, 0x02, 0x76, 0x02, 0x00, 0x12, 0x2a, 0x02, 0x00, 0xc6, 0x6a,
-       0x00, 0x10, 0x02, 0xe4, 0x00, 0x00, 0x60, 0x00, 0x02, 0x83, 0xbf, 0x5a,
-       0x02, 0x90, 0x02, 0xf6, 0x00, 0x00, 0x12, 0x28, 0x00, 0x00, 0xc6, 0x68,
-       0x01, 0x80, 0x02, 0x64, 0x00, 0x00, 0x60, 0x00, 0x02, 0x0f, 0xdf, 0x5a,
-       0x02, 0x00, 0x02, 0x76, 0x00, 0x00, 0x04, 0x28, 0x00, 0x00, 0xc6, 0x68,
-       0x02, 0x00, 0x02, 0x66, 0x00, 0x00, 0x60, 0x00, 0x02, 0x12, 0xf7, 0xca,
-       0x02, 0x00, 0x02, 0x76, 0x02, 0x00, 0x04, 0x2a, 0x02, 0x00, 0xc6, 0x6a,
-       0x02, 0x90, 0x02, 0xe6, 0x00, 0x00, 0x60, 0x00, 0x02, 0x96, 0xd6, 0xca,
-       0x02, 0x90, 0x02, 0xf6, 0x00, 0x00, 0x04, 0x28, 0x00, 0x00, 0xc6, 0x68,
-       0x02, 0x00, 0x02, 0x66, 0x00, 0x00, 0x04, 0x28, 0x00, 0x00, 0xc6, 0x68,
-       0x00, 0x00, 0x20, 0x00, 0x02, 0x10, 0x85, 0xca, 0x02, 0x00, 0x02, 0x76,
-       0x00, 0x00, 0x04, 0x28, 0x00, 0x00, 0xc6, 0x68, 0x02, 0x80, 0x02, 0x66,
-       0x02, 0x00, 0x04, 0x2a, 0x02, 0x00, 0xc6, 0x6a, 0x00, 0x00, 0x20, 0x00,
-       0x02, 0x96, 0x95, 0xca, 0x02, 0x90, 0x02, 0xf6, 0x00, 0x00, 0x04, 0x28,
-       0x00, 0x00, 0xc6, 0x68, 0x01, 0x80, 0x02, 0x64, 0x00, 0x00, 0x60, 0x00,
-       0x02, 0x0f, 0xdf, 0x5a, 0x02, 0x00, 0x02, 0x76, 0x02, 0x00, 0x04, 0x2a,
-       0x02, 0x00, 0xc6, 0x6a, 0x02, 0x90, 0x02, 0xe6, 0x00, 0x00, 0x60, 0x00,
-       0x02, 0x96, 0x10, 0xca, 0x02, 0x90, 0x02, 0xf6, 0x00, 0x00, 0x04, 0x28,
-       0x00, 0x00, 0xc6, 0x68, 0x02, 0x00, 0x02, 0x66, 0x00, 0x00, 0x60, 0x00,
-       0x02, 0x11, 0xef, 0xca, 0x02, 0x00, 0x02, 0x76, 0x00, 0x00, 0x04, 0x28,
-       0x00, 0x00, 0xc6, 0x68, 0x02, 0x80, 0x02, 0x66, 0x02, 0x00, 0x04, 0x2a,
-       0x02, 0x00, 0xc6, 0x6a, 0x00, 0x00, 0x20, 0x00, 0x02, 0x95, 0xae, 0xca,
-       0x02, 0x90, 0x02, 0xf6, 0x02, 0x00, 0x06, 0x2a, 0x02, 0x00, 0xc6, 0x6a,
-       0x02, 0x10, 0x02, 0xe6, 0x00, 0x00, 0x06, 0x28, 0x00, 0x00, 0xc6, 0x68,
-       0x00, 0x00, 0x20, 0x00, 0x02, 0x10, 0x21, 0x0a, 0x02, 0x00, 0x02, 0x76,
-       0x00, 0x00, 0x06, 0x28, 0x00, 0x00, 0xc6, 0x68, 0x01, 0x80, 0x02, 0x64,
-       0x00, 0x00, 0x06, 0x28, 0x00, 0x00, 0xc6, 0x68, 0x00, 0x00, 0x20, 0x00,
-       0x01, 0x8d, 0xae, 0xc8, 0x01, 0x8d, 0x0c, 0x88, 0x01, 0x80, 0x02, 0x74,
-       0x00, 0x00, 0x06, 0x28, 0x00, 0x00, 0xc6, 0x68, 0x02, 0x00, 0x02, 0x66,
-       0x00, 0x00, 0x06, 0x28, 0x00, 0x00, 0xc6, 0x68, 0x00, 0x00, 0x20, 0x00,
-       0x02, 0x10, 0xa7, 0xca, 0x02, 0x00, 0x02, 0x76, 0x00, 0x00, 0x06, 0x28,
-       0x00, 0x00, 0xc6, 0x68, 0x00, 0x00, 0x02, 0x64, 0x02, 0x00, 0x06, 0x2a,
-       0x02, 0x00, 0xc6, 0x6a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x02, 0x31, 0xc8,
-       0x00, 0x02, 0x10, 0x88, 0x00, 0x10, 0x02, 0xf4, 0x00, 0x00, 0x06, 0x28,
-       0x00, 0x00, 0xc6, 0x68, 0x02, 0x80, 0x02, 0x66, 0x02, 0x00, 0x06, 0x2a,
-       0x02, 0x00, 0xc6, 0x6a, 0x00, 0x00, 0x20, 0x00, 0x02, 0x96, 0x74, 0xca,
-       0x02, 0x90, 0x02, 0xf6, 0x00, 0x00, 0x06, 0x28, 0x00, 0x00, 0xc6, 0x68,
-       0x02, 0x80, 0x02, 0x66, 0x02, 0x00, 0x06, 0x2a, 0x02, 0x00, 0xc6, 0x6a,
-       0x00, 0x00, 0x20, 0x00, 0x02, 0x96, 0x52, 0x8a, 0x02, 0x90, 0x02, 0xf6,
-       0x02, 0x00, 0x08, 0x2a, 0x02, 0x00, 0xc6, 0x6a, 0x02, 0x10, 0x02, 0xe6,
-       0x00, 0x00, 0x08, 0x28, 0x00, 0x00, 0xc6, 0x68, 0x00, 0x00, 0x20, 0x00,
-       0x02, 0x10, 0x21, 0x0a, 0x02, 0x00, 0x02, 0x76, 0x00, 0x00, 0x08, 0x28,
-       0x00, 0x00, 0xc6, 0x68, 0x00, 0x00, 0x02, 0x64, 0x02, 0x00, 0x08, 0x2a,
-       0x02, 0x00, 0xc6, 0x6a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x01, 0xae, 0xc8,
-       0x00, 0x01, 0x0c, 0x88, 0x00, 0x10, 0x02, 0xf4, 0x02, 0x00, 0x08, 0x2a,
-       0x02, 0x00, 0xc6, 0x6a, 0x02, 0x10, 0x02, 0xe6, 0x00, 0x00, 0x08, 0x28,
-       0x00, 0x00, 0xc6, 0x68, 0x00, 0x00, 0x20, 0x00, 0x02, 0x10, 0xa7, 0xca,
-       0x02, 0x00, 0x02, 0x76, 0x02, 0x00, 0x08, 0x2a, 0x02, 0x00, 0xc6, 0x6a,
-       0x02, 0x90, 0x02, 0xe6, 0x02, 0x00, 0x08, 0x2a, 0x02, 0x00, 0xc6, 0x6a,
-       0x00, 0x00, 0x20, 0x00, 0x02, 0x96, 0x31, 0xca, 0x02, 0x96, 0x10, 0x8a,
-       0x02, 0x90, 0x02, 0xf6, 0x02, 0x00, 0x08, 0x2a, 0x02, 0x00, 0xc6, 0x6a,
-       0x02, 0x10, 0x02, 0xe6, 0x00, 0x00, 0x08, 0x28, 0x00, 0x00, 0xc6, 0x68,
-       0x00, 0x00, 0x20, 0x00, 0x02, 0x12, 0x74, 0xca, 0x02, 0x00, 0x02, 0x76,
-       0x02, 0x00, 0x08, 0x2a, 0x02, 0x00, 0xc6, 0x6a, 0x02, 0x90, 0x02, 0xe6,
-       0x02, 0x00, 0x08, 0x2a, 0x02, 0x00, 0xc6, 0x6a, 0x00, 0x00, 0x20, 0x00,
-       0x02, 0x96, 0x52, 0x8a, 0x02, 0x90, 0x02, 0xf6, 0x90, 0x00, 0x19, 0x90,
-       0x90, 0x19, 0x2e, 0x28, 0x90, 0x00, 0x00, 0x68, 0x90, 0x00, 0x02, 0x64,
-       0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x0a, 0x28, 0x00, 0x00, 0xc6, 0x68,
-       0x01, 0x80, 0x02, 0x64, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x0a, 0x28,
-       0x01, 0x8f, 0xbd, 0x88, 0x00, 0x00, 0xc6, 0x68, 0x01, 0x80, 0x02, 0x74,
-       0x00, 0x00, 0x0a, 0x28, 0x00, 0x00, 0xc6, 0x68, 0x00, 0x00, 0x02, 0x64,
-       0x02, 0x00, 0x0a, 0x2a, 0x02, 0x00, 0xc6, 0x6a, 0x00, 0x00, 0x20, 0x00,
-       0x00, 0x03, 0x9c, 0x88, 0x00, 0x10, 0x02, 0xf4, 0x02, 0x00, 0x0a, 0x2a,
-       0x02, 0x00, 0xc6, 0x6a, 0x00, 0x10, 0x02, 0xe4, 0x02, 0x00, 0x0a, 0x2a,
-       0x02, 0x00, 0xc6, 0x6a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x03, 0x1b, 0xc8,
-       0x00, 0x02, 0x17, 0x88, 0x00, 0x10, 0x02, 0xf4, 0x00, 0x19, 0x2e, 0x28,
-       0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x64, 0x02, 0x00, 0x0a, 0x2a,
-       0x02, 0x00, 0xc6, 0x6a, 0x02, 0x10, 0x02, 0xe6, 0x00, 0x00, 0x00, 0x00,
-       0x01, 0x82, 0x22, 0x64, 0x00, 0x00, 0x0a, 0x28, 0x00, 0x00, 0xc6, 0x68,
-       0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x07, 0xca, 0x02, 0x0c, 0x9f, 0xfa,
-       0x02, 0x00, 0x02, 0x76, 0x00, 0x19, 0x2e, 0x28, 0x00, 0x00, 0x00, 0x68,
-       0x00, 0x00, 0x02, 0x64, 0x00, 0x00, 0x60, 0x00, 0x03, 0x00, 0x80, 0x58,
-       0x03, 0x00, 0x10, 0x2a, 0x02, 0x04, 0x03, 0xe3, 0x00, 0x00, 0x00, 0x00,
-       0x02, 0x18, 0x56, 0x15, 0x02, 0x93, 0xcf, 0x5a, 0x00, 0x94, 0x03, 0xa2,
-       0x02, 0x18, 0x56, 0x14, 0x00, 0x00, 0x20, 0x00, 0x02, 0x98, 0x56, 0x15,
-       0x00, 0x90, 0x2a, 0x58, 0x81, 0x98, 0xa0, 0x14, 0x04, 0x04, 0x00, 0x59,
-       0x00, 0x00, 0x04, 0x12, 0x00, 0x90, 0x2a, 0x59, 0x02, 0x98, 0x56, 0x14,
-       0x00, 0x1b, 0x40, 0x5b, 0x03, 0x80, 0x00, 0xf9, 0x02, 0x00, 0x00, 0xa9,
-       0x81, 0x98, 0xa0, 0x14, 0x01, 0x20, 0x00, 0x59, 0x04, 0x04, 0x01, 0xa1,
-       0x20, 0x00, 0x00, 0x12, 0xa0, 0x10, 0x6c, 0xe1, 0x00, 0x94, 0x2a, 0x59,
-       0x02, 0x98, 0x56, 0x15, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-       0xa3, 0x9c, 0x0f, 0xf9, 0x20, 0x03, 0xe0, 0x5b, 0x81, 0x98, 0xa0, 0x14,
-       0x04, 0x04, 0x00, 0x59, 0x01, 0x20, 0x01, 0xa0, 0x00, 0x94, 0x2a, 0x59,
-       0xa0, 0x10, 0x6c, 0xe1, 0x00, 0x00, 0x00, 0x00, 0xa3, 0x9c, 0x0f, 0xf9,
-       0x81, 0x98, 0x60, 0x14, 0x04, 0x04, 0x00, 0x59, 0x01, 0x20, 0x01, 0xa0,
-       0x00, 0x94, 0x2a, 0x59, 0xa0, 0x10, 0x6c, 0xe0, 0xa3, 0x9c, 0x0f, 0xf9,
-       0x81, 0x98, 0x20, 0x14, 0x02, 0x84, 0x00, 0x59, 0x01, 0x20, 0x01, 0xa0,
-       0xa0, 0x10, 0x6c, 0xe0, 0x01, 0x14, 0x01, 0xa1, 0xa3, 0x9c, 0x0f, 0xf8,
-       0x00, 0x90, 0x03, 0xa2, 0xa0, 0x10, 0x6c, 0xe0, 0xa3, 0x9c, 0x0f, 0xf8,
-       0x02, 0x00, 0x0c, 0x2b, 0x00, 0x00, 0x00, 0xa8, 0x02, 0x00, 0xc6, 0x6b,
-       0x00, 0x00, 0x01, 0xe8, 0x00, 0x10, 0x02, 0xf4, 0x02, 0x00, 0x0e, 0x2a,
-       0x02, 0x00, 0xc6, 0x6a, 0x03, 0x90, 0x02, 0xf4, 0x00, 0x00, 0x10, 0x28,
-       0x00, 0x00, 0xc6, 0x68, 0x03, 0x80, 0x02, 0x74, 0x00, 0x0c, 0x03, 0x62,
-       0x00, 0x00, 0x80, 0x00, 0x00, 0x0c, 0x03, 0x62, 0x00, 0x00, 0x80, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x28, 0x00, 0x00, 0xc0, 0x69,
-       0x02, 0x00, 0x10, 0x2a, 0x02, 0x00, 0x02, 0x76, 0x00, 0x0c, 0x03, 0x62,
-       0x00, 0x00, 0x80, 0x00, 0x01, 0xbc, 0x54, 0xf6, 0x02, 0x04, 0x03, 0xe2,
-       0x02, 0x13, 0xcf, 0x5a, 0x00, 0x90, 0x03, 0xa2, 0x02, 0x18, 0x50, 0x2a,
-       0x02, 0x00, 0x00, 0x6a, 0x00, 0x10, 0x03, 0x62, 0x01, 0x97, 0x30, 0x2a,
-       0x01, 0x80, 0x00, 0x6a, 0x00, 0x00, 0x40, 0x00, 0x00, 0x17, 0xb4, 0x28,
-       0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x13, 0x62, 0x01, 0x97, 0x3c, 0x2a,
-       0x01, 0x80, 0x00, 0x6a, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, 0x29,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x69, 0x02, 0x00, 0x10, 0x2a,
-       0x02, 0x00, 0x02, 0x76, 0x00, 0x14, 0x4e, 0x28, 0x00, 0x00, 0x00, 0x68,
-       0x00, 0x00, 0x13, 0x62, 0x01, 0x97, 0x52, 0x2a, 0x01, 0x80, 0x00, 0x6a,
-       0x00, 0x00, 0x40, 0x00, 0x00, 0x11, 0x94, 0x28, 0x00, 0x00, 0x00, 0x68,
-       0x00, 0x00, 0x13, 0x62, 0x01, 0x97, 0x5e, 0x2a, 0x01, 0x80, 0x00, 0x6a,
-       0x00, 0x00, 0x40, 0x00, 0x02, 0x11, 0x4c, 0x2a, 0x02, 0x00, 0x00, 0x6a,
-       0x00, 0x10, 0x03, 0x62, 0x01, 0x97, 0x6c, 0x2a, 0x01, 0x80, 0x00, 0x6a,
-       0x02, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x20, 0x00, 0x00, 0x11, 0x4c, 0x28,
-       0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x13, 0x62, 0x01, 0x97, 0x7a, 0x2a,
-       0x01, 0x80, 0x00, 0x6a, 0x02, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x20, 0x00,
-       0x02, 0x04, 0x03, 0xe2, 0x00, 0x12, 0x00, 0x28, 0x02, 0x00, 0x9f, 0xfa,
-       0x00, 0x90, 0x03, 0xa2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
-       0x01, 0xbc, 0x52, 0xe6, 0x00, 0x00, 0x60, 0x00, 0x00, 0x0c, 0x03, 0x62,
-       0x00, 0x00, 0x80, 0x00, 0x07, 0xae, 0xfe, 0x2a, 0x07, 0x80, 0x00, 0x6a,
-       0x00, 0x10, 0x00, 0x28, 0x02, 0x80, 0x13, 0xa2, 0x0f, 0xff, 0xe3, 0x12,
-       0x00, 0x00, 0x80, 0x00, 0x00, 0x0c, 0x03, 0x62, 0x00, 0x00, 0x80, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x0c, 0x03, 0x62, 0x00, 0x00, 0x80, 0x00, 0x00, 0x19, 0x30, 0x28,
-       0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x64, 0x00, 0x00, 0x60, 0x00,
-       0x00, 0x80, 0x02, 0x64, 0x00, 0x00, 0x60, 0x00, 0x90, 0x00, 0x20, 0x90,
-       0x01, 0x04, 0x2a, 0x58, 0x00, 0x00, 0x60, 0x00, 0xa0, 0x00, 0x0a, 0x10,
-       0x00, 0x00, 0x80, 0x00, 0x02, 0x00, 0x00, 0xfa, 0x02, 0x00, 0xc0, 0x6a,
-       0x02, 0x90, 0x02, 0xe6, 0x03, 0x00, 0x08, 0x2a, 0x00, 0x00, 0x40, 0x00,
-       0x02, 0x94, 0xcd, 0xfa, 0x02, 0x90, 0x02, 0xf6, 0x00, 0x00, 0x00, 0xf8,
-       0x00, 0x00, 0xc0, 0x68, 0x01, 0x80, 0x02, 0x64, 0x00, 0x00, 0x60, 0x00,
-       0x01, 0x8d, 0x0d, 0xd8, 0x01, 0x80, 0x02, 0x74, 0x0f, 0xff, 0xfa, 0x90,
-       0x00, 0x00, 0x80, 0x00, 0x02, 0x60, 0x80, 0x2a, 0x02, 0x00, 0xdb, 0xeb,
-       0x01, 0x80, 0x00, 0xf8, 0x01, 0x90, 0x02, 0xf4, 0x02, 0x60, 0x80, 0x2a,
-       0x02, 0x00, 0xdb, 0xeb, 0x02, 0x00, 0x04, 0x28, 0x02, 0x10, 0x02, 0xf4,
-       0x02, 0x00, 0x22, 0x66, 0x02, 0x60, 0x88, 0x28, 0x02, 0x00, 0xdb, 0xe8,
-       0x00, 0x00, 0x20, 0x00, 0x02, 0x10, 0x02, 0x76, 0x02, 0x80, 0x42, 0x66,
-       0x02, 0x60, 0x8a, 0x2a, 0x02, 0x00, 0xdb, 0xea, 0x00, 0x00, 0x20, 0x00,
-       0x02, 0x90, 0x02, 0xf6, 0x02, 0x00, 0xc2, 0x66, 0x02, 0x60, 0x92, 0x28,
-       0x02, 0x00, 0xdb, 0xe8, 0x00, 0x00, 0x20, 0x00, 0x02, 0x10, 0x02, 0x76,
-       0x02, 0x80, 0x62, 0x66, 0x02, 0x60, 0x8c, 0x2a, 0x02, 0x00, 0xdb, 0xea,
-       0x00, 0x00, 0x20, 0x00, 0x02, 0x90, 0x02, 0xf6, 0x02, 0x00, 0x82, 0x66,
-       0x02, 0x60, 0x8e, 0x28, 0x02, 0x00, 0xdb, 0xe8, 0x00, 0x00, 0x20, 0x00,
-       0x02, 0x10, 0x02, 0x76, 0x00, 0x00, 0xa2, 0x64, 0x02, 0x60, 0x90, 0x2a,
-       0x02, 0x00, 0xdb, 0xea, 0x00, 0x00, 0x20, 0x00, 0x00, 0x10, 0x02, 0xf4,
-       0x02, 0x60, 0x80, 0x2a, 0x02, 0x00, 0xdb, 0xea, 0x01, 0x90, 0x02, 0xf4,
-       0x02, 0x60, 0x80, 0x2a, 0x02, 0x00, 0xdb, 0xeb, 0x00, 0x00, 0x00, 0xa8,
-       0x00, 0x10, 0x02, 0xf4, 0x00, 0x0c, 0x03, 0x62, 0x00, 0x00, 0x80, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x19, 0x2a, 0x2a,
-       0x02, 0x84, 0x20, 0xfb, 0x02, 0x00, 0x00, 0x6a, 0x02, 0x90, 0x02, 0xf6,
-       0x02, 0x98, 0xe0, 0x2a, 0x02, 0x19, 0x2c, 0x2a, 0x02, 0x00, 0x00, 0x6b,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x29, 0x02, 0x80, 0x00, 0x6a,
-       0x03, 0x94, 0x10, 0x59, 0x00, 0x10, 0x02, 0xf4, 0x00, 0x00, 0x12, 0xaa,
-       0x00, 0x80, 0x00, 0xa8, 0x04, 0x08, 0x00, 0x28, 0x04, 0x00, 0x00, 0x68,
-       0x20, 0x03, 0xe0, 0x5b, 0x90, 0x14, 0x02, 0x64, 0x20, 0x00, 0x00, 0x12,
-       0x93, 0x1c, 0x36, 0x74, 0x00, 0x00, 0x00, 0x00, 0x03, 0x20, 0x02, 0x65,
-       0x02, 0x19, 0x2a, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x79,
-       0x01, 0xa0, 0x36, 0x65, 0x02, 0x00, 0x00, 0x68, 0x80, 0x87, 0xe0, 0x59,
-       0x90, 0x14, 0x02, 0x75, 0x02, 0x90, 0x01, 0xa0, 0x00, 0x14, 0x02, 0x64,
-       0x00, 0x00, 0x40, 0x00, 0x03, 0x1c, 0x36, 0x74, 0x00, 0x00, 0x60, 0x78,
-       0x00, 0x14, 0x02, 0x74, 0x00, 0x19, 0x2a, 0x28, 0x00, 0x00, 0x00, 0x68,
-       0x00, 0x18, 0xe0, 0x29, 0x00, 0x00, 0x02, 0x66, 0x00, 0x00, 0x00, 0x68,
-       0x00, 0x00, 0x40, 0x00, 0x31, 0x80, 0x80, 0x59, 0x32, 0x19, 0x2e, 0x2a,
-       0x32, 0x00, 0x00, 0x6a, 0x31, 0x90, 0x02, 0xf4, 0x30, 0x02, 0x9d, 0x41,
-       0x32, 0x19, 0x30, 0x2a, 0x32, 0x00, 0x00, 0x6a, 0x30, 0x10, 0x02, 0xf4,
-       0x30, 0x00, 0x09, 0x12, 0x00, 0x00, 0x80, 0x00, 0x02, 0x80, 0x00, 0xfa,
-       0x02, 0x80, 0xc0, 0x6a, 0x03, 0x14, 0x02, 0xe6, 0x02, 0x00, 0x08, 0x2a,
-       0x00, 0x00, 0x40, 0x00, 0x02, 0x18, 0x8d, 0xfa, 0x02, 0x14, 0x02, 0xf6,
-       0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0xc0, 0x68, 0x01, 0x80, 0x02, 0x64,
-       0x00, 0x00, 0x60, 0x00, 0x01, 0x8d, 0x0d, 0xd8, 0x01, 0x80, 0x02, 0x74,
-       0x0f, 0xff, 0xf9, 0x90, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0c, 0x03, 0x62,
-       0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-};
-
-static int load_bootstrap(void)
-{
-       const u8 *s = bootstrap_rbin;
-       u32 l = sizeof(bootstrap_rbin);
-       const u8 *data, *hdr, *h;
-       u32 chksum, chksum2;
-       int i, j, rangenr;
-       u32 start, length;
-
-       if (l < 12) {
-               printf("bootstrap image corrupted. (too short header)\n");
-               return -1;
-       }
-
-       chksum  = ((u32)s[4] << 24) | ((u32)s[5] << 16) | ((u32)s[ 6] <<  8) |  (u32)s[ 7];
-       rangenr = ((u32)s[8] << 24) | ((u32)s[9] << 16) | ((u32)s[10] <<  8) |  (u32)s[11];
-       s += 12; l -= 12;
-
-       hdr = s;
-       s += 8 * rangenr; l -= 8 * rangenr;
-       data = s;
-
-       /* validate bootstrap image */
-       h = hdr; s = data; chksum2 = 0;
-       for (i = 0; i < rangenr; i++) {
-               start  = ((u32)h[0] << 24) | ((u32)h[1] << 16) | ((u32)h[2] <<  8) |  (u32)h[3];
-               length = ((u32)h[4] << 24) | ((u32)h[5] << 16) | ((u32)h[6] <<  8) |  (u32)h[7];
-               h += 8;
-
-               /* too short */
-               if (l < length) {
-                       printf("bootstrap image corrupted. (too short data)\n");
-                       return -1;
-               }
-               l -= length;
-
-               j = (int)length / 4;
-               while (j-- > 0) {
-                       chksum2 += ((u32)s[0] << 24) | ((u32)s[1] << 16) | ((u32)s[2] <<  8) |  (u32)s[3];
-                       s += 4;
-               }
-       }
-
-       /* checksum must match */
-       if (chksum != chksum2) {
-               printf("bootstrap image corrupted. (checksum error)\n");
-               return -1;
-       }
-
-       /* nothing must be left */
-       if (l != 0) {
-               printf("bootstrap image corrupted. (garbage at the end)\n");
-               return -1;
-       }
-
-       /* write the image */
-       h = hdr;
-       s = data;
-       for (i = 0; i < rangenr; i++) {
-               start  = ((u32)h[0] << 24) | ((u32)h[1] << 16) | ((u32)h[2] <<  8) |  (u32)h[3];
-               length = ((u32)h[4] << 24) | ((u32)h[5] << 16) | ((u32)h[6] <<  8) |  (u32)h[7];
-               h += 8;
-               c62_write(start, (u32 *)s, length / 4);
-               s += length;
-       }
-
-       /* and now validate checksum */
-       h = hdr;
-       s = data;
-       chksum2 = 0;
-       for (i = 0; i < rangenr; i++) {
-               start  = ((u32)h[0] << 24) | ((u32)h[1] << 16) | ((u32)h[2] <<  8) |  (u32)h[3];
-               length = ((u32)h[4] << 24) | ((u32)h[5] << 16) | ((u32)h[6] <<  8) |  (u32)h[7];
-               h += 8;
-               chksum2 += c62_checksum(start, length / 4);
-               s += length;
-       }
-
-       /* checksum must match */
-       if (chksum != chksum2) {
-               printf("bootstrap in DSP memory is corrupted\n");
-               return -1;
-       }
-
-       return 0;
-}
-
-struct host_init {
-       u32 master_mode;
-       struct {
-               u8 port_id;
-               u8 slot_id;
-       } ch_serial_map[32];
-       u32 clk_divider[2];
-       /* pll */
-       u32 initmode;
-       u32 pllm;
-       u32 div[4];
-       u32 oscdiv1;
-       u32 unused[10];
-};
-
-const struct host_init hi_default = {
-       .master_mode    =
-#if !defined(CONFIG_NETTA_ISDN)
-               -1,
-#else
-               0,
-#endif
-
-       .ch_serial_map  = {
-               [ 0]    = { .port_id = 2, .slot_id = 16 },
-               [ 1]    = { .port_id = 2, .slot_id = 17 },
-               [ 2]    = { .port_id = 2, .slot_id = 18 },
-               [ 3]    = { .port_id = 2, .slot_id = 19 },
-               [ 4]    = { .port_id = 2, .slot_id = 20 },
-               [ 5]    = { .port_id = 2, .slot_id = 21 },
-               [ 6]    = { .port_id = 2, .slot_id = 22 },
-               [ 7]    = { .port_id = 2, .slot_id = 23 },
-               [ 8]    = { .port_id = 2, .slot_id = 24 },
-               [ 9]    = { .port_id = 2, .slot_id = 25 },
-               [10]    = { .port_id = 2, .slot_id = 26 },
-               [11]    = { .port_id = 2, .slot_id = 27 },
-               [12]    = { .port_id = 2, .slot_id = 28 },
-               [13]    = { .port_id = 2, .slot_id = 29 },
-               [14]    = { .port_id = 2, .slot_id = 30 },
-               [15]    = { .port_id = 2, .slot_id = 31 },
-       },
-
-       /*
-          dsp_clk(xin, pllm)         = xin * pllm
-          serial_clk(xin, pllm, div) = (dsp_clk(xin, pllm) / 2) / (div + 1)
-        */
-
-       .clk_divider    = {
-               [0]     = 47,           /* must be 2048Hz */
-               [1]     = 47,
-       },
-
-       .initmode       = 1,
-       .pllm           =
-#if !defined(CONFIG_NETTA_ISDN)
-       8,              /* for =~ 25MHz 8 */
-#else
-       4,
-#endif
-       .div            = {
-               [0]     = 0x8000,
-               [1]     = 0x8000,       /* for =~ 25MHz 0x8000 */
-               [2]     = 0x8001,       /* for =~ 25MHz 0x8001 */
-               [3]     = 0x8001,       /* for =~ 25MHz 0x8001 */
-       },
-
-       .oscdiv1        = 0,
-};
-
-static void hi_write(const struct host_init *hi)
-{
-       u32 hi_buf[1 + sizeof(*hi) / sizeof(u32)];
-       u32 *s;
-       u32 chksum;
-       int i;
-
-       memset(hi_buf, 0, sizeof(hi_buf));
-
-       s = hi_buf;
-       s++;
-       *s++ = hi->master_mode;
-       for (i = 0; i < (sizeof(hi->ch_serial_map) / sizeof(hi->ch_serial_map[0])) / 2; i++)
-               *s++ = ((u32)hi->ch_serial_map[i * 2 + 1].slot_id << 24) | ((u32)hi->ch_serial_map[i * 2 + 1].port_id << 16) |
-                               ((u32)hi->ch_serial_map[i * 2 + 0].slot_id << 8) | (u32)hi->ch_serial_map[i * 2 + 0].port_id;
-
-       for (i = 0; i < sizeof(hi->clk_divider)/sizeof(hi->clk_divider[0]); i++)
-               *s++ = hi->clk_divider[i];
-
-       *s++ = hi->initmode;
-       *s++ = hi->pllm;
-       for (i = 0; i < sizeof(hi->div)/sizeof(hi->div[0]); i++)
-               *s++ = hi->div[i];
-       *s++ = hi->oscdiv1;
-
-       chksum = 0;
-       for (i = 1; i < sizeof(hi_buf)/sizeof(hi_buf[0]); i++)
-               chksum += hi_buf[i];
-       hi_buf[0] = -chksum;
-
-       c62_write(0x1000, hi_buf, sizeof(hi_buf) / sizeof(hi_buf[0]));
-}
-
-static void run_bootstrap(void)
-{
-       dsp_go_slow();
-
-       hi_write(&hi_default);
-
-       /* signal interrupt */
-       dsp_write_hpic(0x0002);
-       dsp_delay();
-
-       dsp_go_fast();
-}
-
-#endif
-
-/***********************************************************************************************************/
-
-int board_post_dsp(int flags)
-{
-       u32 ramS, ramE;
-       u32 data, data2;
-       int i, j, k;
-#if !defined(CONFIG_NETTA_6412)
-       int r;
-#endif
-       dsp_reset();
-       dsp_init_hpic();
-#if !defined(CONFIG_NETTA_6412)
-       dsp_go_slow();
-#endif
-       data = 0x11223344;
-       dsp_write_hpic_word(DSP_HPIA, data);
-       data2 = dsp_read_hpic_word(DSP_HPIA);
-       if (data2 !=   0x11223344) {
-               printf("HPIA: ** ERROR; wrote 0x%08X read 0x%08X **\n", data, data2);
-               goto err;
-       }
-
-       data = 0xFFEEDDCC;
-       dsp_write_hpic_word(DSP_HPIA, data);
-       data2 = dsp_read_hpic_word(DSP_HPIA);
-       if (data2 != 0xFFEEDDCC) {
-               printf("HPIA: ** ERROR; wrote 0x%08X read 0x%08X **\n", data, data2);
-               goto err;
-       }
-#if defined(CONFIG_NETTA_6412)
-       dsp_dram_initialize();
-#else
-       r = load_bootstrap();
-       if (r < 0) {
-               printf("BOOTSTRAP: ** ERROR ** failed to load\n");
-               goto err;
-       }
-
-       run_bootstrap();
-
-       dsp_go_fast();
-#endif
-       printf("    ");
-
-       /* test RAMs */
-       for (k = 0; k < sizeof(ranges)/sizeof(ranges[0]); k++) {
-
-               ramS = ranges[k].start;
-               ramE = ranges[k].start + ranges[k].size;
-
-               for (j = 0; j < 3; j++) {
-
-                       printf("\b\b\b\bR%d.%d", k, j);
-
-                       for (i = ramS; i < ramE; i += 4) {
-
-                               data = 0;
-                               switch (j) {
-                                       case 0: data = 0xAA55AA55; break;
-                                       case 1: data = 0x55AA55AA; break;
-                                       case 2: data = (u32)i;     break;
-                               }
-
-                               c62_write_word(i, data);
-                               data2 = c62_read_word(i);
-                               if (data != data2) {
-                                       printf(" ** ERROR at 0x%08X; wrote 0x%08X read 0x%08X **\n", i, data, data2);
-                                       goto err;
-                               }
-                       }
-               }
-       }
-
-       printf("\b\b\b\b    \b\b\b\bOK\n");
-#if !defined(CONFIG_NETTA_6412)
-       /* XXX assume that this works */
-       load_bootstrap();
-       run_bootstrap();
-       dsp_go_fast();
-#endif
-       return 0;
-
-err:
-       return -1;
-}
-
-int board_dsp_reset(void)
-{
-#if !defined(CONFIG_NETTA_6412)
-       int r;
-#endif
-       dsp_reset();
-       dsp_init_hpic();
-#if defined(CONFIG_NETTA_6412)
-       dsp_dram_initialize();
-#else
-       dsp_go_slow();
-       r = load_bootstrap();
-       if (r < 0)
-               return r;
-
-       run_bootstrap();
-       dsp_go_fast();
-#endif
-       return 0;
-}
diff --git a/board/netta/flash.c b/board/netta/flash.c
deleted file mode 100644 (file)
index d6902a6..0000000
+++ /dev/null
@@ -1,492 +0,0 @@
-/*
- * (C) Copyright 2000-2004
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <common.h>
-#include <mpc8xx.h>
-
-flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS];   /* info for FLASH chips    */
-
-/*-----------------------------------------------------------------------
- * Functions
- */
-static ulong flash_get_size(vu_long * addr, flash_info_t * info);
-static int write_byte(flash_info_t * info, ulong dest, uchar data);
-static void flash_get_offsets(ulong base, flash_info_t * info);
-
-/*-----------------------------------------------------------------------
- */
-
-unsigned long flash_init(void)
-{
-       volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
-       volatile memctl8xx_t *memctl = &immap->im_memctl;
-       unsigned long size;
-       int i;
-
-       /* Init: no FLASHes known */
-       for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; ++i)
-               flash_info[i].flash_id = FLASH_UNKNOWN;
-
-       size = flash_get_size((vu_long *) FLASH_BASE0_PRELIM, &flash_info[0]);
-
-       if (flash_info[0].flash_id == FLASH_UNKNOWN) {
-               printf("## Unknown FLASH on Bank 0 - Size = 0x%08lx = %ld MB\n", size, size << 20);
-       }
-
-       /* Remap FLASH according to real size */
-       memctl->memc_or0 = CONFIG_SYS_OR_TIMING_FLASH | (-size & 0xFFFF8000);
-       memctl->memc_br0 = (CONFIG_SYS_FLASH_BASE & BR_BA_MSK) | (memctl->memc_br0 & ~(BR_BA_MSK));
-
-       /* Re-do sizing to get full correct info */
-       size = flash_get_size((vu_long *) CONFIG_SYS_FLASH_BASE, &flash_info[0]);
-
-       flash_get_offsets(CONFIG_SYS_FLASH_BASE, &flash_info[0]);
-
-       /* monitor protection ON by default */
-       flash_protect(FLAG_PROTECT_SET,
-                       CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FLASH_BASE + monitor_flash_len - 1,
-                       &flash_info[0]);
-
-       flash_protect ( FLAG_PROTECT_SET,
-                       CONFIG_ENV_ADDR,
-                       CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1,
-                       &flash_info[0]);
-
-#ifdef CONFIG_ENV_ADDR_REDUND
-       flash_protect ( FLAG_PROTECT_SET,
-                       CONFIG_ENV_ADDR_REDUND,
-                       CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1,
-                       &flash_info[0]);
-#endif
-
-
-       flash_info[0].size = size;
-
-       return (size);
-}
-
-/*-----------------------------------------------------------------------
- */
-static void flash_get_offsets(ulong base, flash_info_t * info)
-{
-       int i;
-
-       /* set up sector start address table */
-       if ((info->flash_id & FLASH_TYPEMASK) == FLASH_AM040) {
-               for (i = 0; i < info->sector_count; i++) {
-                       info->start[i] = base + (i * 0x00010000);
-               }
-       } else if (info->flash_id & FLASH_BTYPE) {
-               /* set sector offsets for bottom boot block type    */
-               info->start[0] = base + 0x00000000;
-               info->start[1] = base + 0x00004000;
-               info->start[2] = base + 0x00006000;
-               info->start[3] = base + 0x00008000;
-               for (i = 4; i < info->sector_count; i++) {
-                       info->start[i] = base + (i * 0x00010000) - 0x00030000;
-               }
-       } else {
-               /* set sector offsets for top boot block type       */
-               i = info->sector_count - 1;
-               info->start[i--] = base + info->size - 0x00004000;
-               info->start[i--] = base + info->size - 0x00006000;
-               info->start[i--] = base + info->size - 0x00008000;
-               for (; i >= 0; i--) {
-                       info->start[i] = base + i * 0x00010000;
-               }
-       }
-
-}
-
-/*-----------------------------------------------------------------------
- */
-void flash_print_info(flash_info_t * info)
-{
-       int i;
-
-       if (info->flash_id == FLASH_UNKNOWN) {
-               printf("missing or unknown FLASH type\n");
-               return;
-       }
-
-       switch (info->flash_id & FLASH_VENDMASK) {
-       case FLASH_MAN_AMD:
-               printf("AMD ");
-               break;
-       case FLASH_MAN_FUJ:
-               printf("FUJITSU ");
-               break;
-       case FLASH_MAN_MX:
-               printf("MXIC ");
-               break;
-       default:
-               printf("Unknown Vendor ");
-               break;
-       }
-
-       switch (info->flash_id & FLASH_TYPEMASK) {
-       case FLASH_AM040:
-               printf("AM29LV040B (4 Mbit, bottom boot sect)\n");
-               break;
-       case FLASH_AM400B:
-               printf("AM29LV400B (4 Mbit, bottom boot sect)\n");
-               break;
-       case FLASH_AM400T:
-               printf("AM29LV400T (4 Mbit, top boot sector)\n");
-               break;
-       case FLASH_AM800B:
-               printf("AM29LV800B (8 Mbit, bottom boot sect)\n");
-               break;
-       case FLASH_AM800T:
-               printf("AM29LV800T (8 Mbit, top boot sector)\n");
-               break;
-       case FLASH_AM160B:
-               printf("AM29LV160B (16 Mbit, bottom boot sect)\n");
-               break;
-       case FLASH_AM160T:
-               printf("AM29LV160T (16 Mbit, top boot sector)\n");
-               break;
-       case FLASH_AM320B:
-               printf("AM29LV320B (32 Mbit, bottom boot sect)\n");
-               break;
-       case FLASH_AM320T:
-               printf("AM29LV320T (32 Mbit, top boot sector)\n");
-               break;
-       default:
-               printf("Unknown Chip Type\n");
-               break;
-       }
-
-       printf("  Size: %ld MB in %d Sectors\n", info->size >> 20, info->sector_count);
-
-       printf("  Sector Start Addresses:");
-       for (i = 0; i < info->sector_count; ++i) {
-               if ((i % 5) == 0)
-                       printf("\n   ");
-               printf(" %08lX%s", info->start[i], info->protect[i] ? " (RO)" : "     ");
-       }
-       printf("\n");
-}
-
-/*-----------------------------------------------------------------------
- */
-
-
-/*-----------------------------------------------------------------------
- */
-
-/*
- * The following code cannot be run from FLASH!
- */
-
-static ulong flash_get_size(vu_long * addr, flash_info_t * info)
-{
-       short i;
-       uchar mid;
-       uchar pid;
-       vu_char *caddr = (vu_char *) addr;
-       ulong base = (ulong) addr;
-
-
-       /* Write auto select command: read Manufacturer ID */
-       caddr[0x0555] = 0xAA;
-       caddr[0x02AA] = 0x55;
-       caddr[0x0555] = 0x90;
-
-       mid = caddr[0];
-       switch (mid) {
-       case (AMD_MANUFACT & 0xFF):
-               info->flash_id = FLASH_MAN_AMD;
-               break;
-       case (FUJ_MANUFACT & 0xFF):
-               info->flash_id = FLASH_MAN_FUJ;
-               break;
-       case (MX_MANUFACT & 0xFF):
-               info->flash_id = FLASH_MAN_MX;
-               break;
-       case (STM_MANUFACT & 0xFF):
-               info->flash_id = FLASH_MAN_STM;
-               break;
-       default:
-               info->flash_id = FLASH_UNKNOWN;
-               info->sector_count = 0;
-               info->size = 0;
-               return (0);                             /* no or unknown flash  */
-       }
-
-       pid = caddr[1];                         /* device ID        */
-       switch (pid) {
-       case (AMD_ID_LV400T & 0xFF):
-               info->flash_id += FLASH_AM400T;
-               info->sector_count = 11;
-               info->size = 0x00080000;
-               break;                                  /* => 512 kB        */
-
-       case (AMD_ID_LV400B & 0xFF):
-               info->flash_id += FLASH_AM400B;
-               info->sector_count = 11;
-               info->size = 0x00080000;
-               break;                                  /* => 512 kB        */
-
-       case (AMD_ID_LV800T & 0xFF):
-               info->flash_id += FLASH_AM800T;
-               info->sector_count = 19;
-               info->size = 0x00100000;
-               break;                                  /* => 1 MB      */
-
-       case (AMD_ID_LV800B & 0xFF):
-               info->flash_id += FLASH_AM800B;
-               info->sector_count = 19;
-               info->size = 0x00100000;
-               break;                                  /* => 1 MB      */
-
-       case (AMD_ID_LV160T & 0xFF):
-               info->flash_id += FLASH_AM160T;
-               info->sector_count = 35;
-               info->size = 0x00200000;
-               break;                                  /* => 2 MB      */
-
-       case (AMD_ID_LV160B & 0xFF):
-               info->flash_id += FLASH_AM160B;
-               info->sector_count = 35;
-               info->size = 0x00200000;
-               break;                                  /* => 2 MB      */
-
-       case (AMD_ID_LV040B & 0xFF):
-               info->flash_id += FLASH_AM040;
-               info->sector_count = 8;
-               info->size = 0x00080000;
-               break;
-
-       case (STM_ID_M29W040B & 0xFF):
-               info->flash_id += FLASH_AM040;
-               info->sector_count = 8;
-               info->size = 0x00080000;
-               break;
-
-#if 0                                                  /* enable when device IDs are available */
-       case (AMD_ID_LV320T & 0xFF):
-               info->flash_id += FLASH_AM320T;
-               info->sector_count = 67;
-               info->size = 0x00400000;
-               break;                                  /* => 4 MB      */
-
-       case (AMD_ID_LV320B & 0xFF):
-               info->flash_id += FLASH_AM320B;
-               info->sector_count = 67;
-               info->size = 0x00400000;
-               break;                                  /* => 4 MB      */
-#endif
-       default:
-               info->flash_id = FLASH_UNKNOWN;
-               return (0);                             /* => no or unknown flash */
-
-       }
-
-       printf(" ");
-       /* set up sector start address table */
-       if ((info->flash_id & FLASH_TYPEMASK) == FLASH_AM040) {
-               for (i = 0; i < info->sector_count; i++) {
-                       info->start[i] = base + (i * 0x00010000);
-               }
-       } else if (info->flash_id & FLASH_BTYPE) {
-               /* set sector offsets for bottom boot block type    */
-               info->start[0] = base + 0x00000000;
-               info->start[1] = base + 0x00004000;
-               info->start[2] = base + 0x00006000;
-               info->start[3] = base + 0x00008000;
-               for (i = 4; i < info->sector_count; i++) {
-                       info->start[i] = base + (i * 0x00010000) - 0x00030000;
-               }
-       } else {
-               /* set sector offsets for top boot block type       */
-               i = info->sector_count - 1;
-               info->start[i--] = base + info->size - 0x00004000;
-               info->start[i--] = base + info->size - 0x00006000;
-               info->start[i--] = base + info->size - 0x00008000;
-               for (; i >= 0; i--) {
-                       info->start[i] = base + i * 0x00010000;
-               }
-       }
-
-       /* check for protected sectors */
-       for (i = 0; i < info->sector_count; i++) {
-               /* read sector protection: D0 = 1 if protected */
-               caddr = (volatile unsigned char *)(info->start[i]);
-               info->protect[i] = caddr[2] & 1;
-       }
-
-       /*
-        * Prevent writes to uninitialized FLASH.
-        */
-       if (info->flash_id != FLASH_UNKNOWN) {
-               caddr = (vu_char *) info->start[0];
-
-               caddr[0x0555] = 0xAA;
-               caddr[0x02AA] = 0x55;
-               caddr[0x0555] = 0xF0;
-
-               udelay(20000);
-       }
-
-       return (info->size);
-}
-
-
-/*-----------------------------------------------------------------------
- */
-
-int flash_erase(flash_info_t * info, int s_first, int s_last)
-{
-       vu_char *addr = (vu_char *) (info->start[0]);
-       int flag, prot, sect, l_sect;
-       ulong start, now, last;
-
-       if ((s_first < 0) || (s_first > s_last)) {
-               if (info->flash_id == FLASH_UNKNOWN) {
-                       printf("- missing\n");
-               } else {
-                       printf("- no sectors to erase\n");
-               }
-               return 1;
-       }
-
-       if ((info->flash_id == FLASH_UNKNOWN) ||
-           (info->flash_id > FLASH_AMD_COMP)) {
-               printf("Can't erase unknown flash type %08lx - aborted\n", info->flash_id);
-               return 1;
-       }
-
-       prot = 0;
-       for (sect = s_first; sect <= s_last; ++sect) {
-               if (info->protect[sect]) {
-                       prot++;
-               }
-       }
-
-       if (prot) {
-               printf("- Warning: %d protected sectors will not be erased!\n", prot);
-       } else {
-               printf("\n");
-       }
-
-       l_sect = -1;
-
-       /* Disable interrupts which might cause a timeout here */
-       flag = disable_interrupts();
-
-       addr[0x0555] = 0xAA;
-       addr[0x02AA] = 0x55;
-       addr[0x0555] = 0x80;
-       addr[0x0555] = 0xAA;
-       addr[0x02AA] = 0x55;
-
-       /* Start erase on unprotected sectors */
-       for (sect = s_first; sect <= s_last; sect++) {
-               if (info->protect[sect] == 0) { /* not protected */
-                       addr = (vu_char *) (info->start[sect]);
-                       addr[0] = 0x30;
-                       l_sect = sect;
-               }
-       }
-
-       /* re-enable interrupts if necessary */
-       if (flag)
-               enable_interrupts();
-
-       /* wait at least 80us - let's wait 1 ms */
-       udelay(1000);
-
-       /*
-        * We wait for the last triggered sector
-        */
-       if (l_sect < 0)
-               goto DONE;
-
-       start = get_timer(0);
-       last = start;
-       addr = (vu_char *) (info->start[l_sect]);
-       while ((addr[0] & 0x80) != 0x80) {
-               if ((now = get_timer(start)) > CONFIG_SYS_FLASH_ERASE_TOUT) {
-                       printf("Timeout\n");
-                       return 1;
-               }
-               /* show that we're waiting */
-               if ((now - last) > 1000) {      /* every second */
-                       putc('.');
-                       last = now;
-               }
-       }
-
-  DONE:
-       /* reset to read mode */
-       addr = (vu_char *) info->start[0];
-       addr[0] = 0xF0;                         /* reset bank */
-
-       printf(" done\n");
-       return 0;
-}
-
-/*-----------------------------------------------------------------------
- * Copy memory to flash, returns:
- * 0 - OK
- * 1 - write timeout
- * 2 - Flash not erased
- */
-
-int write_buff(flash_info_t * info, uchar * src, ulong addr, ulong cnt)
-{
-       int rc;
-
-       while (cnt > 0) {
-               if ((rc = write_byte(info, addr++, *src++)) != 0) {
-                       return (rc);
-               }
-               --cnt;
-       }
-
-       return (0);
-}
-
-/*-----------------------------------------------------------------------
- * Write a word to Flash, returns:
- * 0 - OK
- * 1 - write timeout
- * 2 - Flash not erased
- */
-static int write_byte(flash_info_t * info, ulong dest, uchar data)
-{
-       vu_char *addr = (vu_char *) (info->start[0]);
-       ulong start;
-       int flag;
-
-       /* Check if Flash is (sufficiently) erased */
-       if ((*((vu_char *) dest) & data) != data) {
-               return (2);
-       }
-       /* Disable interrupts which might cause a timeout here */
-       flag = disable_interrupts();
-
-       addr[0x0555] = 0xAA;
-       addr[0x02AA] = 0x55;
-       addr[0x0555] = 0xA0;
-
-       *((vu_char *) dest) = data;
-
-       /* re-enable interrupts if necessary */
-       if (flag)
-               enable_interrupts();
-
-       /* data polling for D7 */
-       start = get_timer(0);
-       while ((*((vu_char *) dest) & 0x80) != (data & 0x80)) {
-               if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT) {
-                       return (1);
-               }
-       }
-       return (0);
-}
diff --git a/board/netta/netta.c b/board/netta/netta.c
deleted file mode 100644 (file)
index 2c9c6bf..0000000
+++ /dev/null
@@ -1,558 +0,0 @@
-/*
- * (C) Copyright 2000-2004
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/*
- * Pantelis Antoniou, Intracom S.A., panto@intracom.gr
- * U-Boot port on NetTA4 board
- */
-
-#include <common.h>
-#include <miiphy.h>
-
-#include "mpc8xx.h"
-
-#ifdef CONFIG_HW_WATCHDOG
-#include <watchdog.h>
-#endif
-
-int fec8xx_miiphy_read(char *devname, unsigned char addr,
-               unsigned char  reg, unsigned short *value);
-int fec8xx_miiphy_write(char *devname, unsigned char  addr,
-               unsigned char  reg, unsigned short value);
-
-/****************************************************************/
-
-/* some sane bit macros */
-#define _BD(_b)                                (1U << (31-(_b)))
-#define _BDR(_l, _h)                   (((((1U << (31-(_l))) - 1) << 1) | 1) & ~((1U << (31-(_h))) - 1))
-
-#define _BW(_b)                                (1U << (15-(_b)))
-#define _BWR(_l, _h)                   (((((1U << (15-(_l))) - 1) << 1) | 1) & ~((1U << (15-(_h))) - 1))
-
-#define _BB(_b)                                (1U << (7-(_b)))
-#define _BBR(_l, _h)                   (((((1U << (7-(_l))) - 1) << 1) | 1) & ~((1U << (7-(_h))) - 1))
-
-#define _B(_b)                         _BD(_b)
-#define _BR(_l, _h)                    _BDR(_l, _h)
-
-/****************************************************************/
-
-/*
- * Check Board Identity:
- *
- * Return 1 always.
- */
-
-int checkboard(void)
-{
-       printf ("Intracom NETTA"
-#if defined(CONFIG_NETTA_ISDN)
-                       " with ISDN support"
-#endif
-#if defined(CONFIG_NETTA_6412)
-                       " (DSP:TI6412)"
-#else
-                       " (DSP:TI6711)"
-#endif
-                       "\n"
-                       );
-       return (0);
-}
-
-/****************************************************************/
-
-#define _NOT_USED_     0xFFFFFFFF
-
-/****************************************************************/
-
-#define CS_0000                0x00000000
-#define CS_0001                0x10000000
-#define CS_0010                0x20000000
-#define CS_0011                0x30000000
-#define CS_0100                0x40000000
-#define CS_0101                0x50000000
-#define CS_0110                0x60000000
-#define CS_0111                0x70000000
-#define CS_1000                0x80000000
-#define CS_1001                0x90000000
-#define CS_1010                0xA0000000
-#define CS_1011                0xB0000000
-#define CS_1100                0xC0000000
-#define CS_1101                0xD0000000
-#define CS_1110                0xE0000000
-#define CS_1111                0xF0000000
-
-#define BS_0000                0x00000000
-#define BS_0001                0x01000000
-#define BS_0010                0x02000000
-#define BS_0011                0x03000000
-#define BS_0100                0x04000000
-#define BS_0101                0x05000000
-#define BS_0110                0x06000000
-#define BS_0111                0x07000000
-#define BS_1000                0x08000000
-#define BS_1001                0x09000000
-#define BS_1010                0x0A000000
-#define BS_1011                0x0B000000
-#define BS_1100                0x0C000000
-#define BS_1101                0x0D000000
-#define BS_1110                0x0E000000
-#define BS_1111                0x0F000000
-
-#define A10_AAAA       0x00000000
-#define A10_AAA0       0x00200000
-#define A10_AAA1       0x00300000
-#define A10_000A       0x00800000
-#define A10_0000       0x00A00000
-#define A10_0001       0x00B00000
-#define A10_111A       0x00C00000
-#define A10_1110       0x00E00000
-#define A10_1111       0x00F00000
-
-#define RAS_0000       0x00000000
-#define RAS_0001       0x00040000
-#define RAS_1110       0x00080000
-#define RAS_1111       0x000C0000
-
-#define CAS_0000       0x00000000
-#define CAS_0001       0x00010000
-#define CAS_1110       0x00020000
-#define CAS_1111       0x00030000
-
-#define WE_0000                0x00000000
-#define WE_0001                0x00004000
-#define WE_1110                0x00008000
-#define WE_1111                0x0000C000
-
-#define GPL4_0000      0x00000000
-#define GPL4_0001      0x00001000
-#define GPL4_1110      0x00002000
-#define GPL4_1111      0x00003000
-
-#define GPL5_0000      0x00000000
-#define GPL5_0001      0x00000400
-#define GPL5_1110      0x00000800
-#define GPL5_1111      0x00000C00
-#define LOOP           0x00000080
-
-#define EXEN           0x00000040
-
-#define AMX_COL                0x00000000
-#define AMX_ROW                0x00000020
-#define AMX_MAR                0x00000030
-
-#define NA             0x00000008
-
-#define UTA            0x00000004
-
-#define TODT           0x00000002
-
-#define LAST           0x00000001
-
-/* #define CAS_LATENCY 3 */
-#define CAS_LATENCY    2
-
-const uint sdram_table[0x40] = {
-
-#if CAS_LATENCY == 3
-       /* RSS */
-       CS_0001 | BS_1111 | A10_AAAA | RAS_0001 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* ACT   */
-       CS_1111 | BS_1111 | A10_0000 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* NOP   */
-       CS_0000 | BS_1111 | A10_0001 | RAS_1111 | CAS_0001 | WE_1111 | AMX_COL | UTA,                   /* READ  */
-       CS_0001 | BS_0001 | A10_1111 | RAS_0001 | CAS_1111 | WE_0001 | AMX_COL | UTA,                   /* PALL  */
-       CS_1111 | BS_1111 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_1111 | BS_1111 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA | TODT | LAST,     /* NOP   */
-       _NOT_USED_, _NOT_USED_,
-
-       /* RBS */
-       CS_0001 | BS_1111 | A10_AAAA | RAS_0001 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* ACT   */
-       CS_1111 | BS_1111 | A10_0000 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* NOP   */
-       CS_0001 | BS_1111 | A10_0001 | RAS_1111 | CAS_0001 | WE_1111 | AMX_COL | UTA,                   /* READ  */
-       CS_1111 | BS_0000 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* NOP   */
-       CS_1111 | BS_0000 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_1111 | BS_0000 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_0001 | BS_0001 | A10_1111 | RAS_0001 | CAS_1111 | WE_0001 | AMX_COL,                         /* PALL  */
-       CS_1111 | BS_1111 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | TODT | LAST,           /* NOP   */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-
-       /* WSS */
-       CS_0001 | BS_1111 | A10_AAAA | RAS_0001 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* ACT   */
-       CS_1111 | BS_1111 | A10_0000 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_0000 | BS_0001 | A10_0000 | RAS_1111 | CAS_0001 | WE_0000 | AMX_COL | UTA,                   /* WRITE */
-       CS_0001 | BS_1111 | A10_1111 | RAS_0001 | CAS_1111 | WE_0001 | AMX_COL | UTA,                   /* PALL  */
-       CS_1111 | BS_1111 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA | TODT | LAST,     /* NOP   */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_,
-
-       /* WBS */
-       CS_0001 | BS_1111 | A10_AAAA | RAS_0001 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* ACT   */
-       CS_1111 | BS_1111 | A10_0000 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_0001 | BS_0000 | A10_0000 | RAS_1111 | CAS_0001 | WE_0000 | AMX_COL,                         /* WRITE */
-       CS_1111 | BS_0000 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_1111 | BS_0000 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_1111 | BS_0001 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* NOP   */
-       CS_1111 | BS_1111 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* NOP   */
-       CS_0001 | BS_1111 | A10_1111 | RAS_0001 | CAS_1111 | WE_0001 | AMX_COL | UTA,                   /* PALL  */
-       CS_1111 | BS_1111 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA | TODT | LAST,     /* NOP   */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_,
-#endif
-
-#if CAS_LATENCY == 2
-       /* RSS */
-       CS_0001 | BS_1111 | A10_AAAA | RAS_0001 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* ACT   */
-       CS_1110 | BS_1110 | A10_0000 | RAS_1111 | CAS_1110 | WE_1111 | AMX_COL | UTA,                   /* NOP   */
-       CS_0001 | BS_0001 | A10_0000 | RAS_1111 | CAS_0001 | WE_1111 | AMX_COL | UTA,                   /* READ  */
-       CS_1110 | BS_1111 | A10_0001 | RAS_1110 | CAS_1111 | WE_1110 | AMX_COL,                         /* NOP   */
-       CS_0001 | BS_1111 | A10_1111 | RAS_0001 | CAS_1111 | WE_0001 | AMX_COL | UTA | TODT | LAST,     /* PALL  */
-       _NOT_USED_,
-       _NOT_USED_, _NOT_USED_,
-
-       /* RBS */
-       CS_0001 | BS_1111 | A10_AAAA | RAS_0001 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* ACT   */
-       CS_1110 | BS_1110 | A10_0000 | RAS_1111 | CAS_1110 | WE_1111 | AMX_COL | UTA,                   /* NOP   */
-       CS_0001 | BS_0000 | A10_0000 | RAS_1111 | CAS_0001 | WE_1111 | AMX_COL | UTA,                   /* READ  */
-       CS_1111 | BS_0000 | A10_0000 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_1111 | BS_0000 | A10_0000 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_1111 | BS_0001 | A10_0000 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_1110 | BS_1111 | A10_0001 | RAS_1110 | CAS_1111 | WE_1110 | AMX_COL,                         /* NOP   */
-       CS_0001 | BS_1111 | A10_1111 | RAS_0001 | CAS_1111 | WE_0001 | AMX_COL | UTA | TODT | LAST,     /* PALL  */
-       _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-
-       /* WSS */
-       CS_0001 | BS_1111 | A10_AAA0 | RAS_0001 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* ACT   */
-       CS_1110 | BS_1110 | A10_0000 | RAS_1111 | CAS_1110 | WE_1110 | AMX_COL,                         /* NOP   */
-       CS_0000 | BS_0001 | A10_0001 | RAS_1110 | CAS_0001 | WE_0000 | AMX_COL | UTA,                   /* WRITE */
-       CS_0001 | BS_1111 | A10_1111 | RAS_0001 | CAS_1111 | WE_0001 | AMX_COL | UTA | TODT | LAST,     /* PALL  */
-       _NOT_USED_,
-       _NOT_USED_, _NOT_USED_,
-       _NOT_USED_,
-
-       /* WBS */
-       CS_0001 | BS_1111 | A10_AAAA | RAS_0001 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* ACT   */
-       CS_1110 | BS_1110 | A10_0000 | RAS_1111 | CAS_1110 | WE_1110 | AMX_COL,                         /* NOP   */
-       CS_0001 | BS_0000 | A10_0000 | RAS_1111 | CAS_0001 | WE_0001 | AMX_COL,                         /* WRITE */
-       CS_1111 | BS_0000 | A10_0000 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_1111 | BS_0000 | A10_0000 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_1110 | BS_0001 | A10_0001 | RAS_1110 | CAS_1111 | WE_1110 | AMX_COL | UTA,                   /* NOP   */
-       CS_0001 | BS_1111 | A10_1111 | RAS_0001 | CAS_1111 | WE_0001 | AMX_COL | UTA | TODT | LAST,     /* PALL  */
-       _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_,
-
-#endif
-
-       /* UPT */
-       CS_0001 | BS_1111 | A10_1111 | RAS_0001 | CAS_0001 | WE_1111 | AMX_COL | UTA | LOOP,            /* ATRFR */
-       CS_1111 | BS_1111 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* NOP   */
-       CS_1111 | BS_1111 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* NOP   */
-       CS_1111 | BS_1111 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* NOP   */
-       CS_1111 | BS_1111 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA | LOOP,            /* NOP   */
-       CS_1111 | BS_1111 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA | TODT | LAST,     /* NOP   */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_,
-
-       /* EXC */
-       CS_0001 | BS_1111 | A10_1111 | RAS_0001 | CAS_1111 | WE_0001 | AMX_COL | UTA | LAST,
-       _NOT_USED_,
-
-       /* REG */
-       CS_1110 | BS_1111 | A10_1110 | RAS_1110 | CAS_1110 | WE_1110 | AMX_MAR | UTA,
-       CS_0001 | BS_1111 | A10_0001 | RAS_0001 | CAS_0001 | WE_0001 | AMX_MAR | UTA | LAST,
-};
-
-/* 0xC8 = 0b11001000 , CAS3, >> 2 = 0b00 11 0 010 */
-/* 0x88 = 0b10001000 , CAS2, >> 2 = 0b00 10 0 010 */
-#define MAR_SDRAM_INIT         ((CAS_LATENCY << 6) | 0x00000008LU)
-
-/* 8 */
-#define CONFIG_SYS_MAMR        ((CONFIG_SYS_MAMR_PTA << MAMR_PTA_SHIFT)  | MAMR_PTAE       |   \
-                        MAMR_AMA_TYPE_0 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A11 |   \
-                        MAMR_RLFA_1X    | MAMR_WLFA_1X    | MAMR_TLFA_4X)
-
-void check_ram(unsigned int addr, unsigned int size)
-{
-       unsigned int i, j, v, vv;
-       volatile unsigned int *p;
-       unsigned int pv;
-
-       p = (unsigned int *)addr;
-       pv = (unsigned int)p;
-       for (i = 0; i < size / sizeof(unsigned int); i++, pv += sizeof(unsigned int))
-               *p++ = pv;
-
-       p = (unsigned int *)addr;
-       for (i = 0; i < size / sizeof(unsigned int); i++) {
-               v = (unsigned int)p;
-               vv = *p;
-               if (vv != v) {
-                       printf("%p: read %08x instead of %08x\n", p, vv, v);
-                       hang();
-               }
-               p++;
-       }
-
-       for (j = 0; j < 5; j++) {
-               switch (j) {
-                       case 0: v = 0x00000000; break;
-                       case 1: v = 0xffffffff; break;
-                       case 2: v = 0x55555555; break;
-                       case 3: v = 0xaaaaaaaa; break;
-                       default:v = 0xdeadbeef; break;
-               }
-               p = (unsigned int *)addr;
-               for (i = 0; i < size / sizeof(unsigned int); i++) {
-                       *p = v;
-                       vv = *p;
-                       if (vv != v) {
-                               printf("%p: read %08x instead of %08x\n", p, vv, v);
-                               hang();
-                       }
-                       *p = ~v;
-                       p++;
-               }
-       }
-}
-
-phys_size_t initdram(int board_type)
-{
-       volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
-       volatile memctl8xx_t *memctl = &immap->im_memctl;
-       long int size;
-
-       upmconfig(UPMB, (uint *) sdram_table, sizeof(sdram_table) / sizeof(uint));
-
-       /*
-        * Preliminary prescaler for refresh
-        */
-       memctl->memc_mptpr = MPTPR_PTP_DIV8;
-
-       memctl->memc_mar = MAR_SDRAM_INIT;      /* 32-bit address to be output on the address bus if AMX = 0b11 */
-
-       /*
-        * Map controller bank 3 to the SDRAM bank at preliminary address.
-        */
-       memctl->memc_or3 = CONFIG_SYS_OR3_PRELIM;
-       memctl->memc_br3 = CONFIG_SYS_BR3_PRELIM;
-
-       memctl->memc_mbmr = CONFIG_SYS_MAMR & ~MAMR_PTAE;       /* no refresh yet */
-
-       udelay(200);
-
-       /* perform SDRAM initialisation sequence */
-       memctl->memc_mcr = MCR_OP_RUN | MCR_UPM_B | MCR_MB_CS3 | MCR_MLCF(1) | MCR_MAD(0x3C);   /* precharge all                */
-       udelay(1);
-
-       memctl->memc_mcr = MCR_OP_RUN | MCR_UPM_B | MCR_MB_CS3 | MCR_MLCF(2) | MCR_MAD(0x30);   /* refresh 2 times(0)           */
-       udelay(1);
-
-       memctl->memc_mcr = MCR_OP_RUN | MCR_UPM_B | MCR_MB_CS3 | MCR_MLCF(1) | MCR_MAD(0x3E);   /* exception program (write mar)*/
-       udelay(1);
-
-       memctl->memc_mbmr |= MAMR_PTAE; /* enable refresh */
-
-       udelay(10000);
-
-       {
-               u32 d1, d2;
-
-               d1 = 0xAA55AA55;
-               *(volatile u32 *)0 = d1;
-               d2 = *(volatile u32 *)0;
-               if (d1 != d2) {
-                       printf("DRAM fails: wrote 0x%08x read 0x%08x\n", d1, d2);
-                       hang();
-               }
-
-               d1 = 0x55AA55AA;
-               *(volatile u32 *)0 = d1;
-               d2 = *(volatile u32 *)0;
-               if (d1 != d2) {
-                       printf("DRAM fails: wrote 0x%08x read 0x%08x\n", d1, d2);
-                       hang();
-               }
-       }
-
-       size = get_ram_size((long *)0, SDRAM_MAX_SIZE);
-
-#if 0
-       printf("check 0\n");
-       check_ram(( 0 << 20), (2 << 20));
-       printf("check 16\n");
-       check_ram((16 << 20), (2 << 20));
-       printf("check 32\n");
-       check_ram((32 << 20), (2 << 20));
-       printf("check 48\n");
-       check_ram((48 << 20), (2 << 20));
-#endif
-
-       if (size == 0) {
-               printf("SIZE is zero: LOOP on 0\n");
-               for (;;) {
-                       *(volatile u32 *)0 = 0;
-                       (void)*(volatile u32 *)0;
-               }
-       }
-
-       return size;
-}
-
-/* ------------------------------------------------------------------------- */
-
-int misc_init_r(void)
-{
-       return(0);
-}
-
-void reset_phys(void)
-{
-       int phyno;
-       unsigned short v;
-
-       /* reset the damn phys */
-       mii_init();
-
-       for (phyno = 0; phyno < 32; ++phyno) {
-               fec8xx_miiphy_read(NULL, phyno, MII_PHYSID1, &v);
-               if (v == 0xFFFF)
-                       continue;
-               fec8xx_miiphy_write(NULL, phyno, MII_BMCR, BMCR_PDOWN);
-               udelay(10000);
-               fec8xx_miiphy_write(NULL, phyno, MII_BMCR,
-                               BMCR_RESET | BMCR_ANENABLE);
-               udelay(10000);
-       }
-}
-
-extern int board_dsp_reset(void);
-
-int last_stage_init(void)
-{
-       int r;
-
-       reset_phys();
-       r = board_dsp_reset();
-       if (r < 0)
-               printf("*** WARNING *** DSP reset failed (run diagnostics)\n");
-       return 0;
-}
-
-/* ------------------------------------------------------------------------- */
-
-/* GP = general purpose, SP = special purpose (on chip peripheral) */
-
-/* bits that can have a special purpose or can be configured as inputs/outputs */
-#define PA_GP_INMASK   (_BWR(3) | _BWR(7, 9) | _BW(11))
-#define PA_GP_OUTMASK  (_BW(6) | _BW(10) | _BWR(12, 15))
-#define PA_SP_MASK     (_BWR(0, 2) | _BWR(4, 5))
-#define PA_ODR_VAL     0
-#define PA_GP_OUTVAL   (_BW(13) | _BWR(14, 15))
-#define PA_SP_DIRVAL   0
-
-#define PB_GP_INMASK   (_B(28) | _B(31))
-#define PB_GP_OUTMASK  (_BR(15, 19) | _BR(26, 27) | _BR(29, 30))
-#define PB_SP_MASK     (_BR(22, 25))
-#define PB_ODR_VAL     0
-#define PB_GP_OUTVAL   (_BR(15, 19) | _BR(26, 27) | _BR(29, 31))
-#define PB_SP_DIRVAL   0
-
-#define PC_GP_INMASK   (_BW(5) | _BW(7) | _BW(8) | _BWR(9, 11) | _BWR(13, 15))
-#define PC_GP_OUTMASK  (_BW(6) | _BW(12))
-#define PC_SP_MASK     (_BW(4) | _BW(8))
-#define PC_SOVAL       0
-#define PC_INTVAL      _BW(7)
-#define PC_GP_OUTVAL   (_BW(6) | _BW(12))
-#define PC_SP_DIRVAL   0
-
-#define PD_GP_INMASK   0
-#define PD_GP_OUTMASK  _BWR(3, 15)
-#define PD_SP_MASK     0
-
-#if defined(CONFIG_NETTA_6412)
-
-#define PD_GP_OUTVAL   (_BWR(5, 7) | _BW(9) | _BW(11) | _BW(15))
-
-#else
-
-#define PD_GP_OUTVAL   (_BWR(5, 7) | _BW(9) | _BW(11))
-
-#endif
-
-#define PD_SP_DIRVAL   0
-
-int board_early_init_f(void)
-{
-       volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
-       volatile iop8xx_t *ioport = &immap->im_ioport;
-       volatile cpm8xx_t *cpm = &immap->im_cpm;
-       volatile memctl8xx_t *memctl = &immap->im_memctl;
-
-       /* CS1: NAND chip select */
-       memctl->memc_or1 = ((0xFFFFFFFFLU & ~(NAND_SIZE - 1)) | OR_BI | OR_SCY_2_CLK | OR_TRLX | OR_ACS_DIV2) ;
-       memctl->memc_br1 = ((NAND_BASE & BR_BA_MSK) | BR_PS_8 | BR_V);
-#if !defined(CONFIG_NETTA_6412)
-       /* CS2: DSP */
-       memctl->memc_or2 = ((0xFFFFFFFFLU & ~(DSP_SIZE - 1)) | OR_CSNT_SAM | OR_BI | OR_SCY_7_CLK | OR_ACS_DIV2);
-       memctl->memc_br2 = ((DSP_BASE & BR_BA_MSK) | BR_PS_16 | BR_V);
-#else
-       /* CS6: DSP */
-       memctl->memc_or6 = ((0xFFFFFFFFLU & ~(DSP_SIZE - 1)) | OR_CSNT_SAM | OR_BI | OR_SCY_7_CLK | OR_ACS_DIV2);
-       memctl->memc_br6 = ((DSP_BASE & BR_BA_MSK) | BR_PS_16 | BR_V);
-#endif
-       /* CS4: External register chip select */
-       memctl->memc_or4 = ((0xFFFFFFFFLU & ~(ER_SIZE - 1)) | OR_BI | OR_SCY_4_CLK);
-       memctl->memc_br4 = ((ER_BASE & BR_BA_MSK) | BR_PS_32 | BR_V);
-
-       /* CS5: dummy for accurate delay */
-       memctl->memc_or5 = ((0xFFFFFFFFLU & ~(DUMMY_SIZE - 1)) | OR_CSNT_SAM | OR_BI | OR_SCY_0_CLK | OR_ACS_DIV2);
-       memctl->memc_br5 = ((DUMMY_BASE & BR_BA_MSK) | BR_PS_32 | BR_V);
-
-       ioport->iop_padat       = PA_GP_OUTVAL;
-       ioport->iop_paodr       = PA_ODR_VAL;
-       ioport->iop_padir       = PA_GP_OUTMASK | PA_SP_DIRVAL;
-       ioport->iop_papar       = PA_SP_MASK;
-
-       cpm->cp_pbdat           = PB_GP_OUTVAL;
-       cpm->cp_pbodr           = PB_ODR_VAL;
-       cpm->cp_pbdir           = PB_GP_OUTMASK | PB_SP_DIRVAL;
-       cpm->cp_pbpar           = PB_SP_MASK;
-
-       ioport->iop_pcdat       = PC_GP_OUTVAL;
-       ioport->iop_pcdir       = PC_GP_OUTMASK | PC_SP_DIRVAL;
-       ioport->iop_pcso        = PC_SOVAL;
-       ioport->iop_pcint       = PC_INTVAL;
-       ioport->iop_pcpar       = PC_SP_MASK;
-
-       ioport->iop_pddat       = PD_GP_OUTVAL;
-       ioport->iop_pddir       = PD_GP_OUTMASK | PD_SP_DIRVAL;
-       ioport->iop_pdpar       = PD_SP_MASK;
-
-       /* ioport->iop_pddat |=  (1 << (15 - 6)) | (1 << (15 - 7)); */
-
-       return 0;
-}
-
-#if defined(CONFIG_CMD_PCMCIA)
-
-int pcmcia_init(void)
-{
-       return 0;
-}
-
-#endif
-
-#ifdef CONFIG_HW_WATCHDOG
-
-void hw_watchdog_reset(void)
-{
-       /* XXX add here the really funky stuff */
-}
-
-#endif
diff --git a/board/netta/pcmcia.c b/board/netta/pcmcia.c
deleted file mode 100644 (file)
index 3fa1925..0000000
+++ /dev/null
@@ -1,346 +0,0 @@
-#include <common.h>
-#include <mpc8xx.h>
-#include <pcmcia.h>
-
-#undef CONFIG_PCMCIA
-
-#if defined(CONFIG_CMD_PCMCIA)
-#define        CONFIG_PCMCIA
-#endif
-
-#if defined(CONFIG_CMD_IDE) && defined(CONFIG_IDE_8xx_PCCARD)
-#define        CONFIG_PCMCIA
-#endif
-
-#ifdef CONFIG_PCMCIA
-
-/* some sane bit macros */
-#define _BD(_b)                                (1U << (31-(_b)))
-#define _BDR(_l, _h)                   (((((1U << (31-(_l))) - 1) << 1) | 1) & ~((1U << (31-(_h))) - 1))
-
-#define _BW(_b)                                (1U << (15-(_b)))
-#define _BWR(_l, _h)                   (((((1U << (15-(_l))) - 1) << 1) | 1) & ~((1U << (15-(_h))) - 1))
-
-#define _BB(_b)                                (1U << (7-(_b)))
-#define _BBR(_l, _h)                   (((((1U << (7-(_l))) - 1) << 1) | 1) & ~((1U << (7-(_h))) - 1))
-
-#define _B(_b)                         _BD(_b)
-#define _BR(_l, _h)                    _BDR(_l, _h)
-
-#define PCMCIA_BOARD_MSG "NETTA"
-
-static const unsigned short vppd_masks[2] = { _BW(14), _BW(15) };
-
-static void cfg_vppd(int no)
-{
-       volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
-       unsigned short mask;
-
-       if ((unsigned int)no >= sizeof(vppd_masks)/sizeof(vppd_masks[0]))
-               return;
-
-       mask = vppd_masks[no];
-
-       immap->im_ioport.iop_papar &= ~mask;
-       immap->im_ioport.iop_paodr &= ~mask;
-       immap->im_ioport.iop_padir |=  mask;
-}
-
-static void set_vppd(int no, int what)
-{
-       volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
-       unsigned short mask;
-
-       if ((unsigned int)no >= sizeof(vppd_masks)/sizeof(vppd_masks[0]))
-               return;
-
-       mask = vppd_masks[no];
-
-       if (what)
-               immap->im_ioport.iop_padat |= mask;
-       else
-               immap->im_ioport.iop_padat &= ~mask;
-}
-
-static const unsigned short vccd_masks[2] = { _BW(10), _BW(6) };
-
-static void cfg_vccd(int no)
-{
-       volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
-       unsigned short mask;
-
-       if ((unsigned int)no >= sizeof(vccd_masks)/sizeof(vccd_masks[0]))
-               return;
-
-       mask = vccd_masks[no];
-
-       immap->im_ioport.iop_papar &= ~mask;
-       immap->im_ioport.iop_paodr &= ~mask;
-       immap->im_ioport.iop_padir |=  mask;
-}
-
-static void set_vccd(int no, int what)
-{
-       volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
-       unsigned short mask;
-
-       if ((unsigned int)no >= sizeof(vccd_masks)/sizeof(vccd_masks[0]))
-               return;
-
-       mask = vccd_masks[no];
-
-       if (what)
-               immap->im_ioport.iop_padat |= mask;
-       else
-               immap->im_ioport.iop_padat &= ~mask;
-}
-
-static const unsigned short oc_mask = _BW(8);
-
-static void cfg_oc(void)
-{
-       volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
-       unsigned short mask = oc_mask;
-
-       immap->im_ioport.iop_pcdir &= ~mask;
-       immap->im_ioport.iop_pcso  &= ~mask;
-       immap->im_ioport.iop_pcint &= ~mask;
-       immap->im_ioport.iop_pcpar &= ~mask;
-}
-
-static int get_oc(void)
-{
-       volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
-       unsigned short mask = oc_mask;
-       int what;
-
-       what = !!(immap->im_ioport.iop_pcdat & mask);;
-       return what;
-}
-
-static const unsigned short shdn_mask = _BW(12);
-
-static void cfg_shdn(void)
-{
-       volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
-       unsigned short mask;
-
-       mask = shdn_mask;
-
-       immap->im_ioport.iop_papar &= ~mask;
-       immap->im_ioport.iop_paodr &= ~mask;
-       immap->im_ioport.iop_padir |=  mask;
-}
-
-static void set_shdn(int what)
-{
-       volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
-       unsigned short mask;
-
-       mask = shdn_mask;
-
-       if (what)
-               immap->im_ioport.iop_padat |= mask;
-       else
-               immap->im_ioport.iop_padat &= ~mask;
-}
-
-static void cfg_ports (void)
-{
-       cfg_vppd(0); cfg_vppd(1);       /* VPPD0,VPPD1 VAVPP => Hi-Z */
-       cfg_vccd(0); cfg_vccd(1);       /* 3V and 5V off */
-       cfg_shdn();
-       cfg_oc();
-
-       /*
-        * Configure Port A for TPS2211 PC-Card Power-Interface Switch
-        *
-        * Switch off all voltages, assert shutdown
-        */
-       set_vppd(0, 1); set_vppd(1, 1);
-       set_vccd(0, 0); set_vccd(1, 0);
-       set_shdn(1);
-
-       udelay(100000);
-}
-
-int pcmcia_hardware_enable(int slot)
-{
-       volatile pcmconf8xx_t   *pcmp;
-       uint reg, pipr, mask;
-       int i;
-
-       debug ("hardware_enable: " PCMCIA_BOARD_MSG " Slot %c\n", 'A'+slot);
-
-       udelay(10000);
-
-       pcmp  = (pcmconf8xx_t *)(&(((immap_t *)CONFIG_SYS_IMMR)->im_pcmcia));
-
-       /* Configure Ports for TPS2211A PC-Card Power-Interface Switch */
-       cfg_ports ();
-
-       /* clear interrupt state, and disable interrupts */
-       pcmp->pcmc_pscr =  PCMCIA_MASK(_slot_);
-       pcmp->pcmc_per &= ~PCMCIA_MASK(_slot_);
-
-       /*
-        * Disable interrupts, DMA, and PCMCIA buffers
-        * (isolate the interface) and assert RESET signal
-        */
-       debug ("Disable PCMCIA buffers and assert RESET\n");
-       reg  = 0;
-       reg |= __MY_PCMCIA_GCRX_CXRESET;        /* active high */
-       reg |= __MY_PCMCIA_GCRX_CXOE;           /* active low  */
-       PCMCIA_PGCRX(_slot_) = reg;
-
-       udelay(500);
-
-       /*
-       * Make sure there is a card in the slot, then configure the interface.
-       */
-       udelay(10000);
-       debug ("[%d] %s: PIPR(%p)=0x%x\n",
-              __LINE__,__FUNCTION__,
-              &(pcmp->pcmc_pipr),pcmp->pcmc_pipr);
-       if (pcmp->pcmc_pipr & (0x18000000 >> (slot << 4))) {
-               printf ("   No Card found\n");
-               return (1);
-       }
-
-       /*
-        * Power On: Set VAVCC to 3.3V or 5V, set VAVPP to Hi-Z
-        */
-       mask = PCMCIA_VS1(slot) | PCMCIA_VS2(slot);
-       pipr = pcmp->pcmc_pipr;
-       debug ("PIPR: 0x%x ==> VS1=o%s, VS2=o%s\n",
-              pipr,
-              (reg&PCMCIA_VS1(slot))?"n":"ff",
-              (reg&PCMCIA_VS2(slot))?"n":"ff");
-
-       if ((pipr & mask) == mask) {
-               set_vppd(0, 1); set_vppd(1, 1);         /* VAVPP => Hi-Z */
-               set_vccd(0, 0); set_vccd(1, 1);         /* 5V on, 3V off */
-               puts (" 5.0V card found: ");
-       } else {
-               set_vppd(0, 1); set_vppd(1, 1);         /* VAVPP => Hi-Z */
-               set_vccd(0, 1); set_vccd(1, 0);         /* 5V off, 3V on */
-               puts (" 3.3V card found: ");
-       }
-
-       /*  Wait 500 ms; use this to check for over-current */
-       for (i=0; i<5000; ++i) {
-               if (!get_oc()) {
-                       printf ("   *** Overcurrent - Safety shutdown ***\n");
-                       set_vccd(0, 0); set_vccd(1, 0);         /* VAVPP => Hi-Z */
-                       return (1);
-               }
-               udelay (100);
-       }
-
-       debug ("Enable PCMCIA buffers and stop RESET\n");
-       reg  =  PCMCIA_PGCRX(_slot_);
-       reg &= ~__MY_PCMCIA_GCRX_CXRESET;       /* active high */
-       reg &= ~__MY_PCMCIA_GCRX_CXOE;          /* active low  */
-       PCMCIA_PGCRX(_slot_) = reg;
-
-       udelay(250000); /* some cards need >150 ms to come up :-( */
-
-       debug ("# hardware_enable done\n");
-
-       return (0);
-}
-
-
-#if defined(CONFIG_CMD_PCMCIA)
-int pcmcia_hardware_disable(int slot)
-{
-       u_long reg;
-
-       debug ("hardware_disable: " PCMCIA_BOARD_MSG " Slot %c\n", 'A'+slot);
-
-       /* Configure PCMCIA General Control Register */
-       debug ("Disable PCMCIA buffers and assert RESET\n");
-       reg  = 0;
-       reg |= __MY_PCMCIA_GCRX_CXRESET;        /* active high */
-       reg |= __MY_PCMCIA_GCRX_CXOE;           /* active low  */
-       PCMCIA_PGCRX(_slot_) = reg;
-
-       /* All voltages off / Hi-Z */
-       set_vppd(0, 1); set_vppd(1, 1);
-       set_vccd(0, 1); set_vccd(1, 1);
-
-       udelay(10000);
-
-       return (0);
-}
-#endif
-
-
-int pcmcia_voltage_set(int slot, int vcc, int vpp)
-{
-       volatile pcmconf8xx_t   *pcmp;
-       u_long reg;
-
-       debug ("voltage_set: "
-                       PCMCIA_BOARD_MSG
-                       " Slot %c, Vcc=%d.%d, Vpp=%d.%d\n",
-       'A'+slot, vcc/10, vcc%10, vpp/10, vcc%10);
-
-       pcmp  = (pcmconf8xx_t *)(&(((immap_t *)CONFIG_SYS_IMMR)->im_pcmcia));
-       /*
-        * Disable PCMCIA buffers (isolate the interface)
-        * and assert RESET signal
-        */
-       debug ("Disable PCMCIA buffers and assert RESET\n");
-       reg  = PCMCIA_PGCRX(_slot_);
-       reg |= __MY_PCMCIA_GCRX_CXRESET;        /* active high */
-       reg |= __MY_PCMCIA_GCRX_CXOE;           /* active low  */
-       PCMCIA_PGCRX(_slot_) = reg;
-       udelay(500);
-
-       /*
-        * Configure Port C pins for
-        * 5 Volts Enable and 3 Volts enable,
-        * Turn all power pins to Hi-Z
-        */
-       debug ("PCMCIA power OFF\n");
-       cfg_ports ();   /* Enables switch, but all in Hi-Z */
-
-       set_vppd(0, 1); set_vppd(1, 1);
-
-       switch(vcc) {
-       case  0:
-               break;  /* Switch off           */
-
-       case 33:
-               set_vccd(0, 1); set_vccd(1, 0);
-               break;
-
-       case 50:
-               set_vccd(0, 0); set_vccd(1, 1);
-               break;
-
-       default:
-               goto done;
-       }
-
-       /* Checking supported voltages */
-
-       debug ("PIPR: 0x%x --> %s\n",
-              pcmp->pcmc_pipr,
-              (pcmp->pcmc_pipr & 0x00008000) ? "only 5 V" : "can do 3.3V");
-
-done:
-                       debug ("Enable PCMCIA buffers and stop RESET\n");
-       reg  =  PCMCIA_PGCRX(_slot_);
-       reg &= ~__MY_PCMCIA_GCRX_CXRESET;       /* active high */
-       reg &= ~__MY_PCMCIA_GCRX_CXOE;          /* active low  */
-       PCMCIA_PGCRX(_slot_) = reg;
-       udelay(500);
-
-       debug ("voltage_set: " PCMCIA_BOARD_MSG " Slot %c, DONE\n",
-              slot+'A');
-       return (0);
-}
-
-#endif /* CONFIG_PCMCIA */
diff --git a/board/netta/u-boot.lds b/board/netta/u-boot.lds
deleted file mode 100644 (file)
index 0dff5a4..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * (C) Copyright 2000-2010
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-OUTPUT_ARCH(powerpc)
-
-SECTIONS
-{
-  /* Read-only sections, merged into text segment: */
-  . = + SIZEOF_HEADERS;
-  .text        :
-  {
-    arch/powerpc/cpu/mpc8xx/start.o    (.text*)
-    arch/powerpc/cpu/mpc8xx/traps.o    (.text*)
-
-    *(.text*)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-
-  /* Read-write section, merged into data segment: */
-  . = (. + 0x00FF) & 0xFFFFFF00;
-  _erotext = .;
-  PROVIDE (erotext = .);
-  .reloc   :
-  {
-    _GOT2_TABLE_ = .;
-    KEEP(*(.got2))
-    KEEP(*(.got))
-    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
-    _FIXUP_TABLE_ = .;
-    KEEP(*(.fixup))
-  }
-  __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
-  __fixup_entries = (. - _FIXUP_TABLE_)>>2;
-
-  .data    :
-  {
-    *(.data*)
-    *(.sdata*)
-  }
-  _edata  =  .;
-  PROVIDE (edata = .);
-
-  . = .;
-
-  . = ALIGN(4);
-  .u_boot_list : {
-       KEEP(*(SORT(.u_boot_list*)));
-  }
-
-
-  . = .;
-  __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)       :
-  {
-   *(.bss*)
-   *(.sbss*)
-   *(COMMON)
-   . = ALIGN(4);
-  }
-  __bss_end = . ;
-  PROVIDE (end = .);
-}
diff --git a/board/netta/u-boot.lds.debug b/board/netta/u-boot.lds.debug
deleted file mode 100644 (file)
index a198cf9..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * (C) Copyright 2000-2004
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-OUTPUT_ARCH(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  /* Read-only sections, merged into text segment: */
-  . = + SIZEOF_HEADERS;
-  .interp : { *(.interp) }
-  .hash          : { *(.hash)          }
-  .dynsym        : { *(.dynsym)                }
-  .dynstr        : { *(.dynstr)                }
-  .rel.text      : { *(.rel.text)              }
-  .rela.text     : { *(.rela.text)     }
-  .rel.data      : { *(.rel.data)              }
-  .rela.data     : { *(.rela.data)     }
-  .rel.rodata    : { *(.rel.rodata)    }
-  .rela.rodata   : { *(.rela.rodata)   }
-  .rel.got       : { *(.rel.got)               }
-  .rela.got      : { *(.rela.got)              }
-  .rel.ctors     : { *(.rel.ctors)     }
-  .rela.ctors    : { *(.rela.ctors)    }
-  .rel.dtors     : { *(.rel.dtors)     }
-  .rela.dtors    : { *(.rela.dtors)    }
-  .rel.bss       : { *(.rel.bss)               }
-  .rela.bss      : { *(.rela.bss)              }
-  .rel.plt       : { *(.rel.plt)               }
-  .rela.plt      : { *(.rela.plt)              }
-  .init          : { *(.init)  }
-  .plt : { *(.plt) }
-  .text      :
-  {
-    /* WARNING - the following is hand-optimized to fit within */
-    /* the sector layout of our flash chips!   XXX FIXME XXX   */
-
-    arch/powerpc/cpu/mpc8xx/start.o            (.text)
-    common/dlmalloc.o          (.text)
-    lib/vsprintf.o     (.text)
-    lib/crc32.o                (.text)
-
-    . = env_offset;
-    common/env_embedded.o(.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.rodata)
-    *(.rodata1)
-    *(.rodata.str1.4)
-    *(.eh_frame)
-  }
-  .fini      : { *(.fini)    } =0
-  .ctors     : { *(.ctors)   }
-  .dtors     : { *(.dtors)   }
-
-  /* Read-write section, merged into data segment: */
-  . = (. + 0x0FFF) & 0xFFFFF000;
-  _erotext = .;
-  PROVIDE (erotext = .);
-  .reloc   :
-  {
-    *(.got)
-    _GOT2_TABLE_ = .;
-    *(.got2)
-    _FIXUP_TABLE_ = .;
-    *(.fixup)
-  }
-  __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
-  __fixup_entries = (. - _FIXUP_TABLE_)>>2;
-
-  .data    :
-  {
-    *(.data)
-    *(.data1)
-    *(.sdata)
-    *(.sdata2)
-    *(.dynamic)
-    CONSTRUCTORS
-  }
-  _edata  =  .;
-  PROVIDE (edata = .);
-
-
-  . = ALIGN(4);
-  .u_boot_list : {
-       KEEP(*(SORT(.u_boot_list*)));
-  }
-
-
-  __start___ex_table = .;
-  __ex_table : { *(__ex_table) }
-  __stop___ex_table = .;
-
-  . = ALIGN(4096);
-  __init_begin = .;
-  .text.init : { *(.text.init) }
-  .data.init : { *(.data.init) }
-  . = ALIGN(4096);
-  __init_end = .;
-
-  __bss_start = .;
-  .bss       :
-  {
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
-   *(COMMON)
-  }
-  __bss_end = . ;
-  PROVIDE (end = .);
-}
diff --git a/board/netta2/Makefile b/board/netta2/Makefile
deleted file mode 100644 (file)
index c3bfb0d..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# (C) Copyright 2000-2006
-# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
-
-obj-y  = netta2.o flash.o
diff --git a/board/netta2/flash.c b/board/netta2/flash.c
deleted file mode 100644 (file)
index 133f36d..0000000
+++ /dev/null
@@ -1,490 +0,0 @@
-/*
- * (C) Copyright 2000-2004
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <common.h>
-#include <mpc8xx.h>
-
-flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS];   /* info for FLASH chips    */
-
-/*-----------------------------------------------------------------------
- * Functions
- */
-static ulong flash_get_size(vu_long * addr, flash_info_t * info);
-static int write_byte(flash_info_t * info, ulong dest, uchar data);
-static void flash_get_offsets(ulong base, flash_info_t * info);
-
-/*-----------------------------------------------------------------------
- */
-
-unsigned long flash_init(void)
-{
-       volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
-       volatile memctl8xx_t *memctl = &immap->im_memctl;
-       unsigned long size;
-       int i;
-
-       /* Init: no FLASHes known */
-       for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; ++i)
-               flash_info[i].flash_id = FLASH_UNKNOWN;
-
-       size = flash_get_size((vu_long *) FLASH_BASE0_PRELIM, &flash_info[0]);
-
-       if (flash_info[0].flash_id == FLASH_UNKNOWN) {
-               printf ("## Unknown FLASH on Bank 0 - Size = 0x%08lx = %ld MB\n",
-                       size, size << 20);
-       }
-
-       /* Remap FLASH according to real size */
-       memctl->memc_or0 = CONFIG_SYS_OR_TIMING_FLASH | (-size & 0xFFFF8000);
-       memctl->memc_br0 = (CONFIG_SYS_FLASH_BASE & BR_BA_MSK) | (memctl->memc_br0 & ~(BR_BA_MSK));
-
-       /* Re-do sizing to get full correct info */
-       size = flash_get_size((vu_long *) CONFIG_SYS_FLASH_BASE, &flash_info[0]);
-
-       flash_get_offsets(CONFIG_SYS_FLASH_BASE, &flash_info[0]);
-
-       /* monitor protection ON by default */
-       flash_protect(FLAG_PROTECT_SET,
-                       CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FLASH_BASE + monitor_flash_len - 1,
-                       &flash_info[0]);
-
-       flash_protect ( FLAG_PROTECT_SET,
-                       CONFIG_ENV_ADDR,
-                       CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1,
-                       &flash_info[0]);
-
-#ifdef CONFIG_ENV_ADDR_REDUND
-       flash_protect ( FLAG_PROTECT_SET,
-                       CONFIG_ENV_ADDR_REDUND,
-                       CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1,
-                       &flash_info[0]);
-#endif
-
-       flash_info[0].size = size;
-
-       return (size);
-}
-
-/*-----------------------------------------------------------------------
- */
-static void flash_get_offsets(ulong base, flash_info_t * info)
-{
-       int i;
-
-       /* set up sector start address table */
-       if ((info->flash_id & FLASH_TYPEMASK) == FLASH_AM040) {
-               for (i = 0; i < info->sector_count; i++) {
-                       info->start[i] = base + (i * 0x00010000);
-               }
-       } else if (info->flash_id & FLASH_BTYPE) {
-               /* set sector offsets for bottom boot block type    */
-               info->start[0] = base + 0x00000000;
-               info->start[1] = base + 0x00004000;
-               info->start[2] = base + 0x00006000;
-               info->start[3] = base + 0x00008000;
-               for (i = 4; i < info->sector_count; i++) {
-                       info->start[i] = base + (i * 0x00010000) - 0x00030000;
-               }
-       } else {
-               /* set sector offsets for top boot block type       */
-               i = info->sector_count - 1;
-               info->start[i--] = base + info->size - 0x00004000;
-               info->start[i--] = base + info->size - 0x00006000;
-               info->start[i--] = base + info->size - 0x00008000;
-               for (; i >= 0; i--) {
-                       info->start[i] = base + i * 0x00010000;
-               }
-       }
-}
-
-/*-----------------------------------------------------------------------
- */
-void flash_print_info(flash_info_t * info)
-{
-       int i;
-
-       if (info->flash_id == FLASH_UNKNOWN) {
-               printf("missing or unknown FLASH type\n");
-               return;
-       }
-
-       switch (info->flash_id & FLASH_VENDMASK) {
-       case FLASH_MAN_AMD:
-               printf("AMD ");
-               break;
-       case FLASH_MAN_FUJ:
-               printf("FUJITSU ");
-               break;
-       case FLASH_MAN_MX:
-               printf("MXIC ");
-               break;
-       default:
-               printf("Unknown Vendor ");
-               break;
-       }
-
-       switch (info->flash_id & FLASH_TYPEMASK) {
-       case FLASH_AM040:
-               printf("AM29LV040B (4 Mbit, bottom boot sect)\n");
-               break;
-       case FLASH_AM400B:
-               printf("AM29LV400B (4 Mbit, bottom boot sect)\n");
-               break;
-       case FLASH_AM400T:
-               printf("AM29LV400T (4 Mbit, top boot sector)\n");
-               break;
-       case FLASH_AM800B:
-               printf("AM29LV800B (8 Mbit, bottom boot sect)\n");
-               break;
-       case FLASH_AM800T:
-               printf("AM29LV800T (8 Mbit, top boot sector)\n");
-               break;
-       case FLASH_AM160B:
-               printf("AM29LV160B (16 Mbit, bottom boot sect)\n");
-               break;
-       case FLASH_AM160T:
-               printf("AM29LV160T (16 Mbit, top boot sector)\n");
-               break;
-       case FLASH_AM320B:
-               printf("AM29LV320B (32 Mbit, bottom boot sect)\n");
-               break;
-       case FLASH_AM320T:
-               printf("AM29LV320T (32 Mbit, top boot sector)\n");
-               break;
-       default:
-               printf("Unknown Chip Type\n");
-               break;
-       }
-
-       printf("  Size: %ld MB in %d Sectors\n", info->size >> 20, info->sector_count);
-
-       printf("  Sector Start Addresses:");
-       for (i = 0; i < info->sector_count; ++i) {
-               if ((i % 5) == 0)
-                       printf("\n   ");
-               printf(" %08lX%s", info->start[i], info->protect[i] ? " (RO)" : "     ");
-       }
-       printf("\n");
-}
-
-/*-----------------------------------------------------------------------
- */
-
-
-/*-----------------------------------------------------------------------
- */
-
-/*
- * The following code cannot be run from FLASH!
- */
-
-static ulong flash_get_size(vu_long * addr, flash_info_t * info)
-{
-       short i;
-       uchar mid;
-       uchar pid;
-       vu_char *caddr = (vu_char *) addr;
-       ulong base = (ulong) addr;
-
-       /* Write auto select command: read Manufacturer ID */
-       caddr[0x0555] = 0xAA;
-       caddr[0x02AA] = 0x55;
-       caddr[0x0555] = 0x90;
-
-       mid = caddr[0];
-       switch (mid) {
-       case (AMD_MANUFACT & 0xFF):
-               info->flash_id = FLASH_MAN_AMD;
-               break;
-       case (FUJ_MANUFACT & 0xFF):
-               info->flash_id = FLASH_MAN_FUJ;
-               break;
-       case (MX_MANUFACT & 0xFF):
-               info->flash_id = FLASH_MAN_MX;
-               break;
-       case (STM_MANUFACT & 0xFF):
-               info->flash_id = FLASH_MAN_STM;
-               break;
-       default:
-               info->flash_id = FLASH_UNKNOWN;
-               info->sector_count = 0;
-               info->size = 0;
-               return (0);                             /* no or unknown flash  */
-       }
-
-       pid = caddr[1];                         /* device ID        */
-       switch (pid) {
-       case (AMD_ID_LV400T & 0xFF):
-               info->flash_id += FLASH_AM400T;
-               info->sector_count = 11;
-               info->size = 0x00080000;
-               break;                                  /* => 512 kB        */
-
-       case (AMD_ID_LV400B & 0xFF):
-               info->flash_id += FLASH_AM400B;
-               info->sector_count = 11;
-               info->size = 0x00080000;
-               break;                                  /* => 512 kB        */
-
-       case (AMD_ID_LV800T & 0xFF):
-               info->flash_id += FLASH_AM800T;
-               info->sector_count = 19;
-               info->size = 0x00100000;
-               break;                                  /* => 1 MB      */
-
-       case (AMD_ID_LV800B & 0xFF):
-               info->flash_id += FLASH_AM800B;
-               info->sector_count = 19;
-               info->size = 0x00100000;
-               break;                                  /* => 1 MB      */
-
-       case (AMD_ID_LV160T & 0xFF):
-               info->flash_id += FLASH_AM160T;
-               info->sector_count = 35;
-               info->size = 0x00200000;
-               break;                                  /* => 2 MB      */
-
-       case (AMD_ID_LV160B & 0xFF):
-               info->flash_id += FLASH_AM160B;
-               info->sector_count = 35;
-               info->size = 0x00200000;
-               break;                                  /* => 2 MB      */
-
-       case (AMD_ID_LV040B & 0xFF):
-               info->flash_id += FLASH_AM040;
-               info->sector_count = 8;
-               info->size = 0x00080000;
-               break;
-
-       case (STM_ID_M29W040B & 0xFF):
-               info->flash_id += FLASH_AM040;
-               info->sector_count = 8;
-               info->size = 0x00080000;
-               break;
-
-#if 0                                                  /* enable when device IDs are available */
-       case (AMD_ID_LV320T & 0xFF):
-               info->flash_id += FLASH_AM320T;
-               info->sector_count = 67;
-               info->size = 0x00400000;
-               break;                                  /* => 4 MB      */
-
-       case (AMD_ID_LV320B & 0xFF):
-               info->flash_id += FLASH_AM320B;
-               info->sector_count = 67;
-               info->size = 0x00400000;
-               break;                                  /* => 4 MB      */
-#endif
-       default:
-               info->flash_id = FLASH_UNKNOWN;
-               return (0);                             /* => no or unknown flash */
-
-       }
-
-       printf(" ");
-       /* set up sector start address table */
-       if ((info->flash_id & FLASH_TYPEMASK) == FLASH_AM040) {
-               for (i = 0; i < info->sector_count; i++) {
-                       info->start[i] = base + (i * 0x00010000);
-               }
-       } else if (info->flash_id & FLASH_BTYPE) {
-               /* set sector offsets for bottom boot block type    */
-               info->start[0] = base + 0x00000000;
-               info->start[1] = base + 0x00004000;
-               info->start[2] = base + 0x00006000;
-               info->start[3] = base + 0x00008000;
-               for (i = 4; i < info->sector_count; i++) {
-                       info->start[i] = base + (i * 0x00010000) - 0x00030000;
-               }
-       } else {
-               /* set sector offsets for top boot block type       */
-               i = info->sector_count - 1;
-               info->start[i--] = base + info->size - 0x00004000;
-               info->start[i--] = base + info->size - 0x00006000;
-               info->start[i--] = base + info->size - 0x00008000;
-               for (; i >= 0; i--) {
-                       info->start[i] = base + i * 0x00010000;
-               }
-       }
-
-       /* check for protected sectors */
-       for (i = 0; i < info->sector_count; i++) {
-               /* read sector protection: D0 = 1 if protected */
-               caddr = (volatile unsigned char *)(info->start[i]);
-               info->protect[i] = caddr[2] & 1;
-       }
-
-       /*
-        * Prevent writes to uninitialized FLASH.
-        */
-       if (info->flash_id != FLASH_UNKNOWN) {
-               caddr = (vu_char *) info->start[0];
-
-               caddr[0x0555] = 0xAA;
-               caddr[0x02AA] = 0x55;
-               caddr[0x0555] = 0xF0;
-
-               udelay(20000);
-       }
-
-       return (info->size);
-}
-
-
-/*-----------------------------------------------------------------------
- */
-
-int flash_erase(flash_info_t * info, int s_first, int s_last)
-{
-       vu_char *addr = (vu_char *) (info->start[0]);
-       int flag, prot, sect, l_sect;
-       ulong start, now, last;
-
-       if ((s_first < 0) || (s_first > s_last)) {
-               if (info->flash_id == FLASH_UNKNOWN) {
-                       printf("- missing\n");
-               } else {
-                       printf("- no sectors to erase\n");
-               }
-               return 1;
-       }
-
-       if ((info->flash_id == FLASH_UNKNOWN) ||
-           (info->flash_id > FLASH_AMD_COMP)) {
-               printf("Can't erase unknown flash type %08lx - aborted\n", info->flash_id);
-               return 1;
-       }
-
-       prot = 0;
-       for (sect = s_first; sect <= s_last; ++sect) {
-               if (info->protect[sect]) {
-                       prot++;
-               }
-       }
-
-       if (prot) {
-               printf("- Warning: %d protected sectors will not be erased!\n", prot);
-       } else {
-               printf("\n");
-       }
-
-       l_sect = -1;
-
-       /* Disable interrupts which might cause a timeout here */
-       flag = disable_interrupts();
-
-       addr[0x0555] = 0xAA;
-       addr[0x02AA] = 0x55;
-       addr[0x0555] = 0x80;
-       addr[0x0555] = 0xAA;
-       addr[0x02AA] = 0x55;
-
-       /* Start erase on unprotected sectors */
-       for (sect = s_first; sect <= s_last; sect++) {
-               if (info->protect[sect] == 0) { /* not protected */
-                       addr = (vu_char *) (info->start[sect]);
-                       addr[0] = 0x30;
-                       l_sect = sect;
-               }
-       }
-
-       /* re-enable interrupts if necessary */
-       if (flag)
-               enable_interrupts();
-
-       /* wait at least 80us - let's wait 1 ms */
-       udelay(1000);
-
-       /*
-        * We wait for the last triggered sector
-        */
-       if (l_sect < 0)
-               goto DONE;
-
-       start = get_timer(0);
-       last = start;
-       addr = (vu_char *) (info->start[l_sect]);
-       while ((addr[0] & 0x80) != 0x80) {
-               if ((now = get_timer(start)) > CONFIG_SYS_FLASH_ERASE_TOUT) {
-                       printf("Timeout\n");
-                       return 1;
-               }
-               /* show that we're waiting */
-               if ((now - last) > 1000) {      /* every second */
-                       putc('.');
-                       last = now;
-               }
-       }
-
-DONE:
-       /* reset to read mode */
-       addr = (vu_char *) info->start[0];
-       addr[0] = 0xF0;                         /* reset bank */
-
-       printf(" done\n");
-       return 0;
-}
-
-/*-----------------------------------------------------------------------
- * Copy memory to flash, returns:
- * 0 - OK
- * 1 - write timeout
- * 2 - Flash not erased
- */
-
-int write_buff(flash_info_t * info, uchar * src, ulong addr, ulong cnt)
-{
-       int rc;
-
-       while (cnt > 0) {
-               if ((rc = write_byte(info, addr++, *src++)) != 0) {
-                       return (rc);
-               }
-               --cnt;
-       }
-
-       return (0);
-}
-
-/*-----------------------------------------------------------------------
- * Write a word to Flash, returns:
- * 0 - OK
- * 1 - write timeout
- * 2 - Flash not erased
- */
-static int write_byte(flash_info_t * info, ulong dest, uchar data)
-{
-       vu_char *addr = (vu_char *) (info->start[0]);
-       ulong start;
-       int flag;
-
-       /* Check if Flash is (sufficiently) erased */
-       if ((*((vu_char *) dest) & data) != data) {
-               return (2);
-       }
-       /* Disable interrupts which might cause a timeout here */
-       flag = disable_interrupts();
-
-       addr[0x0555] = 0xAA;
-       addr[0x02AA] = 0x55;
-       addr[0x0555] = 0xA0;
-
-       *((vu_char *) dest) = data;
-
-       /* re-enable interrupts if necessary */
-       if (flag)
-               enable_interrupts();
-
-       /* data polling for D7 */
-       start = get_timer(0);
-       while ((*((vu_char *) dest) & 0x80) != (data & 0x80)) {
-               if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT) {
-                       return (1);
-               }
-       }
-       return (0);
-}
diff --git a/board/netta2/netta2.c b/board/netta2/netta2.c
deleted file mode 100644 (file)
index 008ae67..0000000
+++ /dev/null
@@ -1,624 +0,0 @@
-/*
- * (C) Copyright 2000-2004
- * Pantelis Antoniou, Intracom S.A., panto@intracom.gr
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/*
- * Pantelis Antoniou, Intracom S.A., panto@intracom.gr
- * U-Boot port on NetTA4 board
- */
-
-#include <common.h>
-#include <miiphy.h>
-
-#include "mpc8xx.h"
-
-#ifdef CONFIG_HW_WATCHDOG
-#include <watchdog.h>
-#endif
-
-int fec8xx_miiphy_read(char *devname, unsigned char addr,
-               unsigned char  reg, unsigned short *value);
-int fec8xx_miiphy_write(char *devname, unsigned char  addr,
-               unsigned char  reg, unsigned short value);
-
-/****************************************************************/
-
-/* some sane bit macros */
-#define _BD(_b)                                (1U << (31-(_b)))
-#define _BDR(_l, _h)                   (((((1U << (31-(_l))) - 1) << 1) | 1) & ~((1U << (31-(_h))) - 1))
-
-#define _BW(_b)                                (1U << (15-(_b)))
-#define _BWR(_l, _h)                   (((((1U << (15-(_l))) - 1) << 1) | 1) & ~((1U << (15-(_h))) - 1))
-
-#define _BB(_b)                                (1U << (7-(_b)))
-#define _BBR(_l, _h)                   (((((1U << (7-(_l))) - 1) << 1) | 1) & ~((1U << (7-(_h))) - 1))
-
-#define _B(_b)                         _BD(_b)
-#define _BR(_l, _h)                    _BDR(_l, _h)
-
-/****************************************************************/
-
-/*
- * Check Board Identity:
- *
- * Return 1 always.
- */
-
-int checkboard(void)
-{
-       printf ("Intracom NetTA2 V%d\n", CONFIG_NETTA2_VERSION);
-       return (0);
-}
-
-/****************************************************************/
-
-#define _NOT_USED_     0xFFFFFFFF
-
-/****************************************************************/
-
-#define CS_0000                0x00000000
-#define CS_0001                0x10000000
-#define CS_0010                0x20000000
-#define CS_0011                0x30000000
-#define CS_0100                0x40000000
-#define CS_0101                0x50000000
-#define CS_0110                0x60000000
-#define CS_0111                0x70000000
-#define CS_1000                0x80000000
-#define CS_1001                0x90000000
-#define CS_1010                0xA0000000
-#define CS_1011                0xB0000000
-#define CS_1100                0xC0000000
-#define CS_1101                0xD0000000
-#define CS_1110                0xE0000000
-#define CS_1111                0xF0000000
-
-#define BS_0000                0x00000000
-#define BS_0001                0x01000000
-#define BS_0010                0x02000000
-#define BS_0011                0x03000000
-#define BS_0100                0x04000000
-#define BS_0101                0x05000000
-#define BS_0110                0x06000000
-#define BS_0111                0x07000000
-#define BS_1000                0x08000000
-#define BS_1001                0x09000000
-#define BS_1010                0x0A000000
-#define BS_1011                0x0B000000
-#define BS_1100                0x0C000000
-#define BS_1101                0x0D000000
-#define BS_1110                0x0E000000
-#define BS_1111                0x0F000000
-
-#define GPL0_AAAA      0x00000000
-#define GPL0_AAA0      0x00200000
-#define GPL0_AAA1      0x00300000
-#define GPL0_000A      0x00800000
-#define GPL0_0000      0x00A00000
-#define GPL0_0001      0x00B00000
-#define GPL0_111A      0x00C00000
-#define GPL0_1110      0x00E00000
-#define GPL0_1111      0x00F00000
-
-#define GPL1_0000      0x00000000
-#define GPL1_0001      0x00040000
-#define GPL1_1110      0x00080000
-#define GPL1_1111      0x000C0000
-
-#define GPL2_0000      0x00000000
-#define GPL2_0001      0x00010000
-#define GPL2_1110      0x00020000
-#define GPL2_1111      0x00030000
-
-#define GPL3_0000      0x00000000
-#define GPL3_0001      0x00004000
-#define GPL3_1110      0x00008000
-#define GPL3_1111      0x0000C000
-
-#define GPL4_0000      0x00000000
-#define GPL4_0001      0x00001000
-#define GPL4_1110      0x00002000
-#define GPL4_1111      0x00003000
-
-#define GPL5_0000      0x00000000
-#define GPL5_0001      0x00000400
-#define GPL5_1110      0x00000800
-#define GPL5_1111      0x00000C00
-#define LOOP           0x00000080
-
-#define EXEN           0x00000040
-
-#define AMX_COL                0x00000000
-#define AMX_ROW                0x00000020
-#define AMX_MAR                0x00000030
-
-#define NA             0x00000008
-
-#define UTA            0x00000004
-
-#define TODT           0x00000002
-
-#define LAST           0x00000001
-
-#define A10_AAAA       GPL0_AAAA
-#define A10_AAA0       GPL0_AAA0
-#define A10_AAA1       GPL0_AAA1
-#define A10_000A       GPL0_000A
-#define A10_0000       GPL0_0000
-#define A10_0001       GPL0_0001
-#define A10_111A       GPL0_111A
-#define A10_1110       GPL0_1110
-#define A10_1111       GPL0_1111
-
-#define RAS_0000       GPL1_0000
-#define RAS_0001       GPL1_0001
-#define RAS_1110       GPL1_1110
-#define RAS_1111       GPL1_1111
-
-#define CAS_0000       GPL2_0000
-#define CAS_0001       GPL2_0001
-#define CAS_1110       GPL2_1110
-#define CAS_1111       GPL2_1111
-
-#define WE_0000                GPL3_0000
-#define WE_0001                GPL3_0001
-#define WE_1110                GPL3_1110
-#define WE_1111                GPL3_1111
-
-/* #define CAS_LATENCY 3  */
-#define CAS_LATENCY    2
-
-const uint sdram_table[0x40] = {
-
-#if CAS_LATENCY == 3
-       /* RSS */
-       CS_0001 | BS_1111 | A10_AAAA | RAS_0001 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* ACT   */
-       CS_1111 | BS_1111 | A10_0000 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* NOP   */
-       CS_0000 | BS_1111 | A10_0001 | RAS_1111 | CAS_0001 | WE_1111 | AMX_COL | UTA,                   /* READ  */
-       CS_0001 | BS_0001 | A10_1111 | RAS_0001 | CAS_1111 | WE_0001 | AMX_COL | UTA,                   /* PALL  */
-       CS_1111 | BS_1111 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_1111 | BS_1111 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA | TODT | LAST,     /* NOP   */
-       _NOT_USED_, _NOT_USED_,
-
-       /* RBS */
-       CS_0001 | BS_1111 | A10_AAAA | RAS_0001 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* ACT   */
-       CS_1111 | BS_1111 | A10_0000 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* NOP   */
-       CS_0001 | BS_1111 | A10_0001 | RAS_1111 | CAS_0001 | WE_1111 | AMX_COL | UTA,                   /* READ  */
-       CS_1111 | BS_0000 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* NOP   */
-       CS_1111 | BS_0000 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_1111 | BS_0000 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_0001 | BS_0001 | A10_1111 | RAS_0001 | CAS_1111 | WE_0001 | AMX_COL,                         /* PALL  */
-       CS_1111 | BS_1111 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | TODT | LAST,           /* NOP   */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-
-       /* WSS */
-       CS_0001 | BS_1111 | A10_AAAA | RAS_0001 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* ACT   */
-       CS_1111 | BS_1111 | A10_0000 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_0000 | BS_0001 | A10_0000 | RAS_1111 | CAS_0001 | WE_0000 | AMX_COL | UTA,                   /* WRITE */
-       CS_0001 | BS_1111 | A10_1111 | RAS_0001 | CAS_1111 | WE_0001 | AMX_COL | UTA,                   /* PALL  */
-       CS_1111 | BS_1111 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA | TODT | LAST,     /* NOP   */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_,
-
-       /* WBS */
-       CS_0001 | BS_1111 | A10_AAAA | RAS_0001 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* ACT   */
-       CS_1111 | BS_1111 | A10_0000 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_0001 | BS_0000 | A10_0000 | RAS_1111 | CAS_0001 | WE_0000 | AMX_COL,                         /* WRITE */
-       CS_1111 | BS_0000 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_1111 | BS_0000 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_1111 | BS_0001 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* NOP   */
-       CS_1111 | BS_1111 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* NOP   */
-       CS_0001 | BS_1111 | A10_1111 | RAS_0001 | CAS_1111 | WE_0001 | AMX_COL | UTA,                   /* PALL  */
-       CS_1111 | BS_1111 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA | TODT | LAST,     /* NOP   */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_,
-#endif
-
-#if CAS_LATENCY == 2
-       /* RSS */
-       CS_0001 | BS_1111 | A10_AAAA | RAS_0001 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* ACT   */
-       CS_1110 | BS_1110 | A10_0000 | RAS_1111 | CAS_1110 | WE_1111 | AMX_COL | UTA,                   /* NOP   */
-       CS_0001 | BS_0001 | A10_0000 | RAS_1111 | CAS_0001 | WE_1111 | AMX_COL | UTA,                   /* READ  */
-       CS_1110 | BS_1111 | A10_0001 | RAS_1110 | CAS_1111 | WE_1110 | AMX_COL,                         /* NOP   */
-       CS_0001 | BS_1111 | A10_1111 | RAS_0001 | CAS_1111 | WE_0001 | AMX_COL | UTA | TODT | LAST,     /* PALL  */
-       _NOT_USED_,
-       _NOT_USED_, _NOT_USED_,
-
-       /* RBS */
-       CS_0001 | BS_1111 | A10_AAAA | RAS_0001 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* ACT   */
-       CS_1110 | BS_1110 | A10_0000 | RAS_1111 | CAS_1110 | WE_1111 | AMX_COL | UTA,                   /* NOP   */
-       CS_0001 | BS_0000 | A10_0000 | RAS_1111 | CAS_0001 | WE_1111 | AMX_COL | UTA,                   /* READ  */
-       CS_1111 | BS_0000 | A10_0000 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_1111 | BS_0000 | A10_0000 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_1111 | BS_0001 | A10_0000 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_1110 | BS_1111 | A10_0001 | RAS_1110 | CAS_1111 | WE_1110 | AMX_COL,                         /* NOP   */
-       CS_0001 | BS_1111 | A10_1111 | RAS_0001 | CAS_1111 | WE_0001 | AMX_COL | UTA | TODT | LAST,     /* PALL  */
-       _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-
-       /* WSS */
-       CS_0001 | BS_1111 | A10_AAA0 | RAS_0001 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* ACT   */
-       CS_1110 | BS_1110 | A10_0000 | RAS_1111 | CAS_1110 | WE_1110 | AMX_COL,                         /* NOP   */
-       CS_0000 | BS_0001 | A10_0001 | RAS_1110 | CAS_0001 | WE_0000 | AMX_COL | UTA,                   /* WRITE */
-       CS_0001 | BS_1111 | A10_1111 | RAS_0001 | CAS_1111 | WE_0001 | AMX_COL | UTA | TODT | LAST,     /* PALL  */
-       _NOT_USED_,
-       _NOT_USED_, _NOT_USED_,
-       _NOT_USED_,
-
-       /* WBS */
-       CS_0001 | BS_1111 | A10_AAAA | RAS_0001 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* ACT   */
-       CS_1110 | BS_1110 | A10_0000 | RAS_1111 | CAS_1110 | WE_1110 | AMX_COL,                         /* NOP   */
-       CS_0001 | BS_0000 | A10_0000 | RAS_1111 | CAS_0001 | WE_0001 | AMX_COL,                         /* WRITE */
-       CS_1111 | BS_0000 | A10_0000 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_1111 | BS_0000 | A10_0000 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL,                         /* NOP   */
-       CS_1110 | BS_0001 | A10_0001 | RAS_1110 | CAS_1111 | WE_1110 | AMX_COL | UTA,                   /* NOP   */
-       CS_0001 | BS_1111 | A10_1111 | RAS_0001 | CAS_1111 | WE_0001 | AMX_COL | UTA | TODT | LAST,     /* PALL  */
-       _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_,
-
-#endif
-
-       /* UPT */
-       CS_0001 | BS_1111 | A10_1111 | RAS_0001 | CAS_0001 | WE_1111 | AMX_COL | UTA | LOOP,            /* ATRFR */
-       CS_1111 | BS_1111 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* NOP   */
-       CS_1111 | BS_1111 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* NOP   */
-       CS_1111 | BS_1111 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA,                   /* NOP   */
-       CS_1111 | BS_1111 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA | LOOP,            /* NOP   */
-       CS_1111 | BS_1111 | A10_1111 | RAS_1111 | CAS_1111 | WE_1111 | AMX_COL | UTA | TODT | LAST,     /* NOP   */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_,
-
-       /* EXC */
-       CS_0001 | BS_1111 | A10_1111 | RAS_0001 | CAS_1111 | WE_0001 | AMX_COL | UTA | LAST,
-       _NOT_USED_,
-
-       /* REG */
-       CS_1110 | BS_1111 | A10_1110 | RAS_1110 | CAS_1110 | WE_1110 | AMX_MAR | UTA,
-       CS_0001 | BS_1111 | A10_0001 | RAS_0001 | CAS_0001 | WE_0001 | AMX_MAR | UTA | LAST,
-};
-
-#if CONFIG_NETTA2_VERSION == 2
-static const uint nandcs_table[0x40] = {
-       /* RSS */
-       CS_1000 | GPL4_1111 | GPL5_1111 | UTA,
-       CS_0000 | GPL4_1110 | GPL5_1111 | UTA,
-       CS_0000 | GPL4_0000 | GPL5_1111 | UTA,
-       CS_0000 | GPL4_0000 | GPL5_1111 | UTA,
-       CS_0000 | GPL4_0000 | GPL5_1111,
-       CS_0000 | GPL4_0001 | GPL5_1111 | UTA,
-       CS_0000 | GPL4_1111 | GPL5_1111 | UTA,
-       CS_0011 | GPL4_1111 | GPL5_1111 | UTA | LAST,   /* NOP   */
-
-       /* RBS */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-
-       /* WSS */
-       CS_1000 | GPL4_1111 | GPL5_1110 | UTA,
-       CS_0000 | GPL4_1111 | GPL5_0000 | UTA,
-       CS_0000 | GPL4_1111 | GPL5_0000 | UTA,
-       CS_0000 | GPL4_1111 | GPL5_0000 | UTA,
-       CS_0000 | GPL4_1111 | GPL5_0001 | UTA,
-       CS_0000 | GPL4_1111 | GPL5_1111 | UTA,
-       CS_0000 | GPL4_1111 | GPL5_1111,
-       CS_0011 | GPL4_1111 | GPL5_1111 | UTA | LAST,
-
-       /* WBS */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-
-       /* UPT */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-
-       /* EXC */
-       CS_0001 | LAST,
-       _NOT_USED_,
-
-       /* REG */
-       CS_1110 ,
-       CS_0001 | LAST,
-};
-#endif
-
-/* 0xC8 = 0b11001000 , CAS3, >> 2 = 0b00 11 0 010 */
-/* 0x88 = 0b10001000 , CAS2, >> 2 = 0b00 10 0 010 */
-#define MAR_SDRAM_INIT         ((CAS_LATENCY << 6) | 0x00000008LU)
-
-/* 8 */
-#define CONFIG_SYS_MAMR        ((CONFIG_SYS_MAMR_PTA << MAMR_PTA_SHIFT)  | MAMR_PTAE       |   \
-                        MAMR_AMA_TYPE_0 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A11 |   \
-                        MAMR_RLFA_1X    | MAMR_WLFA_1X    | MAMR_TLFA_4X)
-
-void check_ram(unsigned int addr, unsigned int size)
-{
-       unsigned int i, j, v, vv;
-       volatile unsigned int *p;
-       unsigned int pv;
-
-       p = (unsigned int *)addr;
-       pv = (unsigned int)p;
-       for (i = 0; i < size / sizeof(unsigned int); i++, pv += sizeof(unsigned int))
-               *p++ = pv;
-
-       p = (unsigned int *)addr;
-       for (i = 0; i < size / sizeof(unsigned int); i++) {
-               v = (unsigned int)p;
-               vv = *p;
-               if (vv != v) {
-                       printf("%p: read %08x instead of %08x\n", p, vv, v);
-                       hang();
-               }
-               p++;
-       }
-
-       for (j = 0; j < 5; j++) {
-               switch (j) {
-                       case 0: v = 0x00000000; break;
-                       case 1: v = 0xffffffff; break;
-                       case 2: v = 0x55555555; break;
-                       case 3: v = 0xaaaaaaaa; break;
-                       default:v = 0xdeadbeef; break;
-               }
-               p = (unsigned int *)addr;
-               for (i = 0; i < size / sizeof(unsigned int); i++) {
-                       *p = v;
-                       vv = *p;
-                       if (vv != v) {
-                               printf("%p: read %08x instead of %08x\n", p, vv, v);
-                               hang();
-                       }
-                       *p = ~v;
-                       p++;
-               }
-       }
-}
-
-phys_size_t initdram(int board_type)
-{
-       volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
-       volatile memctl8xx_t *memctl = &immap->im_memctl;
-       long int size;
-
-       upmconfig(UPMB, (uint *) sdram_table, sizeof(sdram_table) / sizeof(sdram_table[0]));
-
-       /*
-        * Preliminary prescaler for refresh
-        */
-       memctl->memc_mptpr = MPTPR_PTP_DIV8;
-
-       memctl->memc_mar = MAR_SDRAM_INIT;      /* 32-bit address to be output on the address bus if AMX = 0b11 */
-
-       /*
-        * Map controller bank 3 to the SDRAM bank at preliminary address.
-        */
-       memctl->memc_or3 = CONFIG_SYS_OR3_PRELIM;
-       memctl->memc_br3 = CONFIG_SYS_BR3_PRELIM;
-
-       memctl->memc_mbmr = CONFIG_SYS_MAMR & ~MAMR_PTAE;       /* no refresh yet */
-
-       udelay(200);
-
-       /* perform SDRAM initialisation sequence */
-       memctl->memc_mcr = MCR_OP_RUN | MCR_UPM_B | MCR_MB_CS3 | MCR_MLCF(1) | MCR_MAD(0x3C);   /* precharge all                */
-       udelay(1);
-
-       memctl->memc_mcr = MCR_OP_RUN | MCR_UPM_B | MCR_MB_CS3 | MCR_MLCF(2) | MCR_MAD(0x30);   /* refresh 2 times(0)           */
-       udelay(1);
-
-       memctl->memc_mcr = MCR_OP_RUN | MCR_UPM_B | MCR_MB_CS3 | MCR_MLCF(1) | MCR_MAD(0x3E);   /* exception program (write mar)*/
-       udelay(1);
-
-       memctl->memc_mbmr |= MAMR_PTAE; /* enable refresh */
-
-       udelay(10000);
-
-       {
-               u32 d1, d2;
-
-               d1 = 0xAA55AA55;
-               *(volatile u32 *)0 = d1;
-               d2 = *(volatile u32 *)0;
-               if (d1 != d2) {
-                       printf("DRAM fails: wrote 0x%08x read 0x%08x\n", d1, d2);
-                       hang();
-               }
-
-               d1 = 0x55AA55AA;
-               *(volatile u32 *)0 = d1;
-               d2 = *(volatile u32 *)0;
-               if (d1 != d2) {
-                       printf("DRAM fails: wrote 0x%08x read 0x%08x\n", d1, d2);
-                       hang();
-               }
-       }
-
-       size = get_ram_size((long *)0, SDRAM_MAX_SIZE);
-
-       if (size == 0) {
-               printf("SIZE is zero: LOOP on 0\n");
-               for (;;) {
-                       *(volatile u32 *)0 = 0;
-                       (void)*(volatile u32 *)0;
-               }
-       }
-
-       return size;
-}
-
-/* ------------------------------------------------------------------------- */
-
-void reset_phys(void)
-{
-       int phyno;
-       unsigned short v;
-
-       udelay(10000);
-       /* reset the damn phys */
-       mii_init();
-
-       for (phyno = 0; phyno < 32; ++phyno) {
-               fec8xx_miiphy_read(NULL, phyno, MII_PHYSID1, &v);
-               if (v == 0xFFFF)
-                       continue;
-               fec8xx_miiphy_write(NULL, phyno, MII_BMCR, BMCR_PDOWN);
-               udelay(10000);
-               fec8xx_miiphy_write(NULL, phyno, MII_BMCR,
-                               BMCR_RESET | BMCR_ANENABLE);
-               udelay(10000);
-       }
-}
-
-/* ------------------------------------------------------------------------- */
-
-/* GP = general purpose, SP = special purpose (on chip peripheral) */
-
-/* bits that can have a special purpose or can be configured as inputs/outputs */
-#define PA_GP_INMASK   0
-#define PA_GP_OUTMASK  (_BW(3) | _BW(7) | _BW(10) | _BW(14) | _BW(15))
-#define PA_SP_MASK     0
-#define PA_ODR_VAL     0
-#define PA_GP_OUTVAL   (_BW(3) | _BW(14) | _BW(15))
-#define PA_SP_DIRVAL   0
-
-#define PB_GP_INMASK   _B(28)
-#define PB_GP_OUTMASK  (_B(19) | _B(23) | _B(26) | _B(27) | _B(29) | _B(30))
-#define PB_SP_MASK     (_BR(22, 25))
-#define PB_ODR_VAL     0
-#define PB_GP_OUTVAL   (_B(26) | _B(27) | _B(29) | _B(30))
-#define PB_SP_DIRVAL   0
-
-#if CONFIG_NETTA2_VERSION == 1
-#define PC_GP_INMASK   _BW(12)
-#define PC_GP_OUTMASK  (_BW(10) | _BW(11) | _BW(13) | _BW(15))
-#elif CONFIG_NETTA2_VERSION == 2
-#define PC_GP_INMASK   (_BW(13) | _BW(15))
-#define PC_GP_OUTMASK  (_BW(10) | _BW(11) | _BW(12))
-#endif
-#define PC_SP_MASK     0
-#define PC_SOVAL       0
-#define PC_INTVAL      0
-#define PC_GP_OUTVAL   (_BW(10) | _BW(11))
-#define PC_SP_DIRVAL   0
-
-#if CONFIG_NETTA2_VERSION == 1
-#define PE_GP_INMASK   _B(31)
-#define PE_GP_OUTMASK  (_B(17) | _B(18) |_B(20) | _B(24) | _B(27) | _B(28) | _B(29) | _B(30))
-#define PE_GP_OUTVAL   (_B(20) | _B(24) | _B(27) | _B(28))
-#elif CONFIG_NETTA2_VERSION == 2
-#define PE_GP_INMASK   _BR(28, 31)
-#define PE_GP_OUTMASK  (_B(17) | _B(18) |_B(20) | _B(24) | _B(27))
-#define PE_GP_OUTVAL   (_B(20) | _B(24) | _B(27))
-#endif
-#define PE_SP_MASK     0
-#define PE_ODR_VAL     0
-#define PE_SP_DIRVAL   0
-
-int board_early_init_f(void)
-{
-       volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
-       volatile iop8xx_t *ioport = &immap->im_ioport;
-       volatile cpm8xx_t *cpm = &immap->im_cpm;
-       volatile memctl8xx_t *memctl = &immap->im_memctl;
-
-       /* NAND chip select */
-#if CONFIG_NETTA2_VERSION == 1
-       memctl->memc_or1 = ((0xFFFFFFFFLU & ~(NAND_SIZE - 1)) | OR_CSNT_SAM | OR_BI | OR_SCY_8_CLK | OR_EHTR | OR_TRLX);
-       memctl->memc_br1 = ((NAND_BASE & BR_BA_MSK) | BR_PS_8 | BR_V);
-#elif CONFIG_NETTA2_VERSION == 2
-       upmconfig(UPMA, (uint *) nandcs_table, sizeof(nandcs_table) / sizeof(nandcs_table[0]));
-       memctl->memc_or1 = ((0xFFFFFFFFLU & ~(NAND_SIZE - 1)) | OR_BI | OR_G5LS);
-       memctl->memc_br1 = ((NAND_BASE & BR_BA_MSK) | BR_PS_8 | BR_V | BR_MS_UPMA);
-       memctl->memc_mamr = 0;  /* all clear */
-#endif
-
-       /* DSP chip select */
-       memctl->memc_or2 = ((0xFFFFFFFFLU & ~(DSP_SIZE - 1)) | OR_CSNT_SAM | OR_BI | OR_ACS_DIV2 | OR_SETA | OR_TRLX);
-       memctl->memc_br2 = ((DSP_BASE & BR_BA_MSK) | BR_PS_16 | BR_V);
-
-#if CONFIG_NETTA2_VERSION == 1
-       memctl->memc_br4 &= ~BR_V;
-#endif
-       memctl->memc_br5 &= ~BR_V;
-       memctl->memc_br6 &= ~BR_V;
-       memctl->memc_br7 &= ~BR_V;
-
-       ioport->iop_padat       = PA_GP_OUTVAL;
-       ioport->iop_paodr       = PA_ODR_VAL;
-       ioport->iop_padir       = PA_GP_OUTMASK | PA_SP_DIRVAL;
-       ioport->iop_papar       = PA_SP_MASK;
-
-       cpm->cp_pbdat           = PB_GP_OUTVAL;
-       cpm->cp_pbodr           = PB_ODR_VAL;
-       cpm->cp_pbdir           = PB_GP_OUTMASK | PB_SP_DIRVAL;
-       cpm->cp_pbpar           = PB_SP_MASK;
-
-       ioport->iop_pcdat       = PC_GP_OUTVAL;
-       ioport->iop_pcdir       = PC_GP_OUTMASK | PC_SP_DIRVAL;
-       ioport->iop_pcso        = PC_SOVAL;
-       ioport->iop_pcint       = PC_INTVAL;
-       ioport->iop_pcpar       = PC_SP_MASK;
-
-       cpm->cp_pedat           = PE_GP_OUTVAL;
-       cpm->cp_peodr           = PE_ODR_VAL;
-       cpm->cp_pedir           = PE_GP_OUTMASK | PE_SP_DIRVAL;
-       cpm->cp_pepar           = PE_SP_MASK;
-
-       return 0;
-}
-
-#ifdef CONFIG_HW_WATCHDOG
-
-void hw_watchdog_reset(void)
-{
-       /* XXX add here the really funky stuff */
-}
-
-#endif
-
-#if defined(CONFIG_SYS_CONSOLE_IS_IN_ENV) && defined(CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE)
-int overwrite_console(void)
-{
-       /* printf("overwrite_console called\n"); */
-       return 0;
-}
-#endif
-
-extern int drv_phone_init(void);
-extern int drv_phone_use_me(void);
-extern int drv_phone_is_idle(void);
-
-int misc_init_r(void)
-{
-       return 0;
-}
-
-int last_stage_init(void)
-{
-#if CONFIG_NETTA2_VERSION == 2
-       int i;
-#endif
-
-#if CONFIG_NETTA2_VERSION == 2
-       /* assert peripheral reset */
-       ((volatile immap_t *)CONFIG_SYS_IMMR)->im_ioport.iop_pcdat &= ~_BW(12);
-       for (i = 0; i < 10; i++)
-               udelay(1000);
-       ((volatile immap_t *)CONFIG_SYS_IMMR)->im_ioport.iop_pcdat |=  _BW(12);
-#endif
-       reset_phys();
-
-       return 0;
-}
diff --git a/board/netta2/u-boot.lds b/board/netta2/u-boot.lds
deleted file mode 100644 (file)
index 0dff5a4..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * (C) Copyright 2000-2010
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-OUTPUT_ARCH(powerpc)
-
-SECTIONS
-{
-  /* Read-only sections, merged into text segment: */
-  . = + SIZEOF_HEADERS;
-  .text        :
-  {
-    arch/powerpc/cpu/mpc8xx/start.o    (.text*)
-    arch/powerpc/cpu/mpc8xx/traps.o    (.text*)
-
-    *(.text*)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-
-  /* Read-write section, merged into data segment: */
-  . = (. + 0x00FF) & 0xFFFFFF00;
-  _erotext = .;
-  PROVIDE (erotext = .);
-  .reloc   :
-  {
-    _GOT2_TABLE_ = .;
-    KEEP(*(.got2))
-    KEEP(*(.got))
-    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
-    _FIXUP_TABLE_ = .;
-    KEEP(*(.fixup))
-  }
-  __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
-  __fixup_entries = (. - _FIXUP_TABLE_)>>2;
-
-  .data    :
-  {
-    *(.data*)
-    *(.sdata*)
-  }
-  _edata  =  .;
-  PROVIDE (edata = .);
-
-  . = .;
-
-  . = ALIGN(4);
-  .u_boot_list : {
-       KEEP(*(SORT(.u_boot_list*)));
-  }
-
-
-  . = .;
-  __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)       :
-  {
-   *(.bss*)
-   *(.sbss*)
-   *(COMMON)
-   . = ALIGN(4);
-  }
-  __bss_end = . ;
-  PROVIDE (end = .);
-}
diff --git a/board/netta2/u-boot.lds.debug b/board/netta2/u-boot.lds.debug
deleted file mode 100644 (file)
index a198cf9..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * (C) Copyright 2000-2004
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-OUTPUT_ARCH(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  /* Read-only sections, merged into text segment: */
-  . = + SIZEOF_HEADERS;
-  .interp : { *(.interp) }
-  .hash          : { *(.hash)          }
-  .dynsym        : { *(.dynsym)                }
-  .dynstr        : { *(.dynstr)                }
-  .rel.text      : { *(.rel.text)              }
-  .rela.text     : { *(.rela.text)     }
-  .rel.data      : { *(.rel.data)              }
-  .rela.data     : { *(.rela.data)     }
-  .rel.rodata    : { *(.rel.rodata)    }
-  .rela.rodata   : { *(.rela.rodata)   }
-  .rel.got       : { *(.rel.got)               }
-  .rela.got      : { *(.rela.got)              }
-  .rel.ctors     : { *(.rel.ctors)     }
-  .rela.ctors    : { *(.rela.ctors)    }
-  .rel.dtors     : { *(.rel.dtors)     }
-  .rela.dtors    : { *(.rela.dtors)    }
-  .rel.bss       : { *(.rel.bss)               }
-  .rela.bss      : { *(.rela.bss)              }
-  .rel.plt       : { *(.rel.plt)               }
-  .rela.plt      : { *(.rela.plt)              }
-  .init          : { *(.init)  }
-  .plt : { *(.plt) }
-  .text      :
-  {
-    /* WARNING - the following is hand-optimized to fit within */
-    /* the sector layout of our flash chips!   XXX FIXME XXX   */
-
-    arch/powerpc/cpu/mpc8xx/start.o            (.text)
-    common/dlmalloc.o          (.text)
-    lib/vsprintf.o     (.text)
-    lib/crc32.o                (.text)
-
-    . = env_offset;
-    common/env_embedded.o(.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.rodata)
-    *(.rodata1)
-    *(.rodata.str1.4)
-    *(.eh_frame)
-  }
-  .fini      : { *(.fini)    } =0
-  .ctors     : { *(.ctors)   }
-  .dtors     : { *(.dtors)   }
-
-  /* Read-write section, merged into data segment: */
-  . = (. + 0x0FFF) & 0xFFFFF000;
-  _erotext = .;
-  PROVIDE (erotext = .);
-  .reloc   :
-  {
-    *(.got)
-    _GOT2_TABLE_ = .;
-    *(.got2)
-    _FIXUP_TABLE_ = .;
-    *(.fixup)
-  }
-  __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
-  __fixup_entries = (. - _FIXUP_TABLE_)>>2;
-
-  .data    :
-  {
-    *(.data)
-    *(.data1)
-    *(.sdata)
-    *(.sdata2)
-    *(.dynamic)
-    CONSTRUCTORS
-  }
-  _edata  =  .;
-  PROVIDE (edata = .);
-
-
-  . = ALIGN(4);
-  .u_boot_list : {
-       KEEP(*(SORT(.u_boot_list*)));
-  }
-
-
-  __start___ex_table = .;
-  __ex_table : { *(__ex_table) }
-  __stop___ex_table = .;
-
-  . = ALIGN(4096);
-  __init_begin = .;
-  .text.init : { *(.text.init) }
-  .data.init : { *(.data.init) }
-  . = ALIGN(4096);
-  __init_end = .;
-
-  __bss_start = .;
-  .bss       :
-  {
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
-   *(COMMON)
-  }
-  __bss_end = . ;
-  PROVIDE (end = .);
-}
diff --git a/board/quantum/Makefile b/board/quantum/Makefile
deleted file mode 100644 (file)
index 6918f63..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# (C) Copyright 2000-2006
-# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
-
-obj-y  = quantum.o fpga.o
diff --git a/board/quantum/fpga.c b/board/quantum/fpga.c
deleted file mode 100644 (file)
index 4bd391a..0000000
+++ /dev/null
@@ -1,247 +0,0 @@
-/*
- * (C) Copyright 2001-2003
- * Matthias Fuchs, esd gmbh germany, matthias.fuchs@esd-electronics.com
- * Stefan Roese, esd gmbh germany, stefan.roese@esd-electronics.com
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-/* The DEBUG define must be before common to enable debugging */
-#undef DEBUG
-#include <common.h>
-#include <asm/processor.h>
-#include <command.h>
-#include "fpga.h"
-/* ------------------------------------------------------------------------- */
-
-#define MAX_ONES               226
-
-/* MPC850 port D */
-#define PD(bit) (1 << (15 - (bit)))
-# define FPGA_INIT             PD(11)  /* FPGA init pin (ppc input)     */
-# define FPGA_PRG              PD(12)  /* FPGA program pin (ppc output) */
-# define FPGA_CLK              PD(13)  /* FPGA clk pin (ppc output)     */
-# define FPGA_DATA             PD(14)  /* FPGA data pin (ppc output)    */
-# define FPGA_DONE             PD(15)  /* FPGA done pin (ppc input)     */
-
-
-/* DDR 0 - input, 1 - output */
-#define FPGA_INIT_PDDIR          FPGA_PRG | FPGA_CLK | FPGA_DATA       /* just set outputs */
-
-
-#define SET_FPGA(data)         immr->im_ioport.iop_pddat = (data)
-#define GET_FPGA               immr->im_ioport.iop_pddat
-
-#define FPGA_WRITE_1 {                                                    \
-       SET_FPGA(FPGA_PRG |            FPGA_DATA);  /* set clock to 0 */  \
-       SET_FPGA(FPGA_PRG |            FPGA_DATA);  /* set data to 1  */  \
-       SET_FPGA(FPGA_PRG | FPGA_CLK | FPGA_DATA);  /* set clock to 1 */  \
-       SET_FPGA(FPGA_PRG | FPGA_CLK | FPGA_DATA);}     /* set data to 1  */
-
-#define FPGA_WRITE_0 {                                                    \
-       SET_FPGA(FPGA_PRG |            FPGA_DATA);  /* set clock to 0 */  \
-       SET_FPGA(FPGA_PRG);                         /* set data to 0  */  \
-       SET_FPGA(FPGA_PRG | FPGA_CLK);              /* set clock to 1 */  \
-       SET_FPGA(FPGA_PRG | FPGA_CLK | FPGA_DATA);}     /* set data to 1  */
-
-
-int fpga_boot (unsigned char *fpgadata, int size)
-{
-       volatile immap_t *immr = (immap_t *) CONFIG_SYS_IMMR;
-       int i, index, len;
-       int count;
-
-#ifdef CONFIG_SYS_FPGA_SPARTAN2
-       int j;
-       unsigned char data;
-#else
-       unsigned char b;
-       int bit;
-#endif
-
-       debug ("fpga_boot: fpgadata = %p, size = %d\n", fpgadata, size);
-
-       /* display infos on fpgaimage */
-       printf ("FPGA:");
-       index = 15;
-       for (i = 0; i < 4; i++) {
-               len = fpgadata[index];
-               printf (" %s", &(fpgadata[index + 1]));
-               index += len + 3;
-       }
-       printf ("\n");
-
-
-       index = 0;
-
-#ifdef CONFIG_SYS_FPGA_SPARTAN2
-       /* search for preamble 0xFFFFFFFF */
-       while (1) {
-               if ((fpgadata[index] == 0xff) && (fpgadata[index + 1] == 0xff)
-                   && (fpgadata[index + 2] == 0xff)
-                   && (fpgadata[index + 3] == 0xff))
-                       break;  /* preamble found */
-               else
-                       index++;
-       }
-#else
-       /* search for preamble 0xFF2X */
-       for (index = 0; index < size - 1; index++) {
-               if ((fpgadata[index] == 0xff)
-                   && ((fpgadata[index + 1] & 0xf0) == 0x30))
-                       break;
-       }
-       index += 2;
-#endif
-
-       debug ("FPGA: configdata starts at position 0x%x\n", index);
-       debug ("FPGA: length of fpga-data %d\n", size - index);
-
-       /*
-        * Setup port pins for fpga programming
-        */
-       immr->im_ioport.iop_pddir = FPGA_INIT_PDDIR;
-
-       debug ("%s, ", ((GET_FPGA & FPGA_DONE) == 0) ? "NOT DONE" : "DONE");
-       debug ("%s\n", ((GET_FPGA & FPGA_INIT) == 0) ? "NOT INIT" : "INIT");
-
-       /*
-        * Init fpga by asserting and deasserting PROGRAM*
-        */
-       SET_FPGA (FPGA_CLK | FPGA_DATA);
-
-       /* Wait for FPGA init line low */
-       count = 0;
-       while (GET_FPGA & FPGA_INIT) {
-               udelay (1000);  /* wait 1ms */
-               /* Check for timeout - 100us max, so use 3ms */
-               if (count++ > 3) {
-                       debug ("FPGA: Booting failed!\n");
-                       return ERROR_FPGA_PRG_INIT_LOW;
-               }
-       }
-
-       debug ("%s, ", ((GET_FPGA & FPGA_DONE) == 0) ? "NOT DONE" : "DONE");
-       debug ("%s\n", ((GET_FPGA & FPGA_INIT) == 0) ? "NOT INIT" : "INIT");
-
-       /* deassert PROGRAM* */
-       SET_FPGA (FPGA_PRG | FPGA_CLK | FPGA_DATA);
-
-       /* Wait for FPGA end of init period .  */
-       count = 0;
-       while (!(GET_FPGA & FPGA_INIT)) {
-               udelay (1000);  /* wait 1ms */
-               /* Check for timeout */
-               if (count++ > 3) {
-                       debug ("FPGA: Booting failed!\n");
-                       return ERROR_FPGA_PRG_INIT_HIGH;
-               }
-       }
-
-       debug ("%s, ", ((GET_FPGA & FPGA_DONE) == 0) ? "NOT DONE" : "DONE");
-       debug ("%s\n", ((GET_FPGA & FPGA_INIT) == 0) ? "NOT INIT" : "INIT");
-
-       debug ("write configuration data into fpga\n");
-       /* write configuration-data into fpga... */
-
-#ifdef CONFIG_SYS_FPGA_SPARTAN2
-       /*
-        * Load uncompressed image into fpga
-        */
-       for (i = index; i < size; i++) {
-#ifdef CONFIG_SYS_FPGA_PROG_FEEDBACK
-               if ((i % 1024) == 0)
-                       printf ("%6d out of %6d\r", i, size);   /* let them know we are alive */
-#endif
-
-               data = fpgadata[i];
-               for (j = 0; j < 8; j++) {
-                       if ((data & 0x80) == 0x80) {
-                               FPGA_WRITE_1;
-                       } else {
-                               FPGA_WRITE_0;
-                       }
-                       data <<= 1;
-               }
-       }
-       /* add some 0xff to the end of the file */
-       for (i = 0; i < 8; i++) {
-               data = 0xff;
-               for (j = 0; j < 8; j++) {
-                       if ((data & 0x80) == 0x80) {
-                               FPGA_WRITE_1;
-                       } else {
-                               FPGA_WRITE_0;
-                       }
-                       data <<= 1;
-               }
-       }
-#else
-       /* send 0xff 0x20 */
-       FPGA_WRITE_1;
-       FPGA_WRITE_1;
-       FPGA_WRITE_1;
-       FPGA_WRITE_1;
-       FPGA_WRITE_1;
-       FPGA_WRITE_1;
-       FPGA_WRITE_1;
-       FPGA_WRITE_1;
-       FPGA_WRITE_0;
-       FPGA_WRITE_0;
-       FPGA_WRITE_1;
-       FPGA_WRITE_0;
-       FPGA_WRITE_0;
-       FPGA_WRITE_0;
-       FPGA_WRITE_0;
-       FPGA_WRITE_0;
-
-       /*
-        ** Bit_DeCompression
-        **   Code 1           .. maxOnes     : n                 '1's followed by '0'
-        **        maxOnes + 1 .. maxOnes + 1 : n - 1             '1's no '0'
-        **        maxOnes + 2 .. 254         : n - (maxOnes + 2) '0's followed by '1'
-        **        255                        :                   '1'
-        */
-
-       for (i = index; i < size; i++) {
-               b = fpgadata[i];
-               if ((b >= 1) && (b <= MAX_ONES)) {
-                       for (bit = 0; bit < b; bit++) {
-                               FPGA_WRITE_1;
-                       }
-                       FPGA_WRITE_0;
-               } else if (b == (MAX_ONES + 1)) {
-                       for (bit = 1; bit < b; bit++) {
-                               FPGA_WRITE_1;
-                       }
-               } else if ((b >= (MAX_ONES + 2)) && (b <= 254)) {
-                       for (bit = 0; bit < (b - (MAX_ONES + 2)); bit++) {
-                               FPGA_WRITE_0;
-                       }
-                       FPGA_WRITE_1;
-               } else if (b == 255) {
-                       FPGA_WRITE_1;
-               }
-       }
-#endif
-       debug ("\n\n");
-       debug ("%s, ", ((GET_FPGA & FPGA_DONE) == 0) ? "NOT DONE" : "DONE");
-       debug ("%s\n", ((GET_FPGA & FPGA_INIT) == 0) ? "NOT INIT" : "INIT");
-
-       /*
-        * Check if fpga's DONE signal - correctly booted ?
-        */
-
-       /* Wait for FPGA end of programming period .  */
-       count = 0;
-       while (!(GET_FPGA & FPGA_DONE)) {
-               udelay (1000);  /* wait 1ms */
-               /* Check for timeout */
-               if (count++ > 3) {
-                       debug ("FPGA: Booting failed!\n");
-                       return ERROR_FPGA_PRG_DONE;
-               }
-       }
-
-       debug ("FPGA: Booting successful!\n");
-       return 0;
-}
diff --git a/board/quantum/fpga.h b/board/quantum/fpga.h
deleted file mode 100644 (file)
index a9f4086..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * (C) Copyright 2002
- * Rich Ireland, Enterasys Networks, rireland@enterasys.com.
- * Keith Outwater, keith_outwater@mvis.com.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/*
- * Virtex2 FPGA configuration support for the QUANTUM computer
- */
-int fpga_boot(unsigned char *fpgadata, int size);
-
-#define ERROR_FPGA_PRG_INIT_LOW  -1        /* Timeout after PRG* asserted   */
-#define ERROR_FPGA_PRG_INIT_HIGH -2        /* Timeout after PRG* deasserted */
-#define ERROR_FPGA_PRG_DONE      -3        /* Timeout after programming     */
diff --git a/board/quantum/quantum.c b/board/quantum/quantum.c
deleted file mode 100644 (file)
index 17e3fc2..0000000
+++ /dev/null
@@ -1,243 +0,0 @@
-/*
- * (C) Copyright 2000
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-
-#include <common.h>
-#include <mpc8xx.h>
-#include "fpga.h"
-
-/* ------------------------------------------------------------------------- */
-
-static long int dram_size (long int, long int *, long int);
-unsigned long flash_init (void);
-
-/* ------------------------------------------------------------------------- */
-
-#define        _NOT_USED_      0xFFFFCC25
-
-const uint sdram_table[] = {
-       /*
-        * Single Read. (Offset 00h in UPMA RAM)
-        */
-       0x0F03CC04, 0x00ACCC24, 0x1FF74C20, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-
-       /*
-        * Burst Read. (Offset 08h in UPMA RAM)
-        */
-       0x0F03CC04, 0x00ACCC24, 0x00FFCC20, 0x00FFCC20,
-       0x01FFCC20, 0x1FF74C20, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-
-       /*
-        * Single Write. (Offset 18h in UPMA RAM)
-        */
-       0x0F03CC02, 0x00AC0C24, 0x1FF74C25, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-
-       /*
-        * Burst Write. (Offset 20h in UPMA RAM)
-        */
-       0x0F03CC00, 0x00AC0C20, 0x00FFFC20, 0x00FFFC22,
-       0x01FFFC24, 0x1FF74C25, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-
-       /*
-        * Refresh. (Offset 30h in UPMA RAM)
-        * (Initialization code at 0x36)
-        */
-       0x0FF0CC24, 0xFFFFCC24, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, 0xEFFB8C34, 0x0FF74C34,
-       0x0FFACCB4, 0x0FF5CC34, 0x0FFCC34, 0x0FFFCCB4,
-
-       /*
-        * Exception. (Offset 3Ch in UPMA RAM)
-        */
-       0x0FEA8C34, 0x1FB54C34, 0xFFFFCC34, _NOT_USED_
-};
-
-/* ------------------------------------------------------------------------- */
-
-
-/*
- * Check Board Identity:
- */
-
-int checkboard (void)
-{
-       char buf[64];
-       int i;
-       int l = getenv_f("serial#", buf, sizeof(buf));
-
-       puts ("Board QUANTUM, Serial No: ");
-
-       for (i = 0; i < l; ++i) {
-               if (buf[i] == ' ')
-                       break;
-               putc (buf[i]);
-       }
-       putc ('\n');
-       return (0);             /* success */
-}
-
-/* ------------------------------------------------------------------------- */
-
-phys_size_t initdram (int board_type)
-{
-       volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
-       volatile memctl8xx_t *memctl = &immap->im_memctl;
-       long int size9;
-
-       upmconfig (UPMA, (uint *) sdram_table,
-                  sizeof (sdram_table) / sizeof (uint));
-
-       /* Refresh clock prescalar */
-       memctl->memc_mptpr = CONFIG_SYS_MPTPR;
-
-       memctl->memc_mar = 0x00000088;
-
-       /* Map controller banks 1 to the SDRAM bank */
-       memctl->memc_or1 = CONFIG_SYS_OR1_PRELIM;
-       memctl->memc_br1 = CONFIG_SYS_BR1_PRELIM;
-
-       memctl->memc_mamr = CONFIG_SYS_MAMR_9COL & (~(MAMR_PTAE));      /* no refresh yet */
-
-       udelay (200);
-
-       /* perform SDRAM initializsation sequence */
-
-       memctl->memc_mcr = 0x80002136;  /* SDRAM bank 0 */
-       udelay (1);
-
-       memctl->memc_mamr |= MAMR_PTAE; /* enable refresh */
-
-       udelay (1000);
-
-       /* Check Bank 0 Memory Size,
-        * 9 column mode
-        */
-       size9 = dram_size (CONFIG_SYS_MAMR_9COL, (long *) SDRAM_BASE_PRELIM,
-                          SDRAM_MAX_SIZE);
-       /*
-        * Final mapping:
-        */
-       memctl->memc_or1 = ((-size9) & 0xFFFF0000) | CONFIG_SYS_OR_TIMING_SDRAM;
-       udelay (1000);
-
-       return (size9);
-}
-
-/* ------------------------------------------------------------------------- */
-
-/*
- * Check memory range for valid RAM. A simple memory test determines
- * the actually available RAM size between addresses `base' and
- * `base + maxsize'. Some (not all) hardware errors are detected:
- * - short between address lines
- * - short between data lines
- */
-
-static long int dram_size (long int mamr_value, long int *base,
-                          long int maxsize)
-{
-       volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
-       volatile memctl8xx_t *memctl = &immap->im_memctl;
-       volatile ulong *addr;
-       ulong cnt, val, size;
-       ulong save[32];         /* to make test non-destructive */
-       unsigned char i = 0;
-
-       memctl->memc_mamr = mamr_value;
-
-       for (cnt = maxsize / sizeof (long); cnt > 0; cnt >>= 1) {
-               addr = (volatile ulong *)(base + cnt);  /* pointer arith! */
-
-               save[i++] = *addr;
-               *addr = ~cnt;
-       }
-
-       /* write 0 to base address */
-       addr = (volatile ulong *)base;
-       save[i] = *addr;
-       *addr = 0;
-
-       /* check at base address */
-       if ((val = *addr) != 0) {
-               /* Restore the original data before leaving the function.
-                */
-               *addr = save[i];
-               for (cnt = 1; cnt <= maxsize / sizeof (long); cnt <<= 1) {
-                       addr = (volatile ulong *) base + cnt;
-                       *addr = save[--i];
-               }
-               return (0);
-       }
-
-       for (cnt = 1; cnt <= maxsize / sizeof (long); cnt <<= 1) {
-               addr = (volatile ulong *)(base + cnt);  /* pointer arith! */
-
-               val = *addr;
-               *addr = save[--i];
-
-               if (val != (~cnt)) {
-                       size = cnt * sizeof (long);
-                       /* Restore the original data before returning
-                        */
-                       for (cnt <<= 1; cnt <= maxsize / sizeof (long);
-                            cnt <<= 1) {
-                               addr = (volatile ulong *) base + cnt;
-                               *addr = save[--i];
-                       }
-                       return (size);
-               }
-       }
-       return (maxsize);
-}
-
-/*
- * Miscellaneous intialization
- */
-int misc_init_r (void)
-{
-       char *fpga_data_str = getenv ("fpgadata");
-       char *fpga_size_str = getenv ("fpgasize");
-       void *fpga_data;
-       int fpga_size;
-       int status;
-       volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
-       volatile memctl8xx_t *memctl = &immap->im_memctl;
-       int flash_size;
-
-       /* Remap FLASH according to real size */
-       flash_size = flash_init ();
-       memctl->memc_or0 = CONFIG_SYS_OR_TIMING_FLASH | (-flash_size & 0xFFFF8000);
-       memctl->memc_br0 = (CONFIG_SYS_FLASH_BASE & BR_BA_MSK) | BR_MS_GPCM | BR_V;
-
-       if (fpga_data_str && fpga_size_str) {
-               fpga_data = (void *) simple_strtoul (fpga_data_str, NULL, 16);
-               fpga_size = simple_strtoul (fpga_size_str, NULL, 10);
-
-               status = fpga_boot (fpga_data, fpga_size);
-               if (status != 0) {
-                       printf ("\nFPGA: Booting failed ");
-                       switch (status) {
-                       case ERROR_FPGA_PRG_INIT_LOW:
-                               printf ("(Timeout: INIT not low after asserting PROGRAM*)\n ");
-                               break;
-                       case ERROR_FPGA_PRG_INIT_HIGH:
-                               printf ("(Timeout: INIT not high after deasserting PROGRAM*)\n ");
-                               break;
-                       case ERROR_FPGA_PRG_DONE:
-                               printf ("(Timeout: DONE not high after programming FPGA)\n ");
-                               break;
-                       }
-               }
-       }
-       return 0;
-}
diff --git a/board/quantum/u-boot.lds b/board/quantum/u-boot.lds
deleted file mode 100644 (file)
index 0eb2fba..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * (C) Copyright 2000-2010
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-OUTPUT_ARCH(powerpc)
-
-SECTIONS
-{
-  /* Read-only sections, merged into text segment: */
-  . = + SIZEOF_HEADERS;
-  .text      :
-  {
-    arch/powerpc/cpu/mpc8xx/start.o    (.text*)
-    arch/powerpc/cpu/mpc8xx/traps.o    (.text*)
-
-    *(.text*)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-
-  /* Read-write section, merged into data segment: */
-  . = (. + 0x00FF) & 0xFFFFFF00;
-  _erotext = .;
-  PROVIDE (erotext = .);
-  .reloc   :
-  {
-    _GOT2_TABLE_ = .;
-    KEEP(*(.got2))
-    KEEP(*(.got))
-    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
-    _FIXUP_TABLE_ = .;
-    KEEP(*(.fixup))
-  }
-  __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
-  __fixup_entries = (. - _FIXUP_TABLE_)>>2;
-
-  .data    :
-  {
-    *(.data*)
-    *(.sdata*)
-  }
-  _edata  =  .;
-  PROVIDE (edata = .);
-
-  . = .;
-
-  . = ALIGN(4);
-  .u_boot_list : {
-       KEEP(*(SORT(.u_boot_list*)));
-  }
-
-
-  . = .;
-  __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)       :
-  {
-   *(.bss*)
-   *(.sbss*)
-   *(COMMON)
-   . = ALIGN(4);
-  }
-  __bss_end = . ;
-  PROVIDE (end = .);
-}
diff --git a/board/quantum/u-boot.lds.debug b/board/quantum/u-boot.lds.debug
deleted file mode 100644 (file)
index b2c562c..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * (C) Copyright 2000
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-OUTPUT_ARCH(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  /* Read-only sections, merged into text segment: */
-  . = + SIZEOF_HEADERS;
-  .interp : { *(.interp) }
-  .hash          : { *(.hash)          }
-  .dynsym        : { *(.dynsym)                }
-  .dynstr        : { *(.dynstr)                }
-  .rel.text      : { *(.rel.text)              }
-  .rela.text     : { *(.rela.text)     }
-  .rel.data      : { *(.rel.data)              }
-  .rela.data     : { *(.rela.data)     }
-  .rel.rodata    : { *(.rel.rodata)    }
-  .rela.rodata   : { *(.rela.rodata)   }
-  .rel.got       : { *(.rel.got)               }
-  .rela.got      : { *(.rela.got)              }
-  .rel.ctors     : { *(.rel.ctors)     }
-  .rela.ctors    : { *(.rela.ctors)    }
-  .rel.dtors     : { *(.rel.dtors)     }
-  .rela.dtors    : { *(.rela.dtors)    }
-  .rel.bss       : { *(.rel.bss)               }
-  .rela.bss      : { *(.rela.bss)              }
-  .rel.plt       : { *(.rel.plt)               }
-  .rela.plt      : { *(.rela.plt)              }
-  .init          : { *(.init)  }
-  .plt : { *(.plt) }
-  .text      :
-  {
-    /* WARNING - the following is hand-optimized to fit within */
-    /* the sector layout of our flash chips!   XXX FIXME XXX   */
-
-    arch/powerpc/cpu/mpc8xx/start.o    (.text)
-    common/dlmalloc.o  (.text)
-    lib/vsprintf.o     (.text)
-    lib/crc32.o                (.text)
-
-    . = env_offset;
-    common/env_embedded.o(.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.rodata)
-    *(.rodata1)
-    *(.rodata.str1.4)
-    *(.eh_frame)
-  }
-  .fini      : { *(.fini)    } =0
-  .ctors     : { *(.ctors)   }
-  .dtors     : { *(.dtors)   }
-
-  /* Read-write section, merged into data segment: */
-  . = (. + 0x0FFF) & 0xFFFFF000;
-  _erotext = .;
-  PROVIDE (erotext = .);
-  .reloc   :
-  {
-    *(.got)
-    _GOT2_TABLE_ = .;
-    *(.got2)
-    _FIXUP_TABLE_ = .;
-    *(.fixup)
-  }
-  __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
-  __fixup_entries = (. - _FIXUP_TABLE_)>>2;
-
-  .data    :
-  {
-    *(.data)
-    *(.data1)
-    *(.sdata)
-    *(.sdata2)
-    *(.dynamic)
-    CONSTRUCTORS
-  }
-  _edata  =  .;
-  PROVIDE (edata = .);
-
-  __start___ex_table = .;
-  __ex_table : { *(__ex_table) }
-  __stop___ex_table = .;
-
-  . = ALIGN(4096);
-  __init_begin = .;
-  .text.init : { *(.text.init) }
-  .data.init : { *(.data.init) }
-  . = ALIGN(4096);
-  __init_end = .;
-
-  __bss_start = .;
-  .bss       :
-  {
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
-   *(COMMON)
-  }
-  __bss_end = . ;
-  PROVIDE (end = .);
-}
diff --git a/board/rbc823/Makefile b/board/rbc823/Makefile
deleted file mode 100644 (file)
index 060a144..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# (C) Copyright 2000-2006
-# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
-
-obj-y  = rbc823.o flash.o kbd.o
diff --git a/board/rbc823/flash.c b/board/rbc823/flash.c
deleted file mode 100644 (file)
index 8a22652..0000000
+++ /dev/null
@@ -1,445 +0,0 @@
-/*
- * (C) Copyright 2000
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <common.h>
-#include <mpc8xx.h>
-
-flash_info_t   flash_info[CONFIG_SYS_MAX_FLASH_BANKS];
-
-/*
- * Functions
- */
-static ulong flash_get_size(vu_long *addr, flash_info_t *info);
-static int write_word(flash_info_t *info, ulong dest, ulong data);
-static void flash_get_offsets(ulong base, flash_info_t *info);
-
-unsigned long flash_init(void)
-{
-       unsigned long size_b0;
-       int i;
-
-       /* Init: no FLASHes known */
-       for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; ++i)
-               flash_info[i].flash_id = FLASH_UNKNOWN;
-
-       /* Detect size */
-       size_b0 = flash_get_size((vu_long *)CONFIG_SYS_FLASH_BASE,
-                       &flash_info[0]);
-
-       /* Setup offsets */
-       flash_get_offsets(CONFIG_SYS_FLASH_BASE, &flash_info[0]);
-
-#if CONFIG_SYS_MONITOR_BASE >= CONFIG_SYS_FLASH_BASE
-       /* Monitor protection ON by default */
-       flash_protect(FLAG_PROTECT_SET,
-                     CONFIG_SYS_MONITOR_BASE,
-                     CONFIG_SYS_MONITOR_BASE+monitor_flash_len-1,
-                     &flash_info[0]);
-#endif
-
-       flash_info[0].size = size_b0;
-
-       return size_b0;
-}
-
-/*-----------------------------------------------------------------------
- * Fix this to support variable sector sizes
-*/
-static void flash_get_offsets(ulong base, flash_info_t *info)
-{
-       int i;
-
-       /* set up sector start address table */
-       if ((info->flash_id & FLASH_TYPEMASK) == FLASH_AM040) {
-               /* set sector offsets for bottom boot block type        */
-               for (i = 0; i < info->sector_count; i++)
-                       info->start[i] = base + (i * 0x00010000);
-       }
-}
-
-/*-----------------------------------------------------------------------
- */
-void flash_print_info(flash_info_t *info)
-{
-       int i;
-
-       if (info->flash_id == FLASH_UNKNOWN) {
-               puts("missing or unknown FLASH type\n");
-               return;
-       }
-
-       switch (info->flash_id & FLASH_VENDMASK) {
-       case FLASH_MAN_AMD:
-               printf("AMD ");
-               break;
-       case FLASH_MAN_FUJ:
-               printf("FUJITSU ");
-               break;
-       case FLASH_MAN_BM:
-               printf("BRIGHT MICRO ");
-               break;
-       default:
-               printf("Unknown Vendor ");
-               break;
-       }
-
-       switch (info->flash_id & FLASH_TYPEMASK) {
-       case FLASH_AM040:
-               printf("29F040 or 29LV040 (4 Mbit, uniform sectors)\n");
-               break;
-       case FLASH_AM400B:
-               printf("AM29LV400B (4 Mbit, bottom boot sect)\n");
-               break;
-       case FLASH_AM400T:
-               printf("AM29LV400T (4 Mbit, top boot sector)\n");
-               break;
-       case FLASH_AM800B:
-               printf("AM29LV800B (8 Mbit, bottom boot sect)\n");
-               break;
-       case FLASH_AM800T:
-               printf("AM29LV800T (8 Mbit, top boot sector)\n");
-               break;
-       case FLASH_AM160B:
-               printf("AM29LV160B (16 Mbit, bottom boot sect)\n");
-               break;
-       case FLASH_AM160T:
-               printf("AM29LV160T (16 Mbit, top boot sector)\n");
-               break;
-       case FLASH_AM320B:
-               printf("AM29LV320B (32 Mbit, bottom boot sect)\n");
-               break;
-       case FLASH_AM320T:
-               printf("AM29LV320T (32 Mbit, top boot sector)\n");
-               break;
-       default:
-               printf("Unknown Chip Type\n");
-               break;
-       }
-
-       if (info->size >> 20) {
-               printf("  Size: %ld MB in %d Sectors\n",
-                       info->size >> 20,
-                       info->sector_count);
-       } else {
-               printf("  Size: %ld KB in %d Sectors\n",
-                       info->size >> 10,
-                       info->sector_count);
-       }
-
-       puts("  Sector Start Addresses:");
-
-       for (i = 0; i < info->sector_count; ++i) {
-               if ((i % 5) == 0)
-                       puts("\n   ");
-
-               printf(" %08lX%s",
-                       info->start[i],
-                       info->protect[i] ? " (RO)" : "     ");
-       }
-
-       putc('\n');
-       return;
-}
-
-/*
- * The following code cannot be run from FLASH!
- */
-
-static ulong flash_get_size(vu_long *addr, flash_info_t *info)
-{
-       short i;
-       volatile unsigned char *caddr;
-       char value;
-
-       caddr = (volatile unsigned char *)addr ;
-
-       /* Write auto select command: read Manufacturer ID */
-
-       debug("Base address is: %8p\n", caddr);
-
-       caddr[0x0555] = 0xAA;
-       caddr[0x02AA] = 0x55;
-       caddr[0x0555] = 0x90;
-
-       value = caddr[0];
-
-       debug("Manufact ID: %02x\n", value);
-
-       switch (value) {
-       case 0x01:      /*AMD_MANUFACT*/
-               info->flash_id = FLASH_MAN_AMD;
-               break;
-
-       case 0x04:      /*FUJ_MANUFACT*/
-               info->flash_id = FLASH_MAN_FUJ;
-               break;
-
-       default:
-               info->flash_id = FLASH_UNKNOWN;
-               info->sector_count = 0;
-               info->size = 0;
-               break;
-       }
-
-       value = caddr[1];                       /* device ID            */
-
-       debug("Device ID: %02x\n", value);
-
-       switch (value) {
-       case AMD_ID_LV040B:
-               info->flash_id += FLASH_AM040;
-               info->sector_count = 8;
-               info->size = 0x00080000;
-               break;                          /* => 512Kb             */
-
-       default:
-               info->flash_id = FLASH_UNKNOWN;
-               return 0;                       /* => no or unknown flash */
-       }
-
-       flash_get_offsets((ulong)addr, &flash_info[0]);
-
-       /* check for protected sectors */
-       for (i = 0; i < info->sector_count; i++) {
-               /*
-                * read sector protection at sector address,
-                * (A7 .. A0) = 0x02
-                * D0 = 1 if protected
-                */
-               caddr = (volatile unsigned char *)(info->start[i]);
-               info->protect[i] = caddr[2] & 1;
-       }
-
-       /*
-        * Prevent writes to uninitialized FLASH.
-        */
-       if (info->flash_id != FLASH_UNKNOWN) {
-               caddr = (volatile unsigned char *)info->start[0];
-               *caddr = 0xF0;  /* reset bank */
-       }
-
-       return info->size;
-}
-
-
-int    flash_erase(flash_info_t *info, int s_first, int s_last)
-{
-       volatile unsigned char *addr =
-               (volatile unsigned char *)(info->start[0]);
-       int flag, prot, sect, l_sect;
-       ulong start, now, last;
-
-       if ((s_first < 0) || (s_first > s_last)) {
-               if (info->flash_id == FLASH_UNKNOWN)
-                       printf("- missing\n");
-               else
-                       printf("- no sectors to erase\n");
-
-               return 1;
-       }
-
-       if ((info->flash_id == FLASH_UNKNOWN) ||
-           (info->flash_id > FLASH_AMD_COMP)) {
-               printf("Can't erase unknown flash type - aborted\n");
-               return 1;
-       }
-
-       prot = 0;
-       for (sect = s_first; sect <= s_last; ++sect) {
-               if (info->protect[sect])
-                       prot++;
-       }
-
-       if (prot) {
-               printf("- Warning: %d protected sectors will not be erased!\n",
-                       prot);
-       } else {
-               printf("\n");
-       }
-
-       l_sect = -1;
-
-       /* Disable interrupts which might cause a timeout here */
-       flag = disable_interrupts();
-
-       addr[0x0555] = 0xAA;
-       addr[0x02AA] = 0x55;
-       addr[0x0555] = 0x80;
-       addr[0x0555] = 0xAA;
-       addr[0x02AA] = 0x55;
-
-       /* Start erase on unprotected sectors */
-       for (sect = s_first; sect <= s_last; sect++) {
-               if (info->protect[sect] == 0) { /* not protected */
-                       addr = (volatile unsigned char *)(info->start[sect]);
-                       addr[0] = 0x30;
-                       l_sect = sect;
-               }
-       }
-
-       /* re-enable interrupts if necessary */
-       if (flag)
-               enable_interrupts();
-
-       /* wait at least 80us - let's wait 1 ms */
-       udelay(1000);
-
-       /*
-        * We wait for the last triggered sector
-        */
-       if (l_sect < 0)
-               goto DONE;
-
-       start = get_timer(0);
-       last  = start;
-       addr = (volatile unsigned char *)(info->start[l_sect]);
-
-       while ((addr[0] & 0xFF) != 0xFF) {
-               now = get_timer(start);
-               if (now > CONFIG_SYS_FLASH_ERASE_TOUT) {
-                       printf("Timeout\n");
-                       return 1;
-               }
-               /* show that we're waiting */
-               if ((now - last) > 1000) {      /* every second */
-                       putc('.');
-                       last = now;
-               }
-       }
-
-DONE:
-       /* reset to read mode */
-       addr = (volatile unsigned char *)info->start[0];
-
-       addr[0] = 0xF0; /* reset bank */
-
-       printf(" done\n");
-       return 0;
-}
-
-/*
- * Copy memory to flash, returns:
- * 0 - OK
- * 1 - write timeout
- * 2 - Flash not erased
- */
-
-int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt)
-{
-       ulong cp, wp, data;
-       int i, l, rc;
-
-       wp = (addr & ~3);       /* get lower word aligned address */
-
-       /*
-        * handle unaligned start bytes
-        */
-       l = addr - wp;
-
-       if (l != 0) {
-               data = 0;
-               for (i = 0, cp = wp; i < l; ++i, ++cp)
-                       data = (data << 8) | (*(uchar *)cp);
-
-               for (; i < 4 && cnt > 0; ++i) {
-                       data = (data << 8) | *src++;
-                       --cnt;
-                       ++cp;
-               }
-
-               for (; cnt == 0 && i < 4; ++i, ++cp)
-                       data = (data << 8) | (*(uchar *)cp);
-
-               rc = write_word(info, wp, data);
-
-               if (rc != 0)
-                       return rc;
-
-               wp += 4;
-       }
-
-       /*
-        * handle word aligned part
-        */
-       while (cnt >= 4) {
-               data = 0;
-               for (i = 0; i < 4; ++i)
-                       data = (data << 8) | *src++;
-
-               rc = write_word(info, wp, data);
-
-               if (rc != 0)
-                       return rc;
-
-               wp  += 4;
-               cnt -= 4;
-       }
-
-       if (cnt == 0)
-               return 0;
-
-       /*
-        * handle unaligned tail bytes
-        */
-       data = 0;
-       for (i = 0, cp = wp; i < 4 && cnt > 0; ++i, ++cp) {
-               data = (data << 8) | *src++;
-               --cnt;
-       }
-       for (; i < 4; ++i, ++cp)
-               data = (data << 8) | (*(uchar *)cp);
-
-       return write_word(info, wp, data);
-}
-
-/*
- * Write a word to Flash, returns:
- * 0 - OK
- * 1 - write timeout
- * 2 - Flash not erased
- */
-static int write_word(flash_info_t *info, ulong dest, ulong data)
-{
-       volatile unsigned char *cdest, *cdata;
-       volatile unsigned char *addr =
-               (volatile unsigned char *)(info->start[0]);
-       ulong start;
-       int flag, count = 4 ;
-
-       cdest = (volatile unsigned char *)dest ;
-       cdata = (volatile unsigned char *)&data ;
-
-       /* Check if Flash is (sufficiently) erased */
-       if ((*((vu_long *)dest)&data) != data)
-               return 2;
-
-       while (count--) {
-               /* Disable interrupts which might cause a timeout here */
-               flag = disable_interrupts();
-
-               addr[0x0555] = 0xAA;
-               addr[0x02AA] = 0x55;
-               addr[0x0555] = 0xA0;
-
-               *cdest = *cdata;
-
-               /* re-enable interrupts if necessary */
-               if (flag)
-                       enable_interrupts();
-
-               /* data polling for D7 */
-               start = get_timer(0);
-               while ((*cdest ^ *cdata) & 0x80) {
-                       if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT)
-                               return 1;
-               }
-
-               cdata++ ;
-               cdest++ ;
-       }
-       return 0;
-}
diff --git a/board/rbc823/kbd.c b/board/rbc823/kbd.c
deleted file mode 100644 (file)
index b35509a..0000000
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- * (C) Copyright 2000
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/* Modified by Udi Finkelstein
- *
- * This file includes communication routines for SMC1 that can run even if
- * SMC2 have already been initialized.
- */
-
-#include <common.h>
-#include <watchdog.h>
-#include <commproc.h>
-#include <stdio_dev.h>
-#include <lcd.h>
-
-DECLARE_GLOBAL_DATA_PTR;
-
-#define        SMC_INDEX       0
-#define PROFF_SMC      PROFF_SMC1
-#define CPM_CR_CH_SMC  CPM_CR_CH_SMC1
-
-#define RBC823_KBD_BAUDRATE    38400
-#define CPM_KEYBOARD_BASE      0x1000
-/*
- * Minimal serial functions needed to use one of the SMC ports
- * as serial console interface.
- */
-
-void smc1_setbrg (void)
-{
-       volatile immap_t *im = (immap_t *)CONFIG_SYS_IMMR;
-       volatile cpm8xx_t *cp = &(im->im_cpm);
-
-       /* Set up the baud rate generator.
-        * See 8xx_io/commproc.c for details.
-        *
-        * Wire BRG2 to SMC1, BRG1 to SMC2
-        */
-
-       cp->cp_simode = 0x00001000;
-
-       cp->cp_brgc2 =
-               (((gd->cpu_clk / 16 / RBC823_KBD_BAUDRATE)-1) << 1) | CPM_BRG_EN;
-}
-
-int smc1_init (void)
-{
-       volatile immap_t *im = (immap_t *)CONFIG_SYS_IMMR;
-       volatile smc_t *sp;
-       volatile smc_uart_t *up;
-       volatile cbd_t *tbdf, *rbdf;
-       volatile cpm8xx_t *cp = &(im->im_cpm);
-       uint    dpaddr;
-
-       /* initialize pointers to SMC */
-
-       sp = (smc_t *) &(cp->cp_smc[SMC_INDEX]);
-       up = (smc_uart_t *) &cp->cp_dparam[PROFF_SMC];
-
-       /* Disable transmitter/receiver.
-       */
-       sp->smc_smcmr &= ~(SMCMR_REN | SMCMR_TEN);
-
-       /* Enable SDMA.
-       */
-       im->im_siu_conf.sc_sdcr = 1;
-
-       /* clear error conditions */
-#ifdef CONFIG_SYS_SDSR
-       im->im_sdma.sdma_sdsr = CONFIG_SYS_SDSR;
-#else
-       im->im_sdma.sdma_sdsr = 0x83;
-#endif
-
-       /* clear SDMA interrupt mask */
-#ifdef CONFIG_SYS_SDMR
-       im->im_sdma.sdma_sdmr = CONFIG_SYS_SDMR;
-#else
-       im->im_sdma.sdma_sdmr = 0x00;
-#endif
-
-       /* Use Port B for SMC1 instead of other functions.
-       */
-       cp->cp_pbpar |=  0x000000c0;
-       cp->cp_pbdir &= ~0x000000c0;
-       cp->cp_pbodr &= ~0x000000c0;
-
-       /* Set the physical address of the host memory buffers in
-        * the buffer descriptors.
-        */
-
-#ifdef CONFIG_SYS_ALLOC_DPRAM
-       dpaddr = dpram_alloc_align (sizeof(cbd_t)*2 + 2, 8) ;
-#else
-       dpaddr = CPM_KEYBOARD_BASE ;
-#endif
-
-       /* Allocate space for two buffer descriptors in the DP ram.
-        * For now, this address seems OK, but it may have to
-        * change with newer versions of the firmware.
-        * damm: allocating space after the two buffers for rx/tx data
-        */
-
-       rbdf = (cbd_t *)&cp->cp_dpmem[dpaddr];
-       rbdf->cbd_bufaddr = (uint) (rbdf+2);
-       rbdf->cbd_sc = 0;
-       tbdf = rbdf + 1;
-       tbdf->cbd_bufaddr = ((uint) (rbdf+2)) + 1;
-       tbdf->cbd_sc = 0;
-
-       /* Set up the uart parameters in the parameter ram.
-       */
-       up->smc_rbase = dpaddr;
-       up->smc_tbase = dpaddr+sizeof(cbd_t);
-       up->smc_rfcr = SMC_EB;
-       up->smc_tfcr = SMC_EB;
-
-       /* Set UART mode, 8 bit, no parity, one stop.
-        * Enable receive and transmit.
-        */
-       sp->smc_smcmr = smcr_mk_clen(9) |  SMCMR_SM_UART;
-
-       /* Mask all interrupts and remove anything pending.
-       */
-       sp->smc_smcm = 0;
-       sp->smc_smce = 0xff;
-
-       /* Set up the baud rate generator.
-       */
-       smc1_setbrg ();
-
-       /* Make the first buffer the only buffer.
-       */
-       tbdf->cbd_sc |= BD_SC_WRAP;
-       rbdf->cbd_sc |= BD_SC_EMPTY | BD_SC_WRAP;
-
-       /* Single character receive.
-       */
-       up->smc_mrblr = 1;
-       up->smc_maxidl = 0;
-
-       /* Initialize Tx/Rx parameters.
-       */
-
-       while (cp->cp_cpcr & CPM_CR_FLG)  /* wait if cp is busy */
-         ;
-
-       cp->cp_cpcr = mk_cr_cmd(CPM_CR_CH_SMC, CPM_CR_INIT_TRX) | CPM_CR_FLG;
-
-       while (cp->cp_cpcr & CPM_CR_FLG)  /* wait if cp is busy */
-         ;
-
-       /* Enable transmitter/receiver.
-       */
-       sp->smc_smcmr |= SMCMR_REN | SMCMR_TEN;
-
-       return (0);
-}
-
-void smc1_putc(const char c)
-{
-       volatile cbd_t          *tbdf;
-       volatile char           *buf;
-       volatile smc_uart_t     *up;
-       volatile immap_t        *im = (immap_t *)CONFIG_SYS_IMMR;
-       volatile cpm8xx_t       *cpmp = &(im->im_cpm);
-
-       up = (smc_uart_t *)&cpmp->cp_dparam[PROFF_SMC];
-
-       tbdf = (cbd_t *)&cpmp->cp_dpmem[up->smc_tbase];
-
-       /* Wait for last character to go.
-       */
-
-       buf = (char *)tbdf->cbd_bufaddr;
-
-       *buf = c;
-       tbdf->cbd_datlen = 1;
-       tbdf->cbd_sc |= BD_SC_READY;
-       __asm__("eieio");
-
-       while (tbdf->cbd_sc & BD_SC_READY) {
-               WATCHDOG_RESET ();
-               __asm__("eieio");
-       }
-}
-
-int smc1_getc(void)
-{
-       volatile cbd_t          *rbdf;
-       volatile unsigned char  *buf;
-       volatile smc_uart_t     *up;
-       volatile immap_t        *im = (immap_t *)CONFIG_SYS_IMMR;
-       volatile cpm8xx_t       *cpmp = &(im->im_cpm);
-       unsigned char           c;
-
-       up = (smc_uart_t *)&cpmp->cp_dparam[PROFF_SMC];
-
-       rbdf = (cbd_t *)&cpmp->cp_dpmem[up->smc_rbase];
-
-       /* Wait for character to show up.
-       */
-       buf = (unsigned char *)rbdf->cbd_bufaddr;
-
-       while (rbdf->cbd_sc & BD_SC_EMPTY)
-               WATCHDOG_RESET ();
-
-       c = *buf;
-       rbdf->cbd_sc |= BD_SC_EMPTY;
-
-       return(c);
-}
-
-int smc1_tstc(void)
-{
-       volatile cbd_t          *rbdf;
-       volatile smc_uart_t     *up;
-       volatile immap_t        *im = (immap_t *)CONFIG_SYS_IMMR;
-       volatile cpm8xx_t       *cpmp = &(im->im_cpm);
-
-       up = (smc_uart_t *)&cpmp->cp_dparam[PROFF_SMC];
-
-       rbdf = (cbd_t *)&cpmp->cp_dpmem[up->smc_rbase];
-
-       return(!(rbdf->cbd_sc & BD_SC_EMPTY));
-}
-
-/* search for keyboard and register it if found */
-int drv_keyboard_init(void)
-{
-       int error = 0;
-       struct stdio_dev kbd_dev;
-
-       if (0) {
-               /* register the keyboard */
-               memset (&kbd_dev, 0, sizeof(struct stdio_dev));
-               strcpy(kbd_dev.name, "kbd");
-               kbd_dev.flags =  DEV_FLAGS_INPUT | DEV_FLAGS_SYSTEM;
-               kbd_dev.putc = NULL;
-               kbd_dev.puts = NULL;
-               kbd_dev.getc = smc1_getc;
-               kbd_dev.tstc = smc1_tstc;
-               error = stdio_register (&kbd_dev);
-       } else {
-               lcd_is_enabled = 0;
-               lcd_disable();
-       }
-       return error;
-}
diff --git a/board/rbc823/rbc823.c b/board/rbc823/rbc823.c
deleted file mode 100644 (file)
index 5881111..0000000
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * (C) Copyright 2000
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <common.h>
-#include "mpc8xx.h"
-#include <linux/mtd/doc2000.h>
-
-extern int kbd_init(void);
-extern int drv_kbd_init(void);
-
-/* ------------------------------------------------------------------------- */
-
-static long int dram_size (long int, long int *, long int);
-
-/* ------------------------------------------------------------------------- */
-
-#define        _NOT_USED_      0xFFFFFFFF
-
-const uint sdram_table[] =
-{
-       /*
-        * Single Read. (Offset 0 in UPMA RAM)
-        */
-       0x1F07FC04, 0xEEAEFC04, 0x11ADFC04, 0xEFBBBC00,
-       0x1FF77C47, /* last */
-       /*
-        * SDRAM Initialization (offset 5 in UPMA RAM)
-        *
-        * This is no UPM entry point. The following definition uses
-        * the remaining space to establish an initialization
-        * sequence, which is executed by a RUN command.
-        *
-        */
-                   0x1FF77C34, 0xEFEABC34, 0x1FB57C35, /* last */
-       /*
-        * Burst Read. (Offset 8 in UPMA RAM)
-        */
-       0x1F07FC04, 0xEEAEFC04, 0x10ADFC04, 0xF0AFFC00,
-       0xF0AFFC00, 0xF1AFFC00, 0xEFBBBC00, 0x1FF77C47, /* last */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       /*
-        * Single Write. (Offset 18 in UPMA RAM)
-        */
-       0x1F27FC04, 0xEEAEBC00, 0x01B93C04, 0x1FF77C47, /* last */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       /*
-        * Burst Write. (Offset 20 in UPMA RAM)
-        */
-       0x1F07FC04, 0xEEAEBC00, 0x10AD7C00, 0xF0AFFC00,
-       0xF0AFFC00, 0xE1BBBC04, 0x1FF77C47, /* last */
-                                           _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       /*
-        * Refresh  (Offset 30 in UPMA RAM)
-        */
-       0x1FF5FC84, 0xFFFFFC04, 0xFFFFFC04, 0xFFFFFC04,
-       0xFFFFFC84, 0xFFFFFC07, /* last */
-                               _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       /*
-        * Exception. (Offset 3c in UPMA RAM)
-        */
-       0x1FF7FC07, /* last */
-                   _NOT_USED_, _NOT_USED_, _NOT_USED_,
-};
-
-const uint static_table[] =
-{
-       /*
-        * Single Read. (Offset 0 in UPMA RAM)
-        */
-       0x0FFFFC04, 0x0FF3FC04, 0x0FF3CC04, 0x0FF3CC04,
-       0x0FF3EC04, 0x0FF3CC00, 0x0FF7FC04, 0x3FFFFC04,
-       0xFFFFFC04, 0xFFFFFC05, /* last */
-                               _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       /*
-        * Single Write. (Offset 18 in UPMA RAM)
-        */
-       0x0FFFFC04, 0x00FFFC04, 0x00FFFC04, 0x00FFFC04,
-       0x01FFFC00, 0x3FFFFC04, 0xFFFFFC04, 0xFFFFFC05, /* last */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-};
-
-/* ------------------------------------------------------------------------- */
-
-/*
- * Check Board Identity:
- *
- * Test TQ ID string (TQM8xx...)
- * If present, check for "L" type (no second DRAM bank),
- * otherwise "L" type is assumed as default.
- *
- * Return 1 for "L" type, 0 else.
- */
-
-int checkboard (void)
-{
-       char buf[64];
-       int i = getenv_f("serial#", buf, sizeof(buf));
-
-       if (i < 0 || strncmp(buf, "TQM8", 4)) {
-               printf ("### No HW ID - assuming RBC823\n");
-               return (0);
-       }
-
-       puts(buf);
-       putc('\n');
-
-       return (0);
-}
-
-/* ------------------------------------------------------------------------- */
-
-phys_size_t initdram (int board_type)
-{
-       volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
-       volatile memctl8xx_t *memctl = &immap->im_memctl;
-       long int size_b0, size8, size9;
-
-       upmconfig (UPMA, (uint *) sdram_table,
-                  sizeof (sdram_table) / sizeof (uint));
-
-       /*
-        * 1 Bank of 64Mbit x 2 devices
-        */
-       memctl->memc_mptpr = CONFIG_SYS_MPTPR_1BK_4K;
-       memctl->memc_mar = 0x00000088;
-
-       /*
-        * Map controller SDRAM bank 0
-        */
-       memctl->memc_or4 = CONFIG_SYS_OR4_PRELIM;
-       memctl->memc_br4 = CONFIG_SYS_BR4_PRELIM;
-       memctl->memc_mamr = CONFIG_SYS_MAMR_8COL & (~(MAMR_PTAE));      /* no refresh yet */
-       udelay (200);
-
-       /*
-        * Perform SDRAM initializsation sequence
-        */
-       memctl->memc_mcr = 0x80008105;  /* SDRAM bank 0 */
-       udelay (1);
-       memctl->memc_mamr = (CONFIG_SYS_MAMR_8COL & ~(MAMR_TLFA_MSK)) | MAMR_TLFA_8X;
-       udelay (200);
-       memctl->memc_mcr = 0x80008130;  /* SDRAM bank 0 - execute twice */
-       udelay (1);
-       memctl->memc_mamr = (CONFIG_SYS_MAMR_8COL & ~(MAMR_TLFA_MSK)) | MAMR_TLFA_4X;
-       udelay (200);
-
-       memctl->memc_mamr |= MAMR_PTAE; /* enable refresh */
-       udelay (1000);
-
-       /*
-        * Preliminary prescaler for refresh (depends on number of
-        * banks): This value is selected for four cycles every 62.4 us
-        * with two SDRAM banks or four cycles every 31.2 us with one
-        * bank. It will be adjusted after memory sizing.
-        */
-       memctl->memc_mptpr = CONFIG_SYS_MPTPR_2BK_4K;   /* 16: but should be: CONFIG_SYS_MPTPR_1BK_4K */
-
-       /*
-        * Check Bank 0 Memory Size for re-configuration
-        *
-        * try 8 column mode
-        */
-       size8 = dram_size (CONFIG_SYS_MAMR_8COL, (long *) SDRAM_BASE4_PRELIM,
-                          SDRAM_MAX_SIZE);
-       udelay (1000);
-
-       /*
-        * try 9 column mode
-        */
-       size9 = dram_size (CONFIG_SYS_MAMR_9COL, (long *) SDRAM_BASE4_PRELIM,
-                          SDRAM_MAX_SIZE);
-
-       if (size8 < size9) {    /* leave configuration at 9 columns     */
-               size_b0 = size9;
-/*     debug ("SDRAM Bank 0 in 9 column mode: %ld MB\n", size >> 20);  */
-       } else {                /* back to 8 columns                    */
-               size_b0 = size8;
-               memctl->memc_mamr = CONFIG_SYS_MAMR_8COL;
-               udelay (500);
-/*     debug ("SDRAM Bank 0 in 8 column mode: %ld MB\n", size >> 20);  */
-       }
-
-       udelay (1000);
-
-       /*
-        * Adjust refresh rate depending on SDRAM type, both banks
-        * For types > 128 MBit leave it at the current (fast) rate
-        */
-       if ((size_b0 < 0x02000000)) {
-               /* reduce to 15.6 us (62.4 us / quad) */
-               memctl->memc_mptpr = CONFIG_SYS_MPTPR_2BK_4K;
-               udelay (1000);
-       }
-
-       /* SDRAM Bank 0 is bigger - map first       */
-
-       memctl->memc_or4 = ((-size_b0) & 0xFFFF0000) | CONFIG_SYS_OR_TIMING_SDRAM;
-       memctl->memc_br4 = (CONFIG_SYS_SDRAM_BASE & BR_BA_MSK) | BR_MS_UPMA | BR_V;
-
-       udelay (10000);
-
-       return (size_b0);
-}
-
-/* ------------------------------------------------------------------------- */
-
-/*
- * Check memory range for valid RAM. A simple memory test determines
- * the actually available RAM size between addresses `base' and
- * `base + maxsize'. Some (not all) hardware errors are detected:
- * - short between address lines
- * - short between data lines
- */
-
-static long int dram_size (long int mamr_value, long int *base,
-                          long int maxsize)
-{
-       volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
-       volatile memctl8xx_t *memctl = &immap->im_memctl;
-
-       memctl->memc_mamr = mamr_value;
-
-       return (get_ram_size (base, maxsize));
-}
-
-#ifdef CONFIG_CMD_DOC
-void doc_init (void)
-{
-       volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
-       volatile memctl8xx_t *memctl = &immap->im_memctl;
-
-       upmconfig (UPMB, (uint *) static_table,
-                  sizeof (static_table) / sizeof (uint));
-       memctl->memc_mbmr = MAMR_DSA_1_CYCL;
-
-       doc_probe (FLASH_BASE1_PRELIM);
-}
-#endif
diff --git a/board/rbc823/u-boot.lds b/board/rbc823/u-boot.lds
deleted file mode 100644 (file)
index 7676cf4..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * (C) Copyright 2000-2010
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-OUTPUT_ARCH(powerpc)
-
-SECTIONS
-{
-  /* Read-only sections, merged into text segment: */
-  . = + SIZEOF_HEADERS;
-  .text      :
-  {
-    /* WARNING - the following is hand-optimized to fit within */
-    /* the sector layout of our flash chips!   XXX FIXME XXX   */
-
-    arch/powerpc/cpu/mpc8xx/start.o    (.text*)
-    arch/powerpc/cpu/mpc8xx/traps.o    (.text*)
-
-    lib/built-in.o                     (.text*)
-    net/built-in.o                     (.text*)
-    arch/powerpc/cpu/mpc8xx/built-in.o (.text*)
-    arch/powerpc/lib/built-in.o                (.text*)
-
-    . = env_offset;
-    common/env_embedded.o              (.text*)
-
-    *(.text*)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-
-  /* Read-write section, merged into data segment: */
-  . = (. + 0x00FF) & 0xFFFFFF00;
-  _erotext = .;
-  PROVIDE (erotext = .);
-  .reloc   :
-  {
-    _GOT2_TABLE_ = .;
-    KEEP(*(.got2))
-    KEEP(*(.got))
-    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
-    _FIXUP_TABLE_ = .;
-    KEEP(*(.fixup))
-  }
-  __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
-  __fixup_entries = (. - _FIXUP_TABLE_)>>2;
-
-  .data    :
-  {
-    *(.data*)
-    *(.sdata*)
-  }
-  _edata  =  .;
-  PROVIDE (edata = .);
-
-  . = .;
-
-  . = ALIGN(4);
-  .u_boot_list : {
-       KEEP(*(SORT(.u_boot_list*)));
-  }
-
-  . = .;
-  __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)       :
-  {
-   *(.bss*)
-   *(.sbss*)
-   *(COMMON)
-   . = ALIGN(4);
-  }
-  __bss_end = . ;
-  PROVIDE (end = .);
-}
diff --git a/board/snmc/qs850/Makefile b/board/snmc/qs850/Makefile
deleted file mode 100644 (file)
index 5867d90..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# (C) Copyright 2000-2006
-# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
-
-obj-y  = qs850.o flash.o
diff --git a/board/snmc/qs850/flash.c b/board/snmc/qs850/flash.c
deleted file mode 100644 (file)
index 2fc23f2..0000000
+++ /dev/null
@@ -1,600 +0,0 @@
-/*
- * (C) Copyright 2003
- * MuLogic B.V.
- *
- * (C) Copyright 2001
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <common.h>
-#include <asm/ppc4xx.h>
-#include <asm/u-boot.h>
-#include <asm/processor.h>
-
-flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH chips */
-
-
-#define FLASH_WORD_SIZE unsigned long
-#define FLASH_ID_MASK 0xFFFFFFFF
-
-/*-----------------------------------------------------------------------
- * Functions
- */
-/* stolen from esteem192e/flash.c */
-ulong flash_get_size (volatile FLASH_WORD_SIZE *addr, flash_info_t *info);
-
-static int write_word (flash_info_t *info, ulong dest, ulong data);
-static void flash_get_offsets (ulong base, flash_info_t *info);
-
-
-/*-----------------------------------------------------------------------
- */
-
-unsigned long flash_init (void)
-{
-       unsigned long size_b0, size_b1;
-       int i;
-       uint pbcr;
-       unsigned long base_b0, base_b1;
-       volatile FLASH_WORD_SIZE* flash_base;
-
-       /* Init: no FLASHes known */
-       for (i=0; i<CONFIG_SYS_MAX_FLASH_BANKS; ++i) {
-               flash_info[i].flash_id = FLASH_UNKNOWN;
-       }
-
-       /* Static FLASH Bank configuration here */
-       /* Test for 8M Flash first */
-       debug ("\n## Get flash bank 1 size @ 0x%08x\n",FLASH_BASE0_8M_PRELIM);
-       flash_base = (volatile FLASH_WORD_SIZE*)(FLASH_BASE0_8M_PRELIM);
-       size_b0 = flash_get_size(flash_base, &flash_info[0]);
-
-       if (flash_info[0].flash_id == FLASH_UNKNOWN) {
-               printf ("## Unknown FLASH on Bank 0 - Size = 0x%08lx = %ld MB\n",
-               size_b0, size_b0<<20);
-               return 0;
-       }
-
-       if (size_b0 < 8*1024*1024) {
-               /* Not quite 8M, try 4M Flash base address */
-               debug ("\n## Get flash bank 1 size @ 0x%08x\n",FLASH_BASE0_4M_PRELIM);
-               flash_base = (volatile FLASH_WORD_SIZE*)(FLASH_BASE0_4M_PRELIM);
-               size_b0 = flash_get_size(flash_base, &flash_info[0]);
-       }
-
-       if (flash_info[0].flash_id == FLASH_UNKNOWN) {
-               printf ("## Unknown FLASH on Bank 0 - Size = 0x%08lx = %ld MB\n",
-               size_b0, size_b0<<20);
-               return 0;
-       }
-
-       /* Only one bank */
-       if (CONFIG_SYS_MAX_FLASH_BANKS == 1) {
-               /* Setup offsets */
-               flash_get_offsets ((ulong)flash_base, &flash_info[0]);
-
-               /* Monitor protection ON by default */
-               (void)flash_protect(FLAG_PROTECT_SET, CONFIG_SYS_MONITOR_BASE,
-                       CONFIG_SYS_MONITOR_BASE+CONFIG_SYS_MONITOR_LEN-1, &flash_info[0]);
-               size_b1 = 0 ;
-               flash_info[0].size = size_b0;
-               return(size_b0);
-       }
-
-       /* We have 2 banks */
-       size_b1 = flash_get_size(flash_base, &flash_info[1]);
-
-       /* Re-do sizing to get full correct info */
-       if (size_b1) {
-               mtdcr(EBC0_CFGADDR, PB0CR);
-               pbcr = mfdcr(EBC0_CFGDATA);
-               mtdcr(EBC0_CFGADDR, PB0CR);
-               base_b1 = -size_b1;
-               pbcr = (pbcr & 0x0001ffff) | base_b1 | (((size_b1/1024/1024)-1)<<17);
-               mtdcr(EBC0_CFGDATA, pbcr);
-       }
-
-       if (size_b0) {
-               mtdcr(EBC0_CFGADDR, PB1CR);
-               pbcr = mfdcr(EBC0_CFGDATA);
-               mtdcr(EBC0_CFGADDR, PB1CR);
-               base_b0 = base_b1 - size_b0;
-               pbcr = (pbcr & 0x0001ffff) | base_b0 | (((size_b0/1024/1024)-1)<<17);
-               mtdcr(EBC0_CFGDATA, pbcr);
-       }
-
-       size_b0 = flash_get_size((volatile FLASH_WORD_SIZE *)base_b0, &flash_info[0]);
-       flash_get_offsets (base_b0, &flash_info[0]);
-
-       /* monitor protection ON by default */
-       (void)flash_protect(FLAG_PROTECT_SET, CONFIG_SYS_MONITOR_BASE,
-               CONFIG_SYS_MONITOR_BASE+CONFIG_SYS_MONITOR_LEN-1, &flash_info[0]);
-
-       if (size_b1) {
-               /* Re-do sizing to get full correct info */
-               size_b1 = flash_get_size((volatile FLASH_WORD_SIZE *)base_b1, &flash_info[1]);
-               flash_get_offsets (base_b1, &flash_info[1]);
-
-               /* monitor protection ON by default */
-               (void)flash_protect(FLAG_PROTECT_SET, base_b1+size_b1-CONFIG_SYS_MONITOR_LEN,
-                       base_b1+size_b1-1, &flash_info[1]);
-
-               /* monitor protection OFF by default (one is enough) */
-               (void)flash_protect(FLAG_PROTECT_CLEAR, base_b0+size_b0-CONFIG_SYS_MONITOR_LEN,
-                       base_b0+size_b0-1, &flash_info[0]);
-       } else {
-               flash_info[1].flash_id = FLASH_UNKNOWN;
-               flash_info[1].sector_count = -1;
-       }
-
-       flash_info[0].size = size_b0;
-       flash_info[1].size = size_b1;
-       return (size_b0 + size_b1);
-}
-
-
-/*-----------------------------------------------------------------------
- This code is specific to the AM29DL163/AM29DL232 for the QS850/QS823.
- */
-
-static void flash_get_offsets (ulong base, flash_info_t *info)
-{
-       int i;
-       long large_sect_size;
-       long small_sect_size;
-
-       /* set up sector start adress table */
-       large_sect_size = info->size / (info->sector_count - 8 + 1);
-       small_sect_size = large_sect_size / 8;
-
-       if (info->flash_id & FLASH_BTYPE) {
-
-               /* set sector offsets for bottom boot block type */
-               for (i = 0; i < 7; i++) {
-                       info->start[i] = base;
-                       base += small_sect_size;
-               }
-
-               for (; i < info->sector_count; i++) {
-                       info->start[i] = base;
-                       base += large_sect_size;
-               }
-       }
-       else
-       {
-               /* set sector offsets for top boot block type */
-               for (i = 0; i < (info->sector_count - 8); i++) {
-                       info->start[i] = base;
-                       base += large_sect_size;
-               }
-
-               for (; i < info->sector_count; i++) {
-                       info->start[i] = base;
-                       base += small_sect_size;
-               }
-       }
-}
-
-/*-----------------------------------------------------------------------
- */
-
-void flash_print_info  (flash_info_t *info)
-{
-       int i;
-       uchar *boottype;
-       uchar botboot[]=", bottom boot sect)\n";
-       uchar topboot[]=", top boot sector)\n";
-
-       if (info->flash_id == FLASH_UNKNOWN) {
-               printf ("missing or unknown FLASH type\n");
-               return;
-       }
-
-       switch (info->flash_id & FLASH_VENDMASK) {
-               case FLASH_MAN_AMD:
-                       printf ("AMD ");
-                       break;
-               case FLASH_MAN_FUJ:
-                       printf ("FUJITSU ");
-                       break;
-               case FLASH_MAN_SST:
-                       printf ("SST ");
-                       break;
-               case FLASH_MAN_STM:
-                       printf ("STM ");
-                       break;
-               case FLASH_MAN_INTEL:
-                       printf ("INTEL ");
-                       break;
-               default:
-                       printf ("Unknown Vendor ");
-                       break;
-       }
-
-       if (info->flash_id & 0x0001 ) {
-               boottype = botboot;
-       } else {
-               boottype = topboot;
-       }
-
-       switch (info->flash_id & FLASH_TYPEMASK) {
-               case FLASH_AM160B:
-                       printf ("AM29LV160B (16 Mbit%s",boottype);
-                       break;
-               case FLASH_AM160T:
-                       printf ("AM29LV160T (16 Mbit%s",boottype);
-                       break;
-               case FLASH_AMDL163T:
-                       printf ("AM29DL163T (16 Mbit%s",boottype);
-                       break;
-               case FLASH_AMDL163B:
-                       printf ("AM29DL163B (16 Mbit%s",boottype);
-                       break;
-               case FLASH_AM320B:
-                       printf ("AM29LV320B (32 Mbit%s",boottype);
-                       break;
-               case FLASH_AM320T:
-                       printf ("AM29LV320T (32 Mbit%s",boottype);
-                       break;
-               case FLASH_AMDL323T:
-                       printf ("AM29DL323T (32 Mbit%s",boottype);
-                       break;
-               case FLASH_AMDL323B:
-                       printf ("AM29DL323B (32 Mbit%s",boottype);
-                       break;
-               case FLASH_AMDL322T:
-                       printf ("AM29DL322T (32 Mbit%s",boottype);
-                       break;
-               default:
-                       printf ("Unknown Chip Type\n");
-                       break;
-       }
-
-       printf ("  Size: %ld MB in %d Sectors\n",
-       info->size >> 20, info->sector_count);
-
-       printf ("  Sector Start Addresses:");
-       for (i=0; i<info->sector_count; ++i) {
-               if ((i % 5) == 0)
-                       printf ("\n   ");
-               printf (" %08lX%s", info->start[i],
-                       info->protect[i] ? " (RO)" : "     ");
-       }
-       printf ("\n");
-       return;
-}
-
-
-/*-----------------------------------------------------------------------
- * The following code cannot be run from FLASH!
- */
-ulong flash_get_size (volatile FLASH_WORD_SIZE *addr, flash_info_t *info)
-{
-       short i;
-       ulong base = (ulong)addr;
-       FLASH_WORD_SIZE value;
-
-       /* Write auto select command: read Manufacturer ID */
-
-       /*
-        * Note: if it is an AMD flash and the word at addr[0000]
-        * is 0x00890089 this routine will think it is an Intel
-        * flash device and may(most likely) cause trouble.
-        */
-
-       addr[0x0000] = 0x00900090;
-       if(addr[0x0000] != 0x00890089){
-               addr[0x0555] = 0x00AA00AA;
-               addr[0x02AA] = 0x00550055;
-               addr[0x0555] = 0x00900090;
-       }
-       value = addr[0];
-
-       switch (value) {
-               case (AMD_MANUFACT & FLASH_ID_MASK):
-                       info->flash_id = FLASH_MAN_AMD;
-                       break;
-               case (FUJ_MANUFACT & FLASH_ID_MASK):
-                       info->flash_id = FLASH_MAN_FUJ;
-                       break;
-               case (STM_MANUFACT & FLASH_ID_MASK):
-                       info->flash_id = FLASH_MAN_STM;
-                       break;
-               case (SST_MANUFACT & FLASH_ID_MASK):
-                       info->flash_id = FLASH_MAN_SST;
-                       break;
-               case (INTEL_MANUFACT & FLASH_ID_MASK):
-                       info->flash_id = FLASH_MAN_INTEL;
-                       break;
-               default:
-                       info->flash_id = FLASH_UNKNOWN;
-                       info->sector_count = 0;
-                       info->size = 0;
-                       return (0); /* no or unknown flash */
-       }
-
-       value = addr[1]; /* device ID */
-
-       switch (value) {
-               case (AMD_ID_LV160T & FLASH_ID_MASK):
-                       info->flash_id += FLASH_AM160T;
-                       info->sector_count = 35;
-                       info->size = 0x00400000;
-                       break; /* => 4 MB */
-
-               case (AMD_ID_LV160B & FLASH_ID_MASK):
-                       info->flash_id += FLASH_AM160B;
-                       info->sector_count = 35;
-                       info->size = 0x00400000;
-                       break; /* => 4 MB */
-
-               case (AMD_ID_DL163T & FLASH_ID_MASK):
-                       info->flash_id += FLASH_AMDL163T;
-                       info->sector_count = 39;
-                       info->size = 0x00400000;
-                       break; /* => 4 MB */
-
-               case (AMD_ID_DL163B & FLASH_ID_MASK):
-                       info->flash_id += FLASH_AMDL163B;
-                       info->sector_count = 39;
-                       info->size = 0x00400000;
-                       break; /* => 4 MB */
-
-               case (AMD_ID_DL323T & FLASH_ID_MASK):
-                       info->flash_id += FLASH_AMDL323T;
-                       info->sector_count = 71;
-                       info->size = 0x00800000;
-                       break; /* => 8 MB */
-
-               case (AMD_ID_DL323B & FLASH_ID_MASK):
-                       info->flash_id += FLASH_AMDL323B;
-                       info->sector_count = 71;
-                       info->size = 0x00800000;
-                       break; /* => 8 MB */
-
-               case (AMD_ID_DL322T & FLASH_ID_MASK):
-                       info->flash_id += FLASH_AMDL322T;
-                       info->sector_count = 71;
-                       info->size = 0x00800000;
-                       break; /* => 8 MB */
-
-               default:
-                       /* FIXME*/
-                       info->flash_id = FLASH_UNKNOWN;
-                       return (0); /* => no or unknown flash */
-       }
-
-       flash_get_offsets(base, info);
-
-       /* check for protected sectors */
-       for (i = 0; i < info->sector_count; i++) {
-               /* read sector protection at sector address, (A7 .. A0) = 0x02 */
-               /* D0 = 1 if protected */
-               addr = (volatile FLASH_WORD_SIZE *)(info->start[i]);
-               info->protect[i] = addr[2] & 1;
-       }
-
-       /*
-        * Prevent writes to uninitialized FLASH.
-        */
-       if (info->flash_id != FLASH_UNKNOWN) {
-               addr = (volatile FLASH_WORD_SIZE *)info->start[0];
-               *addr = (0x00FF00FF & FLASH_ID_MASK);   /* reset bank */
-       }
-
-       return (info->size);
-}
-
-
-/*-----------------------------------------------------------------------
- */
-
-int flash_erase (flash_info_t *info, int s_first, int s_last)
-{
-       volatile FLASH_WORD_SIZE *addr=(volatile FLASH_WORD_SIZE*)(info->start[0]);
-       int flag, prot, sect, l_sect;
-       ulong start, now, last;
-       int rcode = 0;
-
-       if ((s_first < 0) || (s_first > s_last)) {
-               if (info->flash_id == FLASH_UNKNOWN) {
-                       printf ("- missing\n");
-               } else {
-                       printf ("- no sectors to erase\n");
-               }
-               return 1;
-       }
-
-       if ((info->flash_id == FLASH_UNKNOWN) ||
-               (info->flash_id > FLASH_AMD_COMP) ) {
-               printf ("Can't erase unknown flash type - aborted\n");
-               return 1;
-       }
-
-       prot = 0;
-       for (sect=s_first; sect<=s_last; ++sect) {
-               if (info->protect[sect]) {
-                       prot++;
-               }
-       }
-
-       if (prot) {
-               printf ("- Warning: %d protected sectors will not be erased!\n",
-                       prot);
-       } else {
-               printf ("\n");
-       }
-
-       l_sect = -1;
-
-       /* Disable interrupts which might cause a timeout here */
-       flag = disable_interrupts();
-       addr[0x0555] = 0x00AA00AA;
-       addr[0x02AA] = 0x00550055;
-       addr[0x0555] = 0x00800080;
-       addr[0x0555] = 0x00AA00AA;
-       addr[0x02AA] = 0x00550055;
-       /* Start erase on unprotected sectors */
-       for (sect = s_first; sect<=s_last; sect++) {
-               if (info->protect[sect] == 0) { /* not protected */
-                       addr = (volatile FLASH_WORD_SIZE *)(info->start[sect]);
-                       addr[0] = (0x00300030 & FLASH_ID_MASK);
-                       l_sect = sect;
-               }
-       }
-
-       /* re-enable interrupts if necessary */
-       if (flag)
-               enable_interrupts();
-
-       /* wait at least 80us - let's wait 1 ms */
-       udelay (1000);
-
-       /*
-        * We wait for the last triggered sector
-        */
-       if (l_sect < 0)
-               goto DONE;
-
-       start = get_timer (0);
-       last  = start;
-       addr = (volatile FLASH_WORD_SIZE*)(info->start[l_sect]);
-       while ((addr[0] & (0x00800080&FLASH_ID_MASK)) !=
-                       (0x00800080&FLASH_ID_MASK)  )
-       {
-               if ((now = get_timer(start)) > CONFIG_SYS_FLASH_ERASE_TOUT) {
-                       printf ("Timeout\n");
-                       return 1;
-               }
-               /* show that we're waiting */
-               if ((now - last) > 1000) { /* every second */
-                       serial_putc ('.');
-                       last = now;
-               }
-       }
-
-DONE:
-       /* reset to read mode */
-       addr = (volatile FLASH_WORD_SIZE *)info->start[0];
-       addr[0] = (0x00F000F0 & FLASH_ID_MASK); /* reset bank */
-
-       printf (" done\n");
-       return rcode;
-}
-
-/*-----------------------------------------------------------------------
- * Copy memory to flash, returns:
- * 0 - OK
- * 1 - write timeout
- * 2 - Flash not erased
- */
-
-int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
-{
-       ulong cp, wp, data;
-       int l;
-       int i, rc;
-
-       wp = (addr & ~3); /* get lower word aligned address */
-
-       /*
-        * handle unaligned start bytes
-        */
-       if ((l = addr - wp) != 0) {
-               data = 0;
-               for (i=0, cp=wp; i<l; ++i, ++cp) {
-                       data = (data << 8) | (*(uchar *)cp);
-               }
-               for (; i<4 && cnt>0; ++i) {
-                       data = (data << 8) | *src++;
-                       --cnt;
-                       ++cp;
-               }
-               for (; cnt==0 && i<4; ++i, ++cp) {
-                       data = (data << 8) | (*(uchar *)cp);
-               }
-
-               if ((rc = write_word(info, wp, data)) != 0) {
-                       return (rc);
-               }
-               wp += 4;
-       }
-
-       /*
-        * handle word aligned part
-        */
-       while (cnt >= 4) {
-               data = 0;
-               for (i=0; i<4; ++i) {
-                       data = (data << 8) | *src++;
-               }
-               if ((rc = write_word(info, wp, data)) != 0) {
-                       return (rc);
-               }
-               wp  += 4;
-               cnt -= 4;
-       }
-
-       if (cnt == 0) {
-               return (0);
-       }
-
-       /*
-        * handle unaligned tail bytes
-        */
-       data = 0;
-       for (i=0, cp=wp; i<4 && cnt>0; ++i, ++cp) {
-               data = (data << 8) | *src++;
-               --cnt;
-       }
-       for (; i<4; ++i, ++cp) {
-               data = (data << 8) | (*(uchar *)cp);
-       }
-
-       return (write_word(info, wp, data));
-}
-
-/*-----------------------------------------------------------------------
- * Write a word to Flash, returns:
- * 0 - OK
- * 1 - write timeout
- * 2 - Flash not erased
- */
-static int write_word (flash_info_t *info, ulong dest, ulong data)
-{
-       vu_long *addr = (vu_long*)(info->start[0]);
-       ulong start;
-       int flag;
-
-       /* Check if Flash is (sufficiently) erased */
-       if ((*((vu_long *)dest) & data) != data) {
-               return (2);
-       }
-
-       /* Disable interrupts which might cause a timeout here */
-       flag = disable_interrupts();
-
-       /* AMD stuff */
-       addr[0x0555] = 0x00AA00AA;
-       addr[0x02AA] = 0x00550055;
-       addr[0x0555] = 0x00A000A0;
-
-       *((vu_long *)dest) = data;
-
-       /* re-enable interrupts if necessary */
-       if (flag)
-               enable_interrupts();
-
-       /* data polling for D7 */
-       start = get_timer(0);
-
-       while ((*((vu_long *)dest) & 0x00800080) != (data & 0x00800080)) {
-               if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT) {
-                       return (1);
-               }
-       }
-
-       return (0);
-}
diff --git a/board/snmc/qs850/qs850.c b/board/snmc/qs850/qs850.c
deleted file mode 100644 (file)
index dc4a476..0000000
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * (C) Copyright 2003
- * MuLogic B.V.
- *
- * (C) Copyright 2002
- * Simple Network Magic Corporation, dnevil@snmc.com
- *
- * (C) Copyright 2000
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <common.h>
-#include <asm/u-boot.h>
-#include <commproc.h>
-#include "mpc8xx.h"
-
-/* ------------------------------------------------------------------------- */
-
-static long  int dram_size (long int, long int *, long int);
-
-/* ------------------------------------------------------------------------- */
-
-const uint sdram_table[] =
-{
-       /*
-        * Single Read. (Offset 0 in UPMA RAM)
-        */
-       0x0f07cc04,  0x00adcc04,  0x00a74c00,  0x00bfcc04,
-       0x1fffcc05,  0xffffcc05,  0xffffcc05,  0xffffcc05,
-       /*
-        * Burst Read. (Offset 8 in UPMA RAM)
-        */
-       0x0ff7fc04,  0x0ffffc04,  0x00bdfc04,  0x00fffc00,
-       0x00fffc00,  0x00fffc00,  0x0ff77c00,  0x1ffffc05,
-       0x1ffffc05,  0x1ffffc05,  0x1ffffc05,  0x1ffffc05,
-       0x1ffffc05,  0x1ffffc05,  0x1ffffc05,  0x1ffffc05,
-       /*
-        * Single Write. (Offset 18 in UPMA RAM)
-        */
-       0x0f07cc04,  0x0fafcc00,  0x01ad0c04,  0x1ff74c07,
-       0xffffcc05,  0xffffcc05,  0xffffcc05,  0xffffcc05,
-       /*
-        * Burst Write. (Offset 20 in UPMA RAM)
-        */
-       0x0ff7fc04,  0x0ffffc00,  0x00bd7c00,  0x00fffc00,
-       0x00fffc00,  0x00fffc00,  0x0ffffc04,  0x0ff77c04,
-       0x1ffffc05,  0x1ffffc05,  0x1ffffc05,  0x1ffffc05,
-       0x1ffffc05,  0x1ffffc05,  0x1ffffc05,  0x1ffffc05,
-       /*
-        * Refresh  (Offset 30 in UPMA RAM)
-        */
-       0xffffcc04,  0x1ff5cc84,  0xffffcc04,  0xffffcc04,
-       0xffffcc84,  0xffffcc05,  0xffffcc04,  0xffffcc04,
-       0xffffcc04,  0xffffcc04,  0xffffcc04,  0xffffcc04,
-       /*
-        * Exception. (Offset 3c in UPMA RAM)
-        */
-       0x1ff74c04,  0xffffcc07,  0xffffaa34,  0x1fb54a37
-};
-
-/* ------------------------------------------------------------------------- */
-
-
-/*
- * Check Board Identity:
- *
- * Test ID string (QS850, QS823, ...)
- *
- * Always return 1
- */
-#if defined(CONFIG_QS850)
-#define BOARD_IDENTITY "QS850"
-#elif defined(CONFIG_QS823)
-#define BOARD_IDENTITY "QS823"
-#else
-#define        BOARD_IDENTITY  "QS???"
-#endif
-
-int checkboard (void)
-{
-       char *s, *e;
-       char buf[64];
-       int i;
-
-       i = getenv_f("serial#", buf, sizeof(buf));
-       s = (i>0) ? buf : NULL;
-
-       if (!s || strncmp(s, BOARD_IDENTITY, 5)) {
-               puts ("### No HW ID - assuming " BOARD_IDENTITY);
-       } else {
-               for (e=s; *e; ++e) {
-               if (*e == ' ')
-               break;
-       }
-
-       for ( ; s<e; ++s) {
-               putc (*s);
-               }
-       }
-       putc ('\n');
-
-       return (0);
-}
-
-/* ------------------------------------------------------------------------- */
-/* SDRAM Mode Register Definitions */
-
-/* Set SDRAM Burst Length to 4 (010) */
-/* See Motorola MPC850 User Manual, Page 13-14 */
-#define SDRAM_BURST_LENGTH      (2)
-
-/* Set Wrap Type to Sequential (0) */
-/* See Motorola MPC850 User Manual, Page 13-14 */
-#define SDRAM_WRAP_TYPE         (0 << 3)
-
-/* Set /CAS Latentcy to 2 clocks */
-#define SDRAM_CAS_LATENTCY      (2 << 4)
-
-/* The Mode Register value must be shifted left by 2, since it is */
-/* placed on the address bus, and the 2 LSBs are ignored for 32-bit accesses */
-#define SDRAM_MODE_REG  ((SDRAM_BURST_LENGTH|SDRAM_WRAP_TYPE|SDRAM_CAS_LATENTCY) << 2)
-
-#define UPMA_RUN(loops,index)   (0x80002000 + (loops<<8) + index)
-
-/* Please note a value of zero = 16 loops */
-#define REFRESH_INIT_LOOPS (0)
-
-
-phys_size_t initdram (int board_type)
-{
-       volatile immap_t     *immap  = (immap_t *)CONFIG_SYS_IMMR;
-       volatile memctl8xx_t *memctl = &immap->im_memctl;
-       long int size;
-
-       upmconfig(UPMA, (uint *)sdram_table, sizeof(sdram_table)/sizeof(uint));
-
-       /*
-       * Prescaler for refresh
-       */
-       memctl->memc_mptpr = CONFIG_SYS_MPTPR;
-
-       /*
-       * Map controller bank 1 to the SDRAM address
-       */
-       memctl->memc_or1 = CONFIG_SYS_OR1;
-       memctl->memc_br1 = CONFIG_SYS_BR1;
-       udelay(1000);
-
-       /* perform SDRAM initialization sequence */
-       memctl->memc_mamr = CONFIG_SYS_16M_MAMR;
-       udelay(100);
-
-       /* Program the SDRAM's Mode Register */
-       memctl->memc_mar  = SDRAM_MODE_REG;
-
-       /* Run the Prechard Pattern at 0x3C */
-       memctl->memc_mcr  = UPMA_RUN(1,0x3c);
-       udelay(1);
-
-       /* Run the Refresh program residing at MAD index 0x30 */
-       /* This contains the CBR Refresh command with a loop */
-       /* The SDRAM must be refreshed at least 2 times */
-       /* Please note a value of zero = 16 loops */
-       memctl->memc_mcr  = UPMA_RUN(REFRESH_INIT_LOOPS,0x30);
-       udelay(1);
-
-       /* Run the Exception program residing at MAD index 0x3E */
-       /* This contains the Write Mode Register command */
-       /* The Write Mode Register command uses the value written to MAR */
-       memctl->memc_mcr  = UPMA_RUN(1,0x3e);
-
-       udelay (1000);
-
-       /*
-       * Check for 32M SDRAM Memory Size
-       */
-       size = dram_size(CONFIG_SYS_32M_MAMR|MAMR_PTAE,
-       (long *)SDRAM_BASE, SDRAM_32M_MAX_SIZE);
-       udelay (1000);
-
-       /*
-       * Check for 16M SDRAM Memory Size
-       */
-       if (size != SDRAM_32M_MAX_SIZE) {
-       size = dram_size(CONFIG_SYS_16M_MAMR|MAMR_PTAE,
-       (long *)SDRAM_BASE, SDRAM_16M_MAX_SIZE);
-       udelay (1000);
-       }
-
-       udelay(10000);
-       return (size);
-}
-
-/* ------------------------------------------------------------------------- */
-
-/*
- * Check memory range for valid RAM. A simple memory test determines
- * the actually available RAM size between addresses `base' and
- * `base + maxsize'. Some (not all) hardware errors are detected:
- * - short between address lines
- * - short between data lines
- */
-
-static long int dram_size (long int mamr_value, long int *base, long int maxsize)
-{
-       volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
-       volatile memctl8xx_t *memctl = &immap->im_memctl;
-
-       memctl->memc_mamr = mamr_value;
-
-       return (get_ram_size(base, maxsize));
-}
diff --git a/board/snmc/qs850/u-boot.lds b/board/snmc/qs850/u-boot.lds
deleted file mode 100644 (file)
index 667dc54..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * (C) Copyright 2000-2010
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-OUTPUT_ARCH(powerpc)
-
-SECTIONS
-{
-  /* Read-only sections, merged into text segment: */
-  . = + SIZEOF_HEADERS;
-  .text      :
-  {
-    /* WARNING - the following is hand-optimized to fit within */
-    /* the sector layout of our flash chips!   XXX FIXME XXX   */
-
-    arch/powerpc/cpu/mpc8xx/start.o    (.text*)
-    arch/powerpc/cpu/mpc8xx/traps.o    (.text*)
-
-    *(.text*)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-
-  /* Read-write section, merged into data segment: */
-  . = (. + 0x00FF) & 0xFFFFFF00;
-  _erotext = .;
-  PROVIDE (erotext = .);
-  .reloc   :
-  {
-    _GOT2_TABLE_ = .;
-    KEEP(*(.got2))
-    KEEP(*(.got))
-    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
-    _FIXUP_TABLE_ = .;
-    KEEP(*(.fixup))
-  }
-  __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
-  __fixup_entries = (. - _FIXUP_TABLE_)>>2;
-
-  .data    :
-  {
-    *(.data*)
-    *(.sdata*)
-  }
-  _edata  =  .;
-  PROVIDE (edata = .);
-
-  . = .;
-
-  . = ALIGN(4);
-  .u_boot_list : {
-       KEEP(*(SORT(.u_boot_list*)));
-  }
-
-
-  . = .;
-  __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)       :
-  {
-   *(.bss*)
-   *(.sbss*)
-   *(COMMON)
-   . = ALIGN(4);
-  }
-  __bss_end = . ;
-  PROVIDE (end = .);
-}
diff --git a/board/snmc/qs860t/Makefile b/board/snmc/qs860t/Makefile
deleted file mode 100644 (file)
index 802f67e..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# (C) Copyright 2000-2006
-# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
-
-obj-y  = qs860t.o flash.o
diff --git a/board/snmc/qs860t/flash.c b/board/snmc/qs860t/flash.c
deleted file mode 100644 (file)
index c24d979..0000000
+++ /dev/null
@@ -1,1099 +0,0 @@
-/*
- * (C) Copyright 2003
- * MuLogic B.V.
- *
- * (C) Copyright 2001
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <common.h>
-#include <asm/ppc4xx.h>
-#include <asm/u-boot.h>
-#include <asm/processor.h>
-
-flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH chips */
-
-
-#ifdef CONFIG_SYS_FLASH_16BIT
-#define FLASH_WORD_SIZE        unsigned short
-#define FLASH_ID_MASK  0xFFFF
-#else
-#define FLASH_WORD_SIZE unsigned long
-#define FLASH_ID_MASK  0xFFFFFFFF
-#endif
-
-/*-----------------------------------------------------------------------
- * Functions
- */
-/* stolen from esteem192e/flash.c */
-ulong flash_get_size (volatile FLASH_WORD_SIZE *addr, flash_info_t *info);
-
-#ifndef CONFIG_SYS_FLASH_16BIT
-static int write_word (flash_info_t *info, ulong dest, ulong data);
-#else
-static int write_short (flash_info_t *info, ulong dest, ushort data);
-#endif
-static void flash_get_offsets (ulong base, flash_info_t *info);
-
-
-/*-----------------------------------------------------------------------
- */
-
-unsigned long flash_init (void)
-{
-       unsigned long size_b0, size_b1;
-       int i;
-       uint pbcr;
-       unsigned long base_b0, base_b1;
-
-       /* Init: no FLASHes known */
-       for (i=0; i<CONFIG_SYS_MAX_FLASH_BANKS; ++i) {
-               flash_info[i].flash_id = FLASH_UNKNOWN;
-       }
-
-       /* Static FLASH Bank configuration here - FIXME XXX */
-
-       size_b0 = flash_get_size((volatile FLASH_WORD_SIZE *)FLASH_BASE1_PRELIM, &flash_info[0]);
-
-       if (flash_info[0].flash_id == FLASH_UNKNOWN) {
-               printf ("## Unknown FLASH on Bank 0 - Size = 0x%08lx = %ld MB\n",
-                       size_b0, size_b0<<20);
-       }
-
-       /* Only one bank */
-       if (CONFIG_SYS_MAX_FLASH_BANKS == 1) {
-               /* Setup offsets */
-               flash_get_offsets (FLASH_BASE1_PRELIM, &flash_info[0]);
-
-               /* Monitor protection ON by default */
-#if 0  /* sand: */
-               (void)flash_protect(FLAG_PROTECT_SET,
-                       FLASH_BASE1_PRELIM-CONFIG_SYS_MONITOR_LEN+size_b0,
-                       FLASH_BASE1_PRELIM-1+size_b0,
-                       &flash_info[0]);
-#else
-               (void)flash_protect(FLAG_PROTECT_SET,
-                       CONFIG_SYS_MONITOR_BASE,
-                       CONFIG_SYS_MONITOR_BASE+CONFIG_SYS_MONITOR_LEN-1,
-                       &flash_info[0]);
-#endif
-               size_b1 = 0 ;
-               flash_info[0].size = size_b0;
-       } else {        /* 2 banks */
-               size_b1 = flash_get_size((volatile FLASH_WORD_SIZE *)FLASH_BASE1_PRELIM, &flash_info[1]);
-
-               /* Re-do sizing to get full correct info */
-               if (size_b1) {
-                       mtdcr(EBC0_CFGADDR, PB0CR);
-                       pbcr = mfdcr(EBC0_CFGDATA);
-                       mtdcr(EBC0_CFGADDR, PB0CR);
-                       base_b1 = -size_b1;
-                       pbcr = (pbcr & 0x0001ffff) | base_b1 | (((size_b1/1024/1024)-1)<<17);
-                       mtdcr(EBC0_CFGDATA, pbcr);
-               }
-
-               if (size_b0) {
-                       mtdcr(EBC0_CFGADDR, PB1CR);
-                       pbcr = mfdcr(EBC0_CFGDATA);
-                       mtdcr(EBC0_CFGADDR, PB1CR);
-                       base_b0 = base_b1 - size_b0;
-                       pbcr = (pbcr & 0x0001ffff) | base_b0 | (((size_b0/1024/1024)-1)<<17);
-                       mtdcr(EBC0_CFGDATA, pbcr);
-               }
-
-               size_b0 = flash_get_size((volatile FLASH_WORD_SIZE *)base_b0, &flash_info[0]);
-
-               flash_get_offsets (base_b0, &flash_info[0]);
-
-               /* monitor protection ON by default */
-#if 0  /* sand: */
-               (void)flash_protect(FLAG_PROTECT_SET,
-                       FLASH_BASE1_PRELIM-CONFIG_SYS_MONITOR_LEN+size_b0,
-                       FLASH_BASE1_PRELIM-1+size_b0,
-                       &flash_info[0]);
-#else
-               (void)flash_protect(FLAG_PROTECT_SET,
-                       CONFIG_SYS_MONITOR_BASE,
-                       CONFIG_SYS_MONITOR_BASE+CONFIG_SYS_MONITOR_LEN-1,
-                       &flash_info[0]);
-#endif
-
-               if (size_b1) {
-                       /* Re-do sizing to get full correct info */
-                       size_b1 = flash_get_size((volatile FLASH_WORD_SIZE *)base_b1, &flash_info[1]);
-
-                       flash_get_offsets (base_b1, &flash_info[1]);
-
-                       /* monitor protection ON by default */
-                       (void)flash_protect(FLAG_PROTECT_SET,
-                               base_b1+size_b1-CONFIG_SYS_MONITOR_LEN,
-                               base_b1+size_b1-1,
-                               &flash_info[1]);
-                       /* monitor protection OFF by default (one is enough) */
-                       (void)flash_protect(FLAG_PROTECT_CLEAR,
-                               base_b0+size_b0-CONFIG_SYS_MONITOR_LEN,
-                               base_b0+size_b0-1,
-                               &flash_info[0]);
-               } else {
-                       flash_info[1].flash_id = FLASH_UNKNOWN;
-                       flash_info[1].sector_count = -1;
-               }
-
-               flash_info[0].size = size_b0;
-               flash_info[1].size = size_b1;
-       }/* else 2 banks */
-       return (size_b0 + size_b1);
-}
-
-
-/*-----------------------------------------------------------------------
- */
-
-static void flash_get_offsets (ulong base, flash_info_t *info)
-{
-       int i;
-
-       /* set up sector start adress table */
-       if ((info->flash_id & FLASH_TYPEMASK) == INTEL_ID_28F320J3A ||
-               (info->flash_id & FLASH_TYPEMASK) == INTEL_ID_28F640J3A ||
-               (info->flash_id & FLASH_TYPEMASK) == INTEL_ID_28F128J3A) {
-               for (i = 0; i < info->sector_count; i++) {
-                       info->start[i] = base + (i * info->size/info->sector_count);
-               }
-       }
-       else if (info->flash_id & FLASH_BTYPE) {
-               if ((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_INTEL) {
-
-#ifndef CONFIG_SYS_FLASH_16BIT
-                       /* set sector offsets for bottom boot block type */
-                       info->start[0] = base + 0x00000000;
-                       info->start[1] = base + 0x00004000;
-                       info->start[2] = base + 0x00008000;
-                       info->start[3] = base + 0x0000C000;
-                       info->start[4] = base + 0x00010000;
-                       info->start[5] = base + 0x00014000;
-                       info->start[6] = base + 0x00018000;
-                       info->start[7] = base + 0x0001C000;
-                       for (i = 8; i < info->sector_count; i++) {
-                               info->start[i] = base + (i * 0x00020000) - 0x000E0000;
-                       }
-               } else {
-                       /* set sector offsets for bottom boot block type */
-                       info->start[0] = base + 0x00000000;
-                       info->start[1] = base + 0x00008000;
-                       info->start[2] = base + 0x0000C000;
-                       info->start[3] = base + 0x00010000;
-                       for (i = 4; i < info->sector_count; i++) {
-                               info->start[i] = base + (i * 0x00020000) - 0x00060000;
-                       }
-               }
-#else
-                       /* set sector offsets for bottom boot block type */
-                       info->start[0] = base + 0x00000000;
-                       info->start[1] = base + 0x00002000;
-                       info->start[2] = base + 0x00004000;
-                       info->start[3] = base + 0x00006000;
-                       info->start[4] = base + 0x00008000;
-                       info->start[5] = base + 0x0000A000;
-                       info->start[6] = base + 0x0000C000;
-                       info->start[7] = base + 0x0000E000;
-                       for (i = 8; i < info->sector_count; i++) {
-                               info->start[i] = base + (i * 0x00010000) - 0x00070000;
-                       }
-               } else {
-                       /* set sector offsets for bottom boot block type */
-                       info->start[0] = base + 0x00000000;
-                       info->start[1] = base + 0x00004000;
-                       info->start[2] = base + 0x00006000;
-                       info->start[3] = base + 0x00008000;
-                       for (i = 4; i < info->sector_count; i++) {
-                               info->start[i] = base + (i * 0x00010000) - 0x00030000;
-                       }
-               }
-#endif
-       } else {
-               /* set sector offsets for top boot block type */
-               i = info->sector_count - 1;
-               if ((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_INTEL) {
-
-#ifndef CONFIG_SYS_FLASH_16BIT
-                       info->start[i--] = base + info->size - 0x00004000;
-                       info->start[i--] = base + info->size - 0x00008000;
-                       info->start[i--] = base + info->size - 0x0000C000;
-                       info->start[i--] = base + info->size - 0x00010000;
-                       info->start[i--] = base + info->size - 0x00014000;
-                       info->start[i--] = base + info->size - 0x00018000;
-                       info->start[i--] = base + info->size - 0x0001C000;
-                       for (; i >= 0; i--) {
-                               info->start[i] = base + i * 0x00020000;
-                       }
-               } else {
-
-                       info->start[i--] = base + info->size - 0x00008000;
-                       info->start[i--] = base + info->size - 0x0000C000;
-                       info->start[i--] = base + info->size - 0x00010000;
-                       for (; i >= 0; i--) {
-                               info->start[i] = base + i * 0x00020000;
-                       }
-               }
-#else
-                       info->start[i--] = base + info->size - 0x00002000;
-                       info->start[i--] = base + info->size - 0x00004000;
-                       info->start[i--] = base + info->size - 0x00006000;
-                       info->start[i--] = base + info->size - 0x00008000;
-                       info->start[i--] = base + info->size - 0x0000A000;
-                       info->start[i--] = base + info->size - 0x0000C000;
-                       info->start[i--] = base + info->size - 0x0000E000;
-                       for (; i >= 0; i--) {
-                               info->start[i] = base + i * 0x00010000;
-                       }
-               } else {
-                       info->start[i--] = base + info->size - 0x00004000;
-                       info->start[i--] = base + info->size - 0x00006000;
-                       info->start[i--] = base + info->size - 0x00008000;
-                       for (; i >= 0; i--) {
-                               info->start[i] = base + i * 0x00010000;
-                       }
-               }
-#endif
-       }
-}
-
-/*-----------------------------------------------------------------------
- */
-
-void flash_print_info  (flash_info_t *info)
-{
-       int i;
-       uchar *boottype;
-       uchar botboot[]=", bottom boot sect)\n";
-       uchar topboot[]=", top boot sector)\n";
-
-       if (info->flash_id == FLASH_UNKNOWN) {
-               printf ("missing or unknown FLASH type\n");
-               return;
-       }
-
-       switch (info->flash_id & FLASH_VENDMASK) {
-       case FLASH_MAN_AMD:     printf ("AMD ");                break;
-       case FLASH_MAN_FUJ:     printf ("FUJITSU ");            break;
-       case FLASH_MAN_SST:     printf ("SST ");                break;
-       case FLASH_MAN_STM:     printf ("STM ");                break;
-       case FLASH_MAN_INTEL:   printf ("INTEL ");              break;
-       default:                printf ("Unknown Vendor ");     break;
-       }
-
-       if (info->flash_id & 0x0001 ) {
-               boottype = botboot;
-       } else {
-               boottype = topboot;
-       }
-
-       switch (info->flash_id & FLASH_TYPEMASK) {
-       case FLASH_AM400B:      printf ("AM29LV400B (4 Mbit%s",boottype);
-                               break;
-       case FLASH_AM400T:      printf ("AM29LV400T (4 Mbit%s",boottype);
-                               break;
-       case FLASH_AM800B:      printf ("AM29LV800B (8 Mbit%s",boottype);
-                               break;
-       case FLASH_AM800T:      printf ("AM29LV800T (8 Mbit%s",boottype);
-                               break;
-       case FLASH_AM160B:      printf ("AM29LV160B (16 Mbit%s",boottype);
-                               break;
-       case FLASH_AM160T:      printf ("AM29LV160T (16 Mbit%s",boottype);
-                               break;
-       case FLASH_AM320B:      printf ("AM29LV320B (32 Mbit%s",boottype);
-                               break;
-       case FLASH_AM320T:      printf ("AM29LV320T (32 Mbit%s",boottype);
-                               break;
-       case FLASH_INTEL800B:   printf ("INTEL28F800B (8 Mbit%s",boottype);
-                               break;
-       case FLASH_INTEL800T:   printf ("INTEL28F800T (8 Mbit%s",boottype);
-                               break;
-       case FLASH_INTEL160B:   printf ("INTEL28F160B (16 Mbit%s",boottype);
-                               break;
-       case FLASH_INTEL160T:   printf ("INTEL28F160T (16 Mbit%s",boottype);
-                               break;
-       case FLASH_INTEL320B:   printf ("INTEL28F320B (32 Mbit%s",boottype);
-                               break;
-       case FLASH_INTEL320T:   printf ("INTEL28F320T (32 Mbit%s",boottype);
-                               break;
-       case FLASH_AMDL322T:    printf ("AM29DL322T (32 Mbit%s",boottype);
-                               break;
-
-#if 0 /* enable when devices are available */
-
-       case FLASH_INTEL640B:   printf ("INTEL28F640B (64 Mbit%s",boottype);
-                               break;
-       case FLASH_INTEL640T:   printf ("INTEL28F640T (64 Mbit%s",boottype);
-                               break;
-#endif
-       case INTEL_ID_28F320J3A:        printf ("INTEL28F320JA3 (32 Mbit%s",boottype);
-                               break;
-       case INTEL_ID_28F640J3A:        printf ("INTEL28F640JA3 (64 Mbit%s",boottype);
-                               break;
-       case INTEL_ID_28F128J3A:        printf ("INTEL28F128JA3 (128 Mbit%s",boottype);
-                               break;
-
-       default:                printf ("Unknown Chip Type\n");
-                               break;
-       }
-
-       printf ("  Size: %ld MB in %d Sectors\n",
-               info->size >> 20, info->sector_count);
-
-       printf ("  Sector Start Addresses:");
-       for (i=0; i<info->sector_count; ++i) {
-               if ((i % 5) == 0)
-                       printf ("\n   ");
-               printf (" %08lX%s",
-                       info->start[i],
-                       info->protect[i] ? " (RO)" : "     "
-               );
-       }
-       printf ("\n");
-       return;
-}
-
-
-/*-----------------------------------------------------------------------
- */
-
-
-/*-----------------------------------------------------------------------
- */
-
-/*
- * The following code cannot be run from FLASH!
- */
-ulong flash_get_size (volatile FLASH_WORD_SIZE *addr, flash_info_t *info)
-{
-       short i;
-       ulong base = (ulong)addr;
-       FLASH_WORD_SIZE value;
-
-       /* Write auto select command: read Manufacturer ID */
-
-
-#ifndef CONFIG_SYS_FLASH_16BIT
-
-       /*
-        * Note: if it is an AMD flash and the word at addr[0000]
-        * is 0x00890089 this routine will think it is an Intel
-        * flash device and may(most likely) cause trouble.
-        */
-
-       addr[0x0000] = 0x00900090;
-       if(addr[0x0000] != 0x00890089){
-               addr[0x0555] = 0x00AA00AA;
-               addr[0x02AA] = 0x00550055;
-               addr[0x0555] = 0x00900090;
-#else
-
-       /*
-        * Note: if it is an AMD flash and the word at addr[0000]
-        * is 0x0089 this routine will think it is an Intel
-        * flash device and may(most likely) cause trouble.
-        */
-
-       addr[0x0000] = 0x0090;
-
-       if(addr[0x0000] != 0x0089){
-               addr[0x0555] = 0x00AA;
-               addr[0x02AA] = 0x0055;
-               addr[0x0555] = 0x0090;
-#endif
-       }
-       value = addr[0];
-
-       switch (value) {
-       case (AMD_MANUFACT & FLASH_ID_MASK):
-               info->flash_id = FLASH_MAN_AMD;
-               break;
-       case (FUJ_MANUFACT & FLASH_ID_MASK):
-               info->flash_id = FLASH_MAN_FUJ;
-               break;
-       case (STM_MANUFACT & FLASH_ID_MASK):
-               info->flash_id = FLASH_MAN_STM;
-               break;
-       case (SST_MANUFACT & FLASH_ID_MASK):
-               info->flash_id = FLASH_MAN_SST;
-               break;
-       case (INTEL_MANUFACT & FLASH_ID_MASK):
-               info->flash_id = FLASH_MAN_INTEL;
-               break;
-       default:
-               info->flash_id = FLASH_UNKNOWN;
-               info->sector_count = 0;
-               info->size = 0;
-               return (0); /* no or unknown flash */
-
-       }
-
-       value = addr[1];                        /* device ID            */
-
-       switch (value) {
-
-       case (AMD_ID_LV400T & FLASH_ID_MASK):
-               info->flash_id += FLASH_AM400T;
-               info->sector_count = 11;
-               info->size = 0x00100000;
-               break;                          /* => 1 MB              */
-
-       case (AMD_ID_LV400B & FLASH_ID_MASK):
-               info->flash_id += FLASH_AM400B;
-               info->sector_count = 11;
-               info->size = 0x00100000;
-               break;                          /* => 1 MB              */
-
-       case (AMD_ID_LV800T & FLASH_ID_MASK):
-               info->flash_id += FLASH_AM800T;
-               info->sector_count = 19;
-               info->size = 0x00200000;
-               break;                          /* => 2 MB              */
-
-       case (AMD_ID_LV800B & FLASH_ID_MASK):
-               info->flash_id += FLASH_AM800B;
-               info->sector_count = 19;
-               info->size = 0x00200000;
-               break;                          /* => 2 MB              */
-
-       case (AMD_ID_LV160T & FLASH_ID_MASK):
-               info->flash_id += FLASH_AM160T;
-               info->sector_count = 35;
-               info->size = 0x00400000;
-               break;                          /* => 4 MB              */
-
-       case (AMD_ID_LV160B & FLASH_ID_MASK):
-               info->flash_id += FLASH_AM160B;
-               info->sector_count = 35;
-               info->size = 0x00400000;
-               break;                          /* => 4 MB              */
-#if 0  /* enable when device IDs are available */
-       case (AMD_ID_LV320T & FLASH_ID_MASK):
-               info->flash_id += FLASH_AM320T;
-               info->sector_count = 67;
-               info->size = 0x00800000;
-               break;                          /* => 8 MB              */
-
-       case (AMD_ID_LV320B & FLASH_ID_MASK):
-               info->flash_id += FLASH_AM320B;
-               info->sector_count = 67;
-               info->size = 0x00800000;
-               break;                          /* => 8 MB              */
-#endif
-
-       case (AMD_ID_DL322T & FLASH_ID_MASK):
-               info->flash_id += FLASH_AMDL322T;
-               info->sector_count = 71;
-               info->size = 0x00800000;
-               break;                          /* => 8 MB              */
-
-       case (INTEL_ID_28F800B3T & FLASH_ID_MASK):
-               info->flash_id += FLASH_INTEL800T;
-               info->sector_count = 23;
-               info->size = 0x00200000;
-               break;                          /* => 2 MB              */
-
-       case (INTEL_ID_28F800B3B & FLASH_ID_MASK):
-               info->flash_id += FLASH_INTEL800B;
-               info->sector_count = 23;
-               info->size = 0x00200000;
-               break;                          /* => 2 MB              */
-
-       case (INTEL_ID_28F160B3T & FLASH_ID_MASK):
-               info->flash_id += FLASH_INTEL160T;
-               info->sector_count = 39;
-               info->size = 0x00400000;
-               break;                          /* => 4 MB              */
-
-       case (INTEL_ID_28F160B3B & FLASH_ID_MASK):
-               info->flash_id += FLASH_INTEL160B;
-               info->sector_count = 39;
-               info->size = 0x00400000;
-               break;                          /* => 4 MB              */
-
-       case (INTEL_ID_28F320B3T & FLASH_ID_MASK):
-               info->flash_id += FLASH_INTEL320T;
-               info->sector_count = 71;
-               info->size = 0x00800000;
-               break;                          /* => 8 MB              */
-
-       case (INTEL_ID_28F320B3B & FLASH_ID_MASK):
-               info->flash_id += FLASH_AM320B;
-               info->sector_count = 71;
-               info->size = 0x00800000;
-               break;                          /* => 8 MB              */
-
-#if 0 /* enable when devices are available */
-       case (INTEL_ID_28F320B3T & FLASH_ID_MASK):
-               info->flash_id += FLASH_INTEL320T;
-               info->sector_count = 135;
-               info->size = 0x01000000;
-               break;                          /* => 16 MB             */
-
-       case (INTEL_ID_28F320B3B & FLASH_ID_MASK):
-               info->flash_id += FLASH_AM320B;
-               info->sector_count = 135;
-               info->size = 0x01000000;
-               break;                          /* => 16 MB             */
-#endif
-       case (INTEL_ID_28F320J3A & FLASH_ID_MASK):
-               info->flash_id += FLASH_28F320J3A;
-               info->sector_count = 32;
-               info->size = 0x00400000;
-               break;                          /* => 32 MBit   */
-       case (INTEL_ID_28F640J3A & FLASH_ID_MASK):
-               info->flash_id += FLASH_28F640J3A;
-               info->sector_count = 64;
-               info->size = 0x00800000;
-               break;                          /* => 64 MBit   */
-       case (INTEL_ID_28F128J3A & FLASH_ID_MASK):
-               info->flash_id += FLASH_28F128J3A;
-               info->sector_count = 128;
-               info->size = 0x01000000;
-               break;                          /* => 128 MBit  */
-
-       default:
-               /* FIXME*/
-               info->flash_id = FLASH_UNKNOWN;
-               return (0);                     /* => no or unknown flash */
-       }
-
-       flash_get_offsets(base, info);
-
-       /* check for protected sectors */
-       for (i = 0; i < info->sector_count; i++) {
-               /* read sector protection at sector address, (A7 .. A0) = 0x02 */
-               /* D0 = 1 if protected */
-               addr = (volatile FLASH_WORD_SIZE *)(info->start[i]);
-               info->protect[i] = addr[2] & 1;
-       }
-
-       /*
-        * Prevent writes to uninitialized FLASH.
-        */
-       if (info->flash_id != FLASH_UNKNOWN) {
-               addr = (volatile FLASH_WORD_SIZE *)info->start[0];
-               if( (info->flash_id & 0xFF00) == FLASH_MAN_INTEL){
-                       *addr = (0x00F000F0 & FLASH_ID_MASK);   /* reset bank */
-               } else {
-                       *addr = (0x00FF00FF & FLASH_ID_MASK);   /* reset bank */
-               }
-       }
-
-       return (info->size);
-}
-
-
-/*-----------------------------------------------------------------------
- */
-
-int flash_erase (flash_info_t * info, int s_first, int s_last)
-{
-
-       volatile FLASH_WORD_SIZE *addr =
-               (volatile FLASH_WORD_SIZE *) (info->start[0]);
-       int flag, prot, sect, l_sect, barf;
-       ulong start, now, last;
-       int rcode = 0;
-
-       if ((s_first < 0) || (s_first > s_last)) {
-               if (info->flash_id == FLASH_UNKNOWN) {
-                       printf ("- missing\n");
-               } else {
-                       printf ("- no sectors to erase\n");
-               }
-               return 1;
-       }
-
-       if ((info->flash_id == FLASH_UNKNOWN) ||
-           ((info->flash_id > FLASH_AMD_COMP) &&
-            ((info->flash_id & FLASH_VENDMASK) != FLASH_MAN_INTEL))) {
-               printf ("Can't erase unknown flash type - aborted\n");
-               return 1;
-       }
-
-       prot = 0;
-       for (sect = s_first; sect <= s_last; ++sect) {
-               if (info->protect[sect]) {
-                       prot++;
-               }
-       }
-
-       if (prot) {
-               printf ("- Warning: %d protected sectors will not be erased!\n", prot);
-       } else {
-               printf ("\n");
-       }
-
-       l_sect = -1;
-
-       /* Disable interrupts which might cause a timeout here */
-       flag = disable_interrupts ();
-       if (info->flash_id < FLASH_AMD_COMP) {
-#ifndef CONFIG_SYS_FLASH_16BIT
-               addr[0x0555] = 0x00AA00AA;
-               addr[0x02AA] = 0x00550055;
-               addr[0x0555] = 0x00800080;
-               addr[0x0555] = 0x00AA00AA;
-               addr[0x02AA] = 0x00550055;
-#else
-               addr[0x0555] = 0x00AA;
-               addr[0x02AA] = 0x0055;
-               addr[0x0555] = 0x0080;
-               addr[0x0555] = 0x00AA;
-               addr[0x02AA] = 0x0055;
-#endif
-               /* Start erase on unprotected sectors */
-               for (sect = s_first; sect <= s_last; sect++) {
-                       if (info->protect[sect] == 0) { /* not protected */
-                               addr = (volatile FLASH_WORD_SIZE *) (info->start[sect]);
-                               addr[0] = (0x00300030 & FLASH_ID_MASK);
-                               l_sect = sect;
-                       }
-               }
-
-               /* re-enable interrupts if necessary */
-               if (flag)
-                       enable_interrupts ();
-
-               /* wait at least 80us - let's wait 1 ms */
-               udelay (1000);
-
-               /*
-                * We wait for the last triggered sector
-                */
-               if (l_sect < 0)
-                       goto DONE;
-
-               start = get_timer (0);
-               last = start;
-               addr = (volatile FLASH_WORD_SIZE *) (info->start[l_sect]);
-               while ((addr[0] & (0x00800080 & FLASH_ID_MASK)) !=
-                      (0x00800080 & FLASH_ID_MASK)) {
-                       if ((now = get_timer (start)) > CONFIG_SYS_FLASH_ERASE_TOUT) {
-                               printf ("Timeout\n");
-                               return 1;
-                       }
-                       /* show that we're waiting */
-                       if ((now - last) > 1000) {      /* every second */
-                               serial_putc ('.');
-                               last = now;
-                       }
-               }
-
-             DONE:
-               /* reset to read mode */
-               addr = (volatile FLASH_WORD_SIZE *) info->start[0];
-               addr[0] = (0x00F000F0 & FLASH_ID_MASK); /* reset bank */
-       } else {
-
-
-               for (sect = s_first; sect <= s_last; sect++) {
-                       if (info->protect[sect] == 0) { /* not protected */
-                               barf = 0;
-#ifndef CONFIG_SYS_FLASH_16BIT
-                               addr = (vu_long *) (info->start[sect]);
-                               addr[0] = 0x00200020;
-                               addr[0] = 0x00D000D0;
-                               while (!(addr[0] & 0x00800080));        /* wait for error or finish */
-                               if (addr[0] & 0x003A003A) {     /* check for error */
-                                       barf = addr[0] & 0x003A0000;
-                                       if (barf) {
-                                               barf >>= 16;
-                                       } else {
-                                               barf = addr[0] & 0x0000003A;
-                                       }
-                               }
-#else
-                               addr = (vu_short *) (info->start[sect]);
-                               addr[0] = 0x0020;
-                               addr[0] = 0x00D0;
-                               while (!(addr[0] & 0x0080));    /* wait for error or finish */
-                               if (addr[0] & 0x003A)   /* check for error */
-                                       barf = addr[0] & 0x003A;
-#endif
-                               if (barf) {
-                                       printf ("\nFlash error in sector at %lx\n",
-                                               (unsigned long) addr);
-                                       if (barf & 0x0002)
-                                               printf ("Block locked, not erased.\n");
-                                       if ((barf & 0x0030) == 0x0030)
-                                               printf ("Command Sequence error.\n");
-                                       if ((barf & 0x0030) == 0x0020)
-                                               printf ("Block Erase error.\n");
-                                       if (barf & 0x0008)
-                                               printf ("Vpp Low error.\n");
-                                       rcode = 1;
-                               } else
-                                       printf (".");
-                               l_sect = sect;
-                       }
-                       addr = (volatile FLASH_WORD_SIZE *) info->start[0];
-                       addr[0] = (0x00FF00FF & FLASH_ID_MASK); /* reset bank */
-
-               }
-
-       }
-       printf (" done\n");
-       return rcode;
-}
-
-/*-----------------------------------------------------------------------
- */
-
-/*flash_info_t *addr2info (ulong addr)
-{
-       flash_info_t *info;
-       int i;
-
-       for (i=0, info=&flash_info[0]; i<CONFIG_SYS_MAX_FLASH_BANKS; ++i, ++info) {
-               if ((addr >= info->start[0]) &&
-                   (addr < (info->start[0] + info->size)) ) {
-                       return (info);
-               }
-       }
-
-       return (NULL);
-}
-*/
-/*-----------------------------------------------------------------------
- * Copy memory to flash.
- * Make sure all target addresses are within Flash bounds,
- * and no protected sectors are hit.
- * Returns:
- * 0 - OK
- * 1 - write timeout
- * 2 - Flash not erased
- * 4 - target range includes protected sectors
- * 8 - target address not in Flash memory
- */
-
-/*int flash_write (uchar *src, ulong addr, ulong cnt)
-{
-       int i;
-       ulong         end        = addr + cnt - 1;
-       flash_info_t *info_first = addr2info (addr);
-       flash_info_t *info_last  = addr2info (end );
-       flash_info_t *info;
-
-       if (cnt == 0) {
-               return (0);
-       }
-
-       if (!info_first || !info_last) {
-               return (8);
-       }
-
-       for (info = info_first; info <= info_last; ++info) {
-               ulong b_end = info->start[0] + info->size;*/    /* bank end addr */
-/*             short s_end = info->sector_count - 1;
-               for (i=0; i<info->sector_count; ++i) {
-                       ulong e_addr = (i == s_end) ? b_end : info->start[i + 1];
-
-                       if ((end >= info->start[i]) && (addr < e_addr) &&
-                           (info->protect[i] != 0) ) {
-                               return (4);
-                       }
-               }
-       }
-
-*/     /* finally write data to flash */
-/*     for (info = info_first; info <= info_last && cnt>0; ++info) {
-               ulong len;
-
-               len = info->start[0] + info->size - addr;
-               if (len > cnt)
-                       len = cnt;
-               if ((i = write_buff(info, src, addr, len)) != 0) {
-                       return (i);
-               }
-               cnt  -= len;
-               addr += len;
-               src  += len;
-       }
-       return (0);
-}
-*/
-/*-----------------------------------------------------------------------
- * Copy memory to flash, returns:
- * 0 - OK
- * 1 - write timeout
- * 2 - Flash not erased
- */
-
-int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
-{
-#ifndef CONFIG_SYS_FLASH_16BIT
-       ulong cp, wp, data;
-       int l;
-#else
-       ulong cp, wp;
-       ushort data;
-#endif
-       int i, rc;
-
-#ifndef CONFIG_SYS_FLASH_16BIT
-
-
-       wp = (addr & ~3);       /* get lower word aligned address */
-
-       /*
-        * handle unaligned start bytes
-        */
-       if ((l = addr - wp) != 0) {
-               data = 0;
-               for (i=0, cp=wp; i<l; ++i, ++cp) {
-                       data = (data << 8) | (*(uchar *)cp);
-               }
-               for (; i<4 && cnt>0; ++i) {
-                       data = (data << 8) | *src++;
-                       --cnt;
-                       ++cp;
-               }
-               for (; cnt==0 && i<4; ++i, ++cp) {
-                       data = (data << 8) | (*(uchar *)cp);
-               }
-
-               if ((rc = write_word(info, wp, data)) != 0) {
-                       return (rc);
-               }
-               wp += 4;
-       }
-
-       /*
-        * handle word aligned part
-        */
-       while (cnt >= 4) {
-               data = 0;
-               for (i=0; i<4; ++i) {
-                       data = (data << 8) | *src++;
-               }
-               if ((rc = write_word(info, wp, data)) != 0) {
-                       return (rc);
-               }
-               wp  += 4;
-               cnt -= 4;
-       }
-
-       if (cnt == 0) {
-               return (0);
-       }
-
-       /*
-        * handle unaligned tail bytes
-        */
-       data = 0;
-       for (i=0, cp=wp; i<4 && cnt>0; ++i, ++cp) {
-               data = (data << 8) | *src++;
-               --cnt;
-       }
-       for (; i<4; ++i, ++cp) {
-               data = (data << 8) | (*(uchar *)cp);
-       }
-
-       return (write_word(info, wp, data));
-
-#else
-       wp = (addr & ~1);       /* get lower word aligned address */
-
-       /*
-        * handle unaligned start byte
-        */
-       if (addr - wp) {
-               data = 0;
-               data = (data << 8) | *src++;
-               --cnt;
-               if ((rc = write_short(info, wp, data)) != 0) {
-                       return (rc);
-               }
-               wp += 2;
-       }
-
-       /*
-        * handle word aligned part
-        */
-/*     l = 0; used for debuging  */
-       while (cnt >= 2) {
-               data = 0;
-               for (i=0; i<2; ++i) {
-                       data = (data << 8) | *src++;
-               }
-
-/*             if(!l){
-                       printf("%x",data);
-                       l = 1;
-               }  used for debuging */
-
-               if ((rc = write_short(info, wp, data)) != 0) {
-                       return (rc);
-               }
-               wp  += 2;
-               cnt -= 2;
-       }
-
-       if (cnt == 0) {
-               return (0);
-       }
-
-       /*
-        * handle unaligned tail bytes
-        */
-       data = 0;
-       for (i=0, cp=wp; i<2 && cnt>0; ++i, ++cp) {
-               data = (data << 8) | *src++;
-               --cnt;
-       }
-       for (; i<2; ++i, ++cp) {
-               data = (data << 8) | (*(uchar *)cp);
-       }
-
-       return (write_short(info, wp, data));
-
-
-#endif
-}
-
-/*-----------------------------------------------------------------------
- * Write a word to Flash, returns:
- * 0 - OK
- * 1 - write timeout
- * 2 - Flash not erased
- */
-#ifndef CONFIG_SYS_FLASH_16BIT
-static int write_word (flash_info_t *info, ulong dest, ulong data)
-{
-       vu_long *addr = (vu_long*)(info->start[0]);
-       ulong start,barf;
-       int flag;
-
-
-       /* Check if Flash is (sufficiently) erased */
-       if ((*((vu_long *)dest) & data) != data) {
-               return (2);
-       }
-
-       /* Disable interrupts which might cause a timeout here */
-       flag = disable_interrupts();
-
-       if(info->flash_id > FLASH_AMD_COMP) {
-               /* AMD stuff */
-               addr[0x0555] = 0x00AA00AA;
-               addr[0x02AA] = 0x00550055;
-               addr[0x0555] = 0x00A000A0;
-       } else {
-               /* intel stuff */
-               *addr = 0x00400040;
-       }
-       *((vu_long *)dest) = data;
-
-       /* re-enable interrupts if necessary */
-       if (flag)
-               enable_interrupts();
-
-       /* data polling for D7 */
-       start = get_timer (0);
-
-       if(info->flash_id > FLASH_AMD_COMP) {
-               while ((*((vu_long *)dest) & 0x00800080) != (data & 0x00800080)) {
-                       if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT) {
-                               return (1);
-                       }
-               }
-       } else {
-               while(!(addr[0] & 0x00800080)) {        /* wait for error or finish */
-                       if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT) {
-                               return (1);
-                       }
-
-               if( addr[0] & 0x003A003A) {     /* check for error */
-                       barf = addr[0] & 0x003A0000;
-                       if( barf ) {
-                               barf >>=16;
-                       } else {
-                               barf = addr[0] & 0x0000003A;
-                       }
-                       printf("\nFlash write error at address %lx\n",(unsigned long)dest);
-                       if(barf & 0x0002) printf("Block locked, not erased.\n");
-                       if(barf & 0x0010) printf("Programming error.\n");
-                       if(barf & 0x0008) printf("Vpp Low error.\n");
-                       return(2);
-               }
-       }
-
-       return (0);
-}
-
-#else
-
-static int write_short (flash_info_t *info, ulong dest, ushort data)
-{
-       vu_short *addr = (vu_short*)(info->start[0]);
-       ulong start,barf;
-       int flag;
-
-       /* Check if Flash is (sufficiently) erased */
-       if ((*((vu_short *)dest) & data) != data) {
-               return (2);
-       }
-
-       /* Disable interrupts which might cause a timeout here */
-       flag = disable_interrupts();
-
-       if(info->flash_id < FLASH_AMD_COMP) {
-               /* AMD stuff */
-               addr[0x0555] = 0x00AA;
-               addr[0x02AA] = 0x0055;
-               addr[0x0555] = 0x00A0;
-       } else {
-               /* intel stuff */
-               *addr = 0x00D0;
-               *addr = 0x0040;
-       }
-       *((vu_short *)dest) = data;
-
-       /* re-enable interrupts if necessary */
-       if (flag)
-               enable_interrupts();
-
-       /* data polling for D7 */
-       start = get_timer (0);
-
-       if(info->flash_id < FLASH_AMD_COMP) {
-               /* AMD stuff */
-               while ((*((vu_short *)dest) & 0x0080) != (data & 0x0080)) {
-                       if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT) {
-                               return (1);
-                       }
-               }
-
-       } else {
-               /* intel stuff */
-               while(!(addr[0] & 0x0080)){     /* wait for error or finish */
-                       if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT) return (1);
-               }
-
-               if( addr[0] & 0x003A) { /* check for error */
-                       barf = addr[0] & 0x003A;
-                       printf("\nFlash write error at address %lx\n",(unsigned long)dest);
-                       if(barf & 0x0002) printf("Block locked, not erased.\n");
-                       if(barf & 0x0010) printf("Programming error.\n");
-                       if(barf & 0x0008) printf("Vpp Low error.\n");
-                       return(2);
-               }
-               *addr = 0x00B0;
-               *addr = 0x0070;
-               while(!(addr[0] & 0x0080)){     /* wait for error or finish */
-                       if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT) return (1);
-               }
-               *addr = 0x00FF;
-       }
-       return (0);
-}
-
-#endif
-
-/*-----------------------------------------------------------------------*/
diff --git a/board/snmc/qs860t/qs860t.c b/board/snmc/qs860t/qs860t.c
deleted file mode 100644 (file)
index 7ff9945..0000000
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- * (C) Copyright 2003
- * MuLogic B.V.
- *
- * (C) Copyright 2002
- * Simple Network Magic Corporation, dnevil@snmc.com
- *
- * (C) Copyright 2000
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <common.h>
-#include <asm/u-boot.h>
-#include <commproc.h>
-#include "mpc8xx.h"
-
-/* ------------------------------------------------------------------------- */
-
-static long  int dram_size (long int, long int *, long int);
-
-/* ------------------------------------------------------------------------- */
-
-const uint sdram_table[] =
-{
-       /*
-        * Single Read. (Offset 0 in UPMA RAM)
-        */
-       0x1F07FC04, 0xEEAEFC04, 0x11ADFC04, 0xEFBBBC00,
-       0x1FF77C47, 0x1FF77C35, 0xEFEABC34, 0x1FB57C35,
-       /*
-        * Burst Read. (Offset 8 in UPMA RAM)
-        */
-       0x1F07FC04, 0xEEAEFC04, 0x10ADFC04, 0xF0AFFC00,
-       0xF0AFFC00, 0xF1AFFC00, 0xEFBBBC00, 0x1FF77C47,
-       0xFFFFEC04, 0xFFFFEC04, 0xFFFFEC04, 0xFFFFEC04,
-       0xFFFFEC04, 0xFFFFEC04, 0xFFFFEC04, 0xFFFFEC04,
-       /*
-        * Single Write. (Offset 18 in UPMA RAM)
-        */
-       0x1F27FC04, 0xEEAEBC00, 0x01B93C04, 0x1FF77C47,
-       0xFFFFEC04, 0xFFFFEC04, 0xFFFFEC04, 0xFFFFEC04,
-       /*
-        * Burst Write. (Offset 20 in UPMA RAM)
-        */
-       0x1F07FC04, 0xEEAEBC00, 0x10AD7C00, 0xF0AFFC00,
-       0xF0AFFC00, 0xE1BBBC04, 0x1FF77C47, 0xFFFFEC04,
-       0xFFFFEC04, 0xFFFFEC04, 0xFFFFEC04, 0xFFFFEC04,
-       0xFFFFEC04, 0xFFFFEC04, 0xFFFFEC04, 0xFFFFEC04,
-       /*
-        * Refresh  (Offset 30 in UPMA RAM)
-        */
-       0x1FF5FC84, 0xFFFFFC04, 0xFFFFFC04, 0xFFFFFC04,
-       0xFFFFFC84, 0xFFFFFC07, 0xFFFFEC04, 0xFFFFEC04,
-       0xFFFFEC04, 0xFFFFEC04, 0xFFFFEC04, 0xFFFFEC04,
-       /*
-        * Exception. (Offset 3c in UPMA RAM)
-        */
-       0x7FFFFC07, 0xFFFFEC04, 0xFFFFEC04, 0xFFFFEC04
-};
-
-/* ------------------------------------------------------------------------- */
-
-
-/*
- * Check Board Identity:
- *
- * Test ID string (QS860T...)
- *
- * Always return 1
- */
-
-int checkboard (void)
-{
-       char *s, *e;
-       char buf[64];
-       int i;
-
-       i = getenv_f("serial#", buf, sizeof(buf));
-       s = (i>0) ? buf : NULL;
-
-       if (!s || strncmp(s, "QS860T", 6)) {
-               puts ("### No HW ID - assuming QS860T");
-       } else {
-               for (e=s; *e; ++e) {
-                       if (*e == ' ')
-                       break;
-               }
-
-               for ( ; s<e; ++s) {
-                       putc (*s);
-               }
-       }
-       putc ('\n');
-
-       return (0);
-}
-
-/* ------------------------------------------------------------------------- */
-
-phys_size_t initdram (int board_type)
-{
-       volatile immap_t     *immap  = (immap_t *)CONFIG_SYS_IMMR;
-       volatile memctl8xx_t *memctl = &immap->im_memctl;
-       long int size;
-
-       upmconfig(UPMB, (uint *)sdram_table, sizeof(sdram_table)/sizeof(uint));
-
-       /*
-       * Prescaler for refresh
-       */
-       memctl->memc_mptpr = 0x0400;
-
-       /*
-       * Map controller bank 2 to the SDRAM address
-       */
-       memctl->memc_or2 = CONFIG_SYS_OR2;
-       memctl->memc_br2 = CONFIG_SYS_BR2;
-       udelay(200);
-
-       /* perform SDRAM initialization sequence */
-       memctl->memc_mbmr = CONFIG_SYS_16M_MBMR;
-       udelay(100);
-
-       memctl->memc_mar  = 0x00000088;
-       memctl->memc_mcr  = 0x80804105; /* run precharge pattern */
-       udelay(1);
-
-       /* Run two refresh cycles on SDRAM */
-       memctl->memc_mbmr = 0x18802118;
-       memctl->memc_mcr  = 0x80804130;
-       memctl->memc_mbmr = 0x18802114;
-       memctl->memc_mcr  = 0x80804106;
-
-       udelay (1000);
-
-#if 0
-       /*
-       * Check for 64M SDRAM Memory Size
-       */
-       size = dram_size (CONFIG_SYS_64M_MBMR, (ulong *)SDRAM_BASE, SDRAM_64M_MAX_SIZE);
-       udelay (1000);
-
-       /*
-       * Check for 16M SDRAM Memory Size
-       */
-       if (size != SDRAM_64M_MAX_SIZE) {
-#endif
-       size = dram_size (CONFIG_SYS_16M_MBMR, (long *)SDRAM_BASE, SDRAM_16M_MAX_SIZE);
-       udelay (1000);
-#if 0
-       }
-
-       memctl->memc_or2 = ((-size) & 0xFFFF0000) | SDRAM_TIMING;
-#endif
-
-
-       udelay(10000);
-
-
-#if 0
-
-       /*
-       * Also, map other memory to correct position
-       */
-
-       /*
-       * Map the 8M Intel Flash device to chip select 1
-       */
-       memctl->memc_or1 = CONFIG_SYS_OR1;
-       memctl->memc_br1 = CONFIG_SYS_BR1;
-
-
-       /*
-       * Map 64K NVRAM, Sipex Device, NAND Ctl Reg, and LED Ctl Reg
-       * to chip select 3
-       */
-       memctl->memc_or3 = CONFIG_SYS_OR3;
-       memctl->memc_br3 = CONFIG_SYS_BR3;
-
-       /*
-       * Map chip selects 4, 5, 6, & 7 for external expansion connector
-       */
-       memctl->memc_or4 = CONFIG_SYS_OR4;
-       memctl->memc_br4 = CONFIG_SYS_BR4;
-
-       memctl->memc_or5 = CONFIG_SYS_OR5;
-       memctl->memc_br5 = CONFIG_SYS_BR5;
-
-       memctl->memc_or6 = CONFIG_SYS_OR6;
-       memctl->memc_br6 = CONFIG_SYS_BR6;
-
-       memctl->memc_or7 = CONFIG_SYS_OR7;
-       memctl->memc_br7 = CONFIG_SYS_BR7;
-
-#endif
-
-       return (size);
-}
-
-/* ------------------------------------------------------------------------- */
-
-/*
- * Check memory range for valid RAM. A simple memory test determines
- * the actually available RAM size between addresses `base' and
- * `base + maxsize'. Some (not all) hardware errors are detected:
- * - short between address lines
- * - short between data lines
- */
-
-static long int dram_size (long int mbmr_value, long int *base, long int maxsize)
-{
-       volatile immap_t *immap  = (immap_t *)CONFIG_SYS_IMMR;
-       volatile memctl8xx_t *memctl = &immap->im_memctl;
-
-       memctl->memc_mbmr = mbmr_value;
-
-       return (get_ram_size(base, maxsize));
-}
diff --git a/board/snmc/qs860t/u-boot.lds b/board/snmc/qs860t/u-boot.lds
deleted file mode 100644 (file)
index 0eb2fba..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * (C) Copyright 2000-2010
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-OUTPUT_ARCH(powerpc)
-
-SECTIONS
-{
-  /* Read-only sections, merged into text segment: */
-  . = + SIZEOF_HEADERS;
-  .text      :
-  {
-    arch/powerpc/cpu/mpc8xx/start.o    (.text*)
-    arch/powerpc/cpu/mpc8xx/traps.o    (.text*)
-
-    *(.text*)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-
-  /* Read-write section, merged into data segment: */
-  . = (. + 0x00FF) & 0xFFFFFF00;
-  _erotext = .;
-  PROVIDE (erotext = .);
-  .reloc   :
-  {
-    _GOT2_TABLE_ = .;
-    KEEP(*(.got2))
-    KEEP(*(.got))
-    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
-    _FIXUP_TABLE_ = .;
-    KEEP(*(.fixup))
-  }
-  __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
-  __fixup_entries = (. - _FIXUP_TABLE_)>>2;
-
-  .data    :
-  {
-    *(.data*)
-    *(.sdata*)
-  }
-  _edata  =  .;
-  PROVIDE (edata = .);
-
-  . = .;
-
-  . = ALIGN(4);
-  .u_boot_list : {
-       KEEP(*(SORT(.u_boot_list*)));
-  }
-
-
-  . = .;
-  __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)       :
-  {
-   *(.bss*)
-   *(.sbss*)
-   *(COMMON)
-   . = ALIGN(4);
-  }
-  __bss_end = . ;
-  PROVIDE (end = .);
-}
diff --git a/board/spc1920/Makefile b/board/spc1920/Makefile
deleted file mode 100644 (file)
index c0c9a32..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# (C) Copyright 2000-2006
-# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
-
-obj-y  = spc1920.o hpi.o
diff --git a/board/spc1920/hpi.c b/board/spc1920/hpi.c
deleted file mode 100644 (file)
index c593837..0000000
+++ /dev/null
@@ -1,596 +0,0 @@
-/*
- * (C) Copyright 2006
- * Markus Klotzbuecher, DENX Software Engineering, mk@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/*
- * Host Port Interface (HPI)
- */
-
-/* debug levels:
- *  0 : errors
- *  1 : usefull info
- *  2 : lots of info
- *  3 : noisy
- */
-
-#define DEBUG 0
-
-#include <config.h>
-#include <common.h>
-#include <mpc8xx.h>
-
-#include "pld.h"
-#include "hpi.h"
-
-#define        _NOT_USED_      0xFFFFFFFF
-
-/* original table:
- * - inserted loops to achieve long CS low and high Periods (~217ns)
- * - move cs high 2/4 to the right
- */
-const uint dsp_table_slow[] =
-{
-       /* single read   (offset  0x00 in upm ram) */
-       0x8fffdc04, 0x0fffdc84, 0x0fffdc84, 0x0fffdc00,
-       0x3fffdc04, 0xffffdc84, 0xffffdc84, 0xffffdc05,
-
-       /* burst read    (offset 0x08 in upm ram) */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-
-       /* single write  (offset 0x18 in upm ram) */
-       0x8fffd004, 0x0fffd084, 0x0fffd084, 0x3fffd000,
-       0xffffd084, 0xffffd084, 0xffffd005, _NOT_USED_,
-
-       /* burst write   (offset 0x20 in upm ram) */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       /* refresh       (offset 0x30 in upm ram) */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       /* exception     (offset 0x3C in upm ram) */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-};
-
-/* dsp hpi upm ram table
- * works fine for noninc access, failes on incremental.
- * - removed first word
- */
-const uint dsp_table_fast[] =
-{
-       /* single read   (offset  0x00 in upm ram) */
-       0x8fffdc04, 0x0fffdc04, 0x0fffdc00, 0x3fffdc04,
-       0xffffdc05, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-
-       /* burst read    (offset 0x08 in upm ram) */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-
-       /* single write  (offset 0x18 in upm ram) */
-       0x8fffd004, 0x0fffd004, 0x3fffd000, 0xffffd005,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-
-       /* burst write   (offset 0x20 in upm ram) */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       /* refresh       (offset 0x30 in upm ram) */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       /* exception     (offset 0x3C in upm ram) */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-};
-
-
-#ifdef CONFIG_SPC1920_HPI_TEST
-#undef HPI_TEST_OSZI
-
-#define HPI_TEST_CHUNKSIZE     0x1000
-#define HPI_TEST_PATTERN       0x00000000
-#define HPI_TEST_START         0x0
-#define HPI_TEST_END           0x30000
-
-#define TINY_AUTOINC_DATA_SIZE 16 /* 32bit words */
-#define TINY_AUTOINC_BASE_ADDR 0x0
-
-static int hpi_activate(void);
-#if 0
-static void hpi_inactivate(void);
-#endif
-static void dsp_reset(void);
-
-static int hpi_write_inc(u32 addr, u32 *data, u32 count);
-static int hpi_read_inc(u32 addr, u32 *buf, u32 count);
-static int hpi_write_noinc(u32 addr, u32 data);
-static u32 hpi_read_noinc(u32 addr);
-
-int hpi_test(void);
-static int hpi_write_addr_test(u32 addr);
-static int hpi_read_write_test(u32 addr, u32 data);
-#ifdef DO_TINY_TEST
-static int hpi_tiny_autoinc_test(void);
-#endif /* DO_TINY_TEST */
-#endif /* CONFIG_SPC1920_HPI_TEST */
-
-
-/* init the host port interface on UPMA */
-int hpi_init(void)
-{
-       volatile immap_t *immr = (immap_t *) CONFIG_SYS_IMMR;
-       volatile memctl8xx_t *memctl = &immr->im_memctl;
-       volatile spc1920_pld_t *pld = (spc1920_pld_t *) CONFIG_SYS_SPC1920_PLD_BASE;
-
-       upmconfig(UPMA, (uint *)dsp_table_slow, sizeof(dsp_table_slow)/sizeof(uint));
-       udelay(100);
-
-       memctl->memc_mamr = CONFIG_SYS_MAMR;
-       memctl->memc_or3 = CONFIG_SYS_OR3;
-       memctl->memc_br3 = CONFIG_SYS_BR3;
-
-       /* reset dsp */
-       dsp_reset();
-
-       /* activate hpi switch*/
-       pld->dsp_hpi_on = 0x1;
-
-       udelay(100);
-
-       return 0;
-}
-
-#ifdef CONFIG_SPC1920_HPI_TEST
-/* activate the Host Port interface */
-static int hpi_activate(void)
-{
-       volatile spc1920_pld_t *pld = (spc1920_pld_t *) CONFIG_SYS_SPC1920_PLD_BASE;
-
-       /* turn on hpi */
-       pld->dsp_hpi_on = 0x1;
-
-       udelay(5);
-
-       /* turn on the power EN_DSP_POWER high*/
-       /* currently always on TBD */
-
-       /* setup hpi control register */
-       HPI_HPIC_1 = (u16) 0x0008;
-       HPI_HPIC_2 = (u16) 0x0008;
-
-       udelay(100);
-
-       return 0;
-}
-
-#if 0
-/* turn off the host port interface */
-static void hpi_inactivate(void)
-{
-       volatile spc1920_pld_t *pld = (spc1920_pld_t *) CONFIG_SYS_SPC1920_PLD_BASE;
-
-       /* deactivate hpi */
-       pld->dsp_hpi_on = 0x0;
-
-       /* reset the dsp */
-       /* pld->dsp_reset = 0x0; */
-
-       /* turn off the power EN_DSP_POWER# high*/
-       /* currently always on TBD */
-
-}
-#endif
-
-/* reset the DSP */
-static void dsp_reset(void)
-{
-       volatile spc1920_pld_t *pld = (spc1920_pld_t *) CONFIG_SYS_SPC1920_PLD_BASE;
-       pld->dsp_reset = 0x1;
-       pld->dsp_hpi_on = 0x0;
-
-       udelay(300000);
-
-       pld->dsp_reset = 0x0;
-       pld->dsp_hpi_on = 0x1;
-}
-
-
-/* write using autoinc (count is number of 32bit words) */
-static int hpi_write_inc(u32 addr, u32 *data, u32 count)
-{
-       int i;
-       u16 addr1, addr2;
-
-       addr1 = (u16) ((addr >> 16) & 0xffff); /* First HW is most significant */
-       addr2 = (u16) (addr & 0xffff);
-
-       /* write address */
-       HPI_HPIA_1 = addr1;
-       HPI_HPIA_2 = addr2;
-
-       debug("writing from data=0x%lx to 0x%lx\n",
-               (ulong)data, (ulong)(data+count));
-
-       for(i=0; i<count; i++) {
-               HPI_HPID_INC_1 = (u16) ((data[i] >> 16) & 0xffff);
-               HPI_HPID_INC_2 = (u16) (data[i] & 0xffff);
-               debug("hpi_write_inc: data1=0x%x, data2=0x%x\n",
-                      (u16) ((data[i] >> 16) & 0xffff),
-                      (u16) (data[i] & 0xffff));
-       }
-#if 0
-       while(data_ptr < (u16*) (data + count)) {
-               HPI_HPID_INC_1 = *(data_ptr++);
-               HPI_HPID_INC_2 = *(data_ptr++);
-       }
-#endif
-
-       /* return number of bytes written */
-       return count;
-}
-
-/*
- * read using autoinc (count is number of 32bit words)
- */
-static int hpi_read_inc(u32 addr, u32 *buf, u32 count)
-{
-       int i;
-       u16 addr1, addr2, data1, data2;
-
-       addr1 = (u16) ((addr >> 16) & 0xffff); /* First HW is most significant */
-       addr2 = (u16) (addr & 0xffff);
-
-       /* write address */
-       HPI_HPIA_1 = addr1;
-       HPI_HPIA_2 = addr2;
-
-       for(i=0; i<count; i++) {
-               data1 = HPI_HPID_INC_1;
-               data2 = HPI_HPID_INC_2;
-               debug("hpi_read_inc: data1=0x%x, data2=0x%x\n", data1, data2);
-               buf[i] = (((u32) data1) << 16) | (data2 & 0xffff);
-       }
-
-#if 0
-       while(buf_ptr < (u16*) (buf + count)) {
-               *(buf_ptr++) = HPI_HPID_INC_1;
-               *(buf_ptr++) = HPI_HPID_INC_2;
-       }
-#endif
-
-       /* return number of bytes read */
-       return count;
-}
-
-
-/* write to non- auto inc regs */
-static int hpi_write_noinc(u32 addr, u32 data)
-{
-
-       u16 addr1, addr2, data1, data2;
-
-       addr1 = (u16) ((addr >> 16) & 0xffff); /* First HW is most significant */
-       addr2 = (u16) (addr & 0xffff);
-
-       /* printf("hpi_write_noinc: addr1=0x%x, addr2=0x%x\n", addr1, addr2); */
-
-       HPI_HPIA_1 = addr1;
-       HPI_HPIA_2 = addr2;
-
-       data1 = (u16) ((data >> 16) & 0xffff);
-       data2 = (u16) (data & 0xffff);
-
-       /* printf("hpi_write_noinc: data1=0x%x, data2=0x%x\n", data1, data2); */
-
-       HPI_HPID_NOINC_1 = data1;
-       HPI_HPID_NOINC_2 = data2;
-
-       return 0;
-}
-
-/* read from non- auto inc regs */
-static u32 hpi_read_noinc(u32 addr)
-{
-       u16 addr1, addr2, data1, data2;
-       u32 ret;
-
-       addr1 = (u16) ((addr >> 16) & 0xffff); /* First HW is most significant */
-       addr2 = (u16) (addr & 0xffff);
-
-       HPI_HPIA_1 = addr1;
-       HPI_HPIA_2 = addr2;
-
-       /* printf("hpi_read_noinc: addr1=0x%x, addr2=0x%x\n", addr1, addr2); */
-
-       data1 = HPI_HPID_NOINC_1;
-       data2 = HPI_HPID_NOINC_2;
-
-       /* printf("hpi_read_noinc: data1=0x%x, data2=0x%x\n", data1, data2); */
-
-       ret = (((u32) data1) << 16) | (data2 & 0xffff);
-       return ret;
-
-}
-
-/*
- * Host Port Interface Tests
- */
-
-#ifndef HPI_TEST_OSZI
-/* main test function */
-int hpi_test(void)
-{
-       int err = 0;
-       u32 i, ii, pattern, tmp;
-
-       pattern = HPI_TEST_PATTERN;
-
-       u32 test_data[HPI_TEST_CHUNKSIZE];
-       u32 read_data[HPI_TEST_CHUNKSIZE];
-
-       debug("hpi_test: activating hpi...");
-       hpi_activate();
-       debug("OK.\n");
-
-#if 0
-       /* Dump the first 1024 bytes
-        *
-        */
-       for(i=0; i<1024; i+=4) {
-               if(i%16==0)
-                       printf("\n0x%08x: ", i);
-               printf("0x%08x ", hpi_read_noinc(i));
-       }
-#endif
-
-       /* HPIA read-write test
-        *
-        */
-       debug("hpi_test: starting HPIA read-write tests...\n");
-       err |= hpi_write_addr_test(0xdeadc0de);
-       err |= hpi_write_addr_test(0xbeefd00d);
-       err |= hpi_write_addr_test(0xabcd1234);
-       err |= hpi_write_addr_test(0xaaaaaaaa);
-       if(err) {
-               debug("hpi_test: HPIA read-write tests: *** FAILED ***\n");
-               return -1;
-       }
-       debug("hpi_test: HPIA read-write tests: OK\n");
-
-
-       /* read write test using nonincremental data regs
-        *
-        */
-       debug("hpi_test: starting nonincremental tests...\n");
-       for(i=HPI_TEST_START; i<HPI_TEST_END; i+=4) {
-               err |= hpi_read_write_test(i, pattern);
-
-               /* stolen from cmd_mem.c */
-               if(pattern & 0x80000000) {
-                       pattern = -pattern;     /* complement & increment */
-               } else {
-                       pattern = ~pattern;
-               }
-               err |= hpi_read_write_test(i, pattern);
-
-               if(err) {
-                       debug("hpi_test: nonincremental tests *** FAILED ***\n");
-                       return -1;
-               }
-       }
-       debug("hpi_test: nonincremental test OK\n");
-
-       /* read write a chunk of data using nonincremental data regs
-        *
-        */
-       debug("hpi_test: starting nonincremental chunk tests...\n");
-       pattern = HPI_TEST_PATTERN;
-       for(i=HPI_TEST_START; i<HPI_TEST_END; i+=4) {
-               hpi_write_noinc(i, pattern);
-
-               /* stolen from cmd_mem.c */
-               if(pattern & 0x80000000) {
-                       pattern = -pattern;     /* complement & increment */
-               } else {
-                       pattern = ~pattern;
-               }
-       }
-       pattern = HPI_TEST_PATTERN;
-       for(i=HPI_TEST_START; i<HPI_TEST_END; i+=4) {
-               tmp = hpi_read_noinc(i);
-
-               if(tmp != pattern) {
-                       debug("hpi_test: noninc chunk test *** FAILED *** @ 0x%x, written=0x%x, read=0x%x\n", i, pattern, tmp);
-                       err = -1;
-               }
-               /* stolen from cmd_mem.c */
-               if(pattern & 0x80000000) {
-                       pattern = -pattern;     /* complement & increment */
-               } else {
-                       pattern = ~pattern;
-               }
-       }
-       if(err)
-               return -1;
-       debug("hpi_test: nonincremental chunk test OK\n");
-
-
-#ifdef DO_TINY_TEST
-       /* small verbose test using autoinc and nonautoinc to compare
-        *
-        */
-       debug("hpi_test: tiny_autoinc_test...\n");
-       hpi_tiny_autoinc_test();
-       debug("hpi_test: tiny_autoinc_test done\n");
-#endif /* DO_TINY_TEST */
-
-
-       /* $%& write a chunk of data using the autoincremental regs
-        *
-        */
-       debug("hpi_test: starting autoinc test %d chunks with 0x%x bytes...\n",
-              ((HPI_TEST_END - HPI_TEST_START) / HPI_TEST_CHUNKSIZE),
-              HPI_TEST_CHUNKSIZE);
-
-       for(i=HPI_TEST_START;
-           i < ((HPI_TEST_END - HPI_TEST_START) / HPI_TEST_CHUNKSIZE);
-           i++) {
-               /* generate the pattern data */
-               debug("generating pattern data: ");
-               for(ii = 0; ii < HPI_TEST_CHUNKSIZE; ii++) {
-                       debug("0x%x ", pattern);
-
-                       test_data[ii] = pattern;
-                       read_data[ii] = 0x0; /* zero to be sure */
-
-                       /* stolen from cmd_mem.c */
-                       if(pattern & 0x80000000) {
-                               pattern = -pattern;     /* complement & increment */
-                       } else {
-                               pattern = ~pattern;
-                       }
-               }
-               debug("done\n");
-
-               debug("Writing autoinc data @ 0x%x\n", i);
-               hpi_write_inc(i, test_data, HPI_TEST_CHUNKSIZE);
-
-               debug("Reading autoinc data @ 0x%x\n", i);
-               hpi_read_inc(i, read_data, HPI_TEST_CHUNKSIZE);
-
-               /* compare */
-               for(ii = 0; ii < HPI_TEST_CHUNKSIZE; ii++) {
-                       debug("hpi_test_autoinc: @ 0x%x, written=0x%x, read=0x%x", i+ii, test_data[ii], read_data[ii]);
-                       if(read_data[ii] != test_data[ii]) {
-                               debug("hpi_test: autoinc test @ 0x%x, written=0x%x, read=0x%x *** FAILED ***\n", i+ii, test_data[ii], read_data[ii]);
-                               return -1;
-                       }
-               }
-       }
-       debug("hpi_test: autoinc test OK\n");
-
-       return 0;
-}
-#else /* HPI_TEST_OSZI */
-int hpi_test(void)
-{
-       int i;
-       u32 read_data[TINY_AUTOINC_DATA_SIZE];
-
-       unsigned int dummy_data[TINY_AUTOINC_DATA_SIZE] = {
-               0x11112222, 0x33334444, 0x55556666, 0x77778888,
-               0x9999aaaa, 0xbbbbcccc, 0xddddeeee, 0xffff1111,
-               0x00010002, 0x00030004, 0x00050006, 0x00070008,
-               0x0009000a, 0x000b000c, 0x000d000e, 0x000f0001
-       };
-
-       debug("hpi_test: activating hpi...");
-       hpi_activate();
-       debug("OK.\n");
-
-       while(1) {
-               led9(1);
-               debug(" writing to autoinc...\n");
-               hpi_write_inc(TINY_AUTOINC_BASE_ADDR,
-                             dummy_data, TINY_AUTOINC_DATA_SIZE);
-
-               debug(" reading from autoinc...\n");
-               hpi_read_inc(TINY_AUTOINC_BASE_ADDR,
-                            read_data, TINY_AUTOINC_DATA_SIZE);
-
-               for(i=0; i < (TINY_AUTOINC_DATA_SIZE); i++) {
-                       debug(" written=0x%x, read(inc)=0x%x\n",
-                              dummy_data[i], read_data[i]);
-               }
-               led9(0);
-               udelay(2000000);
-       }
-       return 0;
-}
-#endif
-
-/* test if Host Port Address Register can be written correctly */
-static int hpi_write_addr_test(u32 addr)
-{
-       u32 read_back;
-       /* write address */
-       HPI_HPIA_1 = ((u16) (addr >> 16)); /* First HW is most significant */
-       HPI_HPIA_2 = ((u16) addr);
-
-       read_back = (((u32) HPI_HPIA_1)<<16) | ((u32) HPI_HPIA_2);
-
-       if(read_back == addr) {
-               debug(" hpi_write_addr_test OK: written=0x%x, read=0x%x\n",
-                      addr, read_back);
-               return 0;
-       } else {
-               debug(" hpi_write_addr_test *** FAILED ***: written=0x%x, read=0x%x\n",
-                     addr, read_back);
-               return -1;
-       }
-
-       return 0;
-}
-
-/* test if a simple read/write sequence succeeds */
-static int hpi_read_write_test(u32 addr, u32 data)
-{
-       u32 read_back;
-
-       hpi_write_noinc(addr, data);
-       read_back = hpi_read_noinc(addr);
-
-       if(read_back == data) {
-               debug(" hpi_read_write_test: OK, addr=0x%x written=0x%x, read=0x%x\n", addr, data, read_back);
-               return 0;
-       } else {
-               debug(" hpi_read_write_test: *** FAILED ***, addr=0x%x written=0x%x, read=0x%x\n", addr, data, read_back);
-               return -1;
-       }
-
-       return 0;
-}
-
-#ifdef DO_TINY_TEST
-static int hpi_tiny_autoinc_test(void)
-{
-       int i;
-       u32 read_data[TINY_AUTOINC_DATA_SIZE];
-       u32 read_data_noinc[TINY_AUTOINC_DATA_SIZE];
-
-       unsigned int dummy_data[TINY_AUTOINC_DATA_SIZE] = {
-               0x11112222, 0x33334444, 0x55556666, 0x77778888,
-               0x9999aaaa, 0xbbbbcccc, 0xddddeeee, 0xffff1111,
-               0x00010002, 0x00030004, 0x00050006, 0x00070008,
-               0x0009000a, 0x000b000c, 0x000d000e, 0x000f0001
-       };
-
-       printf(" writing to autoinc...\n");
-       hpi_write_inc(TINY_AUTOINC_BASE_ADDR, dummy_data, TINY_AUTOINC_DATA_SIZE);
-
-       printf(" reading from autoinc...\n");
-       hpi_read_inc(TINY_AUTOINC_BASE_ADDR, read_data, TINY_AUTOINC_DATA_SIZE);
-
-       printf(" reading from noinc for comparison...\n");
-       for(i=0; i < (TINY_AUTOINC_DATA_SIZE); i++)
-               read_data_noinc[i] = hpi_read_noinc(TINY_AUTOINC_BASE_ADDR+i*4);
-
-       for(i=0; i < (TINY_AUTOINC_DATA_SIZE); i++) {
-               printf(" written=0x%x, read(inc)=0x%x, read(noinc)=0x%x\n",
-                      dummy_data[i], read_data[i], read_data_noinc[i]);
-       }
-       return 0;
-}
-#endif /* DO_TINY_TEST */
-
-#endif /* CONFIG_SPC1920_HPI_TEST */
diff --git a/board/spc1920/hpi.h b/board/spc1920/hpi.h
deleted file mode 100644 (file)
index db67672..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- * (C) Copyright 2006
- * Markus Klotzbuecher, DENX Software Engineering, mk@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-int hpi_init(void);
-
-#ifdef CONFIG_SPC1920_HPI_TEST
-int hpi_test(void);
-#endif
diff --git a/board/spc1920/pld.h b/board/spc1920/pld.h
deleted file mode 100644 (file)
index 5beb71b..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef __PLD_H__
-#define __PLD_H__
-
-typedef struct spc1920_pld {
-       uchar com1_en;
-       uchar dsp_reset;
-       uchar dsp_hpi_on;
-       uchar superv_mode;
-       uchar codec_dsp_power_en;
-       uchar clk3_select;
-       uchar clk4_select;
-} spc1920_pld_t;
-
-#endif /* __PLD_H__ */
diff --git a/board/spc1920/spc1920.c b/board/spc1920/spc1920.c
deleted file mode 100644 (file)
index 1775433..0000000
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * (C) Copyright 2000-2004
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * Modified by, Yuli Barcohen, Arabella Software Ltd., yuli@arabellasw.com
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <config.h>
-#include <common.h>
-#include <mpc8xx.h>
-#include "pld.h"
-#include "hpi.h"
-
-#define        _NOT_USED_      0xFFFFFFFF
-
-static long int dram_size (long int, long int *, long int);
-
-const uint sdram_table[] = {
-       /*
-        * Single Read. (Offset 0 in UPMB RAM)
-        */
-       0x1F07FC04, 0xEEAEFC04, 0x11ADFC04, 0xEFBBBC00,
-       0x1FF77C47, /* last */
-       /*
-        * SDRAM Initialization (offset 5 in UPMB RAM)
-        *
-        * This is no UPM entry point. The following definition uses
-        * the remaining space to establish an initialization
-        * sequence, which is executed by a RUN command.
-        *
-        */
-       0x1FF77C34, 0xEFEABC34, 0x1FB57C35, /* last */
-       /*
-        * Burst Read. (Offset 8 in UPMB RAM)
-        */
-       0x1F07FC04, 0xEEAEFC04, 0x10ADFC04, 0xF0AFFC00,
-       0xF0AFFC00, 0xF1AFFC00, 0xEFBBBC00, 0x1FF77C47, /* last */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       /*
-        * Single Write. (Offset 18 in UPMB RAM)
-        */
-       0x1F07FC04, 0xEEAEBC00, 0x01B93C04, 0x1FF77C47, /* last */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       /*
-        * Burst Write. (Offset 20 in UPMB RAM)
-        */
-       0x1F07FC04, 0xEEAEBC00, 0x10AD7C00, 0xF0AFFC00,
-       0xF0AFFC00, 0xE1BBBC04, 0x1FF77C47, /* last */
-       _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       /*
-        * Refresh  (Offset 30 in UPMB RAM)
-        */
-       0x1FF5FC84, 0xFFFFFC04, 0xFFFFFC04, 0xFFFFFC04,
-       0xFFFFFC84, 0xFFFFFC07, /* last */
-       _NOT_USED_, _NOT_USED_,
-       _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
-       /*
-        * Exception. (Offset 3c in UPMB RAM)
-        */
-       0x7FFFFC07, /* last */
-       _NOT_USED_, _NOT_USED_, _NOT_USED_,
-};
-
-phys_size_t initdram (int board_type)
-{
-       volatile immap_t *immr = (immap_t *) CONFIG_SYS_IMMR;
-       volatile memctl8xx_t *memctl = &immr->im_memctl;
-       /* volatile spc1920_pld_t *pld = (spc1920_pld_t *) CONFIG_SYS_SPC1920_PLD_BASE; */
-
-       long int size_b0;
-       long int size8, size9;
-       int i;
-
-       /*
-        * Configure UPMB for SDRAM
-        */
-       upmconfig (UPMB, (uint *)sdram_table, sizeof(sdram_table)/sizeof(uint));
-
-       udelay(100);
-
-       memctl->memc_mptpr = CONFIG_SYS_MPTPR;
-
-       /* burst length=4, burst type=sequential, CAS latency=2 */
-       memctl->memc_mar = CONFIG_SYS_MAR;
-
-       /*
-        * Map controller bank 1 to the SDRAM bank at preliminary address.
-        */
-       memctl->memc_or1 = CONFIG_SYS_OR1_PRELIM;
-       memctl->memc_br1 = CONFIG_SYS_BR1_PRELIM;
-
-       /* initialize memory address register */
-       memctl->memc_mbmr = CONFIG_SYS_MBMR_8COL; /* refresh not enabled yet */
-
-       /* mode initialization (offset 5) */
-       udelay (200);                           /* 0x80006105 */
-       memctl->memc_mcr = MCR_OP_RUN | MCR_UPM_B | MCR_MB_CS1 | MCR_MLCF (1) | MCR_MAD (0x05);
-
-       /* run 2 refresh sequence with 4-beat refresh burst (offset 0x30) */
-       udelay (1);                             /* 0x80006130 */
-       memctl->memc_mcr = MCR_OP_RUN | MCR_UPM_B | MCR_MB_CS1 | MCR_MLCF (1) | MCR_MAD (0x30);
-       udelay (1);                             /* 0x80006130 */
-       memctl->memc_mcr = MCR_OP_RUN | MCR_UPM_B | MCR_MB_CS1 | MCR_MLCF (1) | MCR_MAD (0x30);
-       udelay (1);                             /* 0x80006106 */
-       memctl->memc_mcr = MCR_OP_RUN | MCR_UPM_B | MCR_MB_CS1 | MCR_MLCF (1) | MCR_MAD (0x06);
-
-       memctl->memc_mbmr |= MBMR_PTBE; /* refresh enabled */
-
-       udelay (200);
-
-       /* Need at least 10 DRAM accesses to stabilize */
-       for (i = 0; i < 10; ++i) {
-               volatile unsigned long *addr =
-                       (volatile unsigned long *) CONFIG_SYS_SDRAM_BASE;
-               unsigned long val;
-
-               val = *(addr + i);
-               *(addr + i) = val;
-       }
-
-       /*
-        * Check Bank 0 Memory Size for re-configuration
-        *
-        * try 8 column mode
-        */
-       size8 = dram_size (CONFIG_SYS_MBMR_8COL, (long *)CONFIG_SYS_SDRAM_BASE, SDRAM_MAX_SIZE);
-
-       udelay (1000);
-
-       /*
-        * try 9 column mode
-        */
-       size9 = dram_size (CONFIG_SYS_MBMR_9COL, (long *)CONFIG_SYS_SDRAM_BASE, SDRAM_MAX_SIZE);
-
-       if (size8 < size9) {            /* leave configuration at 9 columns */
-               size_b0 = size9;
-               memctl->memc_mbmr = CONFIG_SYS_MBMR_9COL | MBMR_PTBE;
-               udelay (500);
-       } else {                        /* back to 8 columns            */
-               size_b0 = size8;
-               memctl->memc_mbmr = CONFIG_SYS_MBMR_8COL | MBMR_PTBE;
-               udelay (500);
-       }
-
-       /*
-        * Final mapping:
-        */
-
-       memctl->memc_or1 = ((-size_b0) & 0xFFFF0000) |
-                       OR_CSNT_SAM | OR_G5LS | SDRAM_TIMING;
-       memctl->memc_br1 = (CONFIG_SYS_SDRAM_BASE & BR_BA_MSK) | BR_MS_UPMB | BR_V;
-       udelay (1000);
-
-       /* initalize the DSP Host Port Interface */
-       hpi_init();
-
-       /* FRAM Setup */
-       memctl->memc_or4 = CONFIG_SYS_OR4;
-       memctl->memc_br4 = CONFIG_SYS_BR4;
-       udelay(1000);
-
-       return (size_b0);
-}
-
-/*
- * Check memory range for valid RAM. A simple memory test determines
- * the actually available RAM size between addresses `base' and
- * `base + maxsize'. Some (not all) hardware errors are detected:
- * - short between address lines
- * - short between data lines
- */
-static long int dram_size (long int mbmr_value, long int *base,
-                          long int maxsize)
-{
-       volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
-       volatile memctl8xx_t *memctl = &immap->im_memctl;
-
-       memctl->memc_mbmr = mbmr_value;
-
-       return (get_ram_size (base, maxsize));
-}
-
-
-/************* other stuff ******************/
-
-
-int board_early_init_f(void)
-{
-       volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
-
-       /* Set Go/NoGo led (PA15) to color red */
-       immap->im_ioport.iop_papar &= ~0x1;
-       immap->im_ioport.iop_paodr &= ~0x1;
-       immap->im_ioport.iop_padir |= 0x1;
-       immap->im_ioport.iop_padat |= 0x1;
-
-#if 0
-       /* Turn on LED PD9 */
-       immap->im_ioport.iop_pdpar &= ~(0x0040);
-       immap->im_ioport.iop_pddir |= 0x0040;
-       immap->im_ioport.iop_pddat |= 0x0040;
-#endif
-
-       /*
-        * Enable console on SMC1. This requires turning on
-        * the com2_en signal and SMC1_DISABLE
-        */
-
-       /* SMC1_DISABLE: PB17 */
-       immap->im_cpm.cp_pbodr &= ~0x4000;
-       immap->im_cpm.cp_pbpar &= ~0x4000;
-       immap->im_cpm.cp_pbdir |= 0x4000;
-       immap->im_cpm.cp_pbdat &= ~0x4000;
-
-       /* COM2_EN: PD10 */
-       immap->im_ioport.iop_pdpar &= ~0x0020;
-       immap->im_ioport.iop_pddir &= ~0x4000;
-       immap->im_ioport.iop_pddir |= 0x0020;
-       immap->im_ioport.iop_pddat |= 0x0020;
-
-
-#ifdef CONFIG_SYS_SMC1_PLD_CLK4 /* SMC1 uses CLK4 from PLD */
-       immap->im_cpm.cp_simode |= 0x7000;
-       immap->im_cpm.cp_simode &= ~(0x8000);
-#endif
-
-       return 0;
-}
-
-int last_stage_init(void)
-{
-#ifdef CONFIG_SPC1920_HPI_TEST
-       printf("CMB1920 Host Port Interface Test: %s\n",
-              hpi_test() ? "Failed!" : "OK");
-#endif
-       return 0;
-}
-
-int checkboard (void)
-{
-       puts("Board: SPC1920\n");
-       return 0;
-}
diff --git a/board/spc1920/u-boot.lds b/board/spc1920/u-boot.lds
deleted file mode 100644 (file)
index 0eb2fba..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * (C) Copyright 2000-2010
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-OUTPUT_ARCH(powerpc)
-
-SECTIONS
-{
-  /* Read-only sections, merged into text segment: */
-  . = + SIZEOF_HEADERS;
-  .text      :
-  {
-    arch/powerpc/cpu/mpc8xx/start.o    (.text*)
-    arch/powerpc/cpu/mpc8xx/traps.o    (.text*)
-
-    *(.text*)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-
-  /* Read-write section, merged into data segment: */
-  . = (. + 0x00FF) & 0xFFFFFF00;
-  _erotext = .;
-  PROVIDE (erotext = .);
-  .reloc   :
-  {
-    _GOT2_TABLE_ = .;
-    KEEP(*(.got2))
-    KEEP(*(.got))
-    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
-    _FIXUP_TABLE_ = .;
-    KEEP(*(.fixup))
-  }
-  __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
-  __fixup_entries = (. - _FIXUP_TABLE_)>>2;
-
-  .data    :
-  {
-    *(.data*)
-    *(.sdata*)
-  }
-  _edata  =  .;
-  PROVIDE (edata = .);
-
-  . = .;
-
-  . = ALIGN(4);
-  .u_boot_list : {
-       KEEP(*(SORT(.u_boot_list*)));
-  }
-
-
-  . = .;
-  __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)       :
-  {
-   *(.bss*)
-   *(.sbss*)
-   *(COMMON)
-   . = ALIGN(4);
-  }
-  __bss_end = . ;
-  PROVIDE (end = .);
-}
index 054a452eac353e79f11a40fa686bf30a20fa1b60..7e239f1c88ab29f32a538ba05424fa337f412259 100644 (file)
@@ -68,6 +68,9 @@ static int read_eeprom(struct am43xx_board_id *header)
        strncpy(am43xx_board_name, (char *)header->name, sizeof(header->name));
        am43xx_board_name[sizeof(header->name)] = 0;
 
+       strncpy(am43xx_board_rev, (char *)header->version, sizeof(header->version));
+       am43xx_board_rev[sizeof(header->version)] = 0;
+
        return 0;
 }
 
@@ -154,12 +157,16 @@ const struct emif_regs emif_regs_lpddr2 = {
        .emif_rd_wr_lvl_rmp_ctl         = 0x0,
        .emif_rd_wr_lvl_ctl             = 0x0,
        .emif_ddr_phy_ctlr_1            = 0x0E084006,
-       .emif_rd_wr_exec_thresh         = 0x00000405,
+       .emif_rd_wr_exec_thresh         = 0x80000405,
        .emif_ddr_ext_phy_ctrl_1        = 0x04010040,
        .emif_ddr_ext_phy_ctrl_2        = 0x00500050,
        .emif_ddr_ext_phy_ctrl_3        = 0x00500050,
        .emif_ddr_ext_phy_ctrl_4        = 0x00500050,
-       .emif_ddr_ext_phy_ctrl_5        = 0x00500050
+       .emif_ddr_ext_phy_ctrl_5        = 0x00500050,
+       .emif_prio_class_serv_map       = 0x80000001,
+       .emif_connect_id_serv_1_map     = 0x80000094,
+       .emif_connect_id_serv_2_map     = 0x00000000,
+       .emif_cos_config                        = 0x000FFFFF
 };
 
 const u32 ext_phy_ctrl_const_base_lpddr2[] = {
@@ -214,7 +221,57 @@ const struct emif_regs ddr3_emif_regs_400Mhz = {
        .emif_rd_wr_lvl_rmp_win         = 0x0,
        .emif_rd_wr_lvl_rmp_ctl         = 0x0,
        .emif_rd_wr_lvl_ctl             = 0x0,
-       .emif_rd_wr_exec_thresh         = 0x00000405
+       .emif_rd_wr_exec_thresh         = 0x80000405,
+       .emif_prio_class_serv_map       = 0x80000001,
+       .emif_connect_id_serv_1_map     = 0x80000094,
+       .emif_connect_id_serv_2_map     = 0x00000000,
+       .emif_cos_config                = 0x000FFFFF
+};
+
+/* EMIF DDR3 Configurations are different for beta AM43X GP EVMs */
+const struct emif_regs ddr3_emif_regs_400Mhz_beta = {
+       .sdram_config                   = 0x638413B2,
+       .ref_ctrl                       = 0x00000C30,
+       .sdram_tim1                     = 0xEAAAD4DB,
+       .sdram_tim2                     = 0x266B7FDA,
+       .sdram_tim3                     = 0x107F8678,
+       .read_idle_ctrl                 = 0x00050000,
+       .zq_config                      = 0x50074BE4,
+       .temp_alert_config              = 0x0,
+       .emif_ddr_phy_ctlr_1            = 0x0E004008,
+       .emif_ddr_ext_phy_ctrl_1        = 0x08020080,
+       .emif_ddr_ext_phy_ctrl_2        = 0x00000065,
+       .emif_ddr_ext_phy_ctrl_3        = 0x00000091,
+       .emif_ddr_ext_phy_ctrl_4        = 0x000000B5,
+       .emif_ddr_ext_phy_ctrl_5        = 0x000000E5,
+       .emif_rd_wr_exec_thresh         = 0x80000405,
+       .emif_prio_class_serv_map       = 0x80000001,
+       .emif_connect_id_serv_1_map     = 0x80000094,
+       .emif_connect_id_serv_2_map     = 0x00000000,
+       .emif_cos_config                = 0x000FFFFF
+};
+
+/* EMIF DDR3 Configurations are different for production AM43X GP EVMs */
+const struct emif_regs ddr3_emif_regs_400Mhz_production = {
+       .sdram_config                   = 0x638413B2,
+       .ref_ctrl                       = 0x00000C30,
+       .sdram_tim1                     = 0xEAAAD4DB,
+       .sdram_tim2                     = 0x266B7FDA,
+       .sdram_tim3                     = 0x107F8678,
+       .read_idle_ctrl                 = 0x00050000,
+       .zq_config                      = 0x50074BE4,
+       .temp_alert_config              = 0x0,
+       .emif_ddr_phy_ctlr_1            = 0x0E004008,
+       .emif_ddr_ext_phy_ctrl_1        = 0x08020080,
+       .emif_ddr_ext_phy_ctrl_2        = 0x00000066,
+       .emif_ddr_ext_phy_ctrl_3        = 0x00000091,
+       .emif_ddr_ext_phy_ctrl_4        = 0x000000B9,
+       .emif_ddr_ext_phy_ctrl_5        = 0x000000E6,
+       .emif_rd_wr_exec_thresh         = 0x80000405,
+       .emif_prio_class_serv_map       = 0x80000001,
+       .emif_connect_id_serv_1_map     = 0x80000094,
+       .emif_connect_id_serv_2_map     = 0x00000000,
+       .emif_cos_config                = 0x000FFFFF
 };
 
 static const struct emif_regs ddr3_sk_emif_regs_400Mhz = {
@@ -236,7 +293,11 @@ static const struct emif_regs ddr3_sk_emif_regs_400Mhz = {
        .emif_rd_wr_lvl_rmp_win         = 0x0,
        .emif_rd_wr_lvl_rmp_ctl         = 0x00000000,
        .emif_rd_wr_lvl_ctl             = 0x00000000,
-       .emif_rd_wr_exec_thresh         = 0x00000000,
+       .emif_rd_wr_exec_thresh         = 0x80000000,
+       .emif_prio_class_serv_map       = 0x80000001,
+       .emif_connect_id_serv_1_map     = 0x80000094,
+       .emif_connect_id_serv_2_map     = 0x00000000,
+       .emif_cos_config                = 0x000FFFFF
 };
 
 const u32 ext_phy_ctrl_const_base_ddr3[] = {
@@ -262,6 +323,52 @@ const u32 ext_phy_ctrl_const_base_ddr3[] = {
        0x08102040
 };
 
+const u32 ext_phy_ctrl_const_base_ddr3_beta[] = {
+       0x00000000,
+       0x00000045,
+       0x00000046,
+       0x00000048,
+       0x00000047,
+       0x00000000,
+       0x0000004C,
+       0x00000070,
+       0x00000085,
+       0x000000A3,
+       0x00000000,
+       0x0000000C,
+       0x00000030,
+       0x00000045,
+       0x00000063,
+       0x00000000,
+       0x0,
+       0x0,
+       0x40000000,
+       0x08102040
+};
+
+const u32 ext_phy_ctrl_const_base_ddr3_production[] = {
+       0x00000000,
+       0x00000044,
+       0x00000044,
+       0x00000046,
+       0x00000046,
+       0x00000000,
+       0x00000059,
+       0x00000077,
+       0x00000093,
+       0x000000A8,
+       0x00000000,
+       0x00000019,
+       0x00000037,
+       0x00000053,
+       0x00000068,
+       0x00000000,
+       0x0,
+       0x0,
+       0x40000000,
+       0x08102040
+};
+
 static const u32 ext_phy_ctrl_const_base_ddr3_sk[] = {
        /* first 5 are taken care by emif_regs */
        0x00700070,
@@ -309,6 +416,12 @@ void emif_get_ext_phy_ctrl_const_regs(const u32 **regs, u32 *size)
        if (board_is_eposevm()) {
                *regs = ext_phy_ctrl_const_base_lpddr2;
                *size = ARRAY_SIZE(ext_phy_ctrl_const_base_lpddr2);
+       } else if (board_is_evm_14_or_later()) {
+               *regs = ext_phy_ctrl_const_base_ddr3_production;
+               *size = ARRAY_SIZE(ext_phy_ctrl_const_base_ddr3_production);
+       } else if (board_is_evm_12_or_later()) {
+               *regs = ext_phy_ctrl_const_base_ddr3_beta;
+               *size = ARRAY_SIZE(ext_phy_ctrl_const_base_ddr3_beta);
        } else if (board_is_gpevm()) {
                *regs = ext_phy_ctrl_const_base_ddr3;
                *size = ARRAY_SIZE(ext_phy_ctrl_const_base_ddr3);
@@ -473,6 +586,14 @@ void sdram_init(void)
         */
        if (board_is_eposevm()) {
                config_ddr(0, &ioregs_lpddr2, NULL, NULL, &emif_regs_lpddr2, 0);
+       } else if (board_is_evm_14_or_later()) {
+               enable_vtt_regulator();
+               config_ddr(0, &ioregs_ddr3, NULL, NULL,
+                          &ddr3_emif_regs_400Mhz_production, 0);
+       } else if (board_is_evm_12_or_later()) {
+               enable_vtt_regulator();
+               config_ddr(0, &ioregs_ddr3, NULL, NULL,
+                          &ddr3_emif_regs_400Mhz_beta, 0);
        } else if (board_is_gpevm()) {
                enable_vtt_regulator();
                config_ddr(0, &ioregs_ddr3, NULL, NULL,
@@ -486,8 +607,44 @@ void sdram_init(void)
 
 int board_init(void)
 {
+       struct l3f_cfg_bwlimiter *bwlimiter = (struct l3f_cfg_bwlimiter *)L3F_CFG_BWLIMITER;
+       u32 mreqprio_0, mreqprio_1, modena_init0_bw_fractional,
+           modena_init0_bw_integer, modena_init0_watermark_0;
+
        gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
 
+       /* Clear all important bits for DSS errata that may need to be tweaked*/
+       mreqprio_0 = readl(&cdev->mreqprio_0) & MREQPRIO_0_SAB_INIT1_MASK &
+                          MREQPRIO_0_SAB_INIT0_MASK;
+
+       mreqprio_1 = readl(&cdev->mreqprio_1) & MREQPRIO_1_DSS_MASK;
+
+       modena_init0_bw_fractional = readl(&bwlimiter->modena_init0_bw_fractional) &
+                                          BW_LIMITER_BW_FRAC_MASK;
+
+       modena_init0_bw_integer = readl(&bwlimiter->modena_init0_bw_integer) &
+                                       BW_LIMITER_BW_INT_MASK;
+
+       modena_init0_watermark_0 = readl(&bwlimiter->modena_init0_watermark_0) &
+                                        BW_LIMITER_BW_WATERMARK_MASK;
+
+       /* Setting MReq Priority of the DSS*/
+       mreqprio_0 |= 0x77;
+
+       /*
+        * Set L3 Fast Configuration Register
+        * Limiting bandwith for ARM core to 700 MBPS
+        */
+       modena_init0_bw_fractional |= 0x10;
+       modena_init0_bw_integer |= 0x3;
+
+       writel(mreqprio_0, &cdev->mreqprio_0);
+       writel(mreqprio_1, &cdev->mreqprio_1);
+
+       writel(modena_init0_bw_fractional, &bwlimiter->modena_init0_bw_fractional);
+       writel(modena_init0_bw_integer, &bwlimiter->modena_init0_bw_integer);
+       writel(modena_init0_watermark_0, &bwlimiter->modena_init0_watermark_0);
+
        return 0;
 }
 
index 017047d2d0513ead355869a121d3008bbd40fbf7..8e121914e38fdfe145c1681bdff01207b2b14ce8 100644 (file)
@@ -15,6 +15,7 @@
 #include <asm/arch/omap.h>
 
 static char *const am43xx_board_name = (char *)AM4372_BOARD_NAME_START;
+static char *const am43xx_board_rev = (char *)AM4372_BOARD_VERSION_START;
 
 /*
  * TI AM437x EVMs define a system EEPROM that defines certain sub-fields.
@@ -52,6 +53,16 @@ static inline int board_is_sk(void)
        return !strncmp(am43xx_board_name, "AM43__SK", HDR_NAME_LEN);
 }
 
+static inline int board_is_evm_14_or_later(void)
+{
+       return (board_is_gpevm() && strncmp("1.4", am43xx_board_rev, 3) <= 0);
+}
+
+static inline int board_is_evm_12_or_later(void)
+{
+       return (board_is_gpevm() && strncmp("1.2", am43xx_board_rev, 3) <= 0);
+}
+
 void enable_uart0_pin_mux(void);
 void enable_board_pin_mux(void);
 void enable_i2c0_pin_mux(void);
index 38de9d5a8b386d19588d84f9b55c70517082687e..c9e202af6857776529478ff2c477af90dfee27ef 100644 (file)
@@ -31,10 +31,15 @@ const struct pad_conf_entry core_padconf_array_essential[] = {
        {GPMC_A26, (IEN | PTU | PDIS | M1)},    /* mmc2_dat2 */
        {GPMC_A27, (IEN | PTU | PDIS | M1)},    /* mmc2_dat3 */
        {GPMC_CS1, (IEN | PTU | PDIS | M1)},    /* mmm2_cmd */
+#if (CONFIG_CONS_INDEX == 1)
        {UART1_RXD, (FSC | IEN | PTU | PDIS | M0)}, /* UART1_RXD */
        {UART1_TXD, (FSC | IEN | PTU | PDIS | M0)}, /* UART1_TXD */
        {UART1_CTSN, (IEN | PTU | PDIS | M3)},  /* UART1_CTSN */
        {UART1_RTSN, (IEN | PTU | PDIS | M3)},  /* UART1_RTSN */
+#elif (CONFIG_CONS_INDEX == 3)
+       {UART3_RXD, (FSC | IEN | PTU | PDIS | M0)}, /* UART3_RXD */
+       {UART3_TXD, (FSC | IEN | PTU | PDIS | M0)}, /* UART3_TXD */
+#endif
        {I2C1_SDA, (IEN | PTU | PDIS | M0)},    /* I2C1_SDA */
        {I2C1_SCL, (IEN | PTU | PDIS | M0)},    /* I2C1_SCL */
        {MDIO_MCLK, (PTU | PEN | M0)},          /* MDIO_MCLK  */
diff --git a/board/v37/Makefile b/board/v37/Makefile
deleted file mode 100644 (file)
index 2df4b82..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# (C) Copyright 2003-2006
-# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
-
-obj-y  = v37.o flash.o
diff --git a/board/v37/flash.c b/board/v37/flash.c
deleted file mode 100644 (file)
index 5b34af2..0000000
+++ /dev/null
@@ -1,543 +0,0 @@
-/*
- * (C) Copyright 2003
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/*
- * Yoo. Jonghoon, IPone, yooth@ipone.co.kr
- * U-Boot port on RPXlite board
- *
- * Some of flash control words are modified. (from 2x16bit device
- * to 4x8bit device)
- * RPXLite board I tested has only 4 AM29LV800BB devices. Other devices
- * are not tested.
- *
- * (?) Does an RPXLite board which
- *     does not use AM29LV800 flash memory exist ?
- *     I don't know...
- */
-
-#include <common.h>
-#include <mpc8xx.h>
-
-flash_info_t   flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH chips */
-
-/*-----------------------------------------------------------------------
- * Functions
- */
-static ulong flash_get_size ( short manu, short dev_id, flash_info_t *info);
-static int write_word (flash_info_t *info, ulong dest, ulong data);
-static void flash_get_offsets (ulong base, flash_info_t *info, int two_chips);
-static void flash_get_id_word( void *ptr,  short *ptr_manuf, short *ptr_dev_id);
-static void flash_get_id_long( void *ptr,  short *ptr_manuf, short *ptr_dev_id);
-
-/*-----------------------------------------------------------------------
- */
-
-unsigned long flash_init (void)
-{
-       volatile immap_t     *immap  = (immap_t *)CONFIG_SYS_IMMR;
-       volatile memctl8xx_t *memctl = &immap->im_memctl;
-       unsigned long size_b0, size_b1;
-       short manu, dev_id;
-       int i;
-
-       /* Init: no FLASHes known */
-       for (i=0; i<CONFIG_SYS_MAX_FLASH_BANKS; ++i) {
-               flash_info[i].flash_id = FLASH_UNKNOWN;
-       }
-
-       /* Do sizing to get full correct info */
-
-       flash_get_id_word((void*)CONFIG_SYS_FLASH_BASE0,&manu,&dev_id);
-
-       size_b0 = flash_get_size(manu, dev_id, &flash_info[0]);
-
-       flash_get_offsets (CONFIG_SYS_FLASH_BASE0, &flash_info[0],0);
-
-       memctl->memc_or0 = CONFIG_SYS_OR_TIMING_FLASH | (0 - size_b0);
-
-#if CONFIG_SYS_MONITOR_BASE >= CONFIG_SYS_FLASH_BASE0
-       /* monitor protection ON by default */
-       flash_protect(FLAG_PROTECT_SET,
-                     CONFIG_SYS_MONITOR_BASE,
-                     CONFIG_SYS_MONITOR_BASE+monitor_flash_len-1,
-                     &flash_info[0]);
-#endif
-
-       flash_get_id_long((void*)CONFIG_SYS_FLASH_BASE1,&manu,&dev_id);
-
-       size_b1 = 2 * flash_get_size(manu, dev_id, &flash_info[1]);
-
-       flash_get_offsets(CONFIG_SYS_FLASH_BASE1, &flash_info[1],1);
-
-       memctl->memc_or1 = CONFIG_SYS_OR_TIMING_FLASH | (0 - size_b1);
-
-       flash_info[0].size = size_b0;
-       flash_info[1].size = size_b1;
-
-       return (size_b0+size_b1);
-}
-
-/*-----------------------------------------------------------------------
- */
-static void flash_get_offsets (ulong base, flash_info_t *info, int two_chips)
-{
-       int i, addr_shift;
-       vu_short *addr = (vu_short*)base;
-
-       addr[0x555] = 0x00AA ;
-       addr[0xAAA] = 0x0055 ;
-       addr[0x555] = 0x0090 ;
-
-       addr_shift = (two_chips ? 2 : 1 );
-
-       /* set up sector start address table */
-       if (info->flash_id & FLASH_BTYPE) {
-               /* set sector offsets for bottom boot block type        */
-               info->start[0] = base + (0x00000000<<addr_shift);
-               info->start[1] = base + (0x00002000<<addr_shift);
-               info->start[2] = base + (0x00003000<<addr_shift);
-               info->start[3] = base + (0x00004000<<addr_shift);
-               for (i = 4; i < info->sector_count; i++) {
-                       info->start[i] = base + ((i-3) * (0x00008000<<addr_shift)) ;
-               }
-       } else {
-               /* set sector offsets for top boot block type           */
-               i = info->sector_count - 1;
-               info->start[i--] = base + info->size - (0x00002000<<addr_shift);
-               info->start[i--] = base + info->size - (0x00003000<<addr_shift);
-               info->start[i--] = base + info->size - (0x00004000<<addr_shift);
-               for (; i >= 0; i--) {
-                       info->start[i] = base + i * (0x00008000<<addr_shift);
-               }
-       }
-
-       /* check for protected sectors */
-       for (i = 0; i < info->sector_count; i++) {
-               /* read sector protection at sector address, (A7 .. A0) = 0x02 */
-               /* D0 = 1 if protected */
-               addr = (vu_short *)(info->start[i]);
-               info->protect[i] = addr[1<<addr_shift] & 1 ;
-       }
-
-       addr = (vu_short *)info->start[0];
-       *addr = 0xF0F0; /* reset bank */
-}
-
-/*-----------------------------------------------------------------------
- */
-void flash_print_info  (flash_info_t *info)
-{
-       int i;
-
-       if (info->flash_id == FLASH_UNKNOWN) {
-               printf ("missing or unknown FLASH type\n");
-               return;
-       }
-
-       switch (info->flash_id & FLASH_VENDMASK) {
-       case FLASH_MAN_AMD:     printf ("AMD ");                break;
-       case FLASH_MAN_FUJ:     printf ("FUJITSU ");            break;
-       case FLASH_MAN_TOSH:    printf ("TOSHIBA ");            break;
-       default:                printf ("Unknown Vendor ");     break;
-       }
-
-       switch (info->flash_id & FLASH_TYPEMASK) {
-       case FLASH_AM400B:      printf ("AM29LV400B (4 Mbit, bottom boot sect)\n");
-                               break;
-       case FLASH_AM400T:      printf ("AM29LV400T (4 Mbit, top boot sector)\n");
-                               break;
-       case FLASH_AM800B:      printf ("AM29LV800B (8 Mbit, bottom boot sect)\n");
-                               break;
-       case FLASH_AM800T:      printf ("AM29LV800T (8 Mbit, top boot sector)\n");
-                               break;
-       case FLASH_AM160B:      printf ("AM29LV160B (16 Mbit, bottom boot sect)\n");
-                               break;
-       case FLASH_AM160T:      printf ("AM29LV160T (16 Mbit, top boot sector)\n");
-                               break;
-       case FLASH_AM320B:      printf ("AM29LV320B (32 Mbit, bottom boot sect)\n");
-                               break;
-       case FLASH_AM320T:      printf ("AM29LV320T (32 Mbit, top boot sector)\n");
-                               break;
-       default:                printf ("Unknown Chip Type\n");
-                               break;
-       }
-
-       printf ("  Size: %ld MB in %d Sectors\n",
-               info->size >> 20, info->sector_count);
-
-       printf ("  Sector Start Addresses:");
-       for (i=0; i<info->sector_count; ++i) {
-               if ((i % 5) == 0)
-                       printf ("\n   ");
-               printf (" %08lX%s",
-                       info->start[i],
-                       info->protect[i] ? " (RO)" : "     "
-               );
-       }
-       printf ("\n");
-}
-
-/*-----------------------------------------------------------------------
- */
-
-
-/*-----------------------------------------------------------------------
- */
-
-/*
- * The following code cannot be run from FLASH!
- */
-
-static void flash_get_id_word( void *ptr,  short *ptr_manuf, short *ptr_dev_id)
-{
-       vu_short *addr = (vu_short*)ptr;
-
-       addr[0x555] = 0x00AA ;
-       addr[0xAAA] = 0x0055 ;
-       addr[0x555] = 0x0090 ;
-
-       *ptr_manuf  = addr[0];
-       *ptr_dev_id = addr[1];
-
-       addr[0] = 0xf0f0;       /* return to normal */
-}
-
-static void flash_get_id_long( void *ptr,  short *ptr_manuf, short *ptr_dev_id)
-{
-       vu_short *addr = (vu_short*)ptr;
-       vu_short *addr1, *addr2, *addr3;
-
-       addr1 = (vu_short*) ( ((int)ptr) + (0x5555<<2) );
-       addr2 = (vu_short*) ( ((int)ptr) + (0x2AAA<<2) );
-       addr3 = (vu_short*) ( ((int)ptr) + (0x5555<<2) );
-
-       *addr1 = 0xAAAA;
-       *addr2 = 0x5555;
-       *addr3 = 0x9090;
-
-       *ptr_manuf  = addr[0];
-       *ptr_dev_id = addr[2];
-
-       addr[0] = 0xf0f0;       /* return to normal */
-}
-
-static ulong flash_get_size ( short manu, short dev_id, flash_info_t *info)
-{
-       switch (manu) {
-       case ((short)AMD_MANUFACT):
-               info->flash_id = FLASH_MAN_AMD;
-               break;
-       case ((short)FUJ_MANUFACT):
-               info->flash_id = FLASH_MAN_FUJ;
-               break;
-       case ((short)TOSH_MANUFACT):
-               info->flash_id = FLASH_MAN_TOSH;
-               break;
-       default:
-               info->flash_id = FLASH_UNKNOWN;
-               info->sector_count = 0;
-               info->size = 0;
-               return (0);                     /* no or unknown flash  */
-       }
-
-
-       switch (dev_id) {
-       case ((short)TOSH_ID_FVT160):
-               info->flash_id += FLASH_AM160T;
-               info->sector_count = 35;
-               info->size = 0x00200000;
-               break;                          /* => 1 MB              */
-
-       case ((short)TOSH_ID_FVB160):
-               info->flash_id += FLASH_AM160B;
-               info->sector_count = 35;
-               info->size = 0x00200000;
-               break;                          /* => 1 MB              */
-
-       case ((short)AMD_ID_LV400T):
-               info->flash_id += FLASH_AM400T;
-               info->sector_count = 11;
-               info->size = 0x00100000;
-               break;                          /* => 1 MB              */
-
-       case ((short)AMD_ID_LV400B):
-               info->flash_id += FLASH_AM400B;
-               info->sector_count = 11;
-               info->size = 0x00100000;
-               break;                          /* => 1 MB              */
-
-       case ((short)AMD_ID_LV800T):
-               info->flash_id += FLASH_AM800T;
-               info->sector_count = 19;
-               info->size = 0x00200000;
-               break;                          /* => 2 MB              */
-
-       case ((short)AMD_ID_LV800B):
-               info->flash_id += FLASH_AM800B;
-               info->sector_count = 19;
-               info->size = 0x00400000;        /*%%% Size doubled by yooth */
-               break;                          /* => 4 MB              */
-
-       case ((short)AMD_ID_LV160T):
-               info->flash_id += FLASH_AM160T;
-               info->sector_count = 35;
-               info->size = 0x00200000;
-               break;                          /* => 4 MB              */
-
-       case ((short)AMD_ID_LV160B):
-               info->flash_id += FLASH_AM160B;
-               info->sector_count = 35;
-               info->size = 0x00200000;
-               break;                          /* => 4 MB              */
-       default:
-               info->flash_id = FLASH_UNKNOWN;
-               return (0);                     /* => no or unknown flash */
-
-       }
-
-       return(info->size);
-}
-
-
-/*-----------------------------------------------------------------------
- */
-
-int    flash_erase (flash_info_t *info, int s_first, int s_last)
-{
-       vu_short *addr = (vu_short*)(info->start[0]);
-       int flag, prot, sect, l_sect;
-       ulong start, now, last;
-
-       if ((s_first < 0) || (s_first > s_last)) {
-               if (info->flash_id == FLASH_UNKNOWN) {
-                       printf ("- missing\n");
-               } else {
-                       printf ("- no sectors to erase\n");
-               }
-               return 1;
-       }
-
-       if ((info->flash_id == FLASH_UNKNOWN) ||
-           (info->flash_id > FLASH_AMD_COMP)) {
-               printf ("Can't erase unknown flash type %08lx - aborted\n",
-                       info->flash_id);
-               return 1;
-       }
-
-       prot = 0;
-       for (sect=s_first; sect<=s_last; ++sect) {
-               if (info->protect[sect]) {
-                       prot++;
-               }
-       }
-
-       if (prot) {
-               printf ("- Warning: %d protected sectors will not be erased!\n",
-                       prot);
-       } else {
-               printf ("\n");
-       }
-
-       l_sect = -1;
-
-       /* Disable interrupts which might cause a timeout here */
-       flag = disable_interrupts();
-
-       addr[0x555] = (vu_short)0xAAAAAAAA;
-       addr[0xAAA] = (vu_short)0x55555555;
-       addr[0x555] = (vu_short)0x80808080;
-       addr[0x555] = (vu_short)0xAAAAAAAA;
-       addr[0xAAA] = (vu_short)0x55555555;
-
-       /* Start erase on unprotected sectors */
-       for (sect = s_first; sect<=s_last; sect++) {
-               if (info->protect[sect] == 0) { /* not protected */
-                       addr = (vu_short *)(info->start[sect]) ;
-                       addr[0] = (vu_short)0x30303030 ;
-                       l_sect = sect;
-               }
-       }
-
-       /* re-enable interrupts if necessary */
-       if (flag)
-               enable_interrupts();
-
-       /* wait at least 80us - let's wait 1 ms */
-       udelay (1000);
-
-       /*
-        * We wait for the last triggered sector
-        */
-       if (l_sect < 0)
-               goto DONE;
-
-       start = get_timer (0);
-       last  = start;
-       addr = (vu_short *)(info->start[l_sect]);
-       while ((addr[0] & 0x8080) != 0x8080) {
-               if ((now = get_timer(start)) > CONFIG_SYS_FLASH_ERASE_TOUT) {
-                       printf ("Timeout\n");
-                       return 1;
-               }
-               /* show that we're waiting */
-               if ((now - last) > 1000) {      /* every second */
-                       putc ('.');
-                       last = now;
-               }
-       }
-
-DONE:
-       /* reset to read mode */
-       addr = (vu_short *)info->start[0];
-       addr[0] = (vu_short)0xF0F0F0F0; /* reset bank */
-
-       printf (" done\n");
-       return 0;
-}
-
-/*-----------------------------------------------------------------------
- * Copy memory to flash, returns:
- * 0 - OK
- * 1 - write timeout
- * 2 - Flash not erased
- */
-
-int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
-{
-       ulong cp, wp, data;
-       int i, l, rc;
-
-       wp = (addr & ~3);       /* get lower word aligned address */
-
-       /*
-        * handle unaligned start bytes
-        */
-       if ((l = addr - wp) != 0) {
-               data = 0;
-               for (i=0, cp=wp; i<l; ++i, ++cp) {
-                       data = (data << 8) | (*(uchar *)cp);
-               }
-               for (; i<4 && cnt>0; ++i) {
-                       data = (data << 8) | *src++;
-                       --cnt;
-                       ++cp;
-               }
-               for (; cnt==0 && i<4; ++i, ++cp) {
-                       data = (data << 8) | (*(uchar *)cp);
-               }
-
-               if ((rc = write_word(info, wp, data)) != 0) {
-                       return (rc);
-               }
-               wp += 4;
-       }
-
-       /*
-        * handle word aligned part
-        */
-       while (cnt >= 4) {
-               data = 0;
-               for (i=0; i<4; ++i) {
-                       data = (data << 8) | *src++;
-               }
-               if ((rc = write_word(info, wp, data)) != 0) {
-                       return (rc);
-               }
-               wp  += 4;
-               cnt -= 4;
-       }
-
-       if (cnt == 0) {
-               return (0);
-       }
-
-       /*
-        * handle unaligned tail bytes
-        */
-       data = 0;
-       for (i=0, cp=wp; i<4 && cnt>0; ++i, ++cp) {
-               data = (data << 8) | *src++;
-               --cnt;
-       }
-       for (; i<4; ++i, ++cp) {
-               data = (data << 8) | (*(uchar *)cp);
-       }
-
-       return (write_word(info, wp, data));
-}
-
-/*-----------------------------------------------------------------------
- * Write a word to Flash, returns:
- * 0 - OK
- * 1 - write timeout
- * 2 - Flash not erased
- */
-static int write_word (flash_info_t *info, ulong dest, ulong data)
-{
-       vu_short *addr = (vu_short *)(info->start[0]);
-       vu_short sdata;
-
-       ulong start;
-       int flag;
-
-       /* Check if Flash is (sufficiently) erased */
-       if ((*((vu_long *)dest) & data) != data) {
-               return (2);
-       }
-
-       /* First write upper 16 bits */
-       sdata = (short)(data>>16);
-
-       /* Disable interrupts which might cause a timeout here */
-       flag = disable_interrupts();
-
-       addr[0x555] = 0xAAAA;
-       addr[0xAAA] = 0x5555;
-       addr[0x555] = 0xA0A0;
-
-       *((vu_short *)dest) = sdata;
-
-       /* re-enable interrupts if necessary */
-       if (flag)
-               enable_interrupts();
-
-       /* data polling for D7 */
-       start = get_timer (0);
-       while ((*((vu_short *)dest) & 0x8080) != (sdata & 0x8080)) {
-               if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT) {
-                       return (1);
-               }
-       }
-
-       /* Now write lower 16 bits */
-       sdata = (short)(data&0xffff);
-
-       /* Disable interrupts which might cause a timeout here */
-       flag = disable_interrupts();
-
-       addr[0x555] = 0xAAAA;
-       addr[0xAAA] = 0x5555;
-       addr[0x555] = 0xA0A0;
-
-       *((vu_short *)dest + 1) = sdata;
-
-       /* re-enable interrupts if necessary */
-       if (flag)
-               enable_interrupts();
-
-       /* data polling for D7 */
-       start = get_timer (0);
-       while ((*((vu_short *)dest + 1) & 0x8080) != (sdata & 0x8080)) {
-               if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT) {
-                       return (1);
-               }
-       }
-       return (0);
-}
-
-/*-----------------------------------------------------------------------
- */
diff --git a/board/v37/u-boot.lds b/board/v37/u-boot.lds
deleted file mode 100644 (file)
index 6e19b3f..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * (C) Copyright 2003-2010
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-OUTPUT_ARCH(powerpc)
-
-SECTIONS
-{
-  /* Read-only sections, merged into text segment: */
-  . = + SIZEOF_HEADERS;
-  .text      :
-  {
-    arch/powerpc/cpu/mpc8xx/start.o    (.text*)
-    arch/powerpc/cpu/mpc8xx/traps.o    (.text*)
-
-    *(.text*)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-
-  /* Read-write section, merged into data segment: */
-  . = (. + 0x00FF) & 0xFFFFFF00;
-  _erotext = .;
-  PROVIDE (erotext = .);
-  .reloc   :
-  {
-    _GOT2_TABLE_ = .;
-    KEEP(*(.got2))
-    KEEP(*(.got))
-    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
-    _FIXUP_TABLE_ = .;
-    KEEP(*(.fixup))
-  }
-  __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
-  __fixup_entries = (. - _FIXUP_TABLE_)>>2;
-
-  .data    :
-  {
-    *(.data*)
-    *(.sdata*)
-  }
-  _edata  =  .;
-  PROVIDE (edata = .);
-
-  . = .;
-
-  . = ALIGN(4);
-  .u_boot_list : {
-       KEEP(*(SORT(.u_boot_list*)));
-  }
-
-
-  . = .;
-  __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)       :
-  {
-   *(.bss*)
-   *(.sbss*)
-   *(COMMON)
-   . = ALIGN(4);
-  }
-  __bss_end = . ;
-  PROVIDE (end = .);
-}
diff --git a/board/v37/v37.c b/board/v37/v37.c
deleted file mode 100644 (file)
index 438117e..0000000
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * (C) Copyright 2003
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/*
- * Yoo. Jonghoon, IPone, yooth@ipone.co.kr
- * U-Boot port on RPXlite board
- *
- * DRAM related UPMA register values are modified.
- * See RPXLite engineering note : 50MHz/60ns - UPM RAM WORDS
- */
-
-#include <common.h>
-#include "mpc8xx.h"
-
-/* ------------------------------------------------------------------------- */
-
-static long int dram_size (void);
-
-/* ------------------------------------------------------------------------- */
-
-#define MBYTE          (1024*1024)
-#define DRAM_DELAY     0x00000379  /* DRAM delay count */
-#define        _NOT_USED_      0xFFFFCC25
-
-const uint sdram_table[] =
-{
-       /*  single read. (offset 0 in upm RAM) */
-       0x1F07D004, 0xEEAEE004, 0x11ADD004, 0xEFBBA000,
-       0x1FF75447, 0x1FF77C34, 0xEFEABC34, 0x1FB57C35,
-
-       /* burst read. (Offset 8 in upm RAM)   */
-       0x1F07D004, 0xEEAEE004, 0x00ADC004, 0x00AFC000,
-       0x00AFC000, 0x01AFC000, 0x0FBB8000, 0x1FF75447,
-       0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
-       0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
-
-       /* single write. (Offset 0x18 in upm RAM) */
-       0x1F27D004, 0xEEAEA000, 0x01B90004, 0x1FF75447,
-       0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
-
-       /*  burst write. (Offset 0x20 in upm RAM) */
-       0x1F07D004, 0xEEAEA000, 0x00AD4000, 0x00AFC000,
-       0x00AFC000, 0x01BB8004, 0x1FF75447, 0xFFFFFFFF,
-       0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
-       0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
-
-       /* Refresh cycle, offset 0x30 */
-       0x1FF5DC84, 0xFFFFFC04, 0xFFFFFC04, 0xFFFFFC04,
-       0xFFFFFC84, 0xFFFFFC07, 0xFFFFFFFF, 0xFFFFFFFF,
-       0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
-
-       /* Exception, 0ffset 0x3C */
-       0x7FFFFC07, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
-};
-/* ------------------------------------------------------------------------- */
-
-
-/*
- * Check Board Identity:
- *
- * Return 1 for now.
- *
- */
-
-int checkboard (void)
-{
-       printf("Marel V37\n") ;
-       return (0) ;
-}
-
-/* ------------------------------------------------------------------------- */
-
-phys_size_t initdram (int board_type)
-{
-    volatile immap_t     *immap  = (immap_t *)CONFIG_SYS_IMMR;
-    volatile memctl8xx_t *memctl = &immap->im_memctl;
-    unsigned long temp;
-    volatile int delay_cnt;
-    long int ramsize;
-
-    ramsize = dram_size();
-
-       /* Refresh clock prescalar */
-    memctl->memc_mptpr = 0x400 ;
-
-    if( ramsize == 32*MBYTE )
-       temp = 0xd0904110;
-   else                                /* 16MB */
-       temp = 0xd0802110;
-
-    memctl->memc_mbmr = temp;
-
-    upmconfig(UPMB, (uint *)sdram_table, sizeof(sdram_table)/sizeof(uint));
-
-       /* Map controller banks 2 to the SDRAM bank */
-    memctl->memc_or2 = 0xA00 | (0 - ramsize);
-    memctl->memc_br2 = 0xC1;
-
-    memctl->memc_mbmr = temp | 0x08;
-    memctl->memc_mcr  = 0x80804130;
-
-    delay_cnt = 0;
-    while( delay_cnt++ < DRAM_DELAY )
-       ;
-
-    /* Run MRS command in location 5-8 of UPMB */
-
-    memctl->memc_mbmr = temp | 0x04;
-    memctl->memc_mar  = 0x88;
-
-    memctl->memc_mcr  = 0x80804105;
-
-    delay_cnt = 0;
-    while( delay_cnt++ < DRAM_DELAY )
-       ;
-
-#ifdef CONFIG_CAN_DRIVER
-    /* Initialize OR3 / BR3 */
-    memctl->memc_or3 = CONFIG_SYS_OR3_CAN;
-    memctl->memc_br3 = CONFIG_SYS_BR3_CAN;
-
-    /* Initialize MBMR */
-    memctl->memc_mamr = MAMR_GPL_A4DIS;        /* GPL_A4 ouput line Disable */
-
-    /* Initialize UPMB for CAN: single read */
-    memctl->memc_mdr = 0xFFFFC004;
-    memctl->memc_mcr = 0x0100 | UPMA;
-
-    memctl->memc_mdr = 0x0FFFD004;
-    memctl->memc_mcr = 0x0101 | UPMA;
-
-    memctl->memc_mdr = 0x0FFFC000;
-    memctl->memc_mcr = 0x0102 | UPMA;
-
-    memctl->memc_mdr = 0x3FFFC004;
-    memctl->memc_mcr = 0x0103 | UPMA;
-
-    memctl->memc_mdr = 0xFFFFDC05;
-    memctl->memc_mcr = 0x0104 | UPMA;
-
-    /* Initialize UPMB for CAN: single write */
-    memctl->memc_mdr = 0xFFFCC004;
-    memctl->memc_mcr = 0x0118 | UPMA;
-
-    memctl->memc_mdr = 0xCFFCD004;
-    memctl->memc_mcr = 0x0119 | UPMA;
-
-    memctl->memc_mdr = 0x0FFCC000;
-    memctl->memc_mcr = 0x011A | UPMA;
-
-    memctl->memc_mdr = 0x7FFCC004;
-    memctl->memc_mcr = 0x011B | UPMA;
-
-    memctl->memc_mdr = 0xFFFDCC05;
-    memctl->memc_mcr = 0x011C | UPMA;
-#endif /* CONFIG_CAN_DRIVER */
-
-    return (dram_size());
-}
-
-/* ------------------------------------------------------------------------- */
-
-/*
- * Find size of RAM from configuration pins.
- * The input pins that contain the memory size are also the debug port
- * pins.  Normally they are configured as debug port pins.  To be able
- * to read the memory configuration, we must deactivate the debug port
- * and enable the pcmcia input pins.  Then return the register to
- * previous state.
- */
-
-static long int dram_size ()
-{
-    volatile immap_t     *immap  = (immap_t *)CONFIG_SYS_IMMR;
-    volatile sysconf8xx_t *siu = &immap->im_siu_conf;
-    volatile pcmconf8xx_t *pcm = &immap->im_pcmcia;
-    long int             i, memory=1;
-    unsigned long siu_mcr;
-
-    siu_mcr = siu->sc_siumcr;
-    siu->sc_siumcr = siu_mcr & 0xFF9FFFFF;
-    for(i=0; i<10; i++) i = i;
-
-    memory = (pcm->pcmc_pipr>>12) & 0x3;
-
-    siu->sc_siumcr = siu_mcr;
-
-    switch( memory )
-    {
-       case 1:
-           return( 32*MBYTE );
-       case 2:
-           return( 64*MBYTE );
-       default:
-           break;
-    }
-    return( 16*MBYTE );
-}
index 6f8d168cf15338cd527b92de2e03037d32dae45c..f16a0e633c7383b1ff0b60e9ac643c030d62499e 100644 (file)
@@ -419,36 +419,36 @@ Active  arm         pxa            -           -               vpac270
 Active  arm         pxa            -           icpdas          lp8x4x              lp8x4x                                -                                                                                                                                 Sergey Yanovich <ynvich@gmail.com>
 Active  arm         pxa            -           toradex         -                   colibri_pxa270                        -                                                                                                                                 Marek Vasut <marek.vasut@gmail.com>
 Active  arm         sa1100         -           -               -                   jornada                               -                                                                                                                                 Kristoffer Ericson <kristoffer.ericson@gmail.com>
-Active  avr32       at32ap         at32ap700x  atmel           -                   atngw100mkii                          -                                                                                                                                 Andreas Bießmann <andreas.devel@googlemail.com>
-Active  avr32       at32ap         at32ap700x  in-circuit      -                   grasshopper                           -                                                                                                                                 Andreas Bießmann <andreas.devel@googlemail.com>
-Active  avr32       at32ap         at32ap700x  mimc            -                   mimc200                               -                                                                                                                                 Mark Jackson <mpfj@mimc.co.uk>
-Active  avr32       at32ap         at32ap700x  miromico        -                   hammerhead                            -                                                                                                                                 Alex Raimondi <alex.raimondi@miromico.ch>
-Active  blackfin    blackfin       -           -               -                   bct-brettl2                           -                                                                                                                                 Peter Meerwald <devel@bct-electronic.com>
-Active  blackfin    blackfin       -           -               -                   bf506f-ezkit                          -                                                                                                                                 Sonic Zhang <sonic.adi@gmail.com>
-Active  blackfin    blackfin       -           -               -                   bf518f-ezbrd                          -                                                                                                                                 Sonic Zhang <sonic.adi@gmail.com>
-Active  blackfin    blackfin       -           -               -                   bf525-ucr2                            -                                                                                                                                 Haitao Zhang <hzhang@ucrobotics.com>:Chong Huang <chuang@ucrobotics.com>
-Active  blackfin    blackfin       -           -               -                   bf526-ezbrd                           -                                                                                                                                 Sonic Zhang <sonic.adi@gmail.com>
-Active  blackfin    blackfin       -           -               -                   bf527-ad7160-eval                     -                                                                                                                                 Sonic Zhang <sonic.adi@gmail.com>
-Active  blackfin    blackfin       -           -               -                   bf527-ezkit                           -                                                                                                                                 Sonic Zhang <sonic.adi@gmail.com>
-Active  blackfin    blackfin       -           -               -                   bf527-sdp                             -                                                                                                                                 Sonic Zhang <sonic.adi@gmail.com>
-Active  blackfin    blackfin       -           -               -                   bf533-ezkit                           -                                                                                                                                 Sonic Zhang <sonic.adi@gmail.com>
-Active  blackfin    blackfin       -           -               -                   bf533-stamp                           -                                                                                                                                 Sonic Zhang <sonic.adi@gmail.com>
-Active  blackfin    blackfin       -           -               -                   bf537-minotaur                        -                                                                                                                                 Martin Strubel <strubel@section5.ch>
-Active  blackfin    blackfin       -           -               -                   bf537-pnav                            -                                                                                                                                 Sonic Zhang <sonic.adi@gmail.com>
-Active  blackfin    blackfin       -           -               -                   bf537-srv1                            -                                                                                                                                 Martin Strubel <strubel@section5.ch>
-Active  blackfin    blackfin       -           -               -                   bf537-stamp                           -                                                                                                                                 Sonic Zhang <sonic.adi@gmail.com>
-Active  blackfin    blackfin       -           -               -                   bf538f-ezkit                          -                                                                                                                                 Sonic Zhang <sonic.adi@gmail.com>
-Active  blackfin    blackfin       -           -               -                   bf548-ezkit                           -                                                                                                                                 Sonic Zhang <sonic.adi@gmail.com>
-Active  blackfin    blackfin       -           -               -                   bf561-acvilon                         -                                                                                                                                 Valentin Yakovenkov <yakovenkov@niistt.ru>
-Active  blackfin    blackfin       -           -               -                   bf561-ezkit                           -                                                                                                                                 Sonic Zhang <sonic.adi@gmail.com>
-Active  blackfin    blackfin       -           -               -                   bf609-ezkit                           -                                                                                                                                 Sonic Zhang <sonic.adi@gmail.com>
-Active  blackfin    blackfin       -           -               -                   blackstamp                            -                                                                                                                                 Wojtek Skulski <skulski@pas.rochester.edu>:Wojtek Skulski <info@skutek.com>:Benjamin Matthews <mben12@gmail.com>
-Active  blackfin    blackfin       -           -               -                   blackvme                              -                                                                                                                                 Wojtek Skulski <skulski@pas.rochester.edu>:Wojtek Skulski <info@skutek.com>:Benjamin Matthews <mben12@gmail.com>
-Active  blackfin    blackfin       -           -               -                   br4                                   -                                                                                                                                 Dimitar Penev <dpn@switchfin.org>
-Active  blackfin    blackfin       -           -               -                   dnp5370                               -                                                                                                                                 M.Hasewinkel (MHA) <info@ssv-embedded.de>
-Active  blackfin    blackfin       -           -               -                   ibf-dsp561                            -                                                                                                                                 I-SYST Micromodule <support@i-syst.com>
-Active  blackfin    blackfin       -           -               -                   pr1                                   -                                                                                                                                 Dimitar Penev <dpn@switchfin.org>
-Active  blackfin    blackfin       -           -               bf527-ezkit         bf527-ezkit-v2                        bf527-ezkit:BF527_EZKIT_REV_2_1                                                                                                   Sonic Zhang <sonic.adi@gmail.com>
+Active  avr32       -              at32ap700x  atmel           -                   atngw100mkii                          -                                                                                                                                 Andreas Bießmann <andreas.devel@googlemail.com>
+Active  avr32       -              at32ap700x  in-circuit      -                   grasshopper                           -                                                                                                                                 Andreas Bießmann <andreas.devel@googlemail.com>
+Active  avr32       -              at32ap700x  mimc            -                   mimc200                               -                                                                                                                                 Mark Jackson <mpfj@mimc.co.uk>
+Active  avr32       -              at32ap700x  miromico        -                   hammerhead                            -                                                                                                                                 Alex Raimondi <alex.raimondi@miromico.ch>
+Active  blackfin    -              -           -               -                   bct-brettl2                           -                                                                                                                                 Peter Meerwald <devel@bct-electronic.com>
+Active  blackfin    -              -           -               -                   bf506f-ezkit                          -                                                                                                                                 Sonic Zhang <sonic.adi@gmail.com>
+Active  blackfin    -              -           -               -                   bf518f-ezbrd                          -                                                                                                                                 Sonic Zhang <sonic.adi@gmail.com>
+Active  blackfin    -              -           -               -                   bf525-ucr2                            -                                                                                                                                 Haitao Zhang <hzhang@ucrobotics.com>:Chong Huang <chuang@ucrobotics.com>
+Active  blackfin    -              -           -               -                   bf526-ezbrd                           -                                                                                                                                 Sonic Zhang <sonic.adi@gmail.com>
+Active  blackfin    -              -           -               -                   bf527-ad7160-eval                     -                                                                                                                                 Sonic Zhang <sonic.adi@gmail.com>
+Active  blackfin    -              -           -               -                   bf527-ezkit                           -                                                                                                                                 Sonic Zhang <sonic.adi@gmail.com>
+Active  blackfin    -              -           -               -                   bf527-sdp                             -                                                                                                                                 Sonic Zhang <sonic.adi@gmail.com>
+Active  blackfin    -              -           -               -                   bf533-ezkit                           -                                                                                                                                 Sonic Zhang <sonic.adi@gmail.com>
+Active  blackfin    -              -           -               -                   bf533-stamp                           -                                                                                                                                 Sonic Zhang <sonic.adi@gmail.com>
+Active  blackfin    -              -           -               -                   bf537-minotaur                        -                                                                                                                                 Martin Strubel <strubel@section5.ch>
+Active  blackfin    -              -           -               -                   bf537-pnav                            -                                                                                                                                 Sonic Zhang <sonic.adi@gmail.com>
+Active  blackfin    -              -           -               -                   bf537-srv1                            -                                                                                                                                 Martin Strubel <strubel@section5.ch>
+Active  blackfin    -              -           -               -                   bf537-stamp                           -                                                                                                                                 Sonic Zhang <sonic.adi@gmail.com>
+Active  blackfin    -              -           -               -                   bf538f-ezkit                          -                                                                                                                                 Sonic Zhang <sonic.adi@gmail.com>
+Active  blackfin    -              -           -               -                   bf548-ezkit                           -                                                                                                                                 Sonic Zhang <sonic.adi@gmail.com>
+Active  blackfin    -              -           -               -                   bf561-acvilon                         -                                                                                                                                 Valentin Yakovenkov <yakovenkov@niistt.ru>
+Active  blackfin    -              -           -               -                   bf561-ezkit                           -                                                                                                                                 Sonic Zhang <sonic.adi@gmail.com>
+Active  blackfin    -              -           -               -                   bf609-ezkit                           -                                                                                                                                 Sonic Zhang <sonic.adi@gmail.com>
+Active  blackfin    -              -           -               -                   blackstamp                            -                                                                                                                                 Wojtek Skulski <skulski@pas.rochester.edu>:Wojtek Skulski <info@skutek.com>:Benjamin Matthews <mben12@gmail.com>
+Active  blackfin    -              -           -               -                   blackvme                              -                                                                                                                                 Wojtek Skulski <skulski@pas.rochester.edu>:Wojtek Skulski <info@skutek.com>:Benjamin Matthews <mben12@gmail.com>
+Active  blackfin    -              -           -               -                   br4                                   -                                                                                                                                 Dimitar Penev <dpn@switchfin.org>
+Active  blackfin    -              -           -               -                   dnp5370                               -                                                                                                                                 M.Hasewinkel (MHA) <info@ssv-embedded.de>
+Active  blackfin    -              -           -               -                   ibf-dsp561                            -                                                                                                                                 I-SYST Micromodule <support@i-syst.com>
+Active  blackfin    -              -           -               -                   pr1                                   -                                                                                                                                 Dimitar Penev <dpn@switchfin.org>
+Active  blackfin    -              -           -               bf527-ezkit         bf527-ezkit-v2                        bf527-ezkit:BF527_EZKIT_REV_2_1                                                                                                   Sonic Zhang <sonic.adi@gmail.com>
 Active  m68k        mcf5227x       -           freescale       m52277evb           M52277EVB                             M52277EVB:SYS_SPANSION_BOOT,SYS_TEXT_BASE=0x00000000                                                                              TsiChung Liew <Tsi-Chung.Liew@freescale.com>
 Active  m68k        mcf5227x       -           freescale       m52277evb           M52277EVB_stmicro                     M52277EVB:CF_SBF,SYS_STMICRO_BOOT,SYS_TEXT_BASE=0x43E00000                                                                        TsiChung Liew <Tsi-Chung.Liew@freescale.com>
 Active  m68k        mcf523x        -           freescale       m5235evb            M5235EVB                              M5235EVB:SYS_TEXT_BASE=0xFFE00000                                                                                                 TsiChung Liew <Tsi-Chung.Liew@freescale.com>
@@ -496,7 +496,7 @@ Active  m68k        mcf547x_8x     -           freescale       m548xevb
 Active  m68k        mcf547x_8x     -           freescale       m548xevb            M5485FFE                              M5485EVB:SYS_BUSCLK=100000000,SYS_BOOTSZ=2,SYS_DRAMSZ=64,SYS_NOR1SZ=32,SYS_VIDEO,SYS_USBCTRL,SYS_DRAMSZ1=64                       TsiChung Liew <Tsi-Chung.Liew@freescale.com>
 Active  m68k        mcf547x_8x     -           freescale       m548xevb            M5485GFE                              M5485EVB:SYS_BUSCLK=100000000,SYS_BOOTSZ=4,SYS_DRAMSZ=64                                                                          TsiChung Liew <Tsi-Chung.Liew@freescale.com>
 Active  m68k        mcf547x_8x     -           freescale       m548xevb            M5485HFE                              M5485EVB:SYS_BUSCLK=100000000,SYS_BOOTSZ=2,SYS_DRAMSZ=64,SYS_NOR1SZ=16,SYS_VIDEO                                                  TsiChung Liew <Tsi-Chung.Liew@freescale.com>
-Active  microblaze  microblaze     -           xilinx          microblaze-generic  microblaze-generic                    -                                                                                                                                 Michal Simek <monstr@monstr.eu>
+Active  microblaze  -              -           xilinx          microblaze-generic  microblaze-generic                    -                                                                                                                                 Michal Simek <monstr@monstr.eu>
 Active  mips        mips32         -           -               qemu-mips           qemu_mips                             qemu-mips:SYS_BIG_ENDIAN                                                                                                          Vlad Lungu <vlad.lungu@windriver.com>
 Active  mips        mips32         -           -               qemu-mips           qemu_mipsel                           qemu-mips:SYS_LITTLE_ENDIAN                                                                                                       -
 Active  mips        mips32         -           imgtec          malta               malta                                 malta:SYS_BIG_ENDIAN                                                                                                              Paul Burton <paul.burton@imgtec.com>
@@ -524,10 +524,10 @@ Active  mips        mips64         -           -               qemu-mips
 Active  nds32       n1213          ag101       AndesTech       adp-ag101           adp-ag101                             -                                                                                                                                 Andes <uboot@andestech.com>
 Active  nds32       n1213          ag101       AndesTech       adp-ag101p          adp-ag101p                            -                                                                                                                                 Andes <uboot@andestech.com>
 Active  nds32       n1213          ag102       AndesTech       adp-ag102           adp-ag102                             -                                                                                                                                 Andes <uboot@andestech.com>
-Active  nios2       nios2          -           altera          nios2-generic       nios2-generic                         -                                                                                                                                 Scott McNutt <smcnutt@psyent.com>
-Active  nios2       nios2          -           psyent          pci5441             PCI5441                               -                                                                                                                                 Scott McNutt <smcnutt@psyent.com>
-Active  nios2       nios2          -           psyent          pk1c20              PK1C20                                -                                                                                                                                 Scott McNutt <smcnutt@psyent.com>
-Active  openrisc    or1200         -           openrisc        openrisc-generic    openrisc-generic                      -                                                                                                                                 Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
+Active  nios2       -              -           altera          nios2-generic       nios2-generic                         -                                                                                                                                 Scott McNutt <smcnutt@psyent.com>
+Active  nios2       -              -           psyent          pci5441             PCI5441                               -                                                                                                                                 Scott McNutt <smcnutt@psyent.com>
+Active  nios2       -              -           psyent          pk1c20              PK1C20                                -                                                                                                                                 Scott McNutt <smcnutt@psyent.com>
+Active  openrisc    -              -           openrisc        openrisc-generic    openrisc-generic                      -                                                                                                                                 Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
 Active  powerpc     74xx_7xx       -           -               -                   ppmc7xx                               -                                                                                                                                 -
 Active  powerpc     74xx_7xx       -           -               evb64260            P3G4                                  -                                                                                                                                 Wolfgang Denk <wd@denx.de>
 Active  powerpc     74xx_7xx       -           eltec           elppc               ELPPC                                 -                                                                                                                                 -
@@ -977,14 +977,9 @@ Active  powerpc     mpc86xx        -           freescale       mpc8610hpcd
 Active  powerpc     mpc86xx        -           xes             -                   xpedite517x                           -                                                                                                                                 -
 Active  powerpc     mpc8xx         -           -               -                   hermes                                -                                                                                                                                 Wolfgang Denk <wd@denx.de>
 Active  powerpc     mpc8xx         -           -               -                   lwmon                                 -                                                                                                                                 Wolfgang Denk <wd@denx.de>
-Active  powerpc     mpc8xx         -           -               -                   quantum                               -                                                                                                                                 -
 Active  powerpc     mpc8xx         -           -               -                   RRvision                              -                                                                                                                                 Wolfgang Denk <wd@denx.de>
-Active  powerpc     mpc8xx         -           -               -                   spc1920                               -                                                                                                                                 -
-Active  powerpc     mpc8xx         -           -               -                   v37                                   -                                                                                                                                 -
 Active  powerpc     mpc8xx         -           -               cogent              cogent_mpc8xx                         -                                                                                                                                 Murray Jensen <Murray.Jensen@csiro.au>
 Active  powerpc     mpc8xx         -           -               esteem192e          ESTEEM192E                            -                                                                                                                                 Conn Clark <clark@esteem.com>
-Active  powerpc     mpc8xx         -           -               fads                MPC86xADS                             -                                                                                                                                 -
-Active  powerpc     mpc8xx         -           -               fads                MPC885ADS                             -                                                                                                                                 -
 Active  powerpc     mpc8xx         -           -               icu862              ICU862                                -                                                                                                                                 Wolfgang Denk <wd@denx.de>
 Active  powerpc     mpc8xx         -           -               icu862              ICU862_100MHz                         ICU862:100MHz                                                                                                                     Wolfgang Denk <wd@denx.de>
 Active  powerpc     mpc8xx         -           -               ip860               IP860                                 -                                                                                                                                 Wolfgang Denk <wd@denx.de>
@@ -994,30 +989,9 @@ Active  powerpc     mpc8xx         -           -               ivm
 Active  powerpc     mpc8xx         -           -               ivm                 IVMS8                                 IVMS8:IVMS8_16M                                                                                                                   Wolfgang Denk <wd@denx.de>
 Active  powerpc     mpc8xx         -           -               ivm                 IVMS8_128                             IVMS8:IVMS8_32M                                                                                                                   Wolfgang Denk <wd@denx.de>
 Active  powerpc     mpc8xx         -           -               ivm                 IVMS8_256                             IVMS8:IVMS8_64M                                                                                                                   Wolfgang Denk <wd@denx.de>
-Active  powerpc     mpc8xx         -           -               netphone            NETPHONE                              NETPHONE:NETPHONE_VERSION=1                                                                                                       -
-Active  powerpc     mpc8xx         -           -               netphone            NETPHONE_V2                           NETPHONE:NETPHONE_VERSION=2                                                                                                       -
-Active  powerpc     mpc8xx         -           -               netta               NETTA                                 -                                                                                                                                 -
-Active  powerpc     mpc8xx         -           -               netta               NETTA_6412                            NETTA:NETTA_6412=1                                                                                                                -
-Active  powerpc     mpc8xx         -           -               netta               NETTA_6412_SWAPHOOK                   NETTA:NETTA_6412=1,NETTA_SWAPHOOK=1                                                                                               -
-Active  powerpc     mpc8xx         -           -               netta               NETTA_ISDN                            NETTA:NETTA_ISDN=1                                                                                                                -
-Active  powerpc     mpc8xx         -           -               netta               NETTA_ISDN_6412                       NETTA:NETTA_ISDN=1,NETTA_6412=1                                                                                                   -
-Active  powerpc     mpc8xx         -           -               netta               NETTA_ISDN_6412_SWAPHOOK              NETTA:NETTA_ISDN=1,NETTA_6412=1,NETTA_SWAPHOOK=1                                                                                  -
-Active  powerpc     mpc8xx         -           -               netta               NETTA_ISDN_SWAPHOOK                   NETTA:NETTA_ISDN=1,NETTA_SWAPHOOK=1                                                                                               -
-Active  powerpc     mpc8xx         -           -               netta               NETTA_SWAPHOOK                        NETTA:NETTA_SWAPHOOK=1                                                                                                            -
-Active  powerpc     mpc8xx         -           -               netta2              NETTA2                                NETTA2:NETTA2_VERSION=1                                                                                                           -
-Active  powerpc     mpc8xx         -           -               netta2              NETTA2_V2                             NETTA2:NETTA2_VERSION=2                                                                                                           -
 Active  powerpc     mpc8xx         -           -               netvia              NETVIA                                NETVIA:NETVIA_VERSION=1                                                                                                           Pantelis Antoniou <panto@intracom.gr>
 Active  powerpc     mpc8xx         -           -               netvia              NETVIA_V2                             NETVIA:NETVIA_VERSION=2                                                                                                           Pantelis Antoniou <panto@intracom.gr>
 Active  powerpc     mpc8xx         -           -               r360mpi             R360MPI                               -                                                                                                                                 Wolfgang Denk <wd@denx.de>
-Active  powerpc     mpc8xx         -           -               rbc823              RBC823                                -                                                                                                                                 -
-Active  powerpc     mpc8xx         -           -               RPXlite_dw          RPXlite_DW                            -                                                                                                                                 -
-Active  powerpc     mpc8xx         -           -               RPXlite_dw          RPXlite_DW_64                         RPXlite_DW:RPXlite_64MHz                                                                                                          -
-Active  powerpc     mpc8xx         -           -               RPXlite_dw          RPXlite_DW_64_LCD                     RPXlite_DW:RPXlite_64MHz,LCD,NEC_NL6448BC20                                                                                       -
-Active  powerpc     mpc8xx         -           -               RPXlite_dw          RPXlite_DW_LCD                        RPXlite_DW:LCD,NEC_NL6448BC20                                                                                                     -
-Active  powerpc     mpc8xx         -           -               RPXlite_dw          RPXlite_DW_NVRAM                      RPXlite_DW:ENV_IS_IN_NVRAM                                                                                                        -
-Active  powerpc     mpc8xx         -           -               RPXlite_dw          RPXlite_DW_NVRAM_64                   RPXlite_DW:RPXlite_64MHz,ENV_IS_IN_NVRAM                                                                                          -
-Active  powerpc     mpc8xx         -           -               RPXlite_dw          RPXlite_DW_NVRAM_64_LCD               RPXlite_DW:RPXlite_64MHz,LCD,NEC_NL6448BC20,ENV_IS_IN_NVRAM                                                                       -
-Active  powerpc     mpc8xx         -           -               RPXlite_dw          RPXlite_DW_NVRAM_LCD                  RPXlite_DW:LCD,NEC_NL6448BC20,ENV_IS_IN_NVRAM                                                                                     -
 Active  powerpc     mpc8xx         -           -               RRvision            RRvision_LCD                          RRvision:LCD,SHARP_LQ104V7DS01                                                                                                    Wolfgang Denk <wd@denx.de>
 Active  powerpc     mpc8xx         -           -               spd8xx              SPD823TS                              -                                                                                                                                 Wolfgang Denk <wd@denx.de>
 Active  powerpc     mpc8xx         -           eltec           mhpc                MHPC                                  -                                                                                                                                 Frank Gottschling <fgottschling@eltec.de>
@@ -1026,9 +1000,6 @@ Active  powerpc     mpc8xx         -           kup             kup4k
 Active  powerpc     mpc8xx         -           kup             kup4x               KUP4X                                 -                                                                                                                                 Klaus Heydeck <heydeck@kieback-peter.de>
 Active  powerpc     mpc8xx         -           LEOX            elpt860             ELPT860                               -                                                                                                                                 The LEOX team <team@leox.org>
 Active  powerpc     mpc8xx         -           manroland       -                   uc100                                 -                                                                                                                                 Stefan Roese <sr@denx.de>
-Active  powerpc     mpc8xx         -           snmc            qs850               QS823                                 -                                                                                                                                 -
-Active  powerpc     mpc8xx         -           snmc            qs850               QS850                                 -                                                                                                                                 -
-Active  powerpc     mpc8xx         -           snmc            qs860t              QS860T                                -                                                                                                                                 -
 Active  powerpc     mpc8xx         -           tqc             tqm8xx              FPS850L                               -                                                                                                                                 Wolfgang Denk <wd@denx.de>
 Active  powerpc     mpc8xx         -           tqc             tqm8xx              FPS860L                               -                                                                                                                                 Wolfgang Denk <wd@denx.de>
 Active  powerpc     mpc8xx         -           tqc             tqm8xx              NSCU                                  -                                                                                                                                 -
@@ -1150,7 +1121,7 @@ Active  powerpc     ppc4xx         -           xilinx          ppc405-generic
 Active  powerpc     ppc4xx         -           xilinx          ppc405-generic      xilinx-ppc405-generic_flash           xilinx-ppc405-generic:SYS_TEXT_BASE=0xF7F60000,RESET_VECTOR_ADDRESS=0xF7FFFFFC                                                    Ricardo Ribalda <ricardo.ribalda@uam.es>
 Active  powerpc     ppc4xx         -           xilinx          ppc440-generic      xilinx-ppc440-generic                 xilinx-ppc440-generic:SYS_TEXT_BASE=0x04000000,RESET_VECTOR_ADDRESS=0x04100000,BOOT_FROM_XMD=1                                    Ricardo Ribalda <ricardo.ribalda@uam.es>
 Active  powerpc     ppc4xx         -           xilinx          ppc440-generic      xilinx-ppc440-generic_flash           xilinx-ppc440-generic:SYS_TEXT_BASE=0xF7F60000,RESET_VECTOR_ADDRESS=0xF7FFFFFC                                                    Ricardo Ribalda <ricardo.ribalda@uam.es>
-Active  sandbox     sandbox        -           -               sandbox             sandbox                               -                                                                                                                                 Simon Glass <sjg@chromium.org>
+Active  sandbox     -              -           -               sandbox             sandbox                               -                                                                                                                                 Simon Glass <sjg@chromium.org>
 Active  sh          sh2            -           renesas         rsk7203             rsk7203                               -                                                                                                                                 Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>:Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
 Active  sh          sh2            -           renesas         rsk7264             rsk7264                               -                                                                                                                                 Phil Edworthy <phil.edworthy@renesas.com>
 Active  sh          sh2            -           renesas         rsk7269             rsk7269                               -                                                                                                                                 -
@@ -1178,7 +1149,7 @@ Active  sparc       leon3          -           gaisler         -
 Active  sparc       leon3          -           gaisler         -                   gr_ep2s60                             -                                                                                                                                 -
 Active  sparc       leon3          -           gaisler         -                   gr_xc3s_1500                          -                                                                                                                                 -
 Active  sparc       leon3          -           gaisler         -                   grsim                                 -                                                                                                                                 -
-Active  x86         x86            coreboot    chromebook-x86  coreboot            coreboot-x86                          coreboot:SYS_TEXT_BASE=0x01110000                                                                                                 Simon Glass <sjg@chromium.org>
+Active  x86         -              coreboot    chromebook-x86  coreboot            coreboot-x86                          coreboot:SYS_TEXT_BASE=0x01110000                                                                                                 Simon Glass <sjg@chromium.org>
 # The following were moved to "Orphan" in June, 2014
 Orphan  arm         arm1176        tnetv107x   ti              tnetv107xevm        tnetv107x_evm                         -                                                                                                                                 Chan-Taek Park <c-park@ti.com>
 Orphan  arm         arm926ejs      at91        calao           sbc35_a9g20         sbc35_a9g20_eeprom                    sbc35_a9g20:AT91SAM9G20,SYS_USE_EEPROM                                                                                            Albin Tonnerre <albin.tonnerre@free-electrons.com>
@@ -1189,13 +1160,13 @@ Orphan  arm         arm926ejs      at91        calao           tny_a9260
 Orphan  arm         arm926ejs      at91        calao           tny_a9260           tny_a9g20_nandflash                   tny_a9260:AT91SAM9G20,SYS_USE_NANDFLASH                                                                                           Albin Tonnerre <albin.tonnerre@free-electrons.com>
 Orphan  arm         armv7          mx6         congatec        cgtqmx6eval         cgtqmx6qeval                          cgtqmx6eval:IMX_CONFIG=board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg,MX6Q                                                          Leo Sartre <lsartre@adeneo-embedded.com>
 Orphan  arm         pxa            -           -               -                   palmtreo680                           -                                                                                                                                 Mike Dunn <mikedunn@newsguy.com>
-Orphan  avr32       at32ap         at32ap700x  atmel           -                   atngw100                              -                                                                                                                                 Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
-Orphan  avr32       at32ap         at32ap700x  atmel           atstk1000           atstk1002                             -                                                                                                                                 Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
-Orphan  avr32       at32ap         at32ap700x  atmel           atstk1000           atstk1003                             -                                                                                                                                 Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
-Orphan  avr32       at32ap         at32ap700x  atmel           atstk1000           atstk1004                             -                                                                                                                                 Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
-Orphan  avr32       at32ap         at32ap700x  atmel           atstk1000           atstk1006                             -                                                                                                                                 Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
-Orphan  avr32       at32ap         at32ap700x  earthlcd        -                   favr-32-ezkit                         -                                                                                                                                 Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
-Orphan  blackfin    blackfin       -           -               -                   ip04                                  -                                                                                                                                 Brent Kandetzki <brentk@teleco.com>
+Orphan  avr32       -              at32ap700x  atmel           -                   atngw100                              -                                                                                                                                 Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
+Orphan  avr32       -              at32ap700x  atmel           atstk1000           atstk1002                             -                                                                                                                                 Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
+Orphan  avr32       -              at32ap700x  atmel           atstk1000           atstk1003                             -                                                                                                                                 Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
+Orphan  avr32       -              at32ap700x  atmel           atstk1000           atstk1004                             -                                                                                                                                 Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
+Orphan  avr32       -              at32ap700x  atmel           atstk1000           atstk1006                             -                                                                                                                                 Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
+Orphan  avr32       -              at32ap700x  earthlcd        -                   favr-32-ezkit                         -                                                                                                                                 Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
+Orphan  blackfin    -              -           -               -                   ip04                                  -                                                                                                                                 Brent Kandetzki <brentk@teleco.com>
 Orphan  m68k        mcf52x2        -           freescale       m5253evbe           M5253EVBE                             -                                                                                                                                 Hayden Fraser <Hayden.Fraser@freescale.com>
 Orphan  powerpc     mpc5xxx        -           -               galaxy5200          galaxy5200                            galaxy5200:galaxy5200                                                                                                             Eric Millbrandt <emillbrandt@dekaresearch.com>
 Orphan  powerpc     mpc5xxx        -           -               galaxy5200          galaxy5200_LOWBOOT                    galaxy5200:galaxy5200_LOWBOOT                                                                                                     Eric Millbrandt <emillbrandt@dekaresearch.com>
@@ -1226,14 +1197,14 @@ Orphan  powerpc     mpc824x        -           -               musenki
 Orphan  powerpc     mpc824x        -           -               sandpoint           Sandpoint8245                         -                                                                                                                                 Jim Thompson <jim@musenki.com>
 Orphan  powerpc     mpc8260        -           -               -                   ppmc8260                              -                                                                                                                                 Brad Kemp <Brad.Kemp@seranoa.com>
 # The following were moved to "Orphan" in March, 2014
-Orphan  blackfin    blackfin       -           -               -                   cm-bf527                              -                                                                                                                                 Bluetechnix Tinyboards <bluetechnix@blackfin.uclinux.org>
-Orphan  blackfin    blackfin       -           -               -                   cm-bf533                              -                                                                                                                                 Bluetechnix Tinyboards <bluetechnix@blackfin.uclinux.org>
-Orphan  blackfin    blackfin       -           -               -                   cm-bf537e                             -                                                                                                                                 Bluetechnix Tinyboards <bluetechnix@blackfin.uclinux.org>
-Orphan  blackfin    blackfin       -           -               -                   cm-bf537u                             -                                                                                                                                 Bluetechnix Tinyboards <bluetechnix@blackfin.uclinux.org>
-Orphan  blackfin    blackfin       -           -               -                   cm-bf548                              -                                                                                                                                 Bluetechnix Tinyboards <bluetechnix@blackfin.uclinux.org>
-Orphan  blackfin    blackfin       -           -               -                   cm-bf561                              -                                                                                                                                 Bluetechnix Tinyboards <bluetechnix@blackfin.uclinux.org>
-Orphan  blackfin    blackfin       -           -               -                   tcm-bf518                             -                                                                                                                                 Bluetechnix Tinyboards <bluetechnix@blackfin.uclinux.org>
-Orphan  blackfin    blackfin       -           -               -                   tcm-bf537                             -                                                                                                                                 Bluetechnix Tinyboards <bluetechnix@blackfin.uclinux.org>
+Orphan  blackfin    -              -           -               -                   cm-bf527                              -                                                                                                                                 Bluetechnix Tinyboards <bluetechnix@blackfin.uclinux.org>
+Orphan  blackfin    -              -           -               -                   cm-bf533                              -                                                                                                                                 Bluetechnix Tinyboards <bluetechnix@blackfin.uclinux.org>
+Orphan  blackfin    -              -           -               -                   cm-bf537e                             -                                                                                                                                 Bluetechnix Tinyboards <bluetechnix@blackfin.uclinux.org>
+Orphan  blackfin    -              -           -               -                   cm-bf537u                             -                                                                                                                                 Bluetechnix Tinyboards <bluetechnix@blackfin.uclinux.org>
+Orphan  blackfin    -              -           -               -                   cm-bf548                              -                                                                                                                                 Bluetechnix Tinyboards <bluetechnix@blackfin.uclinux.org>
+Orphan  blackfin    -              -           -               -                   cm-bf561                              -                                                                                                                                 Bluetechnix Tinyboards <bluetechnix@blackfin.uclinux.org>
+Orphan  blackfin    -              -           -               -                   tcm-bf518                             -                                                                                                                                 Bluetechnix Tinyboards <bluetechnix@blackfin.uclinux.org>
+Orphan  blackfin    -              -           -               -                   tcm-bf537                             -                                                                                                                                 Bluetechnix Tinyboards <bluetechnix@blackfin.uclinux.org>
 Orphan  powerpc     mpc5xxx        -           matrix_vision   mvbc_p              MVBC_P                                MVBC_P:MVBC_P                                                                                                                     Andre Schwarz <andre.schwarz@matrix-vision.de>
 Orphan  powerpc     mpc5xxx        -           matrix_vision   mvsmr               MVSMR                                 -                                                                                                                                 Andre Schwarz <andre.schwarz@matrix-vision.de>
 Orphan  powerpc     mpc83xx        -           freescale       mpc8360erdk         MPC8360ERDK                           -                                                                                                                                 Anton Vorontsov <avorontsov@ru.mvista.com>
index aad0487c32805aea4ec94e488f498c842e18cef6..328c09d45ff4c9b6b5120908bfb8ca9825ac67da 100644 (file)
@@ -38,39 +38,24 @@ int saveenv(void)
 {
        env_t   env_new;
        block_dev_desc_t *dev_desc = NULL;
-       int dev = FAT_ENV_DEVICE;
-       int part = FAT_ENV_PART;
+       disk_partition_t info;
+       int dev, part;
        int err;
 
        err = env_export(&env_new);
        if (err)
                return err;
 
-#ifdef CONFIG_MMC
-       if (strcmp(FAT_ENV_INTERFACE, "mmc") == 0) {
-               struct mmc *mmc = find_mmc_device(dev);
-
-               if (!mmc) {
-                       printf("no mmc device at slot %x\n", dev);
-                       return 1;
-               }
-
-               mmc->has_init = 0;
-               mmc_init(mmc);
-       }
-#endif /* CONFIG_MMC */
-
-       dev_desc = get_dev(FAT_ENV_INTERFACE, dev);
-       if (dev_desc == NULL) {
-               printf("Failed to find %s%d\n",
-                       FAT_ENV_INTERFACE, dev);
+       part = get_device_and_partition(FAT_ENV_INTERFACE,
+                                       FAT_ENV_DEVICE_AND_PART,
+                                       &dev_desc, &info, 1);
+       if (part < 0)
                return 1;
-       }
 
-       err = fat_register_device(dev_desc, part);
-       if (err) {
-               printf("Failed to register %s%d:%d\n",
-                       FAT_ENV_INTERFACE, dev, part);
+       dev = dev_desc->dev;
+       if (fat_set_blk_dev(dev_desc, &info) != 0) {
+               printf("\n** Unable to use %s %d:%d for saveenv **\n",
+                      FAT_ENV_INTERFACE, dev, part);
                return 1;
        }
 
@@ -90,48 +75,33 @@ void env_relocate_spec(void)
 {
        char buf[CONFIG_ENV_SIZE];
        block_dev_desc_t *dev_desc = NULL;
-       int dev = FAT_ENV_DEVICE;
-       int part = FAT_ENV_PART;
+       disk_partition_t info;
+       int dev, part;
        int err;
 
-#ifdef CONFIG_MMC
-       if (strcmp(FAT_ENV_INTERFACE, "mmc") == 0) {
-               struct mmc *mmc = find_mmc_device(dev);
-
-               if (!mmc) {
-                       printf("no mmc device at slot %x\n", dev);
-                       set_default_env(NULL);
-                       return;
-               }
-
-               mmc->has_init = 0;
-               mmc_init(mmc);
-       }
-#endif /* CONFIG_MMC */
-
-       dev_desc = get_dev(FAT_ENV_INTERFACE, dev);
-       if (dev_desc == NULL) {
-               printf("Failed to find %s%d\n",
-                       FAT_ENV_INTERFACE, dev);
-               set_default_env(NULL);
-               return;
-       }
-
-       err = fat_register_device(dev_desc, part);
-       if (err) {
-               printf("Failed to register %s%d:%d\n",
-                       FAT_ENV_INTERFACE, dev, part);
-               set_default_env(NULL);
-               return;
+       part = get_device_and_partition(FAT_ENV_INTERFACE,
+                                       FAT_ENV_DEVICE_AND_PART,
+                                       &dev_desc, &info, 1);
+       if (part < 0)
+               goto err_env_relocate;
+
+       dev = dev_desc->dev;
+       if (fat_set_blk_dev(dev_desc, &info) != 0) {
+               printf("\n** Unable to use %s %d:%d for loading the env **\n",
+                      FAT_ENV_INTERFACE, dev, part);
+               goto err_env_relocate;
        }
 
        err = file_fat_read(FAT_ENV_FILE, (uchar *)&buf, CONFIG_ENV_SIZE);
        if (err == -1) {
                printf("\n** Unable to read \"%s\" from %s%d:%d **\n",
                        FAT_ENV_FILE, FAT_ENV_INTERFACE, dev, part);
-               set_default_env(NULL);
-               return;
+               goto err_env_relocate;
        }
 
        env_import(buf, 1);
+       return;
+
+err_env_relocate:
+       set_default_env(NULL);
 }
index 05864aabb5a99c92864161b59b2fae3fdbb16a83..bd74732d48d2bb71aae66aab3f106029bb95698a 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -24,10 +24,7 @@ OBJCOPYFLAGS :=
 # so calculate CPUDIR before including ARCH/SOC/CPU config.mk files.
 # Check if arch/$ARCH/cpu/$CPU exists, otherwise assume arch/$ARCH/cpu contains
 # CPU-specific code.
-CPUDIR=arch/$(ARCH)/cpu/$(CPU)
-ifneq ($(srctree)/$(CPUDIR),$(wildcard $(srctree)/$(CPUDIR)))
-CPUDIR=arch/$(ARCH)/cpu
-endif
+CPUDIR=arch/$(ARCH)/cpu$(if $(CPU),/$(CPU),)
 
 sinclude $(srctree)/arch/$(ARCH)/config.mk     # include architecture dependend rules
 sinclude $(srctree)/$(CPUDIR)/config.mk                # include  CPU  specific rules
index 82a254b2e2565357a97a3479246023bbc02e3dbb..e9f8a7583c721cd96eb364ff23d591c0284c70b3 100644 (file)
@@ -31,9 +31,10 @@ informed to load it before running the kernel.
 To boot the kernel, these steps under a Falcon-aware U-Boot are required:
 
 1. Boot the board into U-Boot.
-Use the "spl export" command to generate the kernel parameters area or the DT.
-U-Boot runs as when it boots the kernel, but stops before passing the control
-to the kernel.
+After loading the desired legacy-format kernel image into memory (and DT as
+well, if used), use the "spl export" command to generate the kernel parameters
+area or the DT.  U-Boot runs as when it boots the kernel, but stops before
+passing the control to the kernel.
 
 2. Save the prepared snapshot into persistent media.
 The address where to save it must be configured into board configuration
index 6c6be68c5a3341f3b7f34939b6f006e8b3adb8ca..6a1d2a5c7e8d971b2af809cb6073f2e94714041c 100644 (file)
@@ -11,7 +11,18 @@ easily if here is something they might want to dig for...
 
 Board            Arch        CPU            Commit      Removed     Last known maintainer/contact
 =================================================================================================
-simpc8313        powerpc     mpc83xx        -           2014-04-28  Ron Madrid <info@sheldoninst.com>
+spc1920          powerpc     mpc8xx         -           -
+v37              powerpc     mpc8xx         -           -
+fads             powerpc     mpc8xx         -           -
+netphone         powerpc     mpc8xx         -           -
+netta2           powerpc     mpc8xx         -           -
+netta            powerpc     mpc8xx         -           -
+rbc823           powerpc     mpc8xx         -           -
+quantum          powerpc     mpc8xx         -           -
+RPXlite_dw       powerpc     mpc8xx         -           -
+qs850            powerpc     mpc8xx         -           -
+qs860t           powerpc     mpc8xx         -           -
+simpc8313        powerpc     mpc83xx        7445207f    2014-06-05  Ron Madrid <info@sheldoninst.com>
 hidden_dragon    powerpc     mpc824x        3fe1a854    2014-05-30  Yusdi Santoso <yusdi_santoso@adaptec.com>
 debris           powerpc     mpc824x        7edb1f7b    2014-05-30  Sangmoon Kim <dogoil@etinsys.com>
 kvme080          powerpc     mpc824x        2868f862    2014-05-30  Sangmoon Kim <dogoil@etinsys.com>
index e53c888351fd22933ff32b2ac1a35bc485f9aa45..3d97d306144dec3add1569e0bf69bfe90c3ee2ee 100644 (file)
@@ -17,10 +17,12 @@ alias ag             Anatolij Gustschin <agust@denx.de>
 alias galak          Kumar Gala <galak@kernel.crashing.org>
 alias gruss          Graeme Russ <graeme.russ@gmail.com>
 alias hs             Heiko Schocher <hs@denx.de>
+alias ijc            Ian Campbell <ijc+uboot@hellion.org.uk>
 alias iwamatsu       Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
 alias jagan         Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
 alias jasonjin       Jason Jin <jason.jin@freescale.com>
 alias jhersh         Joe Hershberger <joe.hershberger@gmail.com>
+alias jwrdegoede     Hans de Goede <hdegoede@redhat.com>
 alias kimphill       Kim Phillips <kim.phillips@freescale.com>
 alias lukma          Lukasz Majewski <l.majewski@samsung.com>
 alias macpaul        Macpaul Lin <macpaul@andestech.com>
@@ -56,6 +58,7 @@ alias rmobile        uboot, iwamatsu
 alias s3c            samsung
 alias s5pc           samsung
 alias samsung        uboot, prom
+alias sunxi          uboot, ijc, jwrdegoede
 alias tegra          uboot, sjg, Tom Warren <twarren@nvidia.com>, Stephen Warren <swarren@nvidia.com>
 alias tegra2         tegra
 alias ti             uboot, trini
index e33586d8a6b6ab9b8faa96b5c50ca8eb8d9e6f1a..96bd45d85396493c160b8e94686f6507282e3cde 100644 (file)
@@ -18,6 +18,7 @@ obj-$(CONFIG_SYS_I2C) += i2c_core.o
 obj-$(CONFIG_SYS_I2C_DAVINCI) += davinci_i2c.o
 obj-$(CONFIG_SYS_I2C_FSL) += fsl_i2c.o
 obj-$(CONFIG_SYS_I2C_FTI2C010) += fti2c010.o
+obj-$(CONFIG_SYS_I2C_IHS) += ihs_i2c.o
 obj-$(CONFIG_SYS_I2C_KONA) += kona_i2c.o
 obj-$(CONFIG_SYS_I2C_MXC) += mxc_i2c.o
 obj-$(CONFIG_SYS_I2C_OMAP24XX) += omap24xx_i2c.o
diff --git a/drivers/i2c/ihs_i2c.c b/drivers/i2c/ihs_i2c.c
new file mode 100644 (file)
index 0000000..fe66ce2
--- /dev/null
@@ -0,0 +1,203 @@
+/*
+ * (C) Copyright 2013
+ * Dirk Eibach,  Guntermann & Drunck GmbH, eibach@gdsys.de
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <i2c.h>
+#include <gdsys_fpga.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+enum {
+       I2CINT_ERROR_EV = 1 << 13,
+       I2CINT_TRANSMIT_EV = 1 << 14,
+       I2CINT_RECEIVE_EV = 1 << 15,
+};
+
+enum {
+       I2CMB_WRITE = 1 << 10,
+       I2CMB_2BYTE = 1 << 11,
+       I2CMB_HOLD_BUS = 1 << 13,
+       I2CMB_NATIVE = 2 << 14,
+};
+
+static int wait_for_int(bool read)
+{
+       u16 val;
+       unsigned int ctr = 0;
+
+       FPGA_GET_REG(I2C_ADAP_HWNR, i2c.interrupt_status, &val);
+       while (!(val & (I2CINT_ERROR_EV
+              | (read ? I2CINT_RECEIVE_EV : I2CINT_TRANSMIT_EV)))) {
+               udelay(10);
+               if (ctr++ > 5000) {
+                       return 1;
+               }
+               FPGA_GET_REG(I2C_ADAP_HWNR, i2c.interrupt_status, &val);
+       }
+
+       return (val & I2CINT_ERROR_EV) ? 1 : 0;
+}
+
+static int ihs_i2c_transfer(uchar chip, uchar *buffer, int len, bool read,
+                           bool is_last)
+{
+       u16 val;
+
+       FPGA_SET_REG(I2C_ADAP_HWNR, i2c.interrupt_status, I2CINT_ERROR_EV
+                    | I2CINT_RECEIVE_EV | I2CINT_TRANSMIT_EV);
+       FPGA_GET_REG(I2C_ADAP_HWNR, i2c.interrupt_status, &val);
+
+       if (!read && len) {
+               val = buffer[0];
+
+               if (len > 1)
+                       val |= buffer[1] << 8;
+               FPGA_SET_REG(I2C_ADAP_HWNR, i2c.write_mailbox_ext, val);
+       }
+
+       FPGA_SET_REG(I2C_ADAP_HWNR, i2c.write_mailbox,
+                    I2CMB_NATIVE
+                    | (read ? 0 : I2CMB_WRITE)
+                    | (chip << 1)
+                    | ((len > 1) ? I2CMB_2BYTE : 0)
+                    | (is_last ? 0 : I2CMB_HOLD_BUS));
+
+       if (wait_for_int(read))
+               return 1;
+
+       if (read) {
+               FPGA_GET_REG(I2C_ADAP_HWNR, i2c.read_mailbox_ext, &val);
+               buffer[0] = val & 0xff;
+               if (len > 1)
+                       buffer[1] = val >> 8;
+       }
+
+       return 0;
+}
+
+static int ihs_i2c_address(uchar chip, uint addr, int alen, bool hold_bus)
+{
+       int shift = (alen-1) * 8;
+
+       while (alen) {
+               int transfer = MIN(alen, 2);
+               uchar buf[2];
+               bool is_last = alen <= transfer;
+
+               buf[0] = addr >> shift;
+               if (alen > 1)
+                       buf[1] = addr >> (shift - 8);
+
+               if (ihs_i2c_transfer(chip, buf, transfer, false,
+                                    hold_bus ? false : is_last))
+                       return 1;
+
+               shift -= 16;
+               alen -= transfer;
+       }
+
+       return 0;
+}
+
+static int ihs_i2c_access(struct i2c_adapter *adap, uchar chip, uint addr,
+                         int alen, uchar *buffer, int len, bool read)
+{
+       if (len <= 0)
+               return 1;
+
+       if (ihs_i2c_address(chip, addr, alen, !read))
+               return 1;
+
+       while (len) {
+               int transfer = MIN(len, 2);
+
+               if (ihs_i2c_transfer(chip, buffer, transfer, read,
+                                    len <= transfer))
+                       return 1;
+
+               buffer += transfer;
+               addr += transfer;
+               len -= transfer;
+       }
+
+       return 0;
+}
+
+
+static void ihs_i2c_init(struct i2c_adapter *adap, int speed, int slaveaddr)
+{
+#ifdef CONFIG_SYS_I2C_INIT_BOARD
+       /*
+        * Call board specific i2c bus reset routine before accessing the
+        * environment, which might be in a chip on that bus. For details
+        * about this problem see doc/I2C_Edge_Conditions.
+        */
+       i2c_init_board();
+#endif
+}
+
+static int ihs_i2c_probe(struct i2c_adapter *adap, uchar chip)
+{
+       uchar buffer[2];
+
+       if (ihs_i2c_transfer(chip, buffer, 0, true, true))
+               return 1;
+
+       return 0;
+}
+
+static int ihs_i2c_read(struct i2c_adapter *adap, uchar chip, uint addr,
+                       int alen, uchar *buffer, int len)
+{
+       return ihs_i2c_access(adap, chip, addr, alen, buffer, len, true);
+}
+
+static int ihs_i2c_write(struct i2c_adapter *adap, uchar chip, uint addr,
+                        int alen, uchar *buffer, int len)
+{
+       return ihs_i2c_access(adap, chip, addr, alen, buffer, len, false);
+}
+
+static unsigned int ihs_i2c_set_bus_speed(struct i2c_adapter *adap,
+                                            unsigned int speed)
+{
+       if (speed != adap->speed)
+               return 1;
+       return speed;
+}
+
+/*
+ * Register IHS i2c adapters
+ */
+#ifdef CONFIG_SYS_I2C_IHS_CH0
+U_BOOT_I2C_ADAP_COMPLETE(ihs0, ihs_i2c_init, ihs_i2c_probe,
+                        ihs_i2c_read, ihs_i2c_write,
+                        ihs_i2c_set_bus_speed,
+                        CONFIG_SYS_I2C_IHS_SPEED_0,
+                        CONFIG_SYS_I2C_IHS_SLAVE_0, 0)
+#endif
+#ifdef CONFIG_SYS_I2C_IHS_CH1
+U_BOOT_I2C_ADAP_COMPLETE(ihs1, ihs_i2c_init, ihs_i2c_probe,
+                        ihs_i2c_read, ihs_i2c_write,
+                        ihs_i2c_set_bus_speed,
+                        CONFIG_SYS_I2C_IHS_SPEED_1,
+                        CONFIG_SYS_I2C_IHS_SLAVE_1, 1)
+#endif
+#ifdef CONFIG_SYS_I2C_IHS_CH2
+U_BOOT_I2C_ADAP_COMPLETE(ihs2, ihs_i2c_init, ihs_i2c_probe,
+                        ihs_i2c_read, ihs_i2c_write,
+                        ihs_i2c_set_bus_speed,
+                        CONFIG_SYS_I2C_IHS_SPEED_2,
+                        CONFIG_SYS_I2C_IHS_SLAVE_2, 2)
+#endif
+#ifdef CONFIG_SYS_I2C_IHS_CH3
+U_BOOT_I2C_ADAP_COMPLETE(ihs3, ihs_i2c_init, ihs_i2c_probe,
+                        ihs_i2c_read, ihs_i2c_write,
+                        ihs_i2c_set_bus_speed,
+                        CONFIG_SYS_I2C_IHS_SPEED_3,
+                        CONFIG_SYS_I2C_IHS_SLAVE_3, 3)
+#endif
index ae3cafbea4e6e617ca0e15143daf66995fef0a31..91821f4c7701797e7f1e6a173e45f3709ddb7000 100644 (file)
@@ -7,7 +7,6 @@
 
 obj-$(CONFIG_I82365) += i82365.o
 obj-$(CONFIG_8xx) += mpc8xx_pcmcia.o
-obj-y += rpx_pcmcia.o
 obj-$(CONFIG_IDE_TI_CARDBUS) += ti_pci1410a.o
 obj-y += tqm8xx_pcmcia.o
 obj-$(CONFIG_MARUBUN_PCCARD) += marubun_pcmcia.o
index 663827780e9a27d887dd4b9cd5cf568ad03cd214..af774260ee368dbf9925f546a3b67d06318849ed 100644 (file)
@@ -211,16 +211,6 @@ static u_int m8xx_get_graycode(u_int size)
 
 #if    0
 
-#if defined(CONFIG_RPXLITE)
-
-/* The RPX boards seems to have it's bus monitor timeout set to 6*8 clocks.
- * SYPCR is write once only, therefore must the slowest memory be faster
- * than the bus monitor or we will get a machine check due to the bus timeout.
- */
-#undef PCMCIA_BMT_LIMIT
-#define        PCMCIA_BMT_LIMIT (6*8)
-#endif
-
 static u_int m8xx_get_speed(u_int ns, u_int is_io)
 {
        u_int reg, clocks, psst, psl, psht;
diff --git a/drivers/pcmcia/rpx_pcmcia.c b/drivers/pcmcia/rpx_pcmcia.c
deleted file mode 100644 (file)
index 5b24f0b..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -------------------------------------------------------------------- */
-/* RPX Boards from Embedded Planet                                     */
-/* -------------------------------------------------------------------- */
-#include <common.h>
-#ifdef CONFIG_8xx
-#include <mpc8xx.h>
-#endif
-#include <pcmcia.h>
-
-#undef CONFIG_PCMCIA
-
-#if defined(CONFIG_CMD_PCMCIA)
-#define        CONFIG_PCMCIA
-#endif
-
-#if defined(CONFIG_CMD_IDE) && defined(CONFIG_IDE_8xx_PCCARD)
-#define        CONFIG_PCMCIA
-#endif
-
-#if    defined(CONFIG_PCMCIA)  \
-       && defined(CONFIG_RPXLITE)
-
-#define        PCMCIA_BOARD_MSG        "RPX CLASSIC or RPX LITE"
-
-int pcmcia_voltage_set(int slot, int vcc, int vpp)
-{
-       u_long reg = 0;
-
-       switch(vcc) {
-               case 0: break;
-               case 33: reg |= BCSR1_PCVCTL4; break;
-               case 50: reg |= BCSR1_PCVCTL5; break;
-               default: return 1;
-       }
-
-       switch(vpp) {
-               case 0: break;
-               case 33:
-               case 50:
-                       if(vcc == vpp)
-                               reg |= BCSR1_PCVCTL6;
-                       else
-                               return 1;
-                       break;
-               case 120:
-                       reg |= BCSR1_PCVCTL7;
-                       default: return 1;
-       }
-
-       /* first, turn off all power */
-       *((uint *)RPX_CSR_ADDR) &= ~(BCSR1_PCVCTL4 | BCSR1_PCVCTL5
-                       | BCSR1_PCVCTL6 | BCSR1_PCVCTL7);
-
-       /* enable new powersettings */
-       *((uint *)RPX_CSR_ADDR) |= reg;
-
-       return 0;
-}
-
-int pcmcia_hardware_enable (int slot)
-{
-       return 0;       /* No hardware to enable */
-}
-
-#if defined(CONFIG_CMD_PCMCIA)
-static int pcmcia_hardware_disable(int slot)
-{
-       return 0;       /* No hardware to disable */
-}
-#endif
-
-
-#endif /* CONFIG_PCMCIA && CONFIG_RPXLITE */
index fe5c9e9b38dab38d730d02d96ba70ed6c1c4acab..5599bb948fe60981e39d440b8e159ce5ac268a76 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #include <common.h>
-#include <asm/arch/sound.h>
+#include <asm/sound.h>
 #include <asm/sdl.h>
 
 int sound_play(uint32_t msec, uint32_t frequency)
index b6573341956d6d0d4ffc76239b1bf71da550a8f9..bc0f9645b591e9460a74ccdfee947b49338684ba 100644 (file)
@@ -411,7 +411,7 @@ static ssize_t tpm_transmit(const unsigned char *buf, size_t bufsiz)
                        goto out_recv;
                }
 
-               if ((status == chip->vendor.req_canceled)) {
+               if (status == chip->vendor.req_canceled) {
                        error("Operation Canceled\n");
                        rc = -ECANCELED;
                        goto out;
index fceed871a71444a2d3d4b0be0d99bac177b6ce7d..2bc3ceb418bdf3c12aae70b280ea723777608502 100644 (file)
@@ -34,7 +34,7 @@
 #define CONFIG_LCD_INFO                /* Display Logo, (C) and system info    */
 #endif
 
-#if defined(CONFIG_V37) || defined(CONFIG_EDT32F10)
+#if defined(CONFIG_EDT32F10)
 #undef CONFIG_LCD_LOGO
 #undef CONFIG_LCD_INFO
 #endif
@@ -268,11 +268,6 @@ void lcd_ctrl_init (void *lcdbase)
         * the controller.
         */
 
-#ifdef CONFIG_RPXLITE
-       /* This is special for RPXlite_DW Software Development Platform **[Sam]** */
-       panel_info.vl_dp = CONFIG_SYS_LOW;
-#endif
-
        lccrtmp  = LCDBIT (LCCR_BNUM_BIT,
                   (((panel_info.vl_row * panel_info.vl_col) * (1 << LCD_BPP)) / 128));
 
@@ -297,9 +292,6 @@ void lcd_ctrl_init (void *lcdbase)
 
        /* Initialize LCD controller bus priorities.
         */
-#ifdef CONFIG_RBC823
-       immr->im_siu_conf.sc_sdcr = (immr->im_siu_conf.sc_sdcr & ~0x0f) | 1;    /* RAID = 01, LAID = 00 */
-#else
        immr->im_siu_conf.sc_sdcr &= ~0x0f;     /* RAID = LAID = 0 */
 
        /* set SHFT/CLOCK division factor 4
@@ -313,21 +305,7 @@ void lcd_ctrl_init (void *lcdbase)
        immr->im_clkrst.car_sccr &= ~0x1F;
        immr->im_clkrst.car_sccr |= LCD_DF;     /* was 8 */
 
-#endif /* CONFIG_RBC823 */
-
-#if defined(CONFIG_RBC823)
-       /* Enable LCD on port D.
-        */
-       immr->im_ioport.iop_pddat &= 0x0300;
-       immr->im_ioport.iop_pdpar |= 0x1CFF;
-       immr->im_ioport.iop_pddir |= 0x1CFF;
-
-       /* Configure LCD_ON, VEE_ON, CCFL_ON on port B.
-        */
-       immr->im_cpm.cp_pbdat &= ~0x00005001;
-       immr->im_cpm.cp_pbpar &= ~0x00005001;
-       immr->im_cpm.cp_pbdir |=  0x00005001;
-#elif !defined(CONFIG_EDT32F10)
+#if !defined(CONFIG_EDT32F10)
        /* Enable LCD on port D.
         */
        immr->im_ioport.iop_pdpar |= 0x1FFF;
@@ -432,20 +410,9 @@ void lcd_enable (void)
        volatile lcd823_t *lcdp = &immr->im_lcd;
 
        /* Enable the LCD panel */
-#ifndef CONFIG_RBC823
        immr->im_siu_conf.sc_sdcr |= (1 << (31 - 25));          /* LAM = 1 */
-#endif
        lcdp->lcd_lccr |= LCCR_PON;
 
-#ifdef CONFIG_V37
-       /* Turn on display backlight */
-       immr->im_cpm.cp_pbpar |= 0x00008000;
-       immr->im_cpm.cp_pbdir |= 0x00008000;
-#elif defined(CONFIG_RBC823)
-       /* Turn on display backlight */
-       immr->im_cpm.cp_pbdat |= 0x00004000;
-#endif
-
 #if defined(CONFIG_LWMON)
     {  uchar c = pic_read (0x60);
 #if defined(CONFIG_LCD) && defined(CONFIG_LWMON) && (CONFIG_POST & CONFIG_SYS_POST_SYSMON)
@@ -481,14 +448,6 @@ void lcd_enable (void)
        r360_i2c_lcd_write(0x40 | ((ctr>>8) & 0xF), ctr & 0xFF);
     }
 #endif /* CONFIG_R360MPI */
-#ifdef CONFIG_RBC823
-       udelay(200000); /* wait 200ms */
-       /* Turn VEE_ON first */
-       immr->im_cpm.cp_pbdat |= 0x00000001;
-       udelay(200000); /* wait 200ms */
-       /* Now turn on LCD_ON */
-       immr->im_cpm.cp_pbdat |= 0x00001000;
-#endif
 #ifdef CONFIG_RRVISION
        debug ("PC4->Output(1): enable LVDS\n");
        debug ("PC5->Output(0): disable PAL clock\n");
@@ -508,41 +467,6 @@ void lcd_enable (void)
 #endif
 }
 
-/*----------------------------------------------------------------------*/
-
-#if defined (CONFIG_RBC823)
-void lcd_disable (void)
-{
-       volatile immap_t *immr = (immap_t *) CONFIG_SYS_IMMR;
-       volatile lcd823_t *lcdp = &immr->im_lcd;
-
-#if defined(CONFIG_LWMON)
-    {  uchar c = pic_read (0x60);
-       c &= ~0x07;     /* Power off CCFL, Disable CCFL, Chip Disable LCD */
-       pic_write (0x60, c);
-    }
-#elif defined(CONFIG_R360MPI)
-    {
-       extern void r360_i2c_lcd_write (uchar data0, uchar data1);
-
-       r360_i2c_lcd_write(0x10, 0x00);
-       r360_i2c_lcd_write(0x20, 0x00);
-       r360_i2c_lcd_write(0x30, 0x00);
-       r360_i2c_lcd_write(0x40, 0x00);
-    }
-#endif /* CONFIG_LWMON */
-       /* Disable the LCD panel */
-       lcdp->lcd_lccr &= ~LCCR_PON;
-#ifdef CONFIG_RBC823
-       /* Turn off display backlight, VEE and LCD_ON */
-       immr->im_cpm.cp_pbdat &= ~0x00005001;
-#else
-       immr->im_siu_conf.sc_sdcr &= ~(1 << (31 - 25)); /* LAM = 0 */
-#endif /* CONFIG_RBC823 */
-}
-#endif /* NOT_USED_SO_FAR || CONFIG_RBC823 */
-
-
 /************************************************************************/
 
 #endif /* CONFIG_LCD */
index 7a6756b2e52abdbfef6d19c205ba4ae906eb1ba9..6a8db59fdff1b96da21a0280567a3def1a524890 100644 (file)
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <watchdog.h>
 #include <asm/blackfin.h>
+#include <asm/clock.h>
 #include <asm/mach-common/bits/watchdog.h>
 
 void hw_watchdog_reset(void)
index 2e5a6d3d2f1cb476a55c3b49d0ca1b01554a5897..82c0a5a9a6ce076176ad5a72a718a925ed9cb4aa 100644 (file)
@@ -28,10 +28,8 @@ typedef volatile unsigned char       vu_char;
 #endif
 #if defined(CONFIG_8xx)
 #include <asm/8xx_immap.h>
-#if defined(CONFIG_MPC852)     || defined(CONFIG_MPC852T)      || \
-    defined(CONFIG_MPC859)     || defined(CONFIG_MPC859T)      || \
-    defined(CONFIG_MPC859DSL)  || \
-    defined(CONFIG_MPC866)     || defined(CONFIG_MPC866T)      || \
+#if defined(CONFIG_MPC859)     || defined(CONFIG_MPC859T)      || \
+    defined(CONFIG_MPC866)     || \
     defined(CONFIG_MPC866P)
 # define CONFIG_MPC866_FAMILY 1
 #elif defined(CONFIG_MPC870) \
@@ -499,8 +497,6 @@ extern ssize_t spi_read      (uchar *, int, uchar *, int);
 extern ssize_t spi_write (uchar *, int, uchar *, int);
 #endif
 
-void rpxlite_init (void);
-
 #ifdef CONFIG_HERMES
 /* $(BOARD)/hermes.c */
 void hermes_start_lxt980 (int speed);
index 29a3e61e80303db9e66b5b2c9e3e8868e5ef520e..52ac4caf5a4fd7a25e915aa264932855341f760e 100644 (file)
@@ -531,45 +531,6 @@ typedef struct scc_enet {
 
 #endif
 
-/***  FADS860T********************************************************/
-
-#if defined(CONFIG_FADS) && defined(CONFIG_MPC86x)
-/*
- * This ENET stuff is for the MPC86xFADS/MPC8xxADS with ethernet on SCC1.
- */
-#ifdef CONFIG_SCC1_ENET
-
-#define        SCC_ENET        0
-
-#define        PROFF_ENET      PROFF_SCC1
-#define        CPM_CR_ENET     CPM_CR_CH_SCC1
-
-#define PA_ENET_RXD    ((ushort)0x0001)
-#define PA_ENET_TXD    ((ushort)0x0002)
-#define PA_ENET_TCLK   ((ushort)0x0100)
-#define PA_ENET_RCLK   ((ushort)0x0200)
-
-#define PB_ENET_TENA   ((uint)0x00001000)
-
-#define PC_ENET_CLSN   ((ushort)0x0010)
-#define PC_ENET_RENA   ((ushort)0x0020)
-
-#define SICR_ENET_MASK ((uint)0x000000ff)
-#define SICR_ENET_CLKRT        ((uint)0x0000002c)
-
-#endif /* CONFIG_SCC1_ETHERNET */
-
-/*
- * This ENET stuff is for the MPC860TFADS/MPC86xADS/MPC885ADS
- * with ethernet on FEC.
- */
-
-#ifdef CONFIG_FEC_ENET
-#define        FEC_ENET        /* Use FEC for Ethernet */
-#endif /* CONFIG_FEC_ENET */
-
-#endif /* CONFIG_FADS && CONFIG_MPC86x */
-
 /***  FPS850L, FPS860L  ************************************************/
 
 #if defined(CONFIG_FPS850L) || defined(CONFIG_FPS860L)
@@ -900,86 +861,6 @@ typedef struct scc_enet {
 
 #endif /* CONFIG_NETVIA */
 
-/***  QS850/QS823  ***************************************************/
-
-#if defined(CONFIG_QS850) || defined(CONFIG_QS823)
-#undef FEC_ENET /* Don't use FEC for EThernet */
-
-#define PROFF_ENET             PROFF_SCC2
-#define CPM_CR_ENET            CPM_CR_CH_SCC2
-#define SCC_ENET               1
-
-#define PA_ENET_RXD            ((ushort)0x0004)  /* RXD on PA13 (Pin D9) */
-#define PA_ENET_TXD            ((ushort)0x0008)  /* TXD on PA12 (Pin D7) */
-#define PC_ENET_RENA           ((ushort)0x0080)  /* RENA on PC8 (Pin D12) */
-#define PC_ENET_CLSN           ((ushort)0x0040)  /* CLSN on PC9 (Pin C12) */
-#define PA_ENET_TCLK           ((ushort)0x0200)  /* TCLK on PA6 (Pin D8) */
-#define PA_ENET_RCLK           ((ushort)0x0800)  /* RCLK on PA4 (Pin D10) */
-#define PB_ENET_TENA           ((uint)0x00002000)  /* TENA on PB18 (Pin D11) */
-#define PC_ENET_LBK            ((ushort)0x0010)  /* Loopback control on PC11 (Pin B14) */
-#define PC_ENET_LI             ((ushort)0x0020)  /* Link Integrity control PC10 (A15) */
-#define PC_ENET_SQE            ((ushort)0x0100)  /* SQE Disable control PC7 (B15) */
-
-/* SCC2 TXCLK from CLK2
- * SCC2 RXCLK from CLK4
- * SCC2 Connected to NMSI */
-#define SICR_ENET_MASK         ((uint)0x00007F00)
-#define SICR_ENET_CLKRT                ((uint)0x00003D00)
-
-#endif /* CONFIG_QS850/QS823 */
-
-/***  QS860T  ***************************************************/
-
-#ifdef CONFIG_QS860T
-#ifdef CONFIG_FEC_ENET
-#define FEC_ENET /* use FEC for EThernet */
-#endif /* CONFIG_FEC_ETHERNET */
-
-/* This ENET stuff is for GTH 10 Mbit ( SCC ) */
-#define PROFF_ENET             PROFF_SCC1
-#define CPM_CR_ENET            CPM_CR_CH_SCC1
-#define SCC_ENET               0
-
-#define PA_ENET_RXD            ((ushort)0x0001) /* PA15 */
-#define PA_ENET_TXD            ((ushort)0x0002) /* PA14 */
-#define PA_ENET_TCLK           ((ushort)0x0800) /* PA4 */
-#define PA_ENET_RCLK           ((ushort)0x0200) /* PA6 */
-#define PB_ENET_TENA           ((uint)0x00001000) /* PB19 */
-#define PC_ENET_CLSN           ((ushort)0x0010) /* PC11 */
-#define PC_ENET_RENA           ((ushort)0x0020) /* PC10 */
-
-#define SICR_ENET_MASK         ((uint)0x000000ff)
-/* RCLK PA4 -->CLK4, TCLK PA6 -->CLK2 */
-#define SICR_ENET_CLKRT                ((uint)0x0000003D)
-
-#endif /* CONFIG_QS860T */
-
-/***  RPXLITE  ********************************************************/
-
-#ifdef CONFIG_RPXLITE
-/* This ENET stuff is for the MPC850 with ethernet on SCC2.  Some of
- * this may be unique to the RPX-Lite configuration.
- * Note TENA is on Port B.
- */
-#define        PROFF_ENET      PROFF_SCC2
-#define        CPM_CR_ENET     CPM_CR_CH_SCC2
-#define        SCC_ENET        1
-#define PA_ENET_RXD    ((ushort)0x0004)
-#define PA_ENET_TXD    ((ushort)0x0008)
-#define PA_ENET_TCLK   ((ushort)0x0200)
-#define PA_ENET_RCLK   ((ushort)0x0800)
-#if defined(CONFIG_RMU)
-#define PC_ENET_TENA   ((uint)0x00000002)      /* PC14 */
-#else
-#define PB_ENET_TENA   ((uint)0x00002000)
-#endif
-#define PC_ENET_CLSN   ((ushort)0x0040)
-#define PC_ENET_RENA   ((ushort)0x0080)
-
-#define SICR_ENET_MASK ((uint)0x0000ff00)
-#define SICR_ENET_CLKRT        ((uint)0x00003d00)
-#endif /* CONFIG_RPXLITE */
-
 /***  SM850  *********************************************************/
 
 /* The SM850 Service Module uses SCC2 for IrDA and SCC3 for Ethernet */
@@ -1048,7 +929,7 @@ typedef struct scc_enet {
 /***  MVS1, TQM823L/M, TQM850L/M, TQM885D, R360MPI  **********/
 
 #if (defined(CONFIG_MVS) && CONFIG_MVS < 2) || \
-    defined(CONFIG_R360MPI) || defined(CONFIG_RBC823)  || \
+    defined(CONFIG_R360MPI) || \
     defined(CONFIG_RRVISION)|| defined(CONFIG_TQM823L) || \
     defined(CONFIG_TQM823M) || defined(CONFIG_TQM850L) || \
     defined(CONFIG_TQM850M) || defined(CONFIG_TQM885D) || \
@@ -1142,29 +1023,6 @@ typedef struct scc_enet {
 # endif        /* CONFIG_FEC_ENET */
 #endif /* CONFIG_TQM855L/M, TQM860L/M, TQM862L/M */
 
-/***  V37  **********************************************************/
-
-#ifdef CONFIG_V37
-/* This ENET stuff is for the MPC823 with ethernet on SCC2.  Some of
- * this may be unique to the Marel V37 configuration.
- * Note TENA is on Port B.
- */
-#define        PROFF_ENET      PROFF_SCC2
-#define        CPM_CR_ENET     CPM_CR_CH_SCC2
-#define        SCC_ENET        1
-#define PA_ENET_RXD    ((ushort)0x0004)
-#define PA_ENET_TXD    ((ushort)0x0008)
-#define PA_ENET_TCLK   ((ushort)0x0400)
-#define PA_ENET_RCLK   ((ushort)0x0200)
-#define PB_ENET_TENA   ((uint)0x00002000)
-#define PC_ENET_CLSN   ((ushort)0x0040)
-#define PC_ENET_RENA   ((ushort)0x0080)
-
-#define SICR_ENET_MASK ((uint)0x0000ff00)
-#define SICR_ENET_CLKRT        ((uint)0x00002e00)
-#endif /* CONFIG_V37 */
-
-
 /*********************************************************************/
 
 /* SCC Event register as used by Ethernet.
diff --git a/include/configs/MPC86xADS.h b/include/configs/MPC86xADS.h
deleted file mode 100644 (file)
index beada7e..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-  * A collection of structures, addresses, and values associated with
-  * the Motorola MPC8xxADS board.  Copied from the FADS config.
-  *
-  * Copyright (c) 1998 Dan Malek (dmalek@jlc.net)
-  *
-  * Modified by, Yuli Barcohen, Arabella Software Ltd., yuli@arabellasw.com
-  *
-  * Values common to all FADS family boards are in board/fads/fads.h
-  */
-
-#ifndef __CONFIG_H
-#define __CONFIG_H
-
-/*
- * High Level Configuration Options
- * (easy to change)
- */
-
-/* board type */
-#define CONFIG_MPC86xADS        1       /* new ADS */
-#define CONFIG_FADS            1       /* We are FADS compatible (more or less) */
-
-/* CPU type - pick one of these */
-#define CONFIG_MPC866T         1
-#undef CONFIG_MPC866P
-#undef CONFIG_MPC859T
-#undef CONFIG_MPC859DSL
-#undef CONFIG_MPC852T
-
-#define        CONFIG_SYS_TEXT_BASE    0xFE000000
-
-#define        CONFIG_8xx_CONS_SMC1    1       /* Console is on SMC1           */
-#undef CONFIG_8xx_CONS_SMC2
-#undef CONFIG_8xx_CONS_NONE
-#define CONFIG_BAUDRATE                38400
-
-#define CONFIG_8xx_OSCLK               10000000 /* 10MHz oscillator on EXTCLK  */
-#define CONFIG_8xx_CPUCLK_DEFAULT      50000000
-#define CONFIG_SYS_8xx_CPUCLK_MIN              40000000
-#define CONFIG_SYS_8xx_CPUCLK_MAX              80000000
-
-#define CONFIG_DRAM_50MHZ       1
-#define CONFIG_SDRAM_50MHZ      1
-
-#include "../../board/fads/fads.h"
-
-#define CONFIG_SYS_OR5_PRELIM          0xFFFF8110      /* 64Kbyte address space */
-#define CONFIG_SYS_BR5_PRELIM          (CONFIG_SYS_PHYDEV_ADDR | BR_PS_8 | BR_V)
-
-#endif /* __CONFIG_H */
diff --git a/include/configs/MPC885ADS.h b/include/configs/MPC885ADS.h
deleted file mode 100644 (file)
index eeb2355..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * A collection of structures, addresses, and values associated with
- * the Motorola MPC885ADS board. Values common to all FADS family boards
- * are in board/fads/fads.h
- *
- * Copyright (C) 2003-2004 Arabella Software Ltd.
- * Yuli Barcohen <yuli@arabellasw.com>
- */
-
-#ifndef __CONFIG_H
-#define __CONFIG_H
-
-#define CONFIG_MPC885ADS       1       /* MPC885ADS board */
-#define CONFIG_FADS            1       /* We are FADS compatible (more or less) */
-
-#define CONFIG_MPC885          1       /* MPC885 CPU (Duet family) */
-
-#define        CONFIG_SYS_TEXT_BASE    0xFE000000
-
-#define        CONFIG_8xx_CONS_SMC1    1       /* Console is on SMC1 */
-#undef CONFIG_8xx_CONS_SMC2
-#undef CONFIG_8xx_CONS_NONE
-#define CONFIG_BAUDRATE                38400
-
-#define CONFIG_8xx_OSCLK               10000000 /* 10 MHz oscillator on EXTCLK  */
-#define CONFIG_8xx_CPUCLK_DEFAULT      50000000
-#define CONFIG_SYS_8xx_CPUCLK_MIN              40000000
-#define CONFIG_SYS_8xx_CPUCLK_MAX              133000000
-
-#define CONFIG_SDRAM_50MHZ      1
-
-#include "../../board/fads/fads.h"
-
-#define CONFIG_SYS_OR5_PRELIM          0xFFFF8110      /* 64Kbyte address space */
-#define CONFIG_SYS_BR5_PRELIM          (CONFIG_SYS_PHYDEV_ADDR | BR_PS_8 | BR_V)
-
-#define CONFIG_HAS_ETH1
-
-#endif /* __CONFIG_H */
diff --git a/include/configs/NETPHONE.h b/include/configs/NETPHONE.h
deleted file mode 100644 (file)
index 08cfc9e..0000000
+++ /dev/null
@@ -1,701 +0,0 @@
-/*
- * (C) Copyright 2000-2010
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/*
- * Pantelis Antoniou, Intracom S.A., panto@intracom.gr
- * U-Boot port on NetTA4 board
- */
-
-#ifndef __CONFIG_H
-#define __CONFIG_H
-
-#if !defined(CONFIG_NETPHONE_VERSION) || CONFIG_NETPHONE_VERSION > 2
-#error Unsupported CONFIG_NETPHONE version
-#endif
-
-/*
- * High Level Configuration Options
- * (easy to change)
- */
-
-#define CONFIG_MPC870          1       /* This is a MPC885 CPU         */
-#define CONFIG_NETPHONE                1       /* ...on a NetPhone board       */
-
-#define        CONFIG_SYS_TEXT_BASE    0x40000000
-
-#define        CONFIG_8xx_CONS_SMC1    1       /* Console is on SMC1           */
-#undef CONFIG_8xx_CONS_SMC2
-#undef CONFIG_8xx_CONS_NONE
-
-#define CONFIG_BAUDRATE                115200  /* console baudrate = 115kbps   */
-
-/* #define CONFIG_XIN           10000000 */
-#define CONFIG_XIN              50000000
-/* #define MPC8XX_HZ           120000000 */
-#define MPC8XX_HZ               66666666
-
-#define CONFIG_8xx_GCLK_FREQ   MPC8XX_HZ
-
-#if 0
-#define CONFIG_BOOTDELAY       -1      /* autoboot disabled            */
-#else
-#define CONFIG_BOOTDELAY       5       /* autoboot after 5 seconds     */
-#endif
-
-#undef CONFIG_CLOCKS_IN_MHZ    /* clocks NOT passsed to Linux in MHz */
-
-#define CONFIG_PREBOOT "echo;"
-
-#undef CONFIG_BOOTARGS
-#define CONFIG_BOOTCOMMAND                                                     \
-       "tftpboot; "                                                            \
-       "setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} "     \
-       "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off;"    \
-       "bootm"
-
-#define CONFIG_SOURCE
-#define CONFIG_LOADS_ECHO      0       /* echo off for serial download */
-#undef CONFIG_SYS_LOADS_BAUD_CHANGE            /* don't allow baudrate change  */
-
-#undef CONFIG_WATCHDOG                 /* watchdog disabled            */
-
-#undef CONFIG_CAN_DRIVER               /* CAN Driver support disabled  */
-
-#define        CONFIG_STATUS_LED       1       /* Status LED enabled           */
-#define CONFIG_BOARD_SPECIFIC_LED      /* version has board specific leds */
-
-/*
- * BOOTP options
- */
-#define CONFIG_BOOTP_SUBNETMASK
-#define CONFIG_BOOTP_GATEWAY
-#define CONFIG_BOOTP_HOSTNAME
-#define CONFIG_BOOTP_BOOTPATH
-#define CONFIG_BOOTP_BOOTFILESIZE
-#define CONFIG_BOOTP_NISDOMAIN
-
-#undef CONFIG_MAC_PARTITION
-#undef CONFIG_DOS_PARTITION
-
-#define        CONFIG_RTC_MPC8xx               /* use internal RTC of MPC8xx   */
-
-#define        FEC_ENET                1       /* eth.c needs it that way... */
-#undef CONFIG_SYS_DISCOVER_PHY
-#define CONFIG_MII             1
-#define CONFIG_MII_INIT                1
-#define CONFIG_RMII            1       /* use RMII interface */
-
-#define CONFIG_ETHER_ON_FEC1   1
-#define CONFIG_FEC1_PHY                8       /* phy address of FEC */
-#define CONFIG_FEC1_PHY_NORXERR 1
-
-#define CONFIG_ETHER_ON_FEC2   1
-#define CONFIG_FEC2_PHY                4
-#define CONFIG_FEC2_PHY_NORXERR 1
-
-#define CONFIG_ENV_OVERWRITE   1       /* allow modification of vendor params */
-
-
-/*
- * Command line configuration.
- */
-#include <config_cmd_default.h>
-
-#define CONFIG_CMD_DHCP
-#define CONFIG_CMD_PING
-#define CONFIG_CMD_MII
-#define CONFIG_CMD_CDP
-
-
-#define CONFIG_BOARD_EARLY_INIT_F      1
-#define CONFIG_MISC_INIT_R
-
-/*
- * Miscellaneous configurable options
- */
-#define        CONFIG_SYS_LONGHELP                     /* undef to save memory         */
-
-#define CONFIG_SYS_HUSH_PARSER 1
-
-#if defined(CONFIG_CMD_KGDB)
-#define        CONFIG_SYS_CBSIZE       1024            /* Console I/O Buffer Size      */
-#else
-#define        CONFIG_SYS_CBSIZE       256             /* Console I/O Buffer Size      */
-#endif
-#define        CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
-#define        CONFIG_SYS_MAXARGS      16              /* max number of command args   */
-#define CONFIG_SYS_BARGSIZE    CONFIG_SYS_CBSIZE       /* Boot Argument Buffer Size    */
-
-#define CONFIG_SYS_MEMTEST_START       0x0300000       /* memtest works on     */
-#define CONFIG_SYS_MEMTEST_END         0x0700000       /* 3 ... 7 MB in DRAM   */
-
-#define        CONFIG_SYS_LOAD_ADDR            0x100000        /* default load address */
-
-/*
- * Low Level Configuration Settings
- * (address mappings, register initial values, etc.)
- * You should know what you are doing if you make changes here.
- */
-/*-----------------------------------------------------------------------
- * Internal Memory Mapped Register
- */
-#define CONFIG_SYS_IMMR                0xFF000000
-
-/*-----------------------------------------------------------------------
- * Definitions for initial stack pointer and data area (in DPRAM)
- */
-#define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_SIZE        0x3000  /* Size of used area in DPRAM   */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
-#define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
-
-/*-----------------------------------------------------------------------
- * Start addresses for the final memory configuration
- * (Set up by the startup code)
- * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0
- */
-#define        CONFIG_SYS_SDRAM_BASE           0x00000000
-#define CONFIG_SYS_FLASH_BASE          0x40000000
-#if defined(DEBUG)
-#define        CONFIG_SYS_MONITOR_LEN          (256 << 10)     /* Reserve 256 kB for Monitor   */
-#else
-#define        CONFIG_SYS_MONITOR_LEN          (192 << 10)     /* Reserve 192 kB for Monitor   */
-#endif
-#define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_FLASH_BASE
-#define        CONFIG_SYS_MALLOC_LEN           (128 << 10)     /* Reserve 128 kB for malloc()  */
-#if CONFIG_NETPHONE_VERSION == 2
-#define CONFIG_SYS_FLASH_BASE4         0x40080000
-#endif
-
-#define CONFIG_SYS_RESET_ADDRESS   0x80000000
-
-/*
- * For booting Linux, the board info and command line data
- * have to be in the first 8 MB of memory, since this is
- * the maximum mapped by the Linux kernel during initialization.
- */
-#define        CONFIG_SYS_BOOTMAPSZ            (8 << 20)       /* Initial Memory map for Linux */
-
-/*-----------------------------------------------------------------------
- * FLASH organization
- */
-#if CONFIG_NETPHONE_VERSION == 1
-#define CONFIG_SYS_MAX_FLASH_BANKS     1       /* max number of memory banks           */
-#elif CONFIG_NETPHONE_VERSION == 2
-#define CONFIG_SYS_MAX_FLASH_BANKS     2       /* max number of memory banks           */
-#endif
-#define CONFIG_SYS_MAX_FLASH_SECT      8       /* max number of sectors on one chip    */
-
-#define CONFIG_SYS_FLASH_ERASE_TOUT    120000  /* Timeout for Flash Erase (in ms)      */
-#define CONFIG_SYS_FLASH_WRITE_TOUT    500     /* Timeout for Flash Write (in ms)      */
-
-#define        CONFIG_ENV_IS_IN_FLASH  1
-#define CONFIG_ENV_SECT_SIZE   0x10000
-
-#define        CONFIG_ENV_ADDR         (CONFIG_SYS_FLASH_BASE + 0x60000)
-#define        CONFIG_ENV_SIZE         0x4000
-
-#define CONFIG_ENV_ADDR_REDUND (CONFIG_SYS_FLASH_BASE + 0x70000)
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
-
-/*-----------------------------------------------------------------------
- * Cache Configuration
- */
-#define CONFIG_SYS_CACHELINE_SIZE      16      /* For all MPC8xx CPUs                  */
-#if defined(CONFIG_CMD_KGDB)
-#define CONFIG_SYS_CACHELINE_SHIFT     4       /* log base 2 of the above value        */
-#endif
-
-/*-----------------------------------------------------------------------
- * SYPCR - System Protection Control                           11-9
- * SYPCR can only be written once after reset!
- *-----------------------------------------------------------------------
- * Software & Bus Monitor Timer max, Bus Monitor enable, SW Watchdog freeze
- */
-#if defined(CONFIG_WATCHDOG)
-#define CONFIG_SYS_SYPCR       (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | \
-                        SYPCR_SWE  | SYPCR_SWRI| SYPCR_SWP)
-#else
-#define CONFIG_SYS_SYPCR       (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | SYPCR_SWP)
-#endif
-
-/*-----------------------------------------------------------------------
- * SIUMCR - SIU Module Configuration                           11-6
- *-----------------------------------------------------------------------
- * PCMCIA config., multi-function pin tri-state
- */
-#ifndef        CONFIG_CAN_DRIVER
-#define CONFIG_SYS_SIUMCR      (SIUMCR_DBGC00 | SIUMCR_DBPC00 | SIUMCR_MLRC01 | SIUMCR_FRC)
-#else  /* we must activate GPL5 in the SIUMCR for CAN */
-#define CONFIG_SYS_SIUMCR      (SIUMCR_DBGC11 | SIUMCR_DBPC00 | SIUMCR_MLRC01 | SIUMCR_FRC)
-#endif /* CONFIG_CAN_DRIVER */
-
-/*-----------------------------------------------------------------------
- * TBSCR - Time Base Status and Control                                11-26
- *-----------------------------------------------------------------------
- * Clear Reference Interrupt Status, Timebase freezing enabled
- */
-#define CONFIG_SYS_TBSCR       (TBSCR_REFA | TBSCR_REFB | TBSCR_TBF)
-
-/*-----------------------------------------------------------------------
- * RTCSC - Real-Time Clock Status and Control Register         11-27
- *-----------------------------------------------------------------------
- */
-#define CONFIG_SYS_RTCSC       (RTCSC_SEC | RTCSC_ALR | RTCSC_RTF| RTCSC_RTE)
-
-/*-----------------------------------------------------------------------
- * PISCR - Periodic Interrupt Status and Control               11-31
- *-----------------------------------------------------------------------
- * Clear Periodic Interrupt Status, Interrupt Timer freezing enabled
- */
-#define CONFIG_SYS_PISCR       (PISCR_PS | PISCR_PITF)
-
-/*-----------------------------------------------------------------------
- * PLPRCR - PLL, Low-Power, and Reset Control Register         15-30
- *-----------------------------------------------------------------------
- * Reset PLL lock status sticky bit, timer expired status bit and timer
- * interrupt status bit
- *
- */
-
-#if CONFIG_XIN == 10000000
-
-#if MPC8XX_HZ == 120000000
-#define CONFIG_SYS_PLPRCR      ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
-                        (0 << PLPRCR_S_SHIFT) | (12 << PLPRCR_MFI_SHIFT) | (0 << PLPRCR_PDF_SHIFT) | \
-                        PLPRCR_TEXPS)
-#elif MPC8XX_HZ == 100000000
-#define CONFIG_SYS_PLPRCR      ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
-                        (0 << PLPRCR_S_SHIFT) | (10 << PLPRCR_MFI_SHIFT) | (0 << PLPRCR_PDF_SHIFT) | \
-                        PLPRCR_TEXPS)
-#elif MPC8XX_HZ == 50000000
-#define CONFIG_SYS_PLPRCR      ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
-                        (1 << PLPRCR_S_SHIFT) | (8 << PLPRCR_MFI_SHIFT) | (3 << PLPRCR_PDF_SHIFT) | \
-                        PLPRCR_TEXPS)
-#elif MPC8XX_HZ == 25000000
-#define CONFIG_SYS_PLPRCR      ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
-                        (2 << PLPRCR_S_SHIFT) | (8 << PLPRCR_MFI_SHIFT) | (3 << PLPRCR_PDF_SHIFT) | \
-                        PLPRCR_TEXPS)
-#elif MPC8XX_HZ == 40000000
-#define CONFIG_SYS_PLPRCR      ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
-                        (1 << PLPRCR_S_SHIFT) | (8 << PLPRCR_MFI_SHIFT) | (4 << PLPRCR_PDF_SHIFT) | \
-                        PLPRCR_TEXPS)
-#elif MPC8XX_HZ == 75000000
-#define CONFIG_SYS_PLPRCR      ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
-                        (1 << PLPRCR_S_SHIFT) | (15 << PLPRCR_MFI_SHIFT) | (0 << PLPRCR_PDF_SHIFT) | \
-                        PLPRCR_TEXPS)
-#else
-#error unsupported CPU freq for XIN = 10MHz
-#endif
-
-#elif CONFIG_XIN == 50000000
-
-#if MPC8XX_HZ == 120000000
-#define CONFIG_SYS_PLPRCR      ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
-                        (0 << PLPRCR_S_SHIFT) | (12 << PLPRCR_MFI_SHIFT) | (4 << PLPRCR_PDF_SHIFT) | \
-                        PLPRCR_TEXPS)
-#elif MPC8XX_HZ == 100000000
-#define CONFIG_SYS_PLPRCR      ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
-                        (0 << PLPRCR_S_SHIFT) | (6 << PLPRCR_MFI_SHIFT) | (2 << PLPRCR_PDF_SHIFT) | \
-                        PLPRCR_TEXPS)
-#elif MPC8XX_HZ ==  66666666
-#define CONFIG_SYS_PLPRCR      ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
-                        (1 << PLPRCR_S_SHIFT) | (8 << PLPRCR_MFI_SHIFT) | (2 << PLPRCR_PDF_SHIFT) | \
-                        PLPRCR_TEXPS)
-#else
-#error unsupported CPU freq for XIN = 50MHz
-#endif
-
-#else
-
-#error unsupported XIN freq
-#endif
-
-
-/*
- *-----------------------------------------------------------------------
- * SCCR - System Clock and reset Control Register              15-27
- *-----------------------------------------------------------------------
- * Set clock output, timebase and RTC source and divider,
- * power management and some other internal clocks
- *
- * Note: When TBS == 0 the timebase is independent of current cpu clock.
- */
-
-#define SCCR_MASK      SCCR_EBDF11
-#if MPC8XX_HZ > 66666666
-#define CONFIG_SYS_SCCR        (/* SCCR_TBS    | */ SCCR_CRQEN | \
-                        SCCR_COM00   | SCCR_DFSYNC00 | SCCR_DFBRG00  | \
-                        SCCR_DFNL000 | SCCR_DFNH000  | SCCR_DFLCD000 | \
-                        SCCR_DFALCD00 | SCCR_EBDF01)
-#else
-#define CONFIG_SYS_SCCR        (/* SCCR_TBS    | */ SCCR_CRQEN | \
-                        SCCR_COM00   | SCCR_DFSYNC00 | SCCR_DFBRG00  | \
-                        SCCR_DFNL000 | SCCR_DFNH000  | SCCR_DFLCD000 | \
-                        SCCR_DFALCD00)
-#endif
-
-/*-----------------------------------------------------------------------
- *
- *-----------------------------------------------------------------------
- *
- */
-/*#define      CONFIG_SYS_DER  0x2002000F*/
-#define CONFIG_SYS_DER 0
-
-/*
- * Init Memory Controller:
- *
- * BR0/1 and OR0/1 (FLASH)
- */
-
-#define FLASH_BASE0_PRELIM     0x40000000      /* FLASH bank #0        */
-
-/* used to re-map FLASH both when starting from SRAM or FLASH:
- * restrict access enough to keep SRAM working (if any)
- * but not too much to meddle with FLASH accesses
- */
-#define CONFIG_SYS_REMAP_OR_AM         0x80000000      /* OR addr mask */
-#define CONFIG_SYS_PRELIM_OR_AM        0xE0000000      /* OR addr mask */
-
-/* FLASH timing: ACS = 11, TRLX = 0, CSNT = 1, SCY = 5, EHTR = 1       */
-#define CONFIG_SYS_OR_TIMING_FLASH     (OR_CSNT_SAM  | OR_BI | OR_SCY_5_CLK | OR_TRLX)
-
-#define CONFIG_SYS_OR0_REMAP   (CONFIG_SYS_REMAP_OR_AM  | CONFIG_SYS_OR_TIMING_FLASH)
-#define CONFIG_SYS_OR0_PRELIM  (CONFIG_SYS_PRELIM_OR_AM | CONFIG_SYS_OR_TIMING_FLASH)
-#define CONFIG_SYS_BR0_PRELIM  ((FLASH_BASE0_PRELIM & BR_BA_MSK) | BR_PS_8 | BR_V )
-
-#if CONFIG_NETPHONE_VERSION == 2
-
-#define FLASH_BASE4_PRELIM     0x40080000      /* FLASH bank #1        */
-
-#define CONFIG_SYS_OR4_REMAP   (CONFIG_SYS_REMAP_OR_AM  | CONFIG_SYS_OR_TIMING_FLASH)
-#define CONFIG_SYS_OR4_PRELIM  (CONFIG_SYS_PRELIM_OR_AM | CONFIG_SYS_OR_TIMING_FLASH)
-#define CONFIG_SYS_BR4_PRELIM  ((FLASH_BASE4_PRELIM & BR_BA_MSK) | BR_PS_8 | BR_V )
-
-#endif
-
-/*
- * BR3 and OR3 (SDRAM)
- *
- */
-#define SDRAM_BASE3_PRELIM     0x00000000      /* SDRAM bank #0        */
-#define        SDRAM_MAX_SIZE          (256 << 20)     /* max 256MB per bank   */
-
-/* SDRAM timing: Multiplexed addresses, GPL5 output to GPL5_A (don't care)     */
-#define CONFIG_SYS_OR_TIMING_SDRAM     (OR_CSNT_SAM | OR_G5LS)
-
-#define CONFIG_SYS_OR3_PRELIM  ((0xFFFFFFFFLU & ~(SDRAM_MAX_SIZE - 1)) | CONFIG_SYS_OR_TIMING_SDRAM)
-#define CONFIG_SYS_BR3_PRELIM  ((SDRAM_BASE3_PRELIM & BR_BA_MSK) | BR_MS_UPMB | BR_PS_32 | BR_V)
-
-/*
- * Memory Periodic Timer Prescaler
- */
-
-/*
- * Memory Periodic Timer Prescaler
- *
- * The Divider for PTA (refresh timer) configuration is based on an
- * example SDRAM configuration (64 MBit, one bank). The adjustment to
- * the number of chip selects (NCS) and the actually needed refresh
- * rate is done by setting MPTPR.
- *
- * PTA is calculated from
- *     PTA = (gclk * Trefresh) / ((2 ^ (2 * DFBRG)) * PTP * NCS)
- *
- *     gclk      CPU clock (not bus clock!)
- *     Trefresh  Refresh cycle * 4 (four word bursts used)
- *
- * 4096  Rows from SDRAM example configuration
- * 1000  factor s -> ms
- *   32  PTP (pre-divider from MPTPR) from SDRAM example configuration
- *    4  Number of refresh cycles per period
- *   64  Refresh cycle in ms per number of rows
- * --------------------------------------------
- * Divider = 4096 * 32 * 1000 / (4 * 64) = 512000
- *
- * 50 MHz => 50.000.000 / Divider =  98
- * 66 Mhz => 66.000.000 / Divider = 129
- * 80 Mhz => 80.000.000 / Divider = 156
- */
-
-#define CONFIG_SYS_MAMR_PTA             234
-
-/*
- * For 16 MBit, refresh rates could be 31.3 us
- * (= 64 ms / 2K = 125 / quad bursts).
- * For a simpler initialization, 15.6 us is used instead.
- *
- * #define CONFIG_SYS_MPTPR_2BK_2K     MPTPR_PTP_DIV32         for 2 banks
- * #define CONFIG_SYS_MPTPR_1BK_2K     MPTPR_PTP_DIV64         for 1 bank
- */
-#define CONFIG_SYS_MPTPR_2BK_4K        MPTPR_PTP_DIV16         /* setting for 2 banks  */
-#define CONFIG_SYS_MPTPR_1BK_4K        MPTPR_PTP_DIV32         /* setting for 1 bank   */
-
-/* refresh rate 7.8 us (= 64 ms / 8K = 31.2 / quad bursts) for 256 MBit                */
-#define CONFIG_SYS_MPTPR_2BK_8K        MPTPR_PTP_DIV8          /* setting for 2 banks  */
-#define CONFIG_SYS_MPTPR_1BK_8K        MPTPR_PTP_DIV16         /* setting for 1 bank   */
-
-/*
- * MAMR settings for SDRAM
- */
-
-/* 8 column SDRAM */
-#define CONFIG_SYS_MAMR_8COL   ((CONFIG_SYS_MAMR_PTA << MAMR_PTA_SHIFT)  | MAMR_PTAE       |   \
-                        MAMR_AMA_TYPE_0 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A11 |   \
-                        MAMR_RLFA_1X    | MAMR_WLFA_1X    | MAMR_TLFA_4X)
-
-/* 9 column SDRAM */
-#define CONFIG_SYS_MAMR_9COL   ((CONFIG_SYS_MAMR_PTA << MAMR_PTA_SHIFT)  | MAMR_PTAE       |   \
-                        MAMR_AMA_TYPE_1 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A10 |   \
-                        MAMR_RLFA_1X    | MAMR_WLFA_1X    | MAMR_TLFA_4X)
-
-#define CONFIG_LAST_STAGE_INIT         /* needed to reset the damn phys */
-
-/****************************************************************/
-
-#define DSP_SIZE       0x00010000      /* 64K */
-#define NAND_SIZE      0x00010000      /* 64K */
-
-#define DSP_BASE       0xF1000000
-#define NAND_BASE      0xF1010000
-
-/*****************************************************************************/
-
-#define CONFIG_SYS_DIRECT_FLASH_TFTP
-
-/*****************************************************************************/
-
-#if CONFIG_NETPHONE_VERSION == 1
-#define STATUS_LED_BIT         0x00000008              /* bit 28 */
-#elif CONFIG_NETPHONE_VERSION == 2
-#define STATUS_LED_BIT         0x00000080              /* bit 24 */
-#endif
-
-#define STATUS_LED_PERIOD      (CONFIG_SYS_HZ / 2)
-#define STATUS_LED_STATE       STATUS_LED_BLINKING
-
-#define STATUS_LED_ACTIVE      0               /* LED on for bit == 0  */
-#define STATUS_LED_BOOT                0               /* LED 0 used for boot status */
-
-#ifndef __ASSEMBLY__
-
-/* LEDs */
-
-/* led_id_t is unsigned int mask */
-typedef unsigned int led_id_t;
-
-#define __led_toggle(_msk) \
-       do { \
-               ((volatile immap_t *)CONFIG_SYS_IMMR)->im_cpm.cp_pedat ^= (_msk); \
-       } while(0)
-
-#define __led_set(_msk, _st) \
-       do { \
-               if ((_st)) \
-                       ((volatile immap_t *)CONFIG_SYS_IMMR)->im_cpm.cp_pedat |= (_msk); \
-               else \
-                       ((volatile immap_t *)CONFIG_SYS_IMMR)->im_cpm.cp_pedat &= ~(_msk); \
-       } while(0)
-
-#define __led_init(msk, st) __led_set(msk, st)
-
-#endif
-
-/***********************************************************************************************************
-
- ----------------------------------------------------------------------------------------------
-
-   (V1) version 1 of the board
-   (V2) version 2 of the board
-
- ----------------------------------------------------------------------------------------------
-
-   Pin definitions:
-
- +------+----------------+--------+------------------------------------------------------------
- |  #   | Name           | Type   | Comment
- +------+----------------+--------+------------------------------------------------------------
- | PA3  | SPIEN_MAX      | Output | MAX serial to uart chip select
- | PA7  | DSP_INT        | Output | DSP interrupt
- | PA10 | DSP_RESET      | Output | DSP reset
- | PA14 | USBOE          | Output | USB (1)
- | PA15 | USBRXD         | Output | USB (1)
- | PB19 | BT_RTS         | Output | Bluetooth (0)
- | PB23 | BT_CTS         | Output | Bluetooth (0)
- | PB26 | SPIEN_SEP      | Output | Serial EEPROM chip select
- | PB27 | SPICS_DISP     | Output | Display chip select
- | PB28 | SPI_RXD_3V     | Input  | SPI Data Rx
- | PB29 | SPI_TXD        | Output | SPI Data Tx
- | PB30 | SPI_CLK        | Output | SPI Clock
- | PC10 | DISPA0         | Output | Display A0
- | PC11 | BACKLIGHT      | Output | Display backlit
- | PC12 | SPI2RXD        | Input  | (V1) 2nd SPI RXD
- |      | IO_RESET       | Output | (V2) General I/O reset
- | PC13 | SPI2TXD        | Output | (V1) 2nd SPI TXD (V1)
- |      | HOOK           | Input  | (V2) Hook input interrupt
- | PC15 | SPI2CLK        | Output | (V1) 2nd SPI CLK
- |      | F_RY_BY        | Input  | (V2) NAND F_RY_BY
- | PE17 | F_ALE          | Output | NAND F_ALE
- | PE18 | F_CLE          | Output | NAND F_CLE
- | PE20 | F_CE           | Output | NAND F_CE
- | PE24 | SPICS_SCOUT    | Output | (V1) Codec chip select
- |      | LED            | Output | (V2) LED
- | PE27 | SPICS_ER       | Output | External serial register CS
- | PE28 | LEDIO1         | Output | (V1) LED
- |      | BKBR1          | Input  | (V2) Keyboard input scan
- | PE29 | LEDIO2         | Output | (V1) LED hook for A (TA2)
- |      | BKBR2          | Input  | (V2) Keyboard input scan
- | PE30 | LEDIO3         | Output | (V1) LED hook for A (TA2)
- |      | BKBR3          | Input  | (V2) Keyboard input scan
- | PE31 | F_RY_BY        | Input  | (V1) NAND F_RY_BY
- |      | BKBR4          | Input  | (V2) Keyboard input scan
- +------+----------------+--------+---------------------------------------------------
-
- ----------------------------------------------------------------------------------------------
-
-   Serial register input:
-
- +------+----------------+------------------------------------------------------------
- |  #   | Name           | Comment
- +------+----------------+------------------------------------------------------------
- |    0 | BKBR1          | (V1) Keyboard input scan
- |    1 | BKBR3          | (V1) Keyboard input scan
- |    2 | BKBR4          | (V1) Keyboard input scan
- |    3 | BKBR2          | (V1) Keyboard input scan
- |    4 | HOOK           | (V1) Hook switch
- |    5 | BT_LINK        | (V1) Bluetooth link status
- |    6 | HOST_WAKE      | (V1) Bluetooth host wake up
- |    7 | OK_ETH         | (V1) Cisco inline power OK status
- +------+----------------+------------------------------------------------------------
-
- ----------------------------------------------------------------------------------------------
-
-   Serial register output:
-
- +------+----------------+------------------------------------------------------------
- |  #   | Name           | Comment
- +------+----------------+------------------------------------------------------------
- |    0 | KEY1           | Keyboard output scan
- |    1 | KEY2           | Keyboard output scan
- |    2 | KEY3           | Keyboard output scan
- |    3 | KEY4           | Keyboard output scan
- |    4 | KEY5           | Keyboard output scan
- |    5 | KEY6           | Keyboard output scan
- |    6 | KEY7           | Keyboard output scan
- |    7 | BT_WAKE        | Bluetooth wake up
- +------+----------------+------------------------------------------------------------
-
- ----------------------------------------------------------------------------------------------
-
- Chip selects:
-
- +------+----------------+------------------------------------------------------------
- |  #   | Name           | Comment
- +------+----------------+------------------------------------------------------------
- | CS0  | CS0            | Boot flash
- | CS1  | CS_FLASH       | NAND flash
- | CS2  | CS_DSP         | DSP
- | CS3  | DCS_DRAM       | DRAM
- | CS4  | CS_FLASH2      | (V2) 2nd flash
- +------+----------------+------------------------------------------------------------
-
- ----------------------------------------------------------------------------------------------
-
- Interrupts:
-
- +------+----------------+------------------------------------------------------------
- |  #   | Name           | Comment
- +------+----------------+------------------------------------------------------------
- | IRQ1 | IRQ_DSP        | DSP interrupt
- | IRQ3 | S_INTER        | DUSLIC ???
- | IRQ4 | F_RY_BY        | NAND
- | IRQ7 | IRQ_MAX        | MAX 3100 interrupt
- +------+----------------+------------------------------------------------------------
-
- ----------------------------------------------------------------------------------------------
-
- Interrupts on PCMCIA pins:
-
- +------+----------------+------------------------------------------------------------
- |  #   | Name           | Comment
- +------+----------------+------------------------------------------------------------
- | IP_A0| PHY1_LINK      | Link status changed for #1 Ethernet interface
- | IP_A1| PHY2_LINK      | Link status changed for #2 Ethernet interface
- | IP_A2| RMII1_MDINT    | PHY interrupt for #1
- | IP_A3| RMII2_MDINT    | PHY interrupt for #2
- | IP_A5| HOST_WAKE      | (V2) Bluetooth host wake
- | IP_A6| OK_ETH         | (V2) Cisco inline power OK
- +------+----------------+------------------------------------------------------------
-
-*************************************************************************************************/
-
-#define CONFIG_SED156X                 1       /* use SED156X */
-#define CONFIG_SED156X_PG12864Q                1       /* type of display used */
-
-/* serial interfacing macros */
-
-#define SED156X_SPI_RXD_PORT   (((volatile immap_t *)CONFIG_SYS_IMMR)->im_cpm.cp_pbdat)
-#define SED156X_SPI_RXD_MASK   0x00000008
-
-#define SED156X_SPI_TXD_PORT   (((volatile immap_t *)CONFIG_SYS_IMMR)->im_cpm.cp_pbdat)
-#define SED156X_SPI_TXD_MASK   0x00000004
-
-#define SED156X_SPI_CLK_PORT   (((volatile immap_t *)CONFIG_SYS_IMMR)->im_cpm.cp_pbdat)
-#define SED156X_SPI_CLK_MASK   0x00000002
-
-#define SED156X_CS_PORT                (((volatile immap_t *)CONFIG_SYS_IMMR)->im_cpm.cp_pbdat)
-#define SED156X_CS_MASK                0x00000010
-
-#define SED156X_A0_PORT                (((volatile immap_t *)CONFIG_SYS_IMMR)->im_ioport.iop_pcdat)
-#define SED156X_A0_MASK                0x0020
-
-/*************************************************************************************************/
-
-#define CONFIG_SYS_CONSOLE_IS_IN_ENV           1
-#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE   1
-#define CONFIG_SYS_CONSOLE_ENV_OVERWRITE       1
-
-/*************************************************************************************************/
-
-/* use board specific hardware */
-#undef CONFIG_WATCHDOG                 /* watchdog disabled            */
-#define CONFIG_HW_WATCHDOG
-#define CONFIG_SHOW_ACTIVITY
-
-/*************************************************************************************************/
-
-/* phone console configuration */
-
-#define PHONE_CONSOLE_POLL_HZ          (CONFIG_SYS_HZ/200)     /* poll every 5ms */
-
-/*************************************************************************************************/
-
-#define CONFIG_CDP_DEVICE_ID           20
-#define CONFIG_CDP_DEVICE_ID_PREFIX    "NP"    /* netphone */
-#define CONFIG_CDP_PORT_ID             "eth%d"
-#define CONFIG_CDP_CAPABILITIES                0x00000010
-#define CONFIG_CDP_VERSION             "u-boot" " " U_BOOT_DATE " " U_BOOT_TIME
-#define CONFIG_CDP_PLATFORM            "Intracom NetPhone"
-#define CONFIG_CDP_TRIGGER             0x20020001
-#define CONFIG_CDP_POWER_CONSUMPTION   4300    /* 90 mA @ 48V */
-#define CONFIG_CDP_APPLIANCE_VLAN_TYPE 0x01    /* ipphone */
-
-/*************************************************************************************************/
-
-#define CONFIG_AUTO_COMPLETE   1
-
-/*************************************************************************************************/
-
-#define CONFIG_CRC32_VERIFY    1
-
-/*************************************************************************************************/
-
-#define CONFIG_HUSH_OLD_PARSER_COMPATIBLE      1
-
-/*************************************************************************************************/
-#endif /* __CONFIG_H */
diff --git a/include/configs/NETTA.h b/include/configs/NETTA.h
deleted file mode 100644 (file)
index 800a922..0000000
+++ /dev/null
@@ -1,666 +0,0 @@
-/*
- * (C) Copyright 2000-2010
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/*
- * Pantelis Antoniou, Intracom S.A., panto@intracom.gr
- * U-Boot port on NetTA4 board
- */
-
-#ifndef __CONFIG_H
-#define __CONFIG_H
-
-/*
- * High Level Configuration Options
- * (easy to change)
- */
-
-#define CONFIG_MPC885          1       /* This is a MPC885 CPU         */
-#define CONFIG_NETTA           1       /* ...on a NetTA board          */
-
-#define        CONFIG_SYS_TEXT_BASE    0x40000000
-
-#define        CONFIG_8xx_CONS_SMC1    1       /* Console is on SMC1           */
-#undef CONFIG_8xx_CONS_SMC2
-#undef CONFIG_8xx_CONS_NONE
-
-#define CONFIG_BAUDRATE                115200  /* console baudrate = 115kbps   */
-
-/* #define CONFIG_XIN           10000000 */
-#define CONFIG_XIN              50000000
-#define MPC8XX_HZ              120000000
-/* #define MPC8XX_HZ           100000000 */
-/* #define MPC8XX_HZ            50000000 */
-/* #define MPC8XX_HZ            80000000 */
-
-#define CONFIG_8xx_GCLK_FREQ   MPC8XX_HZ
-
-#if 0
-#define CONFIG_BOOTDELAY       -1      /* autoboot disabled            */
-#else
-#define CONFIG_BOOTDELAY       5       /* autoboot after 5 seconds     */
-#endif
-
-#undef CONFIG_CLOCKS_IN_MHZ    /* clocks NOT passsed to Linux in MHz */
-
-#define CONFIG_PREBOOT "echo;echo Type \\\"run flash_nfs\\\" to mount root filesystem over NFS;echo"
-
-#undef CONFIG_BOOTARGS
-#define CONFIG_BOOTCOMMAND                                                     \
-       "tftpboot; "                                                            \
-       "setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} "     \
-       "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off;"    \
-       "bootm"
-
-#define CONFIG_LOADS_ECHO      0       /* echo off for serial download */
-#undef CONFIG_SYS_LOADS_BAUD_CHANGE            /* don't allow baudrate change  */
-
-#undef CONFIG_WATCHDOG                 /* watchdog disabled            */
-#define CONFIG_HW_WATCHDOG
-
-#undef CONFIG_CAN_DRIVER               /* CAN Driver support disabled  */
-
-/*
- * BOOTP options
- */
-#define CONFIG_BOOTP_SUBNETMASK
-#define CONFIG_BOOTP_GATEWAY
-#define CONFIG_BOOTP_HOSTNAME
-#define CONFIG_BOOTP_BOOTPATH
-#define CONFIG_BOOTP_BOOTFILESIZE
-#define CONFIG_BOOTP_NISDOMAIN
-
-
-#undef CONFIG_MAC_PARTITION
-#undef CONFIG_DOS_PARTITION
-
-#define        CONFIG_RTC_MPC8xx               /* use internal RTC of MPC8xx   */
-
-#define        FEC_ENET                1       /* eth.c needs it that way... */
-#undef  CONFIG_SYS_DISCOVER_PHY                /* do not discover phys */
-#define CONFIG_MII             1
-#define CONFIG_MII_INIT                1
-#define CONFIG_RMII            1       /* use RMII interface */
-
-#if defined(CONFIG_NETTA_ISDN)
-#define CONFIG_ETHER_ON_FEC1   1
-#define CONFIG_FEC1_PHY                1       /* phy address of FEC1 */
-#define CONFIG_FEC1_PHY_NORXERR 1
-#undef  CONFIG_ETHER_ON_FEC2
-#else
-#define CONFIG_ETHER_ON_FEC1   1
-#define CONFIG_FEC1_PHY                8       /* phy address of FEC1 */
-#define CONFIG_FEC1_PHY_NORXERR 1
-#define CONFIG_ETHER_ON_FEC2   1
-#define CONFIG_FEC2_PHY                1       /* phy address of FEC2 */
-#define CONFIG_FEC2_PHY_NORXERR 1
-#endif
-
-#define CONFIG_ENV_OVERWRITE   1       /* allow modification of vendor params */
-
-/* POST support */
-#define CONFIG_POST            (CONFIG_SYS_POST_MEMORY   | \
-                                CONFIG_SYS_POST_CODEC     | \
-                                CONFIG_SYS_POST_DSP       )
-
-
-/*
- * Command line configuration.
- */
-#include <config_cmd_default.h>
-
-#define CONFIG_CMD_CDP
-#define CONFIG_CMD_DHCP
-#define CONFIG_CMD_DIAG
-#define CONFIG_CMD_FAT
-#define CONFIG_CMD_IDE
-#define CONFIG_CMD_JFFS2
-#define CONFIG_CMD_MII
-#define CONFIG_CMD_NFS
-#define CONFIG_CMD_PCMCIA
-#define CONFIG_CMD_PING
-
-
-#define CONFIG_BOARD_EARLY_INIT_F      1
-#define CONFIG_MISC_INIT_R
-
-/*
- * Miscellaneous configurable options
- */
-#define        CONFIG_SYS_LONGHELP                     /* undef to save memory         */
-
-#define CONFIG_SYS_HUSH_PARSER 1
-
-#if defined(CONFIG_CMD_KGDB)
-#define        CONFIG_SYS_CBSIZE       1024            /* Console I/O Buffer Size      */
-#else
-#define        CONFIG_SYS_CBSIZE       256             /* Console I/O Buffer Size      */
-#endif
-#define        CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
-#define        CONFIG_SYS_MAXARGS      16              /* max number of command args   */
-#define CONFIG_SYS_BARGSIZE    CONFIG_SYS_CBSIZE       /* Boot Argument Buffer Size    */
-
-#define CONFIG_SYS_MEMTEST_START       0x0300000       /* memtest works on     */
-#define CONFIG_SYS_MEMTEST_END         0x0700000       /* 3 ... 7 MB in DRAM   */
-
-#define        CONFIG_SYS_LOAD_ADDR            0x100000        /* default load address */
-
-/*
- * Low Level Configuration Settings
- * (address mappings, register initial values, etc.)
- * You should know what you are doing if you make changes here.
- */
-/*-----------------------------------------------------------------------
- * Internal Memory Mapped Register
- */
-#define CONFIG_SYS_IMMR                0xFF000000
-
-/*-----------------------------------------------------------------------
- * Definitions for initial stack pointer and data area (in DPRAM)
- */
-#define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_SIZE        0x3000  /* Size of used area in DPRAM   */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
-#define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
-
-/*-----------------------------------------------------------------------
- * Start addresses for the final memory configuration
- * (Set up by the startup code)
- * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0
- */
-#define        CONFIG_SYS_SDRAM_BASE           0x00000000
-#define CONFIG_SYS_FLASH_BASE          0x40000000
-#if defined(DEBUG)
-#define        CONFIG_SYS_MONITOR_LEN          (256 << 10)     /* Reserve 256 kB for Monitor   */
-#else
-#define        CONFIG_SYS_MONITOR_LEN          (192 << 10)     /* Reserve 192 kB for Monitor   */
-#endif
-#define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_FLASH_BASE
-#define        CONFIG_SYS_MALLOC_LEN           (128 << 10)     /* Reserve 128 kB for malloc()  */
-
-/*
- * For booting Linux, the board info and command line data
- * have to be in the first 8 MB of memory, since this is
- * the maximum mapped by the Linux kernel during initialization.
- */
-#define        CONFIG_SYS_BOOTMAPSZ            (8 << 20)       /* Initial Memory map for Linux */
-
-/*-----------------------------------------------------------------------
- * FLASH organization
- */
-#define CONFIG_SYS_MAX_FLASH_BANKS     1       /* max number of memory banks           */
-#define CONFIG_SYS_MAX_FLASH_SECT      8       /* max number of sectors on one chip    */
-
-#define CONFIG_SYS_FLASH_ERASE_TOUT    120000  /* Timeout for Flash Erase (in ms)      */
-#define CONFIG_SYS_FLASH_WRITE_TOUT    500     /* Timeout for Flash Write (in ms)      */
-
-#define        CONFIG_ENV_IS_IN_FLASH  1
-#define CONFIG_ENV_SECT_SIZE   0x10000
-
-#define        CONFIG_ENV_ADDR         (CONFIG_SYS_FLASH_BASE + 0x60000)
-#define        CONFIG_ENV_SIZE         0x4000
-
-#define CONFIG_ENV_ADDR_REDUND (CONFIG_SYS_FLASH_BASE + 0x70000)
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
-
-/*-----------------------------------------------------------------------
- * Cache Configuration
- */
-#define CONFIG_SYS_CACHELINE_SIZE      16      /* For all MPC8xx CPUs                  */
-#if defined(CONFIG_CMD_KGDB)
-#define CONFIG_SYS_CACHELINE_SHIFT     4       /* log base 2 of the above value        */
-#endif
-
-/*-----------------------------------------------------------------------
- * SYPCR - System Protection Control                           11-9
- * SYPCR can only be written once after reset!
- *-----------------------------------------------------------------------
- * Software & Bus Monitor Timer max, Bus Monitor enable, SW Watchdog freeze
- */
-#if defined(CONFIG_WATCHDOG)
-#define CONFIG_SYS_SYPCR       (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | \
-                        SYPCR_SWE  | SYPCR_SWRI| SYPCR_SWP)
-#else
-#define CONFIG_SYS_SYPCR       (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | SYPCR_SWP)
-#endif
-
-/*-----------------------------------------------------------------------
- * SIUMCR - SIU Module Configuration                           11-6
- *-----------------------------------------------------------------------
- * PCMCIA config., multi-function pin tri-state
- */
-#ifndef        CONFIG_CAN_DRIVER
-#define CONFIG_SYS_SIUMCR      (SIUMCR_DBGC00 | SIUMCR_DBPC00 | SIUMCR_MLRC01 | SIUMCR_FRC)
-#else  /* we must activate GPL5 in the SIUMCR for CAN */
-#define CONFIG_SYS_SIUMCR      (SIUMCR_DBGC11 | SIUMCR_DBPC00 | SIUMCR_MLRC01 | SIUMCR_FRC)
-#endif /* CONFIG_CAN_DRIVER */
-
-/*-----------------------------------------------------------------------
- * TBSCR - Time Base Status and Control                                11-26
- *-----------------------------------------------------------------------
- * Clear Reference Interrupt Status, Timebase freezing enabled
- */
-#define CONFIG_SYS_TBSCR       (TBSCR_REFA | TBSCR_REFB | TBSCR_TBF)
-
-/*-----------------------------------------------------------------------
- * RTCSC - Real-Time Clock Status and Control Register         11-27
- *-----------------------------------------------------------------------
- */
-#define CONFIG_SYS_RTCSC       (RTCSC_SEC | RTCSC_ALR | RTCSC_RTF| RTCSC_RTE)
-
-/*-----------------------------------------------------------------------
- * PISCR - Periodic Interrupt Status and Control               11-31
- *-----------------------------------------------------------------------
- * Clear Periodic Interrupt Status, Interrupt Timer freezing enabled
- */
-#define CONFIG_SYS_PISCR       (PISCR_PS | PISCR_PITF)
-
-/*-----------------------------------------------------------------------
- * PLPRCR - PLL, Low-Power, and Reset Control Register         15-30
- *-----------------------------------------------------------------------
- * Reset PLL lock status sticky bit, timer expired status bit and timer
- * interrupt status bit
- *
- */
-
-#if CONFIG_XIN == 10000000
-
-#if MPC8XX_HZ == 120000000
-#define CONFIG_SYS_PLPRCR      ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
-                        (0 << PLPRCR_S_SHIFT) | (12 << PLPRCR_MFI_SHIFT) | (0 << PLPRCR_PDF_SHIFT) | \
-                        PLPRCR_TEXPS)
-#elif MPC8XX_HZ == 100000000
-#define CONFIG_SYS_PLPRCR      ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
-                        (0 << PLPRCR_S_SHIFT) | (10 << PLPRCR_MFI_SHIFT) | (0 << PLPRCR_PDF_SHIFT) | \
-                        PLPRCR_TEXPS)
-#elif MPC8XX_HZ == 50000000
-#define CONFIG_SYS_PLPRCR      ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
-                        (1 << PLPRCR_S_SHIFT) | (8 << PLPRCR_MFI_SHIFT) | (3 << PLPRCR_PDF_SHIFT) | \
-                        PLPRCR_TEXPS)
-#elif MPC8XX_HZ == 25000000
-#define CONFIG_SYS_PLPRCR      ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
-                        (2 << PLPRCR_S_SHIFT) | (8 << PLPRCR_MFI_SHIFT) | (3 << PLPRCR_PDF_SHIFT) | \
-                        PLPRCR_TEXPS)
-#elif MPC8XX_HZ == 40000000
-#define CONFIG_SYS_PLPRCR      ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
-                        (1 << PLPRCR_S_SHIFT) | (8 << PLPRCR_MFI_SHIFT) | (4 << PLPRCR_PDF_SHIFT) | \
-                        PLPRCR_TEXPS)
-#elif MPC8XX_HZ == 75000000
-#define CONFIG_SYS_PLPRCR      ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
-                        (1 << PLPRCR_S_SHIFT) | (15 << PLPRCR_MFI_SHIFT) | (0 << PLPRCR_PDF_SHIFT) | \
-                        PLPRCR_TEXPS)
-#else
-#error unsupported CPU freq for XIN = 10MHz
-#endif
-
-#elif CONFIG_XIN == 50000000
-
-#if MPC8XX_HZ == 120000000
-#define CONFIG_SYS_PLPRCR      ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
-                        (0 << PLPRCR_S_SHIFT) | (12 << PLPRCR_MFI_SHIFT) | (4 << PLPRCR_PDF_SHIFT) | \
-                        PLPRCR_TEXPS)
-#elif MPC8XX_HZ == 100000000
-#define CONFIG_SYS_PLPRCR      ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
-                        (0 << PLPRCR_S_SHIFT) | (6 << PLPRCR_MFI_SHIFT) | (2 << PLPRCR_PDF_SHIFT) | \
-                        PLPRCR_TEXPS)
-#elif MPC8XX_HZ ==  80000000
-#define CONFIG_SYS_PLPRCR      ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
-                        (0 << PLPRCR_S_SHIFT) | (8 << PLPRCR_MFI_SHIFT) | (4 << PLPRCR_PDF_SHIFT) | \
-                        PLPRCR_TEXPS)
-#elif MPC8XX_HZ ==  50000000
-#define CONFIG_SYS_PLPRCR      ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
-                        (1 << PLPRCR_S_SHIFT) | (6 << PLPRCR_MFI_SHIFT) | (2 << PLPRCR_PDF_SHIFT) | \
-                        PLPRCR_TEXPS)
-#else
-#error unsupported CPU freq for XIN = 50MHz
-#endif
-
-#else
-
-#error unsupported XIN freq
-#endif
-
-
-/*
- *-----------------------------------------------------------------------
- * SCCR - System Clock and reset Control Register              15-27
- *-----------------------------------------------------------------------
- * Set clock output, timebase and RTC source and divider,
- * power management and some other internal clocks
- *
- * Note: When TBS == 0 the timebase is independent of current cpu clock.
- */
-
-#define SCCR_MASK      SCCR_EBDF11
-#if MPC8XX_HZ > 66666666
-#define CONFIG_SYS_SCCR        (/* SCCR_TBS    | */ SCCR_CRQEN | \
-                        SCCR_COM00   | SCCR_DFSYNC00 | SCCR_DFBRG00  | \
-                        SCCR_DFNL111 | SCCR_DFNH000  | SCCR_DFLCD000 | \
-                        SCCR_DFALCD00 | SCCR_EBDF01)
-#else
-#define CONFIG_SYS_SCCR        (/* SCCR_TBS    | */ SCCR_CRQEN | \
-                        SCCR_COM00   | SCCR_DFSYNC00 | SCCR_DFBRG00  | \
-                        SCCR_DFNL111 | SCCR_DFNH000  | SCCR_DFLCD000 | \
-                        SCCR_DFALCD00)
-#endif
-
-/*-----------------------------------------------------------------------
- *
- *-----------------------------------------------------------------------
- *
- */
-/*#define      CONFIG_SYS_DER  0x2002000F*/
-#define CONFIG_SYS_DER 0
-
-/*
- * Init Memory Controller:
- *
- * BR0/1 and OR0/1 (FLASH)
- */
-
-#define FLASH_BASE0_PRELIM     0x40000000      /* FLASH bank #0        */
-
-/* used to re-map FLASH both when starting from SRAM or FLASH:
- * restrict access enough to keep SRAM working (if any)
- * but not too much to meddle with FLASH accesses
- */
-#define CONFIG_SYS_REMAP_OR_AM         0x80000000      /* OR addr mask */
-#define CONFIG_SYS_PRELIM_OR_AM        0xE0000000      /* OR addr mask */
-
-/* FLASH timing: ACS = 11, TRLX = 0, CSNT = 1, SCY = 5, EHTR = 1       */
-#define CONFIG_SYS_OR_TIMING_FLASH     (OR_CSNT_SAM  | OR_BI | OR_SCY_5_CLK | OR_TRLX)
-
-#define CONFIG_SYS_OR0_REMAP   (CONFIG_SYS_REMAP_OR_AM  | CONFIG_SYS_OR_TIMING_FLASH)
-#define CONFIG_SYS_OR0_PRELIM  (CONFIG_SYS_PRELIM_OR_AM | CONFIG_SYS_OR_TIMING_FLASH)
-#define CONFIG_SYS_BR0_PRELIM  ((FLASH_BASE0_PRELIM & BR_BA_MSK) | BR_PS_8 | BR_V )
-
-/*
- * BR3 and OR3 (SDRAM)
- *
- */
-#define SDRAM_BASE3_PRELIM     0x00000000      /* SDRAM bank #0        */
-#define        SDRAM_MAX_SIZE          (256 << 20)     /* max 256MB per bank   */
-
-/* SDRAM timing: Multiplexed addresses, GPL5 output to GPL5_A (don't care)     */
-#define CONFIG_SYS_OR_TIMING_SDRAM     (OR_CSNT_SAM | OR_G5LS)
-
-#define CONFIG_SYS_OR3_PRELIM  ((0xFFFFFFFFLU & ~(SDRAM_MAX_SIZE - 1)) | CONFIG_SYS_OR_TIMING_SDRAM)
-#define CONFIG_SYS_BR3_PRELIM  ((SDRAM_BASE3_PRELIM & BR_BA_MSK) | BR_MS_UPMB | BR_PS_32 | BR_V)
-
-/*
- * Memory Periodic Timer Prescaler
- */
-
-/*
- * Memory Periodic Timer Prescaler
- *
- * The Divider for PTA (refresh timer) configuration is based on an
- * example SDRAM configuration (64 MBit, one bank). The adjustment to
- * the number of chip selects (NCS) and the actually needed refresh
- * rate is done by setting MPTPR.
- *
- * PTA is calculated from
- *     PTA = (gclk * Trefresh) / ((2 ^ (2 * DFBRG)) * PTP * NCS)
- *
- *     gclk      CPU clock (not bus clock!)
- *     Trefresh  Refresh cycle * 4 (four word bursts used)
- *
- * 4096  Rows from SDRAM example configuration
- * 1000  factor s -> ms
- *   32  PTP (pre-divider from MPTPR) from SDRAM example configuration
- *    4  Number of refresh cycles per period
- *   64  Refresh cycle in ms per number of rows
- * --------------------------------------------
- * Divider = 4096 * 32 * 1000 / (4 * 64) = 512000
- *
- * 50 MHz => 50.000.000 / Divider =  98
- * 66 Mhz => 66.000.000 / Divider = 129
- * 80 Mhz => 80.000.000 / Divider = 156
- */
-
-#if   MPC8XX_HZ == 120000000
-#define CONFIG_SYS_MAMR_PTA             234
-#elif MPC8XX_HZ == 100000000
-#define CONFIG_SYS_MAMR_PTA             195
-#elif MPC8XX_HZ ==  80000000
-#define CONFIG_SYS_MAMR_PTA             156
-#elif MPC8XX_HZ ==  50000000
-#define CONFIG_SYS_MAMR_PTA              98
-#else
-#error Unknown frequency
-#endif
-
-
-/*
- * For 16 MBit, refresh rates could be 31.3 us
- * (= 64 ms / 2K = 125 / quad bursts).
- * For a simpler initialization, 15.6 us is used instead.
- *
- * #define CONFIG_SYS_MPTPR_2BK_2K     MPTPR_PTP_DIV32         for 2 banks
- * #define CONFIG_SYS_MPTPR_1BK_2K     MPTPR_PTP_DIV64         for 1 bank
- */
-#define CONFIG_SYS_MPTPR_2BK_4K        MPTPR_PTP_DIV16         /* setting for 2 banks  */
-#define CONFIG_SYS_MPTPR_1BK_4K        MPTPR_PTP_DIV32         /* setting for 1 bank   */
-
-/* refresh rate 7.8 us (= 64 ms / 8K = 31.2 / quad bursts) for 256 MBit                */
-#define CONFIG_SYS_MPTPR_2BK_8K        MPTPR_PTP_DIV8          /* setting for 2 banks  */
-#define CONFIG_SYS_MPTPR_1BK_8K        MPTPR_PTP_DIV16         /* setting for 1 bank   */
-
-/*
- * MAMR settings for SDRAM
- */
-
-/* 8 column SDRAM */
-#define CONFIG_SYS_MAMR_8COL   ((CONFIG_SYS_MAMR_PTA << MAMR_PTA_SHIFT)  | MAMR_PTAE       |   \
-                        MAMR_AMA_TYPE_0 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A11 |   \
-                        MAMR_RLFA_1X    | MAMR_WLFA_1X    | MAMR_TLFA_4X)
-
-/* 9 column SDRAM */
-#define CONFIG_SYS_MAMR_9COL   ((CONFIG_SYS_MAMR_PTA << MAMR_PTA_SHIFT)  | MAMR_PTAE       |   \
-                        MAMR_AMA_TYPE_1 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A10 |   \
-                        MAMR_RLFA_1X    | MAMR_WLFA_1X    | MAMR_TLFA_4X)
-
-#define CONFIG_LAST_STAGE_INIT         /* needed to reset the damn phys */
-
-/***********************************************************************************************************
-
-   Pin definitions:
-
- +------+----------------+--------+------------------------------------------------------------
- |  #   | Name           | Type   | Comment
- +------+----------------+--------+------------------------------------------------------------
- | PA3  | OK_ETH_3V      | Input  | CISCO Ethernet power OK
- |      |                |        | (NetRoute: FEC1, TA: FEC2) (0=power OK)
- | PA6  | P_VCCD1        | Output | TPS2211A PCMCIA
- | PA7  | DCL1_3V        | Periph | IDL1 PCM clock
- | PA8  | DSP_DR1        | Periph | IDL1 PCM Data Rx
- | PA9  | L1TXDA         | Periph | IDL1 PCM Data Tx
- | PA10 | P_VCCD0        | Output | TPS2211A PCMCIA
- | PA12 | P_SHDN         | Output | TPS2211A PCMCIA
- | PA13 | ETH_LOOP       | Output | CISCO Loopback remote power
- |      |                |        | (NetRoute: FEC1, TA: FEC2) (1=NORMAL)
- | PA14 | P_VPPD0        | Output | TPS2211A PCMCIA
- | PA15 | P_VPPD1        | Output | TPS2211A PCMCIA
- | PB14 | SPIEN_FXO      | Output | SPI CS for FXO daughter-board
- | PB15 | SPIEN_S1       | Output | SPI CS for S-interface 1 (NetRoute only)
- | PB16 | DREQ1          | Output | D channel request for S-interface chip 1.
- | PB17 | L1ST3          | Periph | IDL1 timeslot enable signal for PPC
- | PB18 | L1ST2          | Periph | IDL1 timeslot enable signal for PPC
- | PB19 | SPIEN_S2       | Output | SPI CS for S-interface 2 (NetRoute only)
- | PB20 | SPIEN_SEEPROM  | Output | SPI CS for serial eeprom
- | PB21 | LEDIO          | Output | Led mode indication for PHY
- | PB22 | UART_CTS       | Input  | UART CTS
- | PB23 | UART_RTS       | Output | UART RTS
- | PB24 | UART_RX        | Periph | UART Data Rx
- | PB25 | UART_TX        | Periph | UART Data Tx
- | PB26 | RMII-MDC       | Periph | Free for future use (MII mgt clock)
- | PB27 | RMII-MDIO      | Periph | Free for future use (MII mgt data)
- | PB28 | SPI_RXD_3V     | Input  | SPI Data Rx
- | PB29 | SPI_TXD        | Output | SPI Data Tx
- | PB30 | SPI_CLK        | Output | SPI Clock
- | PB31 | RMII1-REFCLK   | Periph | RMII reference clock for FEC1
- | PC4  | PHY1_LINK      | Input  | PHY link state FEC1 (interrupt)
- | PC5  | PHY2_LINK      | Input  | PHY link state FEC2 (interrupt)
- | PC6  | RMII1-MDINT    | Input  | PHY prog interrupt FEC1 (interrupt)
- | PC7  | RMII2-MDINT    | Input  | PHY prog interrupt FEC1 (interrupt)
- | PC8  | P_OC           | Input  | TPS2211A PCMCIA overcurrent (interrupt) (1=OK)
- | PC9  | COM_HOOK1      | Input  | Codec interrupt chip #1 (interrupt)
- | PC10 | COM_HOOK2      | Input  | Codec interrupt chip #2 (interrupt)
- | PC11 | COM_HOOK4      | Input  | Codec interrupt chip #4 (interrupt)
- | PC12 | COM_HOOK3      | Input  | Codec interrupt chip #3 (interrupt)
- | PC13 | F_RY_BY        | Input  | NAND ready signal (interrupt)
- | PC14 | FAN_OK         | Input  | Fan status signal (interrupt) (1=OK)
- | PC15 | PC15_DIRECT0   | Periph | PCMCIA DMA request.
- | PD3  | F_ALE          | Output | NAND
- | PD4  | F_CLE          | Output | NAND
- | PD5  | F_CE           | Output | NAND
- | PD6  | DSP_INT        | Output | DSP debug interrupt
- | PD7  | DSP_RESET      | Output | DSP reset
- | PD8  | RMII_MDC       | Periph | MII mgt clock
- | PD9  | SPIEN_C1       | Output | SPI CS for codec #1
- | PD10 | SPIEN_C2       | Output | SPI CS for codec #2
- | PD11 | SPIEN_C3       | Output | SPI CS for codec #3
- | PD12 | FSC2           | Periph | IDL2 frame sync
- | PD13 | DGRANT2        | Input  | D channel grant from S #2
- | PD14 | SPIEN_C4       | Output | SPI CS for codec #4
- | PD15 | TP700          | Output | Testpoint for software debugging
- | PE14 | RMII2-TXD0     | Periph | FEC2 transmit data
- | PE15 | RMII2-TXD1     | Periph | FEC2 transmit data
- | PE16 | RMII2-REFCLK   | Periph | TA: RMII ref clock for
- |      | DCL2           | Periph | NetRoute: PCM clock #2
- | PE17 | TP703          | Output | Testpoint for software debugging
- | PE18 | DGRANT1        | Input  |  D channel grant from S #1
- | PE19 | RMII2-TXEN     | Periph | TA: FEC2 tx enable
- |      | PCM2OUT        | Periph | NetRoute: Tx data for IDL2
- | PE20 | FSC1           | Periph | IDL1 frame sync
- | PE21 | RMII2-RXD0     | Periph | FEC2 receive data
- | PE22 | RMII2-RXD1     | Periph | FEC2 receive data
- | PE23 | L1ST1          | Periph | IDL1 timeslot enable signal for PPC
- | PE24 | U-N1           | Output | Select user/network for S #1 (0=user)
- | PE25 | U-N2           | Output | Select user/network for S #2 (0=user)
- | PE26 | RMII2-RXDV     | Periph | FEC2 valid
- | PE27 | DREQ2          | Output | D channel request for S #2.
- | PE28 | FPGA_DONE      | Input  | FPGA done signal
- | PE29 | FPGA_INIT      | Output | FPGA init signal
- | PE30 | UDOUT2_3V      | Input  | IDL2 PCM input
- | PE31 |                |        | Free
- +------+----------------+--------+---------------------------------------------------
-
- Chip selects:
-
- +------+----------------+------------------------------------------------------------
- |  #   | Name           | Comment
- +------+----------------+------------------------------------------------------------
- | CS0  | CS0            | Boot flash
- | CS1  | CS_FLASH       | NAND flash
- | CS2  | CS_DSP         | DSP
- | CS3  | DCS_DRAM       | DRAM
- | CS4  | CS_ER1         | External output register
- +------+----------------+------------------------------------------------------------
-
- Interrupts:
-
- +------+----------------+------------------------------------------------------------
- |  #   | Name           | Comment
- +------+----------------+------------------------------------------------------------
- | IRQ1 | UINTER_3V      | S interrupt chips interrupt (common)
- | IRQ3 | IRQ_DSP        | DSP interrupt
- | IRQ4 | IRQ_DSP1       | Extra DSP interrupt
- +------+----------------+------------------------------------------------------------
-
-*************************************************************************************************/
-
-#define DSP_SIZE       0x00010000      /* 64K */
-#define NAND_SIZE      0x00010000      /* 64K */
-#define ER_SIZE                0x00010000      /* 64K */
-#define DUMMY_SIZE     0x00010000      /* 64K */
-
-#define DSP_BASE       0xF1000000
-#define NAND_BASE      0xF1010000
-#define ER_BASE                0xF1020000
-#define DUMMY_BASE     0xF1FF0000
-
-/*****************************************************************************/
-
-#define CONFIG_SYS_DIRECT_FLASH_TFTP
-#define CONFIG_SYS_DIRECT_NAND_TFTP
-
-/*****************************************************************************/
-
-#if 1
-/*-----------------------------------------------------------------------
- * PCMCIA stuff
- *-----------------------------------------------------------------------
- */
-
-#define CONFIG_SYS_PCMCIA_MEM_ADDR     (0xE0000000)
-#define CONFIG_SYS_PCMCIA_MEM_SIZE     ( 64 << 20 )
-#define CONFIG_SYS_PCMCIA_DMA_ADDR     (0xE4000000)
-#define CONFIG_SYS_PCMCIA_DMA_SIZE     ( 64 << 20 )
-#define CONFIG_SYS_PCMCIA_ATTRB_ADDR   (0xE8000000)
-#define CONFIG_SYS_PCMCIA_ATTRB_SIZE   ( 64 << 20 )
-#define CONFIG_SYS_PCMCIA_IO_ADDR      (0xEC000000)
-#define CONFIG_SYS_PCMCIA_IO_SIZE      ( 64 << 20 )
-
-/*-----------------------------------------------------------------------
- * IDE/ATA stuff (Supports IDE harddisk on PCMCIA Adapter)
- *-----------------------------------------------------------------------
- */
-
-#define CONFIG_IDE_PREINIT     1       /* Use preinit IDE hook */
-#define        CONFIG_IDE_8xx_PCCARD   1       /* Use IDE with PC Card Adapter */
-
-#undef CONFIG_IDE_8xx_DIRECT           /* Direct IDE    not supported  */
-#undef CONFIG_IDE_LED                  /* LED   for ide not supported  */
-#undef CONFIG_IDE_RESET                /* reset for ide not supported  */
-
-#define CONFIG_SYS_IDE_MAXBUS          1       /* max. 1 IDE bus               */
-#define CONFIG_SYS_IDE_MAXDEVICE       1       /* max. 1 drive per IDE bus     */
-
-#define CONFIG_SYS_ATA_IDE0_OFFSET     0x0000
-
-#define CONFIG_SYS_ATA_BASE_ADDR       CONFIG_SYS_PCMCIA_MEM_ADDR
-
-/* Offset for data I/O                 */
-#define CONFIG_SYS_ATA_DATA_OFFSET     (CONFIG_SYS_PCMCIA_MEM_SIZE + 0x320)
-
-/* Offset for normal register accesses */
-#define CONFIG_SYS_ATA_REG_OFFSET      (2 * CONFIG_SYS_PCMCIA_MEM_SIZE + 0x320)
-
-/* Offset for alternate registers      */
-#define CONFIG_SYS_ATA_ALT_OFFSET      0x0100
-
-#define CONFIG_MAC_PARTITION
-#define CONFIG_DOS_PARTITION
-#endif
-
-/*************************************************************************************************/
-
-#define CONFIG_CDP_DEVICE_ID           20
-#define CONFIG_CDP_DEVICE_ID_PREFIX    "NT"    /* netta */
-#define CONFIG_CDP_PORT_ID             "eth%d"
-#define CONFIG_CDP_CAPABILITIES                0x00000010
-#define CONFIG_CDP_VERSION             "u-boot 1.0" " " U_BOOT_DATE " " U_BOOT_TIME
-#define CONFIG_CDP_PLATFORM            "Intracom NetTA"
-#define CONFIG_CDP_TRIGGER             0x20020001
-#define CONFIG_CDP_POWER_CONSUMPTION   4300    /* 90 mA @ 48V */
-#define CONFIG_CDP_APPLIANCE_VLAN_TYPE 0x01    /* ipphone? */
-
-/*************************************************************************************************/
-
-#define CONFIG_AUTO_COMPLETE   1
-
-/*************************************************************************************************/
-
-#define CONFIG_CRC32_VERIFY    1
-
-/*************************************************************************************************/
-
-#define CONFIG_HUSH_OLD_PARSER_COMPATIBLE      1
-
-/*************************************************************************************************/
-
-#endif /* __CONFIG_H */
diff --git a/include/configs/NETTA2.h b/include/configs/NETTA2.h
deleted file mode 100644 (file)
index 55ae4b5..0000000
+++ /dev/null
@@ -1,654 +0,0 @@
-/*
- * (C) Copyright 2000-2004
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/*
- * Pantelis Antoniou, Intracom S.A., panto@intracom.gr
- * U-Boot port on NetTA4 board
- */
-
-#ifndef __CONFIG_H
-#define __CONFIG_H
-
-#if !defined(CONFIG_NETTA2_VERSION) || CONFIG_NETTA2_VERSION > 2
-#error Unsupported CONFIG_NETTA2 version
-#endif
-
-/*
- * High Level Configuration Options
- * (easy to change)
- */
-
-#define CONFIG_MPC870          1       /* This is a MPC885 CPU         */
-#define CONFIG_NETTA2          1       /* ...on a NetTA2 board         */
-
-#define        CONFIG_SYS_TEXT_BASE    0x40000000
-
-#define        CONFIG_8xx_CONS_SMC1    1       /* Console is on SMC1           */
-#undef CONFIG_8xx_CONS_SMC2
-#undef CONFIG_8xx_CONS_NONE
-
-#define CONFIG_BAUDRATE                115200  /* console baudrate = 115kbps   */
-
-/* #define CONFIG_XIN           10000000 */
-#define CONFIG_XIN              50000000
-/* #define MPC8XX_HZ           120000000 */
-#define MPC8XX_HZ               66666666
-
-#define CONFIG_8xx_GCLK_FREQ   MPC8XX_HZ
-
-#if 0
-#define CONFIG_BOOTDELAY       -1      /* autoboot disabled            */
-#else
-#define CONFIG_BOOTDELAY       5       /* autoboot after 5 seconds     */
-#endif
-
-#undef CONFIG_CLOCKS_IN_MHZ    /* clocks NOT passsed to Linux in MHz */
-
-#define CONFIG_PREBOOT "echo;"
-
-#undef CONFIG_BOOTARGS
-#define CONFIG_BOOTCOMMAND                                                     \
-       "tftpboot; "                                                            \
-       "setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} "     \
-       "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; "   \
-       "bootm"
-
-#define CONFIG_SOURCE
-#define CONFIG_LOADS_ECHO      0       /* echo off for serial download */
-#undef CONFIG_SYS_LOADS_BAUD_CHANGE            /* don't allow baudrate change  */
-
-#undef CONFIG_WATCHDOG                 /* watchdog disabled            */
-
-#undef CONFIG_CAN_DRIVER               /* CAN Driver support disabled  */
-
-#define        CONFIG_STATUS_LED       1       /* Status LED enabled           */
-#define CONFIG_BOARD_SPECIFIC_LED      /* version has board specific leds */
-
-/*
- * BOOTP options
- */
-#define CONFIG_BOOTP_SUBNETMASK
-#define CONFIG_BOOTP_GATEWAY
-#define CONFIG_BOOTP_HOSTNAME
-#define CONFIG_BOOTP_BOOTPATH
-#define CONFIG_BOOTP_BOOTFILESIZE
-#define CONFIG_BOOTP_NISDOMAIN
-
-
-#undef CONFIG_MAC_PARTITION
-#undef CONFIG_DOS_PARTITION
-
-#define        CONFIG_RTC_MPC8xx               /* use internal RTC of MPC8xx   */
-
-#define        FEC_ENET                1       /* eth.c needs it that way... */
-#undef CONFIG_SYS_DISCOVER_PHY
-#define CONFIG_MII             1
-#define CONFIG_MII_INIT                1
-#define CONFIG_RMII            1       /* use RMII interface */
-
-#define CONFIG_ETHER_ON_FEC1   1
-#define CONFIG_FEC1_PHY                8       /* phy address of FEC */
-#define CONFIG_FEC1_PHY_NORXERR 1
-
-#define CONFIG_ETHER_ON_FEC2   1
-#define CONFIG_FEC2_PHY                4
-#define CONFIG_FEC2_PHY_NORXERR 1
-
-#define CONFIG_ENV_OVERWRITE   1       /* allow modification of vendor params */
-
-
-/*
- * Command line configuration.
- */
-#include <config_cmd_default.h>
-
-#define CONFIG_CMD_DHCP
-#define CONFIG_CMD_PING
-#define CONFIG_CMD_MII
-#define CONFIG_CMD_CDP
-
-
-#define CONFIG_BOARD_EARLY_INIT_F      1
-#define CONFIG_MISC_INIT_R
-
-/*
- * Miscellaneous configurable options
- */
-#define        CONFIG_SYS_LONGHELP                     /* undef to save memory         */
-
-#define CONFIG_SYS_HUSH_PARSER 1
-
-#if defined(CONFIG_CMD_KGDB)
-#define        CONFIG_SYS_CBSIZE       1024            /* Console I/O Buffer Size      */
-#else
-#define        CONFIG_SYS_CBSIZE       256             /* Console I/O Buffer Size      */
-#endif
-#define        CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
-#define        CONFIG_SYS_MAXARGS      16              /* max number of command args   */
-#define CONFIG_SYS_BARGSIZE    CONFIG_SYS_CBSIZE       /* Boot Argument Buffer Size    */
-
-#define CONFIG_SYS_MEMTEST_START       0x0300000       /* memtest works on     */
-#define CONFIG_SYS_MEMTEST_END         0x0700000       /* 3 ... 7 MB in DRAM   */
-
-#define        CONFIG_SYS_LOAD_ADDR            0x100000        /* default load address */
-
-/*
- * Low Level Configuration Settings
- * (address mappings, register initial values, etc.)
- * You should know what you are doing if you make changes here.
- */
-/*-----------------------------------------------------------------------
- * Internal Memory Mapped Register
- */
-#define CONFIG_SYS_IMMR                0xFF000000
-
-/*-----------------------------------------------------------------------
- * Definitions for initial stack pointer and data area (in DPRAM)
- */
-#define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_SIZE        0x3000  /* Size of used area in DPRAM   */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
-#define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
-
-/*-----------------------------------------------------------------------
- * Start addresses for the final memory configuration
- * (Set up by the startup code)
- * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0
- */
-#define        CONFIG_SYS_SDRAM_BASE           0x00000000
-#define CONFIG_SYS_FLASH_BASE          0x40000000
-#if defined(DEBUG)
-#define        CONFIG_SYS_MONITOR_LEN          (256 << 10)     /* Reserve 256 kB for Monitor   */
-#else
-#define        CONFIG_SYS_MONITOR_LEN          (192 << 10)     /* Reserve 192 kB for Monitor   */
-#endif
-#define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_FLASH_BASE
-#define        CONFIG_SYS_MALLOC_LEN           (128 << 10)     /* Reserve 128 kB for malloc()  */
-#if CONFIG_NETTA2_VERSION == 2
-#define CONFIG_SYS_FLASH_BASE4         0x40080000
-#endif
-
-#define CONFIG_SYS_RESET_ADDRESS   0x80000000
-
-/*
- * For booting Linux, the board info and command line data
- * have to be in the first 8 MB of memory, since this is
- * the maximum mapped by the Linux kernel during initialization.
- */
-#define        CONFIG_SYS_BOOTMAPSZ            (8 << 20)       /* Initial Memory map for Linux */
-
-/*-----------------------------------------------------------------------
- * FLASH organization
- */
-#if CONFIG_NETTA2_VERSION == 1
-#define CONFIG_SYS_MAX_FLASH_BANKS     1       /* max number of memory banks           */
-#elif CONFIG_NETTA2_VERSION == 2
-#define CONFIG_SYS_MAX_FLASH_BANKS     2       /* max number of memory banks           */
-#endif
-#define CONFIG_SYS_MAX_FLASH_SECT      8       /* max number of sectors on one chip    */
-
-#define CONFIG_SYS_FLASH_ERASE_TOUT    120000  /* Timeout for Flash Erase (in ms)      */
-#define CONFIG_SYS_FLASH_WRITE_TOUT    500     /* Timeout for Flash Write (in ms)      */
-
-#define        CONFIG_ENV_IS_IN_FLASH  1
-#define CONFIG_ENV_SECT_SIZE   0x10000
-
-#define        CONFIG_ENV_ADDR         (CONFIG_SYS_FLASH_BASE + 0x60000)
-#define CONFIG_ENV_OFFSET              0
-#define        CONFIG_ENV_SIZE         0x4000
-
-#define CONFIG_ENV_ADDR_REDUND (CONFIG_SYS_FLASH_BASE + 0x70000)
-#define CONFIG_ENV_OFFSET_REDUND       0
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
-
-/*-----------------------------------------------------------------------
- * Cache Configuration
- */
-#define CONFIG_SYS_CACHELINE_SIZE      16      /* For all MPC8xx CPUs                  */
-#if defined(CONFIG_CMD_KGDB)
-#define CONFIG_SYS_CACHELINE_SHIFT     4       /* log base 2 of the above value        */
-#endif
-
-/*-----------------------------------------------------------------------
- * SYPCR - System Protection Control                           11-9
- * SYPCR can only be written once after reset!
- *-----------------------------------------------------------------------
- * Software & Bus Monitor Timer max, Bus Monitor enable, SW Watchdog freeze
- */
-#if defined(CONFIG_WATCHDOG)
-#define CONFIG_SYS_SYPCR       (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | \
-                        SYPCR_SWE  | SYPCR_SWRI| SYPCR_SWP)
-#else
-#define CONFIG_SYS_SYPCR       (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | SYPCR_SWP)
-#endif
-
-/*-----------------------------------------------------------------------
- * SIUMCR - SIU Module Configuration                           11-6
- *-----------------------------------------------------------------------
- * PCMCIA config., multi-function pin tri-state
- */
-#ifndef        CONFIG_CAN_DRIVER
-#define CONFIG_SYS_SIUMCR      (SIUMCR_DBGC00 | SIUMCR_DBPC00 | SIUMCR_MLRC01 | SIUMCR_FRC)
-#else  /* we must activate GPL5 in the SIUMCR for CAN */
-#define CONFIG_SYS_SIUMCR      (SIUMCR_DBGC11 | SIUMCR_DBPC00 | SIUMCR_MLRC01 | SIUMCR_FRC)
-#endif /* CONFIG_CAN_DRIVER */
-
-/*-----------------------------------------------------------------------
- * TBSCR - Time Base Status and Control                                11-26
- *-----------------------------------------------------------------------
- * Clear Reference Interrupt Status, Timebase freezing enabled
- */
-#define CONFIG_SYS_TBSCR       (TBSCR_REFA | TBSCR_REFB | TBSCR_TBF)
-
-/*-----------------------------------------------------------------------
- * RTCSC - Real-Time Clock Status and Control Register         11-27
- *-----------------------------------------------------------------------
- */
-#define CONFIG_SYS_RTCSC       (RTCSC_SEC | RTCSC_ALR | RTCSC_RTF| RTCSC_RTE)
-
-/*-----------------------------------------------------------------------
- * PISCR - Periodic Interrupt Status and Control               11-31
- *-----------------------------------------------------------------------
- * Clear Periodic Interrupt Status, Interrupt Timer freezing enabled
- */
-#define CONFIG_SYS_PISCR       (PISCR_PS | PISCR_PITF)
-
-/*-----------------------------------------------------------------------
- * PLPRCR - PLL, Low-Power, and Reset Control Register         15-30
- *-----------------------------------------------------------------------
- * Reset PLL lock status sticky bit, timer expired status bit and timer
- * interrupt status bit
- *
- */
-
-#if CONFIG_XIN == 10000000
-
-#if MPC8XX_HZ == 120000000
-#define CONFIG_SYS_PLPRCR      ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
-                        (0 << PLPRCR_S_SHIFT) | (12 << PLPRCR_MFI_SHIFT) | (0 << PLPRCR_PDF_SHIFT) | \
-                        PLPRCR_TEXPS)
-#elif MPC8XX_HZ == 100000000
-#define CONFIG_SYS_PLPRCR      ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
-                        (0 << PLPRCR_S_SHIFT) | (10 << PLPRCR_MFI_SHIFT) | (0 << PLPRCR_PDF_SHIFT) | \
-                        PLPRCR_TEXPS)
-#elif MPC8XX_HZ == 50000000
-#define CONFIG_SYS_PLPRCR      ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
-                        (1 << PLPRCR_S_SHIFT) | (8 << PLPRCR_MFI_SHIFT) | (3 << PLPRCR_PDF_SHIFT) | \
-                        PLPRCR_TEXPS)
-#elif MPC8XX_HZ == 25000000
-#define CONFIG_SYS_PLPRCR      ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
-                        (2 << PLPRCR_S_SHIFT) | (8 << PLPRCR_MFI_SHIFT) | (3 << PLPRCR_PDF_SHIFT) | \
-                        PLPRCR_TEXPS)
-#elif MPC8XX_HZ == 40000000
-#define CONFIG_SYS_PLPRCR      ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
-                        (1 << PLPRCR_S_SHIFT) | (8 << PLPRCR_MFI_SHIFT) | (4 << PLPRCR_PDF_SHIFT) | \
-                        PLPRCR_TEXPS)
-#elif MPC8XX_HZ == 75000000
-#define CONFIG_SYS_PLPRCR      ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
-                        (1 << PLPRCR_S_SHIFT) | (15 << PLPRCR_MFI_SHIFT) | (0 << PLPRCR_PDF_SHIFT) | \
-                        PLPRCR_TEXPS)
-#else
-#error unsupported CPU freq for XIN = 10MHz
-#endif
-
-#elif CONFIG_XIN == 50000000
-
-#if MPC8XX_HZ == 120000000
-#define CONFIG_SYS_PLPRCR      ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
-                        (0 << PLPRCR_S_SHIFT) | (12 << PLPRCR_MFI_SHIFT) | (4 << PLPRCR_PDF_SHIFT) | \
-                        PLPRCR_TEXPS)
-#elif MPC8XX_HZ == 100000000
-#define CONFIG_SYS_PLPRCR      ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
-                        (0 << PLPRCR_S_SHIFT) | (6 << PLPRCR_MFI_SHIFT) | (2 << PLPRCR_PDF_SHIFT) | \
-                        PLPRCR_TEXPS)
-#elif MPC8XX_HZ ==  66666666
-#define CONFIG_SYS_PLPRCR      ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
-                        (1 << PLPRCR_S_SHIFT) | (8 << PLPRCR_MFI_SHIFT) | (2 << PLPRCR_PDF_SHIFT) | \
-                        PLPRCR_TEXPS)
-#else
-#error unsupported CPU freq for XIN = 50MHz
-#endif
-
-#else
-
-#error unsupported XIN freq
-#endif
-
-
-/*
- *-----------------------------------------------------------------------
- * SCCR - System Clock and reset Control Register              15-27
- *-----------------------------------------------------------------------
- * Set clock output, timebase and RTC source and divider,
- * power management and some other internal clocks
- *
- * Note: When TBS == 0 the timebase is independent of current cpu clock.
- */
-
-#define SCCR_MASK      SCCR_EBDF11
-#if MPC8XX_HZ > 66666666
-#define CONFIG_SYS_SCCR        (/* SCCR_TBS     | */ SCCR_CRQEN | \
-                        SCCR_COM00   | SCCR_DFSYNC00 | SCCR_DFBRG00  | \
-                        SCCR_DFNL000 | SCCR_DFNH000  | SCCR_DFLCD000 | \
-                        SCCR_DFALCD00 | SCCR_EBDF01)
-#else
-#define CONFIG_SYS_SCCR        (/* SCCR_TBS     | */ SCCR_CRQEN | \
-                        SCCR_COM00   | SCCR_DFSYNC00 | SCCR_DFBRG00  | \
-                        SCCR_DFNL000 | SCCR_DFNH000  | SCCR_DFLCD000 | \
-                        SCCR_DFALCD00)
-#endif
-
-/*-----------------------------------------------------------------------
- *
- *-----------------------------------------------------------------------
- *
- */
-/*#define      CONFIG_SYS_DER  0x2002000F*/
-#define CONFIG_SYS_DER 0
-
-/*
- * Init Memory Controller:
- *
- * BR0/1 and OR0/1 (FLASH)
- */
-
-#define FLASH_BASE0_PRELIM     0x40000000      /* FLASH bank #0        */
-
-/* used to re-map FLASH both when starting from SRAM or FLASH:
- * restrict access enough to keep SRAM working (if any)
- * but not too much to meddle with FLASH accesses
- */
-#define CONFIG_SYS_REMAP_OR_AM         0x80000000      /* OR addr mask */
-#define CONFIG_SYS_PRELIM_OR_AM        0xE0000000      /* OR addr mask */
-
-/* FLASH timing: ACS = 11, TRLX = 0, CSNT = 1, SCY = 5, EHTR = 1       */
-#define CONFIG_SYS_OR_TIMING_FLASH     (OR_CSNT_SAM  | OR_BI | OR_SCY_5_CLK | OR_TRLX)
-
-#define CONFIG_SYS_OR0_REMAP   (CONFIG_SYS_REMAP_OR_AM  | CONFIG_SYS_OR_TIMING_FLASH)
-#define CONFIG_SYS_OR0_PRELIM  (CONFIG_SYS_PRELIM_OR_AM | CONFIG_SYS_OR_TIMING_FLASH)
-#define CONFIG_SYS_BR0_PRELIM  ((FLASH_BASE0_PRELIM & BR_BA_MSK) | BR_PS_8 | BR_V )
-
-#if CONFIG_NETTA2_VERSION == 2
-
-#define FLASH_BASE4_PRELIM     0x40080000      /* FLASH bank #1        */
-
-#define CONFIG_SYS_OR4_REMAP   (CONFIG_SYS_REMAP_OR_AM  | CONFIG_SYS_OR_TIMING_FLASH)
-#define CONFIG_SYS_OR4_PRELIM  (CONFIG_SYS_PRELIM_OR_AM | CONFIG_SYS_OR_TIMING_FLASH)
-#define CONFIG_SYS_BR4_PRELIM  ((FLASH_BASE4_PRELIM & BR_BA_MSK) | BR_PS_8 | BR_V )
-
-#endif
-
-/*
- * BR3 and OR3 (SDRAM)
- *
- */
-#define SDRAM_BASE3_PRELIM     0x00000000      /* SDRAM bank #0        */
-#define        SDRAM_MAX_SIZE          (256 << 20)     /* max 256MB per bank   */
-
-/* SDRAM timing: Multiplexed addresses, GPL5 output to GPL5_A (don't care)     */
-#define CONFIG_SYS_OR_TIMING_SDRAM     (OR_CSNT_SAM | OR_G5LS)
-
-#define CONFIG_SYS_OR3_PRELIM  ((0xFFFFFFFFLU & ~(SDRAM_MAX_SIZE - 1)) | CONFIG_SYS_OR_TIMING_SDRAM)
-#define CONFIG_SYS_BR3_PRELIM  ((SDRAM_BASE3_PRELIM & BR_BA_MSK) | BR_MS_UPMB | BR_PS_32 | BR_V)
-
-/*
- * Memory Periodic Timer Prescaler
- */
-
-/*
- * Memory Periodic Timer Prescaler
- *
- * The Divider for PTA (refresh timer) configuration is based on an
- * example SDRAM configuration (64 MBit, one bank). The adjustment to
- * the number of chip selects (NCS) and the actually needed refresh
- * rate is done by setting MPTPR.
- *
- * PTA is calculated from
- *     PTA = (gclk * Trefresh) / ((2 ^ (2 * DFBRG)) * PTP * NCS)
- *
- *     gclk      CPU clock (not bus clock!)
- *     Trefresh  Refresh cycle * 4 (four word bursts used)
- *
- * 4096  Rows from SDRAM example configuration
- * 1000  factor s -> ms
- *   32  PTP (pre-divider from MPTPR) from SDRAM example configuration
- *    4  Number of refresh cycles per period
- *   64  Refresh cycle in ms per number of rows
- * --------------------------------------------
- * Divider = 4096 * 32 * 1000 / (4 * 64) = 512000
- *
- * 50 MHz => 50.000.000 / Divider =  98
- * 66 Mhz => 66.000.000 / Divider = 129
- * 80 Mhz => 80.000.000 / Divider = 156
- */
-
-#define CONFIG_SYS_MAMR_PTA             234
-
-/*
- * For 16 MBit, refresh rates could be 31.3 us
- * (= 64 ms / 2K = 125 / quad bursts).
- * For a simpler initialization, 15.6 us is used instead.
- *
- * #define CONFIG_SYS_MPTPR_2BK_2K     MPTPR_PTP_DIV32         for 2 banks
- * #define CONFIG_SYS_MPTPR_1BK_2K     MPTPR_PTP_DIV64         for 1 bank
- */
-#define CONFIG_SYS_MPTPR_2BK_4K        MPTPR_PTP_DIV16         /* setting for 2 banks  */
-#define CONFIG_SYS_MPTPR_1BK_4K        MPTPR_PTP_DIV32         /* setting for 1 bank   */
-
-/* refresh rate 7.8 us (= 64 ms / 8K = 31.2 / quad bursts) for 256 MBit                */
-#define CONFIG_SYS_MPTPR_2BK_8K        MPTPR_PTP_DIV8          /* setting for 2 banks  */
-#define CONFIG_SYS_MPTPR_1BK_8K        MPTPR_PTP_DIV16         /* setting for 1 bank   */
-
-/*
- * MAMR settings for SDRAM
- */
-
-/* 8 column SDRAM */
-#define CONFIG_SYS_MAMR_8COL   ((CONFIG_SYS_MAMR_PTA << MAMR_PTA_SHIFT)  | MAMR_PTAE       |   \
-                        MAMR_AMA_TYPE_0 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A11 |   \
-                        MAMR_RLFA_1X    | MAMR_WLFA_1X    | MAMR_TLFA_4X)
-
-/* 9 column SDRAM */
-#define CONFIG_SYS_MAMR_9COL   ((CONFIG_SYS_MAMR_PTA << MAMR_PTA_SHIFT)  | MAMR_PTAE       |   \
-                        MAMR_AMA_TYPE_1 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A10 |   \
-                        MAMR_RLFA_1X    | MAMR_WLFA_1X    | MAMR_TLFA_4X)
-
-#define CONFIG_LAST_STAGE_INIT         /* needed to reset the damn phys */
-
-/****************************************************************/
-
-#define DSP_SIZE       0x00010000      /* 64K */
-#define NAND_SIZE      0x00010000      /* 64K */
-
-#define DSP_BASE       0xF1000000
-#define NAND_BASE      0xF1010000
-
-/*****************************************************************************/
-
-#define CONFIG_SYS_DIRECT_FLASH_TFTP
-
-/*****************************************************************************/
-
-#if CONFIG_NETTA2_VERSION == 1
-#define STATUS_LED_BIT         0x00000008              /* bit 28 */
-#elif CONFIG_NETTA2_VERSION == 2
-#define STATUS_LED_BIT         0x00000080              /* bit 24 */
-#endif
-
-#define STATUS_LED_PERIOD      (CONFIG_SYS_HZ / 2)
-#define STATUS_LED_STATE       STATUS_LED_BLINKING
-
-#define STATUS_LED_ACTIVE      0               /* LED on for bit == 0  */
-#define STATUS_LED_BOOT                0               /* LED 0 used for boot status */
-
-#ifndef __ASSEMBLY__
-
-/* LEDs */
-
-/* led_id_t is unsigned int mask */
-typedef unsigned int led_id_t;
-
-#define __led_toggle(_msk) \
-       do { \
-               ((volatile immap_t *)CONFIG_SYS_IMMR)->im_cpm.cp_pedat ^= (_msk); \
-       } while(0)
-
-#define __led_set(_msk, _st) \
-       do { \
-               if ((_st)) \
-                       ((volatile immap_t *)CONFIG_SYS_IMMR)->im_cpm.cp_pedat |= (_msk); \
-               else \
-                       ((volatile immap_t *)CONFIG_SYS_IMMR)->im_cpm.cp_pedat &= ~(_msk); \
-       } while(0)
-
-#define __led_init(msk, st) __led_set(msk, st)
-
-#endif
-
-/***********************************************************************************************************
-
- ----------------------------------------------------------------------------------------------
-
-   (V1) version 1 of the board
-   (V2) version 2 of the board
-
- ----------------------------------------------------------------------------------------------
-
-   Pin definitions:
-
- +------+----------------+--------+------------------------------------------------------------
- |  #   | Name           | Type   | Comment
- +------+----------------+--------+------------------------------------------------------------
- | PA3  | SPIEN_MAX      | Output | MAX serial to uart chip select
- | PA7  | DSP_INT        | Output | DSP interrupt
- | PA10 | DSP_RESET      | Output | DSP reset
- | PA14 | USBOE          | Output | USB (1)
- | PA15 | USBRXD         | Output | USB (1)
- | PB19 | BT_RTS         | Output | Bluetooth (0)
- | PB23 | BT_CTS         | Output | Bluetooth (0)
- | PB26 | SPIEN_SEP      | Output | Serial EEPROM chip select
- | PB27 | SPICS_DISP     | Output | Display chip select
- | PB28 | SPI_RXD_3V     | Input  | SPI Data Rx
- | PB29 | SPI_TXD        | Output | SPI Data Tx
- | PB30 | SPI_CLK        | Output | SPI Clock
- | PC10 | DISPA0         | Output | Display A0
- | PC11 | BACKLIGHT      | Output | Display backlit
- | PC12 | SPI2RXD        | Input  | (V1) 2nd SPI RXD
- |      | IO_RESET       | Output | (V2) General I/O reset
- | PC13 | SPI2TXD        | Output | (V1) 2nd SPI TXD (V1)
- |      | HOOK           | Input  | (V2) Hook input interrupt
- | PC15 | SPI2CLK        | Output | (V1) 2nd SPI CLK
- |      | F_RY_BY        | Input  | (V2) NAND F_RY_BY
- | PE17 | F_ALE          | Output | NAND F_ALE
- | PE18 | F_CLE          | Output | NAND F_CLE
- | PE20 | F_CE           | Output | NAND F_CE
- | PE24 | SPICS_SCOUT    | Output | (V1) Codec chip select
- |      | LED            | Output | (V2) LED
- | PE27 | SPICS_ER       | Output | External serial register CS
- | PE28 | LEDIO1         | Output | (V1) LED
- |      | BKBR1          | Input  | (V2) Keyboard input scan
- | PE29 | LEDIO2         | Output | (V1) LED hook for A (TA2)
- |      | BKBR2          | Input  | (V2) Keyboard input scan
- | PE30 | LEDIO3         | Output | (V1) LED hook for A (TA2)
- |      | BKBR3          | Input  | (V2) Keyboard input scan
- | PE31 | F_RY_BY        | Input  | (V1) NAND F_RY_BY
- |      | BKBR4          | Input  | (V2) Keyboard input scan
- +------+----------------+--------+---------------------------------------------------
-
- ----------------------------------------------------------------------------------------------
-
-   Serial register input:
-
- +------+----------------+------------------------------------------------------------
- |  #   | Name           | Comment
- +------+----------------+------------------------------------------------------------
- |    4 | HOOK           | Hook switch
- |    5 | BT_LINK        | Bluetooth link status
- |    6 | HOST_WAKE      | Bluetooth host wake up
- |    7 | OK_ETH         | Cisco inline power OK status
- +------+----------------+------------------------------------------------------------
-
- ----------------------------------------------------------------------------------------------
-
- Chip selects:
-
- +------+----------------+------------------------------------------------------------
- |  #   | Name           | Comment
- +------+----------------+------------------------------------------------------------
- | CS0  | CS0            | Boot flash
- | CS1  | CS_FLASH       | NAND flash
- | CS2  | CS_DSP         | DSP
- | CS3  | DCS_DRAM       | DRAM
- | CS4  | CS_FLASH2      | (V2) 2nd flash
- +------+----------------+------------------------------------------------------------
-
- ----------------------------------------------------------------------------------------------
-
- Interrupts:
-
- +------+----------------+------------------------------------------------------------
- |  #   | Name           | Comment
- +------+----------------+------------------------------------------------------------
- | IRQ1 | IRQ_DSP        | DSP interrupt
- | IRQ3 | S_INTER        | DUSLIC ???
- | IRQ4 | F_RY_BY        | NAND
- | IRQ7 | IRQ_MAX        | MAX 3100 interrupt
- +------+----------------+------------------------------------------------------------
-
- ----------------------------------------------------------------------------------------------
-
- Interrupts on PCMCIA pins:
-
- +------+----------------+------------------------------------------------------------
- |  #   | Name           | Comment
- +------+----------------+------------------------------------------------------------
- | IP_A0| PHY1_LINK      | Link status changed for #1 Ethernet interface
- | IP_A1| PHY2_LINK      | Link status changed for #2 Ethernet interface
- | IP_A2| RMII1_MDINT    | PHY interrupt for #1
- | IP_A3| RMII2_MDINT    | PHY interrupt for #2
- | IP_A5| HOST_WAKE      | (V2) Bluetooth host wake
- | IP_A6| OK_ETH         | (V2) Cisco inline power OK
- +------+----------------+------------------------------------------------------------
-
-**************************************************************************************************/
-
-#define CONFIG_SYS_CONSOLE_IS_IN_ENV           1
-#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE   1
-#define CONFIG_SYS_CONSOLE_ENV_OVERWRITE       1
-
-/*************************************************************************************************/
-
-/* use board specific hardware */
-#undef CONFIG_WATCHDOG                 /* watchdog disabled            */
-#define CONFIG_HW_WATCHDOG
-
-/*************************************************************************************************/
-
-#define CONFIG_CDP_DEVICE_ID           20
-#define CONFIG_CDP_DEVICE_ID_PREFIX    "NT"    /* netta2 */
-#define CONFIG_CDP_PORT_ID             "eth%d"
-#define CONFIG_CDP_CAPABILITIES                0x00000010
-#define CONFIG_CDP_VERSION             "u-boot" " " U_BOOT_DATE " " U_BOOT_TIME
-#define CONFIG_CDP_PLATFORM            "Intracom NetTA2"
-#define CONFIG_CDP_TRIGGER             0x20020001
-#define CONFIG_CDP_POWER_CONSUMPTION   4300    /* 90 mA @ 48V */
-#define CONFIG_CDP_APPLIANCE_VLAN_TYPE 0x01    /* ipphone ? */
-
-/*************************************************************************************************/
-
-#define CONFIG_AUTO_COMPLETE   1
-
-/*************************************************************************************************/
-
-#define CONFIG_CRC32_VERIFY    1
-
-/*************************************************************************************************/
-
-#define CONFIG_HUSH_OLD_PARSER_COMPATIBLE      1
-
-/*************************************************************************************************/
-#endif /* __CONFIG_H */
diff --git a/include/configs/QS823.h b/include/configs/QS823.h
deleted file mode 100644 (file)
index 6733460..0000000
+++ /dev/null
@@ -1,551 +0,0 @@
-/*
- * (C) Copyright 2003
- * MuLogic B.V.
- *
- * (C) Copyright 2002
- * Simple Network Magic Corporation
- *
- * (C) Copyright 2000
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/*
- * board/config.h - configuration options, board specific
- */
-
-#ifndef __CONFIG_H
-#define __CONFIG_H
-
-/* various debug settings */
-#undef CONFIG_SYS_DEVICE_NULLDEV               /* null device */
-#undef CONFIG_SILENT_CONSOLE           /* silent console */
-#undef CONFIG_SYS_CONSOLE_INFO_QUIET           /* silent console ? */
-#undef DEBUG_FLASH                     /* debug flash code */
-#undef FLASH_DEBUG                     /* debug fash code */
-#undef DEBUG_ENV                       /* debug environment code */
-
-#define CONFIG_SYS_DIRECT_FLASH_TFTP   1       /* allow direct tftp to flash */
-#define CONFIG_ENV_OVERWRITE   1       /* allow overwrite MAC address */
-
-/*
- * High Level Configuration Options
- * (easy to change)
- */
-#define CONFIG_MPC823          1       /* This is a MPC823 CPU */
-#define CONFIG_QS823           1       /* ...on a QS823 module */
-#define CONFIG_SCC2_ENET       1       /* SCC2 10BaseT ethernet */
-
-#define        CONFIG_SYS_TEXT_BASE    0xFFF00000
-
-/* Select the target clock speed */
-#undef CONFIG_CLOCK_16MHZ              /* cpu=16,777,216 Hz, mem=16Mhz */
-#undef CONFIG_CLOCK_33MHZ              /* cpu=33,554,432 Hz, mem=33Mhz */
-#undef CONFIG_CLOCK_50MHZ              /* cpu=49,971,200 Hz, mem=33Mhz */
-#define CONFIG_CLOCK_66MHZ     1       /* cpu=67,108,864 Hz, mem=66Mhz */
-#undef CONFIG_CLOCK_80MHZ              /* cpu=79,986,688 Hz, mem=33Mhz */
-
-#ifdef CONFIG_CLOCK_16MHZ
-#define CONFIG_CLOCK_MULT      512
-#endif
-
-#ifdef CONFIG_CLOCK_33MHZ
-#define CONFIG_CLOCK_MULT      1024
-#endif
-
-#ifdef CONFIG_CLOCK_50MHZ
-#define CONFIG_CLOCK_MULT      1525
-#endif
-
-#ifdef CONFIG_CLOCK_66MHZ
-#define CONFIG_CLOCK_MULT      2048
-#endif
-
-#ifdef CONFIG_CLOCK_80MHZ
-#define CONFIG_CLOCK_MULT      2441
-#endif
-
-/* choose flash size, 4Mb or 8Mb */
-#define CONFIG_FLASH_4MB       1       /* board has 4Mb flash */
-#undef CONFIG_FLASH_8MB                        /* board has 8Mb flash */
-
-#define CONFIG_CLOCK_BASE      32768   /* Base clock input freq */
-
-#undef CONFIG_8xx_CONS_SMC1
-#define CONFIG_8xx_CONS_SMC2   1       /* Console is on SMC2 */
-#undef CONFIG_8xx_CONS_NONE
-
-#define CONFIG_BAUDRATE                38400   /* console baudrate = 38.4kbps */
-
-#undef CONFIG_CLOCKS_IN_MHZ            /* clocks passsed to Linux in MHz */
-
-/* Define default IP addresses */
-#define CONFIG_IPADDR          192.168.1.99    /* own ip address */
-#define CONFIG_SERVERIP                192.168.1.19    /* used for tftp (not nfs?) */
-
-/* message to say directly after booting */
-#define CONFIG_PREBOOT         "echo '';" \
-       "echo 'type:';" \
-       "echo 'run boot_nfs       to boot to NFS';" \
-       "echo 'run boot_flash     to boot to flash';" \
-       "echo '';" \
-       "echo 'run flash_rootfs   to install a new rootfs';" \
-       "echo 'run flash_env      to clear the env sector';" \
-       "echo 'run flash_rw       to clear the rw fs';" \
-       "echo 'run flash_uboot    to install a new u-boot';" \
-       "echo 'run flash_kernel   to install a new kernel';"
-
-/* wait 5 seconds before executing CONFIG_BOOTCOMMAND */
-#define CONFIG_BOOTDELAY       5
-#define CONFIG_BOOTCOMMAND     "run boot_nfs"
-
-#undef CONFIG_BOOTARGS         /* made by set_nfs of set_flash */
-
-/* Our flash filesystem looks like this
- *
- * 4Mb board:
- * ffc0 0000 - ffeb ffff       root filesystem (jffs2) (~3Mb)
- * ffec 0000 - ffed ffff       read-write filesystem (ext2)
- * ffee 0000 - ffef ffff       environment
- * fff0 0000 - fff1 ffff       u-boot
- * fff2 0000 - ffff ffff       linux kernel
- *
- * 8Mb board:
- * ff80 0000 - ffeb ffff       root filesystem (jffs2) (~7Mb)
- * ffec 0000 - ffed ffff       read-write filesystem (ext2)
- * ffee 0000 - ffef ffff       environment
- * fff0 0000 - fff1 ffff       u-boot
- * fff2 0000 - ffff ffff       linux kernel
- *
- */
-
-/* environment for 4Mb board */
-#ifdef CONFIG_FLASH_4MB
-#define CONFIG_EXTRA_ENV_SETTINGS \
-       "serial#=QS823\0" \
-       "hostname=qs823\0" \
-       "netdev=eth0\0" \
-       "ethaddr=00:01:02:B4:36:56\0" \
-       "rootpath=/exports/rootfs\0" \
-       "mtdparts=mtdparts=phys:2816k(root),128k(rw),128k(env),128k(u-boot),-(kernel)\0" \
-       /* fill in variables */ \
-       "set_ip=setenv ip ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off\0" \
-       "set_nfs=setenv bootargs root=/dev/nfs rw nfsroot=$serverip:$rootpath $ip init=/sbin/init $mtdparts\0" \
-       "set_flash=setenv bootargs root=/dev/mtdblock1 ro $ip init=/sbin/init $mtdparts\0" \
-       /* commands */ \
-       "boot_nfs=run set_ip; run set_nfs; tftp 0x400000 /tftpboot/vmlinux.UBoot; bootm 0x400000\0" \
-       "boot_flash=run set_ip; run set_flash; bootm fff20000\0" \
-       /* reinstall flash parts */ \
-       "flash_rootfs=protect off ffc00000 ffebffff; era ffc00000 ffebffff; tftp ffc00000 /tftpboot/rootfs.jffs2\0" \
-       "flash_rw=protect off ffec0000 ffedffff; era ffec0000 ffedffff\0" \
-       "flash_env=protect off ffee0000 ffefffff; era ffee0000 ffefffff\0" \
-       "flash_uboot=protect off fff00000 fff1ffff; era fff00000 fff1ffff; tftp fff00000 /tftpboot/u-boot.4mb.bin\0" \
-       "flash_kernel=protect off fff20000 ffffffff; era fff20000 ffffffff; tftp fff20000 /tftpboot/vmlinux.UBoot\0"
-#endif /* CONFIG_FLASH_4MB */
-
-/* environment for 8Mb board */
-#ifdef CONFIG_FLASH_8MB
-#define CONFIG_EXTRA_ENV_SETTINGS \
-       "serial#=QS823\0" \
-       "hostname=qs823\0" \
-       "netdev=eth0\0" \
-       "ethaddr=00:01:02:B4:36:56\0" \
-       "rootpath=/exports/rootfs\0" \
-       "mtdparts=mtdparts=phys:6912k(root),128k(rw),128k(env),128k(u-boot),-(kernel)\0" \
-       /* fill in variables */ \
-       "set_ip=setenv ip ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off\0" \
-       "set_nfs=setenv bootargs root=/dev/nfs rw nfsroot=$serverip:$rootpath $ip init=/sbin/init $mtdparts\0" \
-       "set_flash=setenv bootargs root=/dev/mtdblock1 ro $ip init=/sbin/init $mtdparts\0" \
-       /* commands */ \
-       "boot_nfs=run set_ip; run set_nfs; tftp 0x400000 /tftpboot/vmlinux.UBoot; bootm 0x400000\0" \
-       "boot_flash=run set_ip; run set_flash; bootm fff20000\0" \
-       /* reinstall flash parts */ \
-       "flash_rootfs=protect off ff800000 ffebffff; era ff800000 ffebffff; tftp ff800000 /tftpboot/rootfs.jffs2\0" \
-       "flash_rw=protect off ffec0000 ffedffff; era ffec0000 ffedffff\0" \
-       "flash_env=protect off ffee0000 ffefffff; era ffee0000 ffefffff\0" \
-       "flash_uboot=protect off fff00000 fff1ffff; era fff00000 fff1ffff; tftp fff00000 /tftpboot/u-boot.8mb.bin\0" \
-       "flash_kernel=protect off fff20000 ffffffff; era fff20000 ffffffff; tftp fff20000 /tftpboot/vmlinux.UBoot\0"
-#endif /* CONFIG_FLASH_8MB */
-
-#define CONFIG_LOADS_ECHO      1       /* echo on for serial download */
-#undef CONFIG_SYS_LOADS_BAUD_CHANGE            /* don't allow baudrate change */
-#undef CONFIG_WATCHDOG                 /* watchdog disabled */
-#undef CONFIG_STATUS_LED               /* Status LED disabled */
-#undef CONFIG_CAN_DRIVER               /* CAN Driver support disabled */
-
-/*
- * BOOTP options
- */
-#define CONFIG_BOOTP_SUBNETMASK
-#define CONFIG_BOOTP_GATEWAY
-#define CONFIG_BOOTP_HOSTNAME
-#define CONFIG_BOOTP_BOOTPATH
-#define CONFIG_BOOTP_BOOTFILESIZE
-
-
-#undef CONFIG_MAC_PARTITION
-#undef CONFIG_DOS_PARTITION
-
-#define CONFIG_RTC_MPC8xx      /* use internal RTC of MPC8xx */
-
-
-/*
- * Command line configuration.
- */
-#define CONFIG_CMD_BDI
-#define CONFIG_CMD_BOOTD
-#define CONFIG_CMD_CONSOLE
-#define CONFIG_CMD_DATE
-#define CONFIG_CMD_SAVEENV
-#define CONFIG_CMD_FLASH
-#define CONFIG_CMD_IMI
-#define CONFIG_CMD_IMMAP
-#define CONFIG_CMD_MEMORY
-#define CONFIG_CMD_NET
-#define CONFIG_CMD_RUN
-
-
-/*-----------------------------------------------------------------------
- * Environment variable storage is in FLASH, one sector before U-boot
- */
-#define CONFIG_ENV_IS_IN_FLASH 1
-#define CONFIG_ENV_SECT_SIZE   0x20000         /* 128Kb, one whole sector */
-#define CONFIG_ENV_SIZE                0x2000          /* 8kb */
-#define CONFIG_ENV_ADDR                0xffee0000      /* address of env sector */
-
-/*-----------------------------------------------------------------------
- * Miscellaneous configurable options
- */
-#define CONFIG_SYS_LONGHELP                            /* undef to save memory */
-
-#define CONFIG_SYS_HUSH_PARSER         1               /* use "hush" command parser */
-
-#if defined(CONFIG_CMD_KGDB)
-#define CONFIG_SYS_CBSIZE              1024            /* Console I/O Buffer Size */
-#else
-#define CONFIG_SYS_CBSIZE              256             /* Console I/O Buffer Size */
-#endif
-#define CONFIG_SYS_PBSIZE              (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
-#define CONFIG_SYS_MAXARGS             16              /* max number of command args */
-#define CONFIG_SYS_BARGSIZE            CONFIG_SYS_CBSIZE       /* Boot Argument Buffer Size */
-
-#define CONFIG_SYS_MEMTEST_START       0x0400000       /* memtest works */
-#define CONFIG_SYS_MEMTEST_END         0x0C00000       /* 4 ... 12 MB in DRAM */
-
-#define CONFIG_SYS_LOAD_ADDR           0x400000        /* default load address */
-
-/*-----------------------------------------------------------------------
- * Low Level Configuration Settings
- * (address mappings, register initial values, etc.)
- * You should know what you are doing if you make changes here.
- */
-
-/*-----------------------------------------------------------------------
- * Internal Memory Mapped Register
- */
-#define CONFIG_SYS_IMMR                0xFF000000
-
-/*-----------------------------------------------------------------------
- * Definitions for initial stack pointer and data area (in DPRAM)
- */
-#define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_SIZE       0x2F00          /* Size of used area in DPRAM */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
-#define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
-
-/*-----------------------------------------------------------------------
- * Start addresses for the final memory configuration
- * (Set up by the startup code)
- * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0
- */
-#define CONFIG_SYS_SDRAM_BASE          0x00000000
-#define CONFIG_SYS_FLASH_BASE          0xFF800000      /* Allow an 8Mbyte window */
-
-#define FLASH_BASE0_4M_PRELIM  0xFFC00000      /* Base for 4M Flash */
-#define FLASH_BASE0_8M_PRELIM  0xFF800000      /* Base for 8M Flash */
-
-#define CONFIG_SYS_MONITOR_LEN         (192 << 10)     /* Reserve 192 kB for Monitor */
-#define CONFIG_SYS_MONITOR_BASE        0xFFF00000      /* U-boot location */
-#define CONFIG_SYS_MALLOC_LEN          (128 << 10)     /* Reserve 128 kB for malloc() */
-
-/*
- * For booting Linux, the board info and command line data
- * have to be in the first 8 MB of memory, since this is
- * the maximum mapped by the Linux kernel during initialization.
- */
-#define CONFIG_SYS_BOOTMAPSZ           (8 << 20)       /* Initial Memory map for Linux */
-
-/*-----------------------------------------------------------------------
- * TODO flash parameters
- * FLASH organization for Intel Strataflash
- */
-#undef  CONFIG_SYS_FLASH_16BIT                         /* 32-bit wide flash memory */
-#define CONFIG_SYS_MAX_FLASH_BANKS     1               /* max number of memory banks */
-#define CONFIG_SYS_MAX_FLASH_SECT      71              /* max number of sectors on one chip */
-
-#define CONFIG_SYS_FLASH_ERASE_TOUT    120000          /* Timeout for Flash Erase (in ms) */
-#define CONFIG_SYS_FLASH_WRITE_TOUT    500             /* Timeout for Flash Write (in ms) */
-
-/*-----------------------------------------------------------------------
- * Cache Configuration
- */
-#define CONFIG_SYS_CACHELINE_SIZE      16              /* For all MPC8xx CPUs */
-#if defined(CONFIG_CMD_KGDB)
-#define CONFIG_SYS_CACHELINE_SHIFT     4               /* log base 2 of the above value */
-#endif
-
-/*-----------------------------------------------------------------------
- * SYPCR - System Protection Control 11-9
- * SYPCR can only be written once after reset!
- *-----------------------------------------------------------------------
- * Software & Bus Monitor Timer max, Bus Monitor enable, SW Watchdog freeze
- */
-
-#ifdef CONFIG_WATCHDOG
-#define CONFIG_SYS_SYPCR       (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | SYPCR_SWE | SYPCR_SWRI | SYPCR_SWP)
-#else
-#define CONFIG_SYS_SYPCR       (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | SYPCR_SWRI | SYPCR_SWP)
-#endif
-
-/*-----------------------------------------------------------------------
- * SIUMCR - SIU Module Configuration 11-6
- *-----------------------------------------------------------------------
- */
-#define CONFIG_SYS_SIUMCR      (SIUMCR_DLK | SIUMCR_DPC | SIUMCR_MPRE | SIUMCR_MLRC01 | SIUMCR_GB5E)
-
-/*-----------------------------------------------------------------------
- * TBSCR - Time Base Status and Control 11-26
- *-----------------------------------------------------------------------
- */
-#define CONFIG_SYS_TBSCR       (TBSCR_REFA | TBSCR_REFB | TBSCR_TBF)
-
-/*-----------------------------------------------------------------------
- * RTCSC - Real-Time Clock Status and Control Register 11-27
- *-----------------------------------------------------------------------
- */
-#define CONFIG_SYS_RTCSC       (RTCSC_SEC | RTCSC_ALR | RTCSC_RTF| RTCSC_RTE)
-
-/*-----------------------------------------------------------------------
- * PISCR - Periodic Interrupt Status and Control 11-31
- *-----------------------------------------------------------------------
- */
-#define CONFIG_SYS_PISCR       (PISCR_PS | PISCR_PITF)
-
-/*-----------------------------------------------------------------------
- * PLPRCR - PLL, Low-Power, and Reset Control Register 15-30
- *-----------------------------------------------------------------------
- */
-
-/* MF (Multiplication Factor of SPLL) */
-/* Sets the QS823 to specified clock from 32KHz clock at EXTAL. */
-#define vPLPRCR_MF     ((CONFIG_CLOCK_MULT+1) << 20)
-#define CONFIG_SYS_PLPRCR      (vPLPRCR_MF | PLPRCR_SPLSS | PLPRCR_TEXPS | PLPRCR_TMIST | PLPRCR_LOLRE)
-
-/*-----------------------------------------------------------------------
- * SCCR - System Clock and reset Control Register              15-27
- *-----------------------------------------------------------------------
- */
-#if defined(CONFIG_CLOCK_16MHZ) || defined(CONFIG_CLOCK_33MHZ) || defined(CONFIG_CLOCK_50MHZ)
-#define CONFIG_SYS_SCCR                (SCCR_TBS | SCCR_EBDF00 | SCCR_DFBRG00)
-#define CONFIG_SYS_BRGCLK_PRESCALE     1
-#endif
-
-#if defined(CONFIG_CLOCK_66MHZ)
-#define CONFIG_SYS_SCCR                (SCCR_TBS | SCCR_EBDF00 | SCCR_DFBRG01)
-#define CONFIG_SYS_BRGCLK_PRESCALE     4
-#endif
-
-#if defined(CONFIG_CLOCK_80MHZ)
-#define CONFIG_SYS_SCCR                (SCCR_TBS | SCCR_EBDF01 | SCCR_DFBRG01)
-#define CONFIG_SYS_BRGCLK_PRESCALE     4
-#endif
-
-#define SCCR_MASK              CONFIG_SYS_SCCR
-
-/*-----------------------------------------------------------------------
- * Debug Enable Register
- * 0x73E67C0F - All interrupts handled by BDM
- * 0x00824001 - Only interrupts needed by MWDebug.exe handled by BDM
- *-----------------------------------------------------------------------
-#define CONFIG_SYS_DER                 0x73E67C0F
-#define CONFIG_SYS_DER                 0x0082400F
-
- #-------------------------------------------------------------------------
- # Program the Debug Enable Register (DER). This register provides the user
- # with the reason for entering into the debug mode. We want all conditions
- # to end up as an exception. We don't want to enter into debug mode for
- # any condition. See the back of of the Development Support section of the
- # MPC860 User Manual for a description of this register.
- #-------------------------------------------------------------------------
-*/
-#define CONFIG_SYS_DER                 0
-
-/*-----------------------------------------------------------------------
- * Memory Controller Initialization Constants
- *-----------------------------------------------------------------------
- */
-
-/*
- * BR0 and OR0 (AMD dual FLASH devices)
- * Base address = 0xFFF0_0000 - 0xFFF7_FFFF (After relocation)
- */
-#define CONFIG_SYS_PRELIM_OR_AM
-#define CONFIG_SYS_OR_TIMING_FLASH
-
-/*
- *-----------------------------------------------------------------------
- * Base Register 0 (BR0): Bank 0 is assigned to the 8Mbyte (2M X 32)
- *                        flash that resides on the QS823.
- *-----------------------------------------------------------------------
- */
-
-/* BA (Base Address) = 0xFF80+0b for a total of 17 bits. 17 bit base addr */
-/*                     represents a minumum 32K block size. */
-#define vBR0_BA                        ((0xFF80 << 16) + (0 << 15))
-#define CONFIG_SYS_BR0_PRELIM          (vBR0_BA | BR_V)
-
-/* AM (Address Mask) = 0xFF80+0b = We've masked the upper 9 bits        */
-/*                                 which defines a 8 Mbyte memory block. */
-#define vOR0_AM                        ((0xFF80 << 16) + (0 << 15))
-
-#if defined(CONFIG_CLOCK_50MHZ) || defined(CONFIG_CLOCK_80MHZ)
-/*  0101 = Add a 5 clock cycle wait state */
-#define CONFIG_SYS_OR0_PRELIM          (vOR0_AM | OR_CSNT_SAM | 0R_ACS_DIV4 | OR_BI | OR_SCY_5_CLK)
-#endif
-
-#if defined(CONFIG_CLOCK_33MHZ) || defined(CONFIG_CLOCK_66MHZ)
-/*  0011 = Add a 3 clock cycle wait state */
-/*  29.8ns clock * (3 + 2) = 149ns cycle time */
-#define CONFIG_SYS_OR0_PRELIM          (vOR0_AM | OR_CSNT_SAM | OR_ACS_DIV4 | OR_BI | OR_SCY_3_CLK)
-#endif
-
-#if defined(CONFIG_CLOCK_16MHZ)
-/*  0010 = Add a 2 clock cycle wait state */
-#define CONFIG_SYS_OR0_PRELIM          (vOR0_AM | OR_CSNT_SAM | OR_ACS_DIV4 | OR_BI | OR_SCY_2_CLK)
-#endif
-
-/*
- * BR1 and OR1 (SDRAM)
- * Base Address = 0x00000000 - 0x00FF_FFFF (16M After relocation)
- * Base Address = 0x00000000 - 0x01FF_FFFF (32M After relocation)
- * Base Address = 0x00000000 - 0x03FF_FFFF (64M After relocation)
- * Base Address = 0x00000000 - 0x07FF_FFFF (128M After relocation)
- */
-
-#define SDRAM_BASE             0x00000000      /* SDRAM bank */
-#define SDRAM_PRELIM_OR_AM     0xF8000000      /* map max. 128 MB */
-
-/* AM (Address Mask) = 0xF800+0b = We've masked the upper 5 bits which
- *                                 represents a 128 Mbyte block the DRAM in
- *                                 this address base.
- */
-#define vOR1_AM                        ((0xF800 << 16) + (0 << 15))
-#define vBR1_BA                        ((0x0000 << 16) + (0 << 15))
-#define CONFIG_SYS_OR1                 (vOR1_AM | OR_CSNT_SAM | OR_BI)
-#define CONFIG_SYS_BR1                 (vBR1_BA | BR_MS_UPMA | BR_V)
-
-/* Machine A Mode Register */
-
-/* PTA Periodic Timer A */
-
-#if defined(CONFIG_CLOCK_80MHZ)
-#define vMAMR_PTA              (19 << 24)
-#endif
-
-#if defined(CONFIG_CLOCK_66MHZ)
-#define vMAMR_PTA              (16 << 24)
-#endif
-
-#if defined(CONFIG_CLOCK_50MHZ)
-#define vMAMR_PTA              (195 << 24)
-#endif
-
-#if defined(CONFIG_CLOCK_33MHZ)
-#define vMAMR_PTA              (131 << 24)
-#endif
-
-#if defined(CONFIG_CLOCK_16MHZ)
-#define vMAMR_PTA              (65 << 24)
-#endif
-
-/* For boards with 16M of SDRAM */
-#define SDRAM_16M_MAX_SIZE     0x01000000      /* max 16MB SDRAM */
-#define CONFIG_SYS_16M_MAMR            (vMAMR_PTA | MAMR_AMA_TYPE_0 | MAMR_DSA_2_CYCL | MAMR_G0CLA_A11 |\
-MAMR_RLFA_1X | MAMR_WLFA_1X | MAMR_TLFA_4X)
-
-/* For boards with 32M of SDRAM */
-#define SDRAM_32M_MAX_SIZE     0x02000000      /* max 32MB SDRAM */
-#define CONFIG_SYS_32M_MAMR            (vMAMR_PTA | MAMR_AMA_TYPE_1 | MAMR_DSA_2_CYCL | MAMR_G0CLA_A10 |\
-MAMR_RLFA_1X | MAMR_WLFA_1X | MAMR_TLFA_4X)
-
-
-/* Memory Periodic Timer Prescaler Register */
-
-#if defined(CONFIG_CLOCK_66MHZ) || defined(CONFIG_CLOCK_80MHZ)
-/* Divide by 32 */
-#define CONFIG_SYS_MPTPR               0x02
-#endif
-
-#if defined(CONFIG_CLOCK_16MHZ) || defined(CONFIG_CLOCK_33MHZ) || defined(CONFIG_CLOCK_50MHZ)
-/* Divide by 16 */
-#define CONFIG_SYS_MPTPR               0x04
-#endif
-
-/*
- * BR2 and OR2 (Unused)
- * Base address = 0xF020_0000 - 0xF020_0FFF
- *
- */
-#define CONFIG_SYS_OR2_PRELIM          0xFFF00000
-#define CONFIG_SYS_BR2_PRELIM          0xF0200000
-
-/*
- * BR3 and OR3 (External Bus CS3)
- * Base address = 0xF030_0000 - 0xF030_0FFF
- *
- */
-#define CONFIG_SYS_OR3_PRELIM          0xFFF00000
-#define CONFIG_SYS_BR3_PRELIM          0xF0300000
-
-/*
- * BR4 and OR4 (External Bus CS3)
- * Base address = 0xF040_0000 - 0xF040_0FFF
- *
- */
-#define CONFIG_SYS_OR4_PRELIM          0xFFF00000
-#define CONFIG_SYS_BR4_PRELIM          0xF0400000
-
-
-/*
- * BR4 and OR4 (External Bus CS3)
- * Base address = 0xF050_0000 - 0xF050_0FFF
- *
- */
-#define CONFIG_SYS_OR5_PRELIM          0xFFF00000
-#define CONFIG_SYS_BR5_PRELIM          0xF0500000
-
-/*
- * BR6 and OR6 (Unused)
- * Base address = 0xF060_0000 - 0xF060_0FFF
- *
- */
-#define CONFIG_SYS_OR6_PRELIM          0xFFF00000
-#define CONFIG_SYS_BR6_PRELIM          0xF0600000
-
-/*
- * BR7 and OR7 (Unused)
- * Base address = 0xF070_0000 - 0xF070_0FFF
- *
- */
-#define CONFIG_SYS_OR7_PRELIM          0xFFF00000
-#define CONFIG_SYS_BR7_PRELIM          0xF0700000
-
-/*
- * Sanity checks
- */
-#if defined(CONFIG_SCC1_ENET) && defined(CONFIG_FEC_ENET)
-#error Both CONFIG_SCC1_ENET and CONFIG_FEC_ENET configured
-#endif
-
-#endif /* __CONFIG_H */
diff --git a/include/configs/QS850.h b/include/configs/QS850.h
deleted file mode 100644 (file)
index f114213..0000000
+++ /dev/null
@@ -1,551 +0,0 @@
-/*
- * (C) Copyright 2003
- * MuLogic B.V.
- *
- * (C) Copyright 2002
- * Simple Network Magic Corporation
- *
- * (C) Copyright 2000
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/*
- * board/config.h - configuration options, board specific
- */
-
-#ifndef __CONFIG_H
-#define __CONFIG_H
-
-/* various debug settings */
-#undef CONFIG_SYS_DEVICE_NULLDEV               /* null device */
-#undef CONFIG_SILENT_CONSOLE           /* silent console */
-#undef CONFIG_SYS_CONSOLE_INFO_QUIET           /* silent console ? */
-#undef DEBUG_FLASH                     /* debug flash code */
-#undef FLASH_DEBUG                     /* debug fash code */
-#undef DEBUG_ENV                       /* debug environment code */
-
-#define CONFIG_SYS_DIRECT_FLASH_TFTP   1       /* allow direct tftp to flash */
-#define CONFIG_ENV_OVERWRITE   1       /* allow overwrite MAC address */
-
-/*
- * High Level Configuration Options
- * (easy to change)
- */
-#define CONFIG_MPC850          1       /* This is a MPC850 CPU */
-#define CONFIG_QS850           1       /* ...on a QS850 module */
-#define CONFIG_SCC2_ENET       1       /* SCC2 10BaseT ethernet */
-
-#define        CONFIG_SYS_TEXT_BASE    0xFFF00000
-
-/* Select the target clock speed */
-#undef CONFIG_CLOCK_16MHZ              /* cpu=16,777,216 Hz, mem=16Mhz */
-#undef CONFIG_CLOCK_33MHZ              /* cpu=33,554,432 Hz, mem=33Mhz */
-#undef CONFIG_CLOCK_50MHZ              /* cpu=49,971,200 Hz, mem=33Mhz */
-#define CONFIG_CLOCK_66MHZ     1       /* cpu=67,108,864 Hz, mem=66Mhz */
-#undef CONFIG_CLOCK_80MHZ              /* cpu=79,986,688 Hz, mem=33Mhz */
-
-#ifdef CONFIG_CLOCK_16MHZ
-#define CONFIG_CLOCK_MULT      512
-#endif
-
-#ifdef CONFIG_CLOCK_33MHZ
-#define CONFIG_CLOCK_MULT      1024
-#endif
-
-#ifdef CONFIG_CLOCK_50MHZ
-#define CONFIG_CLOCK_MULT      1525
-#endif
-
-#ifdef CONFIG_CLOCK_66MHZ
-#define CONFIG_CLOCK_MULT      2048
-#endif
-
-#ifdef CONFIG_CLOCK_80MHZ
-#define CONFIG_CLOCK_MULT      2441
-#endif
-
-/* choose flash size, 4Mb or 8Mb */
-#define CONFIG_FLASH_4MB       1       /* board has 4Mb flash */
-#undef CONFIG_FLASH_8MB                        /* board has 8Mb flash */
-
-#define CONFIG_CLOCK_BASE      32768   /* Base clock input freq */
-
-#define CONFIG_8xx_CONS_SMC1   1       /* Console is on SMC1 */
-#undef CONFIG_8xx_CONS_SMC2
-#undef CONFIG_8xx_CONS_NONE
-
-#define CONFIG_BAUDRATE                38400   /* console baudrate = 38.4kbps */
-
-#undef CONFIG_CLOCKS_IN_MHZ            /* clocks passsed to Linux in MHz */
-
-/* Define default IP addresses */
-#define CONFIG_IPADDR          192.168.1.99    /* own ip address */
-#define CONFIG_SERVERIP                192.168.1.19    /* used for tftp (not nfs?) */
-
-/* message to say directly after booting */
-#define CONFIG_PREBOOT         "echo '';" \
-       "echo 'type:';" \
-       "echo 'run boot_nfs       to boot to NFS';" \
-       "echo 'run boot_flash     to boot to flash';" \
-       "echo '';" \
-       "echo 'run flash_rootfs   to install a new rootfs';" \
-       "echo 'run flash_env      to clear the env sector';" \
-       "echo 'run flash_rw       to clear the rw fs';" \
-       "echo 'run flash_uboot    to install a new u-boot';" \
-       "echo 'run flash_kernel   to install a new kernel';"
-
-/* wait 5 seconds before executing CONFIG_BOOTCOMMAND */
-#define CONFIG_BOOTDELAY       5
-#define CONFIG_BOOTCOMMAND     "run boot_nfs"
-
-#undef CONFIG_BOOTARGS         /* made by set_nfs of set_flash */
-
-/* Our flash filesystem looks like this
- *
- * 4Mb board:
- * ffc0 0000 - ffeb ffff       root filesystem (jffs2) (~3Mb)
- * ffec 0000 - ffed ffff       read-write filesystem (ext2)
- * ffee 0000 - ffef ffff       environment
- * fff0 0000 - fff1 ffff       u-boot
- * fff2 0000 - ffff ffff       linux kernel
- *
- * 8Mb board:
- * ff80 0000 - ffeb ffff       root filesystem (jffs2) (~7Mb)
- * ffec 0000 - ffed ffff       read-write filesystem (ext2)
- * ffee 0000 - ffef ffff       environment
- * fff0 0000 - fff1 ffff       u-boot
- * fff2 0000 - ffff ffff       linux kernel
- *
- */
-
-/* environment for 4Mb board */
-#ifdef CONFIG_FLASH_4MB
-#define CONFIG_EXTRA_ENV_SETTINGS \
-       "serial#=QS850\0" \
-       "hostname=qs850\0" \
-       "netdev=eth0\0" \
-       "ethaddr=00:01:02:B4:36:56\0" \
-       "rootpath=/exports/rootfs\0" \
-       "mtdparts=mtdparts=phys:2816k(root),128k(rw),128k(env),128k(u-boot),-(kernel)\0" \
-       /* fill in variables */ \
-       "set_ip=setenv ip ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off\0" \
-       "set_nfs=setenv bootargs root=/dev/nfs rw nfsroot=$serverip:$rootpath $ip init=/sbin/init $mtdparts\0" \
-       "set_flash=setenv bootargs root=/dev/mtdblock1 ro $ip init=/sbin/init $mtdparts\0" \
-       /* commands */ \
-       "boot_nfs=run set_ip; run set_nfs; tftp 0x400000 /tftpboot/vmlinux.UBoot; bootm 0x400000\0" \
-       "boot_flash=run set_ip; run set_flash; bootm fff20000\0" \
-       /* reinstall flash parts */ \
-       "flash_rootfs=protect off ffc00000 ffebffff; era ffc00000 ffebffff; tftp ffc00000 /tftpboot/rootfs.jffs2\0" \
-       "flash_rw=protect off ffec0000 ffedffff; era ffec0000 ffedffff\0" \
-       "flash_env=protect off ffee0000 ffefffff; era ffee0000 ffefffff\0" \
-       "flash_uboot=protect off fff00000 fff1ffff; era fff00000 fff1ffff; tftp fff00000 /tftpboot/u-boot.4mb.bin\0" \
-       "flash_kernel=protect off fff20000 ffffffff; era fff20000 ffffffff; tftp fff20000 /tftpboot/vmlinux.UBoot\0"
-#endif /* CONFIG_FLASH_4MB */
-
-/* environment for 8Mb board */
-#ifdef CONFIG_FLASH_8MB
-#define CONFIG_EXTRA_ENV_SETTINGS \
-       "serial#=QS850\0" \
-       "hostname=qs850\0" \
-       "netdev=eth0\0" \
-       "ethaddr=00:01:02:B4:36:56\0" \
-       "rootpath=/exports/rootfs\0" \
-       "mtdparts=mtdparts=phys:6912k(root),128k(rw),128k(env),128k(u-boot),-(kernel)\0" \
-       /* fill in variables */ \
-       "set_ip=setenv ip ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off\0" \
-       "set_nfs=setenv bootargs root=/dev/nfs rw nfsroot=$serverip:$rootpath $ip init=/sbin/init $mtdparts\0" \
-       "set_flash=setenv bootargs root=/dev/mtdblock1 ro $ip init=/sbin/init $mtdparts\0" \
-       /* commands */ \
-       "boot_nfs=run set_ip; run set_nfs; tftp 0x400000 /tftpboot/vmlinux.UBoot; bootm 0x400000\0" \
-       "boot_flash=run set_ip; run set_flash; bootm fff20000\0" \
-       /* reinstall flash parts */ \
-       "flash_rootfs=protect off ff800000 ffebffff; era ff800000 ffebffff; tftp ff800000 /tftpboot/rootfs.jffs2\0" \
-       "flash_rw=protect off ffec0000 ffedffff; era ffec0000 ffedffff\0" \
-       "flash_env=protect off ffee0000 ffefffff; era ffee0000 ffefffff\0" \
-       "flash_uboot=protect off fff00000 fff1ffff; era fff00000 fff1ffff; tftp fff00000 /tftpboot/u-boot.8mb.bin\0" \
-       "flash_kernel=protect off fff20000 ffffffff; era fff20000 ffffffff; tftp fff20000 /tftpboot/vmlinux.UBoot\0"
-#endif /* CONFIG_FLASH_8MB */
-
-#define CONFIG_LOADS_ECHO      1       /* echo on for serial download */
-#undef CONFIG_SYS_LOADS_BAUD_CHANGE            /* don't allow baudrate change */
-#undef CONFIG_WATCHDOG                 /* watchdog disabled */
-#undef CONFIG_STATUS_LED               /* Status LED disabled */
-#undef CONFIG_CAN_DRIVER               /* CAN Driver support disabled */
-
-/*
- * BOOTP options
- */
-#define CONFIG_BOOTP_SUBNETMASK
-#define CONFIG_BOOTP_GATEWAY
-#define CONFIG_BOOTP_HOSTNAME
-#define CONFIG_BOOTP_BOOTPATH
-#define CONFIG_BOOTP_BOOTFILESIZE
-
-#undef CONFIG_MAC_PARTITION
-#undef CONFIG_DOS_PARTITION
-
-#define CONFIG_RTC_MPC8xx      /* use internal RTC of MPC8xx */
-
-
-/*
- * Command line configuration.
- */
-
-#define CONFIG_CMD_BDI
-#define CONFIG_CMD_BOOTD
-#define CONFIG_CMD_CONSOLE
-#define CONFIG_CMD_DATE
-#define CONFIG_CMD_SAVEENV
-#define CONFIG_CMD_FLASH
-#define CONFIG_CMD_IMI
-#define CONFIG_CMD_IMMAP
-#define CONFIG_CMD_MEMORY
-#define CONFIG_CMD_NET
-#define CONFIG_CMD_RUN
-
-
-/*-----------------------------------------------------------------------
- * Environment variable storage is in FLASH, one sector before U-boot
- */
-#define CONFIG_ENV_IS_IN_FLASH 1
-#define CONFIG_ENV_SECT_SIZE   0x20000         /* 128Kb, one whole sector */
-#define CONFIG_ENV_SIZE                0x2000          /* 8kb */
-#define CONFIG_ENV_ADDR                0xffee0000      /* address of env sector */
-
-/*-----------------------------------------------------------------------
- * Miscellaneous configurable options
- */
-#define CONFIG_SYS_LONGHELP                            /* undef to save memory */
-
-#define CONFIG_SYS_HUSH_PARSER         1               /* use "hush" command parser */
-
-#if defined(CONFIG_CMD_KGDB)
-#define CONFIG_SYS_CBSIZE              1024            /* Console I/O Buffer Size */
-#else
-#define CONFIG_SYS_CBSIZE              256             /* Console I/O Buffer Size */
-#endif
-#define CONFIG_SYS_PBSIZE              (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
-#define CONFIG_SYS_MAXARGS             16              /* max number of command args */
-#define CONFIG_SYS_BARGSIZE            CONFIG_SYS_CBSIZE       /* Boot Argument Buffer Size */
-
-#define CONFIG_SYS_MEMTEST_START       0x0400000       /* memtest works */
-#define CONFIG_SYS_MEMTEST_END         0x0C00000       /* 4 ... 12 MB in DRAM */
-
-#define CONFIG_SYS_LOAD_ADDR           0x400000        /* default load address */
-
-/*-----------------------------------------------------------------------
- * Low Level Configuration Settings
- * (address mappings, register initial values, etc.)
- * You should know what you are doing if you make changes here.
- */
-
-/*-----------------------------------------------------------------------
- * Internal Memory Mapped Register
- */
-#define CONFIG_SYS_IMMR                0xFF000000
-
-/*-----------------------------------------------------------------------
- * Definitions for initial stack pointer and data area (in DPRAM)
- */
-#define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_SIZE       0x2F00          /* Size of used area in DPRAM */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
-#define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
-
-/*-----------------------------------------------------------------------
- * Start addresses for the final memory configuration
- * (Set up by the startup code)
- * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0
- */
-#define CONFIG_SYS_SDRAM_BASE          0x00000000
-#define CONFIG_SYS_FLASH_BASE          0xFF800000      /* Allow an 8Mbyte window */
-
-#define FLASH_BASE0_4M_PRELIM  0xFFC00000      /* Base for 4M Flash */
-#define FLASH_BASE0_8M_PRELIM  0xFF800000      /* Base for 8M Flash */
-
-#define CONFIG_SYS_MONITOR_LEN         (192 << 10)     /* Reserve 192 kB for Monitor */
-#define CONFIG_SYS_MONITOR_BASE        0xFFF00000      /* U-boot location */
-#define CONFIG_SYS_MALLOC_LEN          (128 << 10)     /* Reserve 128 kB for malloc() */
-
-/*
- * For booting Linux, the board info and command line data
- * have to be in the first 8 MB of memory, since this is
- * the maximum mapped by the Linux kernel during initialization.
- */
-#define CONFIG_SYS_BOOTMAPSZ           (8 << 20)       /* Initial Memory map for Linux */
-
-/*-----------------------------------------------------------------------
- * TODO flash parameters
- * FLASH organization for Intel Strataflash
- */
-#undef  CONFIG_SYS_FLASH_16BIT                         /* 32-bit wide flash memory */
-#define CONFIG_SYS_MAX_FLASH_BANKS     1               /* max number of memory banks */
-#define CONFIG_SYS_MAX_FLASH_SECT      71              /* max number of sectors on one chip */
-
-#define CONFIG_SYS_FLASH_ERASE_TOUT    120000          /* Timeout for Flash Erase (in ms) */
-#define CONFIG_SYS_FLASH_WRITE_TOUT    500             /* Timeout for Flash Write (in ms) */
-
-/*-----------------------------------------------------------------------
- * Cache Configuration
- */
-#define CONFIG_SYS_CACHELINE_SIZE      16              /* For all MPC8xx CPUs */
-#if defined(CONFIG_CMD_KGDB)
-#define CONFIG_SYS_CACHELINE_SHIFT     4               /* log base 2 of the above value */
-#endif
-
-/*-----------------------------------------------------------------------
- * SYPCR - System Protection Control 11-9
- * SYPCR can only be written once after reset!
- *-----------------------------------------------------------------------
- * Software & Bus Monitor Timer max, Bus Monitor enable, SW Watchdog freeze
- */
-
-#ifdef CONFIG_WATCHDOG
-#define CONFIG_SYS_SYPCR       (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | SYPCR_SWE | SYPCR_SWRI | SYPCR_SWP)
-#else
-#define CONFIG_SYS_SYPCR       (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | SYPCR_SWRI | SYPCR_SWP)
-#endif
-
-/*-----------------------------------------------------------------------
- * SIUMCR - SIU Module Configuration 11-6
- *-----------------------------------------------------------------------
- */
-#define CONFIG_SYS_SIUMCR      (SIUMCR_DLK | SIUMCR_DPC | SIUMCR_MPRE | SIUMCR_MLRC01 | SIUMCR_GB5E)
-
-/*-----------------------------------------------------------------------
- * TBSCR - Time Base Status and Control 11-26
- *-----------------------------------------------------------------------
- */
-#define CONFIG_SYS_TBSCR       (TBSCR_REFA | TBSCR_REFB | TBSCR_TBF)
-
-/*-----------------------------------------------------------------------
- * RTCSC - Real-Time Clock Status and Control Register 11-27
- *-----------------------------------------------------------------------
- */
-#define CONFIG_SYS_RTCSC       (RTCSC_SEC | RTCSC_ALR | RTCSC_RTF| RTCSC_RTE)
-
-/*-----------------------------------------------------------------------
- * PISCR - Periodic Interrupt Status and Control 11-31
- *-----------------------------------------------------------------------
- */
-#define CONFIG_SYS_PISCR       (PISCR_PS | PISCR_PITF)
-
-/*-----------------------------------------------------------------------
- * PLPRCR - PLL, Low-Power, and Reset Control Register 15-30
- *-----------------------------------------------------------------------
- */
-
-/* MF (Multiplication Factor of SPLL) */
-/* Sets the QS850 to specified clock from 32KHz clock at EXTAL. */
-#define vPLPRCR_MF     ((CONFIG_CLOCK_MULT+1) << 20)
-#define CONFIG_SYS_PLPRCR      (vPLPRCR_MF | PLPRCR_SPLSS | PLPRCR_TEXPS | PLPRCR_TMIST | PLPRCR_LOLRE)
-
-/*-----------------------------------------------------------------------
- * SCCR - System Clock and reset Control Register              15-27
- *-----------------------------------------------------------------------
- */
-#if defined(CONFIG_CLOCK_16MHZ) || defined(CONFIG_CLOCK_33MHZ) || defined(CONFIG_CLOCK_50MHZ)
-#define CONFIG_SYS_SCCR                (SCCR_TBS | SCCR_EBDF00 | SCCR_DFBRG00)
-#define CONFIG_SYS_BRGCLK_PRESCALE     1
-#endif
-
-#if defined(CONFIG_CLOCK_66MHZ)
-#define CONFIG_SYS_SCCR                (SCCR_TBS | SCCR_EBDF00 | SCCR_DFBRG01)
-#define CONFIG_SYS_BRGCLK_PRESCALE     4
-#endif
-
-#if defined(CONFIG_CLOCK_80MHZ)
-#define CONFIG_SYS_SCCR                (SCCR_TBS | SCCR_EBDF01 | SCCR_DFBRG01)
-#define CONFIG_SYS_BRGCLK_PRESCALE     4
-#endif
-
-#define SCCR_MASK              CONFIG_SYS_SCCR
-
-/*-----------------------------------------------------------------------
- * Debug Enable Register
- * 0x73E67C0F - All interrupts handled by BDM
- * 0x00824001 - Only interrupts needed by MWDebug.exe handled by BDM
- *-----------------------------------------------------------------------
-#define CONFIG_SYS_DER                 0x73E67C0F
-#define CONFIG_SYS_DER                 0x0082400F
-
- #-------------------------------------------------------------------------
- # Program the Debug Enable Register (DER). This register provides the user
- # with the reason for entering into the debug mode. We want all conditions
- # to end up as an exception. We don't want to enter into debug mode for
- # any condition. See the back of of the Development Support section of the
- # MPC860 User Manual for a description of this register.
- #-------------------------------------------------------------------------
-*/
-#define CONFIG_SYS_DER                 0
-
-/*-----------------------------------------------------------------------
- * Memory Controller Initialization Constants
- *-----------------------------------------------------------------------
- */
-
-/*
- * BR0 and OR0 (AMD dual FLASH devices)
- * Base address = 0xFFF0_0000 - 0xFFF7_FFFF (After relocation)
- */
-#define CONFIG_SYS_PRELIM_OR_AM
-#define CONFIG_SYS_OR_TIMING_FLASH
-
-/*
- *-----------------------------------------------------------------------
- * Base Register 0 (BR0): Bank 0 is assigned to the 8Mbyte (2M X 32)
- *                        flash that resides on the QS850.
- *-----------------------------------------------------------------------
- */
-
-/* BA (Base Address) = 0xFF80+0b for a total of 17 bits. 17 bit base addr */
-/*                     represents a minumum 32K block size. */
-#define vBR0_BA                        ((0xFF80 << 16) + (0 << 15))
-#define CONFIG_SYS_BR0_PRELIM          (vBR0_BA | BR_V)
-
-/* AM (Address Mask) = 0xFF80+0b = We've masked the upper 9 bits        */
-/*                                 which defines a 8 Mbyte memory block. */
-#define vOR0_AM                        ((0xFF80 << 16) + (0 << 15))
-
-#if defined(CONFIG_CLOCK_50MHZ) || defined(CONFIG_CLOCK_80MHZ)
-/*  0101 = Add a 5 clock cycle wait state */
-#define CONFIG_SYS_OR0_PRELIM          (vOR0_AM | OR_CSNT_SAM | 0R_ACS_DIV4 | OR_BI | OR_SCY_5_CLK)
-#endif
-
-#if defined(CONFIG_CLOCK_33MHZ) || defined(CONFIG_CLOCK_66MHZ)
-/*  0011 = Add a 3 clock cycle wait state */
-/*  29.8ns clock * (3 + 2) = 149ns cycle time */
-#define CONFIG_SYS_OR0_PRELIM          (vOR0_AM | OR_CSNT_SAM | OR_ACS_DIV4 | OR_BI | OR_SCY_3_CLK)
-#endif
-
-#if defined(CONFIG_CLOCK_16MHZ)
-/*  0010 = Add a 2 clock cycle wait state */
-#define CONFIG_SYS_OR0_PRELIM          (vOR0_AM | OR_CSNT_SAM | OR_ACS_DIV4 | OR_BI | OR_SCY_2_CLK)
-#endif
-
-/*
- * BR1 and OR1 (SDRAM)
- * Base Address = 0x00000000 - 0x00FF_FFFF (16M After relocation)
- * Base Address = 0x00000000 - 0x01FF_FFFF (32M After relocation)
- * Base Address = 0x00000000 - 0x03FF_FFFF (64M After relocation)
- * Base Address = 0x00000000 - 0x07FF_FFFF (128M After relocation)
- */
-
-#define SDRAM_BASE             0x00000000      /* SDRAM bank */
-#define SDRAM_PRELIM_OR_AM     0xF8000000      /* map max. 128 MB */
-
-/* AM (Address Mask) = 0xF800+0b = We've masked the upper 5 bits which
- *                                 represents a 128 Mbyte block the DRAM in
- *                                 this address base.
- */
-#define vOR1_AM                        ((0xF800 << 16) + (0 << 15))
-#define vBR1_BA                        ((0x0000 << 16) + (0 << 15))
-#define CONFIG_SYS_OR1                 (vOR1_AM | OR_CSNT_SAM | OR_BI)
-#define CONFIG_SYS_BR1                 (vBR1_BA | BR_MS_UPMA | BR_V)
-
-/* Machine A Mode Register */
-
-/* PTA Periodic Timer A */
-
-#if defined(CONFIG_CLOCK_80MHZ)
-#define vMAMR_PTA              (19 << 24)
-#endif
-
-#if defined(CONFIG_CLOCK_66MHZ)
-#define vMAMR_PTA              (16 << 24)
-#endif
-
-#if defined(CONFIG_CLOCK_50MHZ)
-#define vMAMR_PTA              (195 << 24)
-#endif
-
-#if defined(CONFIG_CLOCK_33MHZ)
-#define vMAMR_PTA              (131 << 24)
-#endif
-
-#if defined(CONFIG_CLOCK_16MHZ)
-#define vMAMR_PTA              (65 << 24)
-#endif
-
-/* For boards with 16M of SDRAM */
-#define SDRAM_16M_MAX_SIZE     0x01000000      /* max 16MB SDRAM */
-#define CONFIG_SYS_16M_MAMR            (vMAMR_PTA | MAMR_AMA_TYPE_0 | MAMR_DSA_2_CYCL | MAMR_G0CLA_A11 |\
-MAMR_RLFA_1X | MAMR_WLFA_1X | MAMR_TLFA_4X)
-
-/* For boards with 32M of SDRAM */
-#define SDRAM_32M_MAX_SIZE     0x02000000      /* max 32MB SDRAM */
-#define CONFIG_SYS_32M_MAMR            (vMAMR_PTA | MAMR_AMA_TYPE_1 | MAMR_DSA_2_CYCL | MAMR_G0CLA_A10 |\
-MAMR_RLFA_1X | MAMR_WLFA_1X | MAMR_TLFA_4X)
-
-
-/* Memory Periodic Timer Prescaler Register */
-
-#if defined(CONFIG_CLOCK_66MHZ) || defined(CONFIG_CLOCK_80MHZ)
-/* Divide by 32 */
-#define CONFIG_SYS_MPTPR               0x02
-#endif
-
-#if defined(CONFIG_CLOCK_16MHZ) || defined(CONFIG_CLOCK_33MHZ) || defined(CONFIG_CLOCK_50MHZ)
-/* Divide by 16 */
-#define CONFIG_SYS_MPTPR               0x04
-#endif
-
-/*
- * BR2 and OR2 (Unused)
- * Base address = 0xF020_0000 - 0xF020_0FFF
- *
- */
-#define CONFIG_SYS_OR2_PRELIM          0xFFF00000
-#define CONFIG_SYS_BR2_PRELIM          0xF0200000
-
-/*
- * BR3 and OR3 (External Bus CS3)
- * Base address = 0xF030_0000 - 0xF030_0FFF
- *
- */
-#define CONFIG_SYS_OR3_PRELIM          0xFFF00000
-#define CONFIG_SYS_BR3_PRELIM          0xF0300000
-
-/*
- * BR4 and OR4 (External Bus CS3)
- * Base address = 0xF040_0000 - 0xF040_0FFF
- *
- */
-#define CONFIG_SYS_OR4_PRELIM          0xFFF00000
-#define CONFIG_SYS_BR4_PRELIM          0xF0400000
-
-
-/*
- * BR4 and OR4 (External Bus CS3)
- * Base address = 0xF050_0000 - 0xF050_0FFF
- *
- */
-#define CONFIG_SYS_OR5_PRELIM          0xFFF00000
-#define CONFIG_SYS_BR5_PRELIM          0xF0500000
-
-/*
- * BR6 and OR6 (Unused)
- * Base address = 0xF060_0000 - 0xF060_0FFF
- *
- */
-#define CONFIG_SYS_OR6_PRELIM          0xFFF00000
-#define CONFIG_SYS_BR6_PRELIM          0xF0600000
-
-/*
- * BR7 and OR7 (Unused)
- * Base address = 0xF070_0000 - 0xF070_0FFF
- *
- */
-#define CONFIG_SYS_OR7_PRELIM          0xFFF00000
-#define CONFIG_SYS_BR7_PRELIM          0xF0700000
-
-/*
- * Sanity checks
- */
-#if defined(CONFIG_SCC1_ENET) && defined(CONFIG_FEC_ENET)
-#error Both CONFIG_SCC1_ENET and CONFIG_FEC_ENET configured
-#endif
-
-#endif /* __CONFIG_H */
diff --git a/include/configs/QS860T.h b/include/configs/QS860T.h
deleted file mode 100644 (file)
index 9958c09..0000000
+++ /dev/null
@@ -1,390 +0,0 @@
-/*
- * (C) Copyright 2003
- * MuLogic B.V.
- *
- * (C) Copyright 2002
- * Simple Network Magic Corporation
- *
- * (C) Copyright 2000
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/*
- * board/config.h - configuration options, board specific
- */
-
-#ifndef __CONFIG_H
-#define __CONFIG_H
-
-/* various debug settings */
-#undef CONFIG_SYS_DEVICE_NULLDEV               /* null device */
-#undef CONFIG_SILENT_CONSOLE           /* silent console */
-#undef CONFIG_SYS_CONSOLE_INFO_QUIET           /* silent console ? */
-#undef DEBUG_FLASH                     /* debug flash code */
-#undef FLASH_DEBUG                     /* debug fash code */
-#undef DEBUG_ENV                       /* debug environment code */
-
-#define CONFIG_SYS_DIRECT_FLASH_TFTP   1       /* allow direct tftp to flash */
-#define CONFIG_ENV_OVERWRITE   1       /* allow overwrite MAC address */
-
-
-/*
- * High Level Configuration Options
- * (easy to change)
- */
-
-#define CONFIG_MPC860          1       /* This is a MPC860 CPU */
-#define CONFIG_QS860T          1       /* ...on a QS860T module */
-
-/* Start address of 512K Socketed Flash */
-#define        CONFIG_SYS_TEXT_BASE    0xFFF00000
-
-#define CONFIG_FEC_ENET                1       /* FEC 10/100BaseT ethernet */
-#define CONFIG_MII
-#define FEC_INTERRUPT          SIU_LEVEL1
-#undef CONFIG_SCC1_ENET                        /* SCC1 10BaseT ethernet */
-#define CONFIG_SYS_DISCOVER_PHY
-
-#undef CONFIG_8xx_CONS_SMC1
-#define CONFIG_8xx_CONS_SMC2   1       /* Console is on SMC */
-#undef CONFIG_8xx_CONS_NONE
-
-#define CONFIG_BAUDRATE                38400   /* console baudrate = 38.4kbps */
-
-#define CONFIG_BOOTDELAY       5       /* autoboot after 5 seconds */
-
-/* Pass clocks to Linux 2.4.18 in Hz */
-#undef CONFIG_CLOCKS_IN_MHZ            /* clocks passsed to Linux in MHz */
-
-#define CONFIG_PREBOOT         "echo;" \
-       "echo 'Type \\\"run flash_nfs\\\" to mount root filesystem over NFS';" \
-       "echo"
-
-#undef CONFIG_BOOTARGS
-/* TODO compare against CADM860 */
-#define CONFIG_BOOTCOMMAND     "bootp; " \
-       "setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} " \
-       "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; " \
-       "bootm"
-
-#define CONFIG_LOADS_ECHO      1       /* echo on for serial download */
-#undef CONFIG_SYS_LOADS_BAUD_CHANGE            /* don't allow baudrate change */
-
-#undef CONFIG_WATCHDOG                 /* watchdog disabled */
-
-#undef CONFIG_STATUS_LED               /* Status LED disabled */
-
-#undef CONFIG_CAN_DRIVER               /* CAN Driver support disabled */
-
-/*
- * BOOTP options
- */
-#define CONFIG_BOOTP_SUBNETMASK
-#define CONFIG_BOOTP_GATEWAY
-#define CONFIG_BOOTP_HOSTNAME
-#define CONFIG_BOOTP_BOOTPATH
-#define CONFIG_BOOTP_BOOTFILESIZE
-
-
-#define CONFIG_MAC_PARTITION
-#define CONFIG_DOS_PARTITION
-
-#define CONFIG_RTC_MPC8xx      /* use internal RTC of MPC8xx */
-
-
-/*
- * Command line configuration.
- */
-#include <config_cmd_default.h>
-
-#define CONFIG_CMD_REGINFO
-#define CONFIG_CMD_IMMAP
-#define CONFIG_CMD_ASKENV
-#define CONFIG_CMD_NET
-#define CONFIG_CMD_DHCP
-#define CONFIG_CMD_DATE
-
-
-/* TODO */
-#if 0
-/* Look at these */
-CONFIG_IPADDR
-CONFIG_SERVERIP
-CONFIG_I2C
-CONFIG_SPI
-#endif
-
-/*
- * Environment variable storage is in NVRAM
- */
-#define CONFIG_ENV_IS_IN_NVRAM 1
-#define CONFIG_ENV_SIZE                0x00001000      /* We use only the last 4K for PPCBoot */
-#define CONFIG_ENV_ADDR                0xD100E000
-
-/*
- * Miscellaneous configurable options
- */
-#define CONFIG_SYS_LONGHELP                            /* undef to save memory */
-
-#define CONFIG_SYS_HUSH_PARSER         1               /* use "hush" command parser */
-
-#if defined(CONFIG_CMD_KGDB)
-#define CONFIG_SYS_CBSIZE              1024            /* Console I/O Buffer Size */
-#else
-#define CONFIG_SYS_CBSIZE              256             /* Console I/O Buffer Size */
-#endif
-#define CONFIG_SYS_PBSIZE              (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
-#define CONFIG_SYS_MAXARGS             16              /* max number of command args */
-#define CONFIG_SYS_BARGSIZE            CONFIG_SYS_CBSIZE       /* Boot Argument Buffer Size */
-
-/* TODO - size? */
-#define CONFIG_SYS_MEMTEST_START       0x0400000       /* memtest works */
-#define CONFIG_SYS_MEMTEST_END         0x0C00000       /* 4 ... 12 MB in DRAM */
-
-#define CONFIG_SYS_LOAD_ADDR           0x100000        /* default load address */
-
-/*-----------------------------------------------------------------------
- * Low Level Configuration Settings
- * (address mappings, register initial values, etc.)
- * You should know what you are doing if you make changes here.
- */
-/*-----------------------------------------------------------------------
- * Internal Memory Mapped Register
- */
-#define CONFIG_SYS_IMMR                0xF0000000
-
-/*-----------------------------------------------------------------------
- * Definitions for initial stack pointer and data area (in DPRAM)
- */
-#define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_SIZE       0x2F00          /* Size of used area in DPRAM */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
-#define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
-
-/*-----------------------------------------------------------------------
- * Start addresses for the final memory configuration
- * (Set up by the startup code)
- * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0
- */
-#define CONFIG_SYS_SDRAM_BASE          0x00000000
-#define CONFIG_SYS_FLASH_BASE          0xFFF00000
-
-#define CONFIG_SYS_MONITOR_LEN         (192 << 10)     /* Reserve 192 kB for Monitor */
-#define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_FLASH_BASE
-#define CONFIG_SYS_MALLOC_LEN          (128 << 10)     /* Reserve 128 kB for malloc() */
-
-/*
- * For booting Linux, the board info and command line data
- * have to be in the first 8 MB of memory, since this is
- * the maximum mapped by the Linux kernel during initialization.
- */
-#define CONFIG_SYS_BOOTMAPSZ           (8 << 20)       /* Initial Memory map for Linux */
-
-/* TODO flash parameters */
-/*-----------------------------------------------------------------------
- * FLASH organization for Intel Strataflash
- */
-#define CONFIG_SYS_FLASH_16BIT         1               /* 16-bit wide flash memory */
-#define CONFIG_SYS_MAX_FLASH_BANKS     1               /* max number of memory banks */
-#define CONFIG_SYS_MAX_FLASH_SECT      64              /* max number of sectors on one chip */
-
-#define CONFIG_SYS_FLASH_ERASE_TOUT    120000          /* Timeout for Flash Erase (in ms) */
-#define CONFIG_SYS_FLASH_WRITE_TOUT    500             /* Timeout for Flash Write (in ms) */
-
-#undef CONFIG_ENV_IS_IN_FLASH
-
-/*-----------------------------------------------------------------------
- * Cache Configuration
- */
-#define CONFIG_SYS_CACHELINE_SIZE      16              /* For all MPC8xx CPUs */
-#if defined(CONFIG_CMD_KGDB)
-#define CONFIG_SYS_CACHELINE_SHIFT     4               /* log base 2 of the above value */
-#endif
-
-/*-----------------------------------------------------------------------
- * SYPCR - System Protection Control 11-9
- * SYPCR can only be written once after reset!
- *-----------------------------------------------------------------------
- * Software & Bus Monitor Timer max, Bus Monitor enable, SW Watchdog freeze
- */
-#if defined(CONFIG_WATCHDOG)
-#define CONFIG_SYS_SYPCR       (0xFFFFFF88 | SYPCR_SWE | SYPCR_SWRI)
-#else
-#define CONFIG_SYS_SYPCR       0xFFFFFF88
-#endif
-
-/*-----------------------------------------------------------------------
- * SIUMCR - SIU Module Configuration 11-6
- *-----------------------------------------------------------------------
- */
-#define CONFIG_SYS_SIUMCR      0x00620000
-
-/*-----------------------------------------------------------------------
- * TBSCR - Time Base Status and Control 11-26
- *-----------------------------------------------------------------------
- */
-#define CONFIG_SYS_TBSCR       0x00C3
-
-/*-----------------------------------------------------------------------
- * RTCSC - Real-Time Clock Status and Control Register 11-27
- *-----------------------------------------------------------------------
- */
-#define CONFIG_SYS_RTCSC       (RTCSC_SEC | RTCSC_ALR | RTCSC_RTF| RTCSC_RTE)
-
-/*-----------------------------------------------------------------------
- * PISCR - Periodic Interrupt Status and Control 11-31
- *-----------------------------------------------------------------------
- */
-#define CONFIG_SYS_PISCR       0x0082
-
-/*-----------------------------------------------------------------------
- * PLPRCR - PLL, Low-Power, and Reset Control Register 15-30
- *-----------------------------------------------------------------------
- */
-#define CONFIG_SYS_PLPRCR      0x0090D000
-
-/*-----------------------------------------------------------------------
- * SCCR - System Clock and reset Control Register              15-27
- *-----------------------------------------------------------------------
- */
-#define SCCR_MASK      SCCR_EBDF11
-#define CONFIG_SYS_SCCR        0x02000000
-
-
-/*-----------------------------------------------------------------------
- * Debug Enable Register
- * 0x73E67C0F - All interrupts handled by BDM
- * 0x00824001 - Only interrupts needed by MWDebug.exe handled by BDM
- *-----------------------------------------------------------------------
-#define CONFIG_SYS_DER                 0x73E67C0F
-*/
-#define CONFIG_SYS_DER                 0x0082400F
-
-
-/*-----------------------------------------------------------------------
- * Memory Controller Initialization Constants
- *-----------------------------------------------------------------------
- */
-
-/*
- * BR0 and OR0 (AMD 512K Socketed FLASH)
- * Base address = 0xFFF0_0000 - 0xFFF7_FFFF (After relocation)
- */
-#define CONFIG_SYS_PRELIM_OR_AM
-#define CONFIG_SYS_OR_TIMING_FLASH
-
-#define FLASH_BASE0_PRELIM     0xFFF00001
-#define CONFIG_SYS_OR0_PRELIM          0xFFF80D42
-#define CONFIG_SYS_BR0_PRELIM          0xFFF00401
-
-
-/*
- * BR1 and OR1 (Intel 8M StrataFLASH)
- * Base address = 0xD000_0000 - 0xD07F_FFFF
- */
-
-#define FLASH_BASE1_PRELIM     0xD0000000
-#define CONFIG_SYS_OR1_PRELIM          0xFF800D42
-#define CONFIG_SYS_BR1_PRELIM          0xD0000801
-/* #define CONFIG_SYS_OR1              0xFF800D42 */
-/* #define CONFIG_SYS_BR1              0xD0000801 */
-
-
-/*
- * BR2 and OR2 (SDRAM)
- * Base Address = 0x00000000 - 0x00FF_FFFF (16M After relocation)
- * Base Address = 0x00000000 - 0x03FF_FFFF (64M After relocation)
- * Base Address = 0x00000000 - 0x07FF_FFFF (128M After relocation)
- *
- */
-#define SDRAM_BASE             0x00000000      /* SDRAM bank */
-#define SDRAM_PRELIM_OR_AM     0xF8000000      /* map max. 128 MB */
-
-/* SDRAM timing */
-#define SDRAM_TIMING           0x00000A00
-
-/* For boards with 16M of SDRAM */
-#define SDRAM_16M_MAX_SIZE     0x01000000      /* max 16MB SDRAM */
-#define CONFIG_SYS_16M_MBMR            0x18802114      /* Mem Periodic Timer Prescaler */
-
-/* For boards with 64M of SDRAM */
-#define SDRAM_64M_MAX_SIZE     0x04000000      /* max 64MB SDRAM */
-/* TODO - determine real value */
-#define CONFIG_SYS_64M_MBMR            0x18802114      /* Mem Period Timer Prescaler */
-
-#define CONFIG_SYS_OR2                 (SDRAM_PRELIM_OR_AM | SDRAM_TIMING)
-#define CONFIG_SYS_BR2                 (SDRAM_BASE | 0x000000C1)
-
-
-/*
- * BR3 and OR3 (NVRAM, Sipex, NAND Flash)
- * Base address = 0xD100_0000 - 0xD100_FFFF (64K NVRAM)
- * Base address = 0xD108_0000 - 0xD108_0000 (Sipex chip ctl register)
- * Base address = 0xD110_0000 - 0xD110_0000 (NAND ctl register)
- * Base address = 0xD138_0000 - 0xD138_0000 (LED ctl register)
- *
- */
-
-#define CONFIG_SYS_OR3_PRELIM          0xFFC00DF6
-#define CONFIG_SYS_BR3_PRELIM          0xD1000401
-/* #define CONFIG_SYS_OR3              0xFFC00DF6 */
-/* #define CONFIG_SYS_BR3              0xD1000401 */
-
-
-/*
- * BR4 and OR4 (Unused)
- * Base address = 0xE000_0000 - 0xE3FF_FFFF
- *
- */
-
-#define CONFIG_SYS_OR4_PRELIM          0xFF000000
-#define CONFIG_SYS_BR4_PRELIM          0xE0000000
-/* #define CONFIG_SYS_OR4              0xFF000000 */
-/* #define CONFIG_SYS_BR4              0xE0000000 */
-
-
-/*
- * BR5 and OR5 (Expansion bus)
- * Base address = 0xE400_0000 - 0xE7FF_FFFF
- *
- */
-
-#define CONFIG_SYS_OR5_PRELIM          0xFF000000
-#define CONFIG_SYS_BR5_PRELIM          0xE4000000
-/* #define CONFIG_SYS_OR5              0xFF000000 */
-/* #define CONFIG_SYS_BR5              0xE4000000 */
-
-
-/*
- * BR6 and OR6 (Expansion bus)
- * Base address = 0xE800_0000 - 0xEBFF_FFFF
- *
- */
-
-#define CONFIG_SYS_OR6_PRELIM          0xFF000000
-#define CONFIG_SYS_BR6_PRELIM          0xE8000000
-/* #define CONFIG_SYS_OR6              0xFF000000 */
-/* #define CONFIG_SYS_BR6              0xE8000000 */
-
-
-/*
- * BR7 and OR7 (Expansion bus)
- * Base address = 0xEC00_0000 - 0xEFFF_FFFF
- *
- */
-
-#define CONFIG_SYS_OR7_PRELIM          0xFF000000
-#define CONFIG_SYS_BR7_PRELIM          0xE8000000
-/* #define CONFIG_SYS_OR7              0xFF000000 */
-/* #define CONFIG_SYS_BR7              0xE8000000 */
-
-/*
- * Sanity checks
- */
-#if defined(CONFIG_SCC1_ENET) && defined(CONFIG_FEC_ENET)
-#error Both CONFIG_SCC1_ENET and CONFIG_FEC_ENET configured
-#endif
-
-#endif /* __CONFIG_H */
diff --git a/include/configs/RBC823.h b/include/configs/RBC823.h
deleted file mode 100644 (file)
index e7e061c..0000000
+++ /dev/null
@@ -1,407 +0,0 @@
-/*
- * (C) Copyright 2000, 2001
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * Modified by Udi Finkelstein udif@udif.com
- * For the RBC823 board.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/*
- * board/config.h - configuration options, board specific
- */
-
-#ifndef __CONFIG_H
-#define __CONFIG_H
-
-/*
- * High Level Configuration Options
- * (easy to change)
- */
-
-#define CONFIG_MPC823          1       /* This is a MPC823 CPU         */
-#define CONFIG_RBC823          1       /* ...on a RBC823 module        */
-
-#define        CONFIG_SYS_TEXT_BASE    0xFFF00000
-
-#if 0
-#define DEBUG                  1
-#define CONFIG_LAST_STAGE_INIT
-#endif
-#define CONFIG_KEYBOARD                1       /* This board has a custom keybpard */
-#define CONFIG_LCD             1       /* use LCD controller ...       */
-#define CONFIG_MPC8XX_LCD
-#define CONFIG_HITACHI_SP19X001_Z1A    /* The LCD type we use */
-
-#define        CONFIG_8xx_CONS_SMC2    1       /* Console is on SMC2           */
-#undef CONFIG_8xx_CONS_SMC1
-#undef CONFIG_8xx_CONS_NONE
-#define CONFIG_BAUDRATE                115200  /* console baudrate = 115kbps   */
-#if 1
-#define CONFIG_BOOTDELAY       -1      /* autoboot disabled            */
-#else
-#define CONFIG_BOOTDELAY       5       /* autoboot after 5 seconds     */
-#endif
-
-#define        CONFIG_CLOCKS_IN_MHZ    1       /* clocks passsed to Linux in MHz */
-#define CONFIG_8xx_GCLK_FREQ    48000000L
-
-#define CONFIG_PREBOOT "echo;echo Type \\\"run flash_nfs\\\" to mount root filesystem over NFS;echo"
-
-#undef CONFIG_BOOTARGS
-#define CONFIG_BOOTCOMMAND                                                     \
-       "bootp; "                                                               \
-       "setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} "     \
-       "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; "   \
-       "bootm"
-
-#define CONFIG_LOADS_ECHO      1       /* echo on for serial download  */
-#undef CONFIG_SYS_LOADS_BAUD_CHANGE            /* don't allow baudrate change  */
-
-#undef CONFIG_WATCHDOG                 /* watchdog disabled            */
-
-#define CONFIG_STATUS_LED      1       /* Status LED enabled           */
-
-#undef CONFIG_CAN_DRIVER               /* CAN Driver support disabled  */
-
-/*
- * BOOTP options
- */
-#define CONFIG_BOOTP_SUBNETMASK
-#define CONFIG_BOOTP_GATEWAY
-#define CONFIG_BOOTP_HOSTNAME
-#define CONFIG_BOOTP_BOOTPATH
-#define CONFIG_BOOTP_BOOTFILESIZE
-
-
-#undef CONFIG_MAC_PARTITION
-#define CONFIG_DOS_PARTITION
-
-#undef CONFIG_RTC_MPC8xx               /* don't use internal RTC of MPC8xx (no battery)        */
-
-#define CONFIG_HARD_I2C
-#define CONFIG_SYS_I2C_SPEED 40000
-#define CONFIG_SYS_I2C_SLAVE 0xfe
-#define CONFIG_SYS_I2C_EEPROM_ADDR             0x50
-#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN         1
-#define CONFIG_SYS_EEPROM_WRITE_BITS           4
-#define CONFIG_SYS_EEPROM_WRITE_DELAY_MS       10
-
-/*
- * Command line configuration.
- */
-#include <config_cmd_default.h>
-
-#define CONFIG_CMD_ASKENV
-#define CONFIG_CMD_BEDBUG
-#define CONFIG_CMD_BMP
-#define CONFIG_CMD_CACHE
-#define CONFIG_CMD_CDP
-#define CONFIG_CMD_DHCP
-#define CONFIG_CMD_DIAG
-#define CONFIG_CMD_EEPROM
-#define CONFIG_CMD_ELF
-#define CONFIG_CMD_FAT
-#define CONFIG_CMD_I2C
-#define CONFIG_CMD_IMMAP
-#define CONFIG_CMD_KGDB
-#define CONFIG_CMD_PING
-#define CONFIG_CMD_PORTIO
-#define CONFIG_CMD_REGINFO
-#define CONFIG_CMD_SAVES
-#define CONFIG_CMD_SDRAM
-
-#undef CONFIG_CMD_SETGETDCR
-#undef CONFIG_CMD_XIMG
-
-/*
- * Miscellaneous configurable options
- */
-#define        CONFIG_SYS_LONGHELP                     /* undef to save memory         */
-#if defined(CONFIG_CMD_KGDB)
-#define        CONFIG_SYS_CBSIZE       1024            /* Console I/O Buffer Size      */
-#else
-#define        CONFIG_SYS_CBSIZE       256             /* Console I/O Buffer Size      */
-#endif
-#define        CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
-#define        CONFIG_SYS_MAXARGS      16              /* max number of command args   */
-#define CONFIG_SYS_BARGSIZE    CONFIG_SYS_CBSIZE       /* Boot Argument Buffer Size    */
-
-#define CONFIG_SYS_MEMTEST_START       0x0400000       /* memtest works on     */
-#define CONFIG_SYS_MEMTEST_END         0x0C00000       /* 4 ... 12 MB in DRAM  */
-
-#define        CONFIG_SYS_LOAD_ADDR            0x0100000       /* default load address */
-
-/*
- * Low Level Configuration Settings
- * (address mappings, register initial values, etc.)
- * You should know what you are doing if you make changes here.
- */
-/*-----------------------------------------------------------------------
- * Internal Memory Mapped Register
- */
-#define CONFIG_SYS_IMMR                0xFF000000
-
-/*-----------------------------------------------------------------------
- * Definitions for initial stack pointer and data area (in DPRAM)
- */
-#define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
-#define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
-
-/*-----------------------------------------------------------------------
- * Start addresses for the final memory configuration
- * (Set up by the startup code)
- * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0
- */
-#define        CONFIG_SYS_SDRAM_BASE           0x00000000
-#define CONFIG_SYS_FLASH_BASE          0xFFF00000
-#if defined(DEBUG)
-#define        CONFIG_SYS_MONITOR_LEN          (384 << 10)     /* Reserve 256 kB for Monitor   */
-#else
-#define        CONFIG_SYS_MONITOR_LEN          (384 << 10)     /* Reserve 192 kB for Monitor   */
-#endif
-#define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_FLASH_BASE
-#define        CONFIG_SYS_MALLOC_LEN           (128 << 10)     /* Reserve 128 kB for malloc()  */
-
-/*
- * For booting Linux, the board info and command line data
- * have to be in the first 8 MB of memory, since this is
- * the maximum mapped by the Linux kernel during initialization.
- */
-#define        CONFIG_SYS_BOOTMAPSZ            (8 << 20)       /* Initial Memory map for Linux */
-
-/*-----------------------------------------------------------------------
- * FLASH organization
- */
-#define CONFIG_SYS_MAX_FLASH_BANKS     1       /* max number of memory banks           */
-#define CONFIG_SYS_MAX_FLASH_SECT      67      /* max number of sectors on one chip    */
-
-#define CONFIG_SYS_FLASH_ERASE_TOUT    120000  /* Timeout for Flash Erase (in ms)      */
-#define CONFIG_SYS_FLASH_WRITE_TOUT    500     /* Timeout for Flash Write (in ms)      */
-
-#define        CONFIG_ENV_IS_IN_FLASH  1
-#define        CONFIG_ENV_OFFSET               0x10000 /*   Offset   of Environment Sector     */
-#define        CONFIG_ENV_SIZE         0x10000 /* Total Size of Environment Sector     */
-
-/*-----------------------------------------------------------------------
- * Cache Configuration
- */
-#define CONFIG_SYS_CACHELINE_SIZE      16      /* For all MPC8xx CPUs                  */
-#if defined(CONFIG_CMD_KGDB)
-#define CONFIG_SYS_CACHELINE_SHIFT     4       /* log base 2 of the above value        */
-#endif
-
-/*-----------------------------------------------------------------------
- * SYPCR - System Protection Control                           11-9
- * SYPCR can only be written once after reset!
- *-----------------------------------------------------------------------
- * Software & Bus Monitor Timer max, Bus Monitor enable, SW Watchdog freeze
- */
-#if defined(CONFIG_WATCHDOG)
-#define CONFIG_SYS_SYPCR       (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | \
-                        SYPCR_SWE  | SYPCR_SWRI| SYPCR_SWP)
-#else
-/*
-#define CONFIG_SYS_SYPCR       (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | SYPCR_SWP)
-*/
-#define CONFIG_SYS_SYPCR       (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWRI | SYPCR_SWP)
-#endif
-
-/*-----------------------------------------------------------------------
- * SIUMCR - SIU Module Configuration                           11-6
- *-----------------------------------------------------------------------
- * PCMCIA config., multi-function pin tri-state
- */
-#define CONFIG_SYS_SIUMCR      (SIUMCR_DBGC11 | SIUMCR_DBPC00 | SIUMCR_MLRC00 | SIUMCR_FRC)
-
-/*-----------------------------------------------------------------------
- * TBSCR - Time Base Status and Control                                11-26
- *-----------------------------------------------------------------------
- * Clear Reference Interrupt Status, Timebase freezing enabled
- */
-#define CONFIG_SYS_TBSCR       (TBSCR_REFA | TBSCR_REFB | TBSCR_TBF)
-
-/*-----------------------------------------------------------------------
- * RTCSC - Real-Time Clock Status and Control Register         11-27
- *-----------------------------------------------------------------------
- */
-#define CONFIG_SYS_RTCSC       (RTCSC_SEC | RTCSC_ALR | RTCSC_RTF| RTCSC_RTE)
-
-/*-----------------------------------------------------------------------
- * PISCR - Periodic Interrupt Status and Control               11-31
- *-----------------------------------------------------------------------
- * Clear Periodic Interrupt Status, Interrupt Timer freezing enabled
- */
-#define CONFIG_SYS_PISCR       (PISCR_PS | PISCR_PITF)
-
-/*-----------------------------------------------------------------------
- * PLPRCR - PLL, Low-Power, and Reset Control Register         15-30
- *-----------------------------------------------------------------------
- * Reset PLL lock status sticky bit, timer expired status bit and timer
- * interrupt status bit
- *
- */
-
-/*
- * for 48 MHz, we use a 4 MHz clock * 12
- */
-#define CONFIG_SYS_PLPRCR                                                      \
-               ( (12-1)<<PLPRCR_MF_SHIFT | PLPRCR_TEXPS | PLPRCR_LOLRE )
-
-/*-----------------------------------------------------------------------
- * SCCR - System Clock and reset Control Register              15-27
- *-----------------------------------------------------------------------
- * Set clock output, timebase and RTC source and divider,
- * power management and some other internal clocks
- */
-#define SCCR_MASK      SCCR_EBDF11
-#define CONFIG_SYS_SCCR        (SCCR_RTDIV   | SCCR_RTSEL    | SCCR_CRQEN    | \
-                        SCCR_PRQEN   | SCCR_EBDF00   | \
-                        SCCR_COM01   | SCCR_DFSYNC00 | SCCR_DFBRG00  | \
-                        SCCR_DFNL000 | SCCR_DFNH000  | SCCR_DFLCD001 | \
-                        SCCR_DFALCD00)
-
-#ifdef NOT_USED
-/*-----------------------------------------------------------------------
- * PCMCIA stuff
- *-----------------------------------------------------------------------
- *
- */
-#define CONFIG_SYS_PCMCIA_MEM_ADDR     (0xE0000000)
-#define CONFIG_SYS_PCMCIA_MEM_SIZE     ( 64 << 20 )
-#define CONFIG_SYS_PCMCIA_DMA_ADDR     (0xE4000000)
-#define CONFIG_SYS_PCMCIA_DMA_SIZE     ( 64 << 20 )
-#define CONFIG_SYS_PCMCIA_ATTRB_ADDR   (0xE8000000)
-#define CONFIG_SYS_PCMCIA_ATTRB_SIZE   ( 64 << 20 )
-#define CONFIG_SYS_PCMCIA_IO_ADDR      (0xEC000000)
-#define CONFIG_SYS_PCMCIA_IO_SIZE      ( 64 << 20 )
-
-/*-----------------------------------------------------------------------
- * IDE/ATA stuff (Supports IDE harddisk on PCMCIA Adapter)
- *-----------------------------------------------------------------------
- */
-
-#define        CONFIG_IDE_PCCARD       1       /* Use IDE with PC Card Adapter */
-
-#undef CONFIG_IDE_PCMCIA               /* Direct IDE    not supported  */
-#undef CONFIG_IDE_LED                  /* LED   for ide not supported  */
-#undef CONFIG_IDE_RESET                /* reset for ide not supported  */
-
-#define CONFIG_SYS_IDE_MAXBUS          1       /* max. 1 IDE bus               */
-#define CONFIG_SYS_IDE_MAXDEVICE       1       /* max. 1 drive per IDE bus     */
-
-#define CONFIG_SYS_ATA_IDE0_OFFSET     0x0000
-
-#define CONFIG_SYS_ATA_BASE_ADDR       CONFIG_SYS_PCMCIA_MEM_ADDR
-
-/* Offset for data I/O                 */
-#define CONFIG_SYS_ATA_DATA_OFFSET     (CONFIG_SYS_PCMCIA_MEM_SIZE + 0x320)
-
-/* Offset for normal register accesses */
-#define CONFIG_SYS_ATA_REG_OFFSET      (2 * CONFIG_SYS_PCMCIA_MEM_SIZE + 0x320)
-
-/* Offset for alternate registers      */
-#define CONFIG_SYS_ATA_ALT_OFFSET      0x0100
-
-#endif
-
-/*-----------------------------------------------------------------------
- *
- *-----------------------------------------------------------------------
- *
- */
-/*#define      CONFIG_SYS_DER  0x2002000F*/
-#define CONFIG_SYS_DER 0
-
-/*
- * Init Memory Controller:
- *
- * BR0/1 and OR0/1 (FLASH)
- */
-
-#define FLASH_BASE0_PRELIM     0xFFF00000      /* FLASH bank #0        */
-#define FLASH_BASE1_PRELIM     0x04000000      /* D.O.C Millenium      */
-
-/* used to re-map FLASH both when starting from SRAM or FLASH:
- * restrict access enough to keep SRAM working (if any)
- * but not too much to meddle with FLASH accesses
- */
-#define CONFIG_SYS_PRELIM_OR_AM        0xFFF80000      /* OR addr mask */
-
-/* FLASH timing: ACS = 00, TRLX = 0, CSNT = 1, SCY = 7, EHTR = 1       */
-#define CONFIG_SYS_OR_TIMING_FLASH  (OR_ACS_DIV1 | OR_BI | OR_SCY_7_CLK | OR_EHTR)
-
-#define CONFIG_SYS_OR_TIMING_MSYS   (OR_ACS_DIV1 | OR_BI)
-
-#define CONFIG_SYS_OR0_PRELIM  (CONFIG_SYS_PRELIM_OR_AM | CONFIG_SYS_OR_TIMING_FLASH)
-#define CONFIG_SYS_BR0_PRELIM  ((FLASH_BASE0_PRELIM & BR_BA_MSK) | BR_PS_8 | BR_V)
-
-#define CONFIG_SYS_OR1_PRELIM  (CONFIG_SYS_PRELIM_OR_AM | CONFIG_SYS_OR_TIMING_MSYS)
-#define CONFIG_SYS_BR1_PRELIM  ((FLASH_BASE1_PRELIM & BR_BA_MSK) | BR_MS_UPMB | \
-                         BR_PS_8 | BR_V)
-
-/*
- * BR4 and OR4 (SDRAM)
- *
- */
-#define SDRAM_BASE4_PRELIM     0x00000000      /* SDRAM bank #0        */
-#define        SDRAM_MAX_SIZE          0x04000000      /* max 64 MB per bank   */
-
-/*
- * SDRAM timing:
- */
-#define CONFIG_SYS_OR_TIMING_SDRAM     (OR_CSNT_SAM)
-
-#define CONFIG_SYS_OR4_PRELIM  (~(SDRAM_MAX_SIZE-1) | CONFIG_SYS_OR_TIMING_SDRAM )
-#define CONFIG_SYS_BR4_PRELIM  ((SDRAM_BASE4_PRELIM & BR_BA_MSK) | BR_MS_UPMA | BR_V )
-
-/*
- * Memory Periodic Timer Prescaler
- */
-
-/* periodic timer for refresh */
-#define CONFIG_SYS_MAMR_PTA    187             /* start with divider for 48 MHz        */
-
-/* refresh rate 15.6 us (= 64 ms / 4K = 62.4 / quad bursts) for <= 128 MBit    */
-#define CONFIG_SYS_MPTPR_2BK_4K        MPTPR_PTP_DIV16         /* setting for 2 banks  */
-#define CONFIG_SYS_MPTPR_1BK_4K        MPTPR_PTP_DIV32         /* setting for 1 bank   */
-
-/* refresh rate 7.8 us (= 64 ms / 8K = 31.2 / quad bursts) for 256 MBit                */
-#define CONFIG_SYS_MPTPR_2BK_8K        MPTPR_PTP_DIV8          /* setting for 2 banks  */
-#define CONFIG_SYS_MPTPR_1BK_8K        MPTPR_PTP_DIV16         /* setting for 1 bank   */
-
-/*
- * MAMR settings for SDRAM
- */
-
-/* 8 column SDRAM */
-#define CONFIG_SYS_MAMR_8COL   ((CONFIG_SYS_MAMR_PTA << MAMR_PTA_SHIFT)  | MAMR_PTAE       |   \
-                        MAMR_AMA_TYPE_0 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A11 |   \
-                        MAMR_RLFA_1X    | MAMR_WLFA_1X    | MAMR_TLFA_4X)
-/* 9 column SDRAM */
-#define CONFIG_SYS_MAMR_9COL   ((CONFIG_SYS_MAMR_PTA << MAMR_PTA_SHIFT)  | MAMR_PTAE       |   \
-                        MAMR_AMA_TYPE_1 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A10 |   \
-                        MAMR_RLFA_1X    | MAMR_WLFA_1X    | MAMR_TLFA_4X)
-
-/*
- * JFFS2 partitions
- *
- */
-/* No command line, one static partition, whole device */
-#undef CONFIG_CMD_MTDPARTS
-#define CONFIG_JFFS2_DEV               "nor0"
-#define CONFIG_JFFS2_PART_SIZE         0xFFFFFFFF
-#define CONFIG_JFFS2_PART_OFFSET       0x00000000
-
-/* mtdparts command line support */
-/* Note: fake mtd_id used, no linux mtd map file */
-/*
-#define CONFIG_CMD_MTDPARTS
-#define MTDIDS_DEFAULT         ""
-#define MTDPARTS_DEFAULT       ""
-*/
-
-#endif /* __CONFIG_H */
diff --git a/include/configs/RPXlite_DW.h b/include/configs/RPXlite_DW.h
deleted file mode 100644 (file)
index 50c82c6..0000000
+++ /dev/null
@@ -1,462 +0,0 @@
-/*
- * (C) Copyright 2004
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- * Sam Song, IEMC. SHU, samsongshu@yahoo.com.cn
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/*
- * board/config.h - configuration options, board specific
- */
-
-/* Yoo. Jonghoon, IPone, yooth@ipone.co.kr
- * U-BOOT port on RPXlite board
- */
-
-/*
- * Sam Song, IEMC. SHU, samsongshu@yahoo.com.cn
- * U-BOOT port on RPXlite DW version board--RPXlite_DW
- * June 8 ,2004
- */
-
-#ifndef __CONFIG_H
-#define __CONFIG_H
-
-/*
- * High Level Configuration Options
- * (easy to change)
- */
-
-/* #define DEBUG       1 */
-/* #define DEPLOYMENT  1 */
-
-#undef CONFIG_MPC860
-#define CONFIG_MPC823          1       /* This is a MPC823e CPU. */
-#define CONFIG_RPXLITE         1       /* RPXlite DW version board */
-
-#define        CONFIG_SYS_TEXT_BASE    0xff000000
-
-#ifdef CONFIG_LCD                      /* with LCD controller ?        */
-#define CONFIG_MPC8XX_LCD
-#define CONFIG_SPLASH_SCREEN           /* ... with splashscreen support*/
-#endif
-
-#define CONFIG_8xx_CONS_SMC1   1       /* Console is on SMC1           */
-#undef CONFIG_8xx_CONS_SMC2
-#undef CONFIG_8xx_CONS_NONE
-#define CONFIG_BAUDRATE                9600    /* console default baudrate = 9600bps   */
-
-#ifdef DEBUG
-#define CONFIG_BOOTDELAY       -1      /* autoboot disabled            */
-#else
-#define CONFIG_BOOTDELAY       6       /* autoboot after 6 seconds     */
-
-#ifdef DEPLOYMENT
-#define CONFIG_BOOT_RETRY_TIME         -1
-#define CONFIG_AUTOBOOT_KEYED
-#define CONFIG_AUTOBOOT_PROMPT         \
-       "autoboot in %d seconds (stop with 'st')...\n", bootdelay
-#define CONFIG_AUTOBOOT_STOP_STR       "st"
-#define CONFIG_ZERO_BOOTDELAY_CHECK
-#define CONFIG_RESET_TO_RETRY          1
-#define CONFIG_BOOT_RETRY_MIN          1
-#endif /* DEPLOYMENT */
-#endif /* DEBUG */
-
-/* pre-boot commands */
-#define CONFIG_PREBOOT         "setenv stdout serial;setenv stdin serial"
-
-#undef CONFIG_BOOTARGS
-#define CONFIG_EXTRA_ENV_SETTINGS                                      \
-       "netdev=eth0\0"                                                 \
-       "nfsargs=setenv bootargs console=tty0 console=ttyS0,9600 "      \
-               "root=/dev/nfs rw nfsroot=${serverip}:${rootpath}\0"    \
-       "ramargs=setenv bootargs console=tty0 root=/dev/ram rw\0"       \
-       "addip=setenv bootargs ${bootargs} "                            \
-               "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}"      \
-               ":${hostname}:${netdev}:off panic=1\0"                  \
-       "flash_nfs=run nfsargs addip;"                                  \
-               "bootm ${kernel_addr}\0"                                \
-       "flash_self=run ramargs addip;"                                 \
-               "bootm ${kernel_addr} ${ramdisk_addr}\0"                \
-       "net_nfs=tftp 200000 ${bootfile};run nfsargs addip;bootm\0"     \
-       "gatewayip=172.16.115.254\0"                                    \
-       "netmask=255.255.255.0\0"                                       \
-       "kernel_addr=ff040000\0"                                        \
-       "ramdisk_addr=ff200000\0"                                       \
-       "ku=era ${kernel_addr} ff1fffff;cp.b 100000 ${kernel_addr} "    \
-               "${filesize};md ${kernel_addr};"                        \
-               "echo kernel updating finished\0"                       \
-       "uu=protect off 1:0-4;era 1:0-4;cp.b 100000 ff000000 "          \
-               "${filesize};md ff000000;"                              \
-               "echo u-boot updating finished\0"                       \
-       "eu=protect off 1:6;era 1:6;reset\0"                            \
-       "lcd=setenv stdout lcd;setenv stdin lcd\0"                      \
-       "ser=setenv stdout serial;setenv stdin serial\0"                \
-       "verify=no"
-
-#define CONFIG_BOOTCOMMAND     "run flash_self"
-
-#define CONFIG_LOADS_ECHO      1       /* echo on for serial download  */
-#undef CONFIG_SYS_LOADS_BAUD_CHANGE            /* don't allow baudrate change  */
-#undef CONFIG_WATCHDOG                 /* watchdog disabled            */
-#undef CONFIG_STATUS_LED               /* disturbs display. Status LED disabled. */
-
-/*
- * BOOTP options
- */
-#define CONFIG_BOOTP_SUBNETMASK
-#define CONFIG_BOOTP_GATEWAY
-#define CONFIG_BOOTP_HOSTNAME
-#define CONFIG_BOOTP_BOOTPATH
-#define CONFIG_BOOTP_BOOTFILESIZE
-
-
-#if 1         /* Enable this stuff could make image enlarge about 25KB. Mask it if you
-                 don't want the advanced function */
-
-
-/*
- * Command line configuration.
- */
-#include <config_cmd_default.h>
-
-#define CONFIG_CMD_ASKENV
-#define CONFIG_CMD_JFFS2
-#define CONFIG_CMD_PING
-#define CONFIG_CMD_ELF
-#define CONFIG_CMD_REGINFO
-#define CONFIG_CMD_DHCP
-
-#ifdef CONFIG_SPLASH_SCREEN
-#define CONFIG_CMD_BMP
-#endif
-
-
-/* test-only */
-#define CONFIG_SYS_JFFS2_FIRST_BANK    0           /* use for JFFS2 */
-#define CONFIG_SYS_JFFS2_NUM_BANKS     1           /* ! second bank contains U-Boot */
-
-#define CONFIG_NETCONSOLE
-
-#endif /* 1 */
-
-/*
- * Miscellaneous configurable options
- */
-#define CONFIG_SYS_LONGHELP                    /* undef to save memory         */
-#define CONFIG_SYS_PROMPT      "u-boot>"       /* Monitor Command Prompt   */
-
-#if defined(CONFIG_CMD_KGDB)
-#define CONFIG_SYS_CBSIZE      1024            /* Console I/O Buffer Size      */
-#else
-#define CONFIG_SYS_CBSIZE      256             /* Console I/O Buffer Size      */
-#endif
-
-#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
-#define CONFIG_SYS_MAXARGS     16              /* max number of command args   */
-#define CONFIG_SYS_BARGSIZE    CONFIG_SYS_CBSIZE       /* Boot Argument Buffer Size    */
-
-#define CONFIG_SYS_MEMTEST_START       0x0040000       /* memtest works on     */
-#define CONFIG_SYS_MEMTEST_END         0x00C0000       /* 4 ... 12 MB in DRAM  */
-#define CONFIG_SYS_LOAD_ADDR           0x100000        /* default load address */
-
-/*
- * Low Level Configuration Settings
- * (address mappings, register initial values, etc.)
- * You should know what you are doing if you make changes here.
- */
-/*-----------------------------------------------------------------------
- * Internal Memory Mapped Register
- */
-#define CONFIG_SYS_IMMR                0xFA200000
-
-/*-----------------------------------------------------------------------
- * Definitions for initial stack pointer and data area (in DPRAM)
- */
-#define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_SIZE       0x2F00          /* Size of used area in DPRAM   */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
-#define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
-
-/*-----------------------------------------------------------------------
- * Start addresses for the final memory configuration
- * (Set up by the startup code)
- * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0
- */
-#define CONFIG_SYS_SDRAM_BASE          0x00000000
-#define CONFIG_SYS_FLASH_BASE          0xFF000000
-
-#if defined(DEBUG) || defined(CONFIG_CMD_IDE)
-#define CONFIG_SYS_MONITOR_LEN         (256 << 10)     /* Reserve 256 kB for Monitor   */
-#else
-#define CONFIG_SYS_MONITOR_LEN         (128 << 10)     /* Reserve 128 kB for Monitor */
-#endif
-
-#define CONFIG_SYS_MONITOR_BASE        0xFF000000
-#define CONFIG_SYS_MALLOC_LEN          (128 << 10)     /* Reserve 128 kB for malloc()  */
-
-/*
- * For booting Linux, the board info and command line data
- * have to be in the first 8 MB of memory, since this is
- * the maximum mapped by the Linux kernel during initialization.
- */
-#define CONFIG_SYS_BOOTMAPSZ           (8 << 20)       /* Initial Memory map for Linux */
-
-/*-----------------------------------------------------------------------
- * FLASH organization
- */
-#define CONFIG_SYS_MAX_FLASH_BANKS     1       /* max number of memory banks           */
-#define CONFIG_SYS_MAX_FLASH_SECT      71      /* max number of sectors on one chip    */
-#define CONFIG_SYS_FLASH_ERASE_TOUT    120000  /* Timeout for Flash Erase (in ms)      */
-#define CONFIG_SYS_FLASH_WRITE_TOUT    500     /* Timeout for Flash Write (in ms)      */
-
-#ifdef CONFIG_ENV_IS_IN_NVRAM
-#define CONFIG_ENV_ADDR                0xFA000100
-#define CONFIG_ENV_SIZE                0x1000
-#else
-#define CONFIG_ENV_IS_IN_FLASH
-#define CONFIG_ENV_OFFSET              0x30000 /* Offset of Environment Sector         */
-#define CONFIG_ENV_SIZE                0x8000  /* Total Size of Environment Sector     */
-#endif /* CONFIG_ENV_IS_IN_NVRAM */
-
-#define CONFIG_SYS_RESET_ADDRESS       ((ulong)((((immap_t *)CONFIG_SYS_IMMR)->im_clkrst.res)))
-
-/*-----------------------------------------------------------------------
- * Cache Configuration
- */
-#define CONFIG_SYS_CACHELINE_SIZE      16      /* For all MPC8xx CPUs                  */
-#if defined(CONFIG_CMD_KGDB)
-#define CONFIG_SYS_CACHELINE_SHIFT     4       /* log base 2 of the above value        */
-#endif
-
-/*-----------------------------------------------------------------------
- * SYPCR - System Protection Control   32-bit                  12-35
- * SYPCR can only be written once after reset!
- *-----------------------------------------------------------------------
- * Software & Bus Monitor Timer max, Bus Monitor enable, SW Watchdog freeze
- */
-#if defined(CONFIG_WATCHDOG)
-#define CONFIG_SYS_SYPCR       (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | \
-                        SYPCR_SWE  | SYPCR_SWRI| SYPCR_SWP)
-#else
-#define CONFIG_SYS_SYPCR       (SYPCR_SWTC | 0x00000600 | SYPCR_BME | SYPCR_SWF | SYPCR_SWP)
-#endif /* We can get SYPCR: 0xFFFF0689. */
-
-/*-----------------------------------------------------------------------
- * SIUMCR - SIU Module Configuration   32-bit                   12-30
- *-----------------------------------------------------------------------
- * PCMCIA config., multi-function pin tri-state
- */
-#define CONFIG_SYS_SIUMCR      (SIUMCR_MLRC10)        /* SIUMCR:0x00000800 */
-
-/*---------------------------------------------------------------------
- * TBSCR - Time Base Status and Control         16-bit                  12-16
- *---------------------------------------------------------------------
- * Clear Reference Interrupt Status, Timebase freezing enabled
- */
-#define CONFIG_SYS_TBSCR       (TBSCR_REFA | TBSCR_REFB | TBSCR_TBF | TBSCR_TBE)
-/* TBSCR: 0x00C3 [SAM] */
-
-/*-----------------------------------------------------------------------
- * RTCSC - Real-Time Clock Status and Control Register 16-bit   12-18
- *-----------------------------------------------------------------------
- * [RTC enabled but not stopped on FRZ]
- */
-#define CONFIG_SYS_RTCSC    (RTCSC_SEC | RTCSC_ALR | RTCSC_RTE) /* RTCSC:0x00C1        */
-
-/*-----------------------------------------------------------------------
- * PISCR - Periodic Interrupt Status and Control 16-bit                 12-23
- *-----------------------------------------------------------------------
- * Clear Periodic Interrupt Status, Interrupt Timer freezing enabled
- * [Periodic timer enabled,Periodic timer interrupt disable. ]
- */
-#define CONFIG_SYS_PISCR (PISCR_PS | PISCR_PITF | PISCR_PTE)  /* PISCR:0x0083          */
-
-/*-----------------------------------------------------------------------
- * PLPRCR - PLL, Low-Power, and Reset Control Register 32-bit   5-7
- *-----------------------------------------------------------------------
- * Reset PLL lock status sticky bit, timer expired status bit and timer
- * interrupt status bit
- */
-/* up to 64 MHz we use a 1:2 clock */
-#if defined(RPXlite_64MHz)
-#define CONFIG_SYS_PLPRCR      ( (7 << PLPRCR_MF_SHIFT) | PLPRCR_TEXPS )   /*PLPRCR: 0x00700000. */
-#else
-#define CONFIG_SYS_PLPRCR      ( (5 << PLPRCR_MF_SHIFT) | PLPRCR_TEXPS )
-#endif
-
-/*-----------------------------------------------------------------------
- * SCCR - System Clock and reset Control Register              5-3
- *-----------------------------------------------------------------------
- * Set clock output, timebase and RTC source and divider,
- * power management and some other internal clocks
- */
-#define SCCR_MASK      SCCR_EBDF00
-/* Up to 48MHz system clock, we use 1:1 SYSTEM/BUS ratio */
-#if defined(RPXlite_64MHz)
-#define CONFIG_SYS_SCCR        ( SCCR_TBS | SCCR_EBDF01 )  /* %%%SCCR:0x02020000 */
-#else
-#define CONFIG_SYS_SCCR        ( SCCR_TBS | SCCR_EBDF00 )  /* %%%SCCR:0x02000000 */
-#endif
-
-/*-----------------------------------------------------------------------
- * PCMCIA stuff
- *-----------------------------------------------------------------------
- */
-#define CONFIG_SYS_PCMCIA_MEM_ADDR     (0xE0000000)
-#define CONFIG_SYS_PCMCIA_MEM_SIZE     ( 64 << 20 )
-#define CONFIG_SYS_PCMCIA_DMA_ADDR     (0xE4000000)
-#define CONFIG_SYS_PCMCIA_DMA_SIZE     ( 64 << 20 )
-#define CONFIG_SYS_PCMCIA_ATTRB_ADDR   (0xE8000000)
-#define CONFIG_SYS_PCMCIA_ATTRB_SIZE   ( 64 << 20 )
-#define CONFIG_SYS_PCMCIA_IO_ADDR      (0xEC000000)
-#define CONFIG_SYS_PCMCIA_IO_SIZE      ( 64 << 20 )
-
-/*-----------------------------------------------------------------------
- * IDE/ATA stuff (Supports IDE harddisk on PCMCIA Adapter)
- *-----------------------------------------------------------------------
- */
-#define CONFIG_IDE_PREINIT     1       /* Use preinit IDE hook */
-#define CONFIG_IDE_8xx_PCCARD  1       /* Use IDE with PC Card Adapter */
-
-#undef CONFIG_IDE_8xx_DIRECT           /* Direct IDE    not supported  */
-#undef CONFIG_IDE_LED                  /* LED   for ide not supported  */
-#undef CONFIG_IDE_RESET                /* reset for ide not supported  */
-
-#define CONFIG_SYS_IDE_MAXBUS          1       /* max. 1 IDE bus               */
-#define CONFIG_SYS_IDE_MAXDEVICE       1       /* max. 1 drive per IDE bus     */
-
-#define CONFIG_SYS_ATA_IDE0_OFFSET     0x0000
-#define CONFIG_SYS_ATA_BASE_ADDR       CONFIG_SYS_PCMCIA_MEM_ADDR
-
-/* Offset for data I/O                 */
-#define CONFIG_SYS_ATA_DATA_OFFSET     (CONFIG_SYS_PCMCIA_MEM_SIZE + 0x320)
-
-/* Offset for normal register accesses */
-#define CONFIG_SYS_ATA_REG_OFFSET      (2 * CONFIG_SYS_PCMCIA_MEM_SIZE + 0x320)
-
-/* Offset for alternate registers      */
-#define CONFIG_SYS_ATA_ALT_OFFSET      0x0100
-
-#define                CONFIG_SYS_DER          0
-
-/*
- * Init Memory Controller:
- *
- * BR0 and OR0 (FLASH)
- */
-#define FLASH_BASE_PRELIM      0xFC000000      /* FLASH base   */
-#define CONFIG_SYS_PRELIM_OR_AM        0xFC000000      /* OR addr mask */
-
-/* FLASH timing: ACS = 0, TRLX = 0, CSNT = 0, SCY = 8, ETHR = 0, BIH = 1 */
-#define CONFIG_SYS_OR_TIMING_FLASH (OR_SCY_8_CLK | OR_BI)
-#define CONFIG_SYS_OR0_PRELIM  (CONFIG_SYS_PRELIM_OR_AM | CONFIG_SYS_OR_TIMING_FLASH)
-#define CONFIG_SYS_BR0_PRELIM  ((FLASH_BASE_PRELIM & BR_BA_MSK) | BR_V)
-
-/*
- * BR1 and OR1 (SDRAM)
- *
- */
-#define SDRAM_BASE_PRELIM      0x00000000      /* SDRAM base   */
-#define SDRAM_MAX_SIZE         0x08000000      /* max 128 MB in system */
-
-/* SDRAM timing: Multiplexed addresses, GPL5 output to GPL5_A (don't care)     */
-#define CONFIG_SYS_OR_TIMING_SDRAM     0x00000E00
-#define CONFIG_SYS_OR_AM_SDRAM         (-(SDRAM_MAX_SIZE & OR_AM_MSK))
-#define CONFIG_SYS_OR1_PRELIM  ( CONFIG_SYS_OR_AM_SDRAM | CONFIG_SYS_OR_TIMING_SDRAM )
-#define CONFIG_SYS_BR1_PRELIM  ((SDRAM_BASE_PRELIM & BR_BA_MSK) | BR_MS_UPMA | BR_V )
-
-/* RPXlite mem setting */
-#define CONFIG_SYS_BR3_PRELIM  0xFA400001              /* BCSR */
-#define CONFIG_SYS_OR3_PRELIM  0xFF7F8900
-#define CONFIG_SYS_BR4_PRELIM  0xFA000401              /* NVRAM&SRAM */
-#define CONFIG_SYS_OR4_PRELIM  0xFFFE0040
-
-/*
- * Memory Periodic Timer Prescaler
- */
-/* periodic timer for refresh */
-#if defined(RPXlite_64MHz)
-#define CONFIG_SYS_MAMR_PTA    32
-#else
-#define CONFIG_SYS_MAMR_PTA    20
-#endif
-
-/*
- * Refresh clock Prescalar
- */
-#define CONFIG_SYS_MPTPR       MPTPR_PTP_DIV2
-
-/*
- * MAMR settings for SDRAM
- */
-
-/* 9 column SDRAM */
-#define CONFIG_SYS_MAMR_9COL  ((CONFIG_SYS_MAMR_PTA << MAMR_PTA_SHIFT)  | MAMR_PTAE | \
-                       MAMR_AMA_TYPE_1 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A10)
-/* CONFIG_SYS_MAMR_9COL:0x20904000 @ 64MHz */
-
-/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */
-/* Configuration variable added by yooth. */
-/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */
-/*
- * BCSRx
- *
- * Board Status and Control Registers
- *
- */
-#define BCSR0 0xFA400000
-#define BCSR1 0xFA400001
-#define BCSR2 0xFA400002
-#define BCSR3 0xFA400003
-
-#define BCSR0_ENMONXCVR 0x01   /* Monitor XVCR Control */
-#define BCSR0_ENNVRAM  0x02    /* CS4# Control */
-#define BCSR0_LED5     0x04    /* LED5 control 0='on' 1='off' */
-#define BCSR0_LED4     0x08    /* LED4 control 0='on' 1='off' */
-#define BCSR0_FULLDPLX 0x10    /* Ethernet XCVR Control */
-#define BCSR0_COLTEST  0x20
-#define BCSR0_ETHLPBK  0x40
-#define BCSR0_ETHEN    0x80
-
-#define BCSR1_PCVCTL7  0x01    /* PC Slot B Control */
-#define BCSR1_PCVCTL6  0x02
-#define BCSR1_PCVCTL5  0x04
-#define BCSR1_PCVCTL4  0x08
-#define BCSR1_IPB5SEL  0x10
-
-#define BCSR1_SMC1CTS  0x40    /* Added by SAM. */
-#define BCSR1_SMC1TRS  0x80    /* Added by SAM. */
-
-#define BCSR2_ENRTCIRQ 0x01    /* Added by SAM. */
-#define BCSR2_ENBRG1   0x04    /* Added by SAM. */
-
-#define BCSR2_ENPA5HDR 0x08    /* USB Control */
-#define BCSR2_ENUSBCLK 0x10
-#define BCSR2_USBPWREN 0x20
-#define BCSR2_USBSPD   0x40
-#define BCSR2_USBSUSP  0x80
-
-#define BCSR3_BWKAPWR  0x01   /* Changed by SAM. Backup battery situation */
-#define BCSR3_IRQRTC   0x02   /* Changed by SAM. NVRAM Battery */
-#define BCSR3_RDY_BSY  0x04   /* Changed by SAM. Flash Operation */
-#define BCSR3_MPLX_LIN 0x08   /* Changed by SAM. Linear or Multiplexed address Mode */
-
-#define BCSR3_D27      0x10      /* Dip Switch settings */
-#define BCSR3_D26      0x20
-#define BCSR3_D25      0x40
-#define BCSR3_D24      0x80
-
-/*
- * Environment setting
- */
-#define CONFIG_ETHADDR 00:10:EC:00:37:5B
-#define CONFIG_IPADDR  172.16.115.7
-#define CONFIG_SERVERIP 172.16.115.6
-#define CONFIG_ROOTPATH "/workspace/myfilesystem/target/"
-#define CONFIG_BOOTFILE "uImage.rpxusb"
-#define CONFIG_HOSTNAME LITE_H1_DW
-
-#endif /* __CONFIG_H */
index 341b21df270c305a767fb2a0aad78c6696b96d9f..db5d5ea846b24062a6803557d0f034b9b3198704 100644 (file)
 #elif CONFIG_SYS_USE_MMC
 /* bootstrap + u-boot + env + linux in mmc */
 #define FAT_ENV_INTERFACE      "mmc"
-#define FAT_ENV_DEVICE         0
-#define FAT_ENV_PART           1
+/*
+ * We don't specify the part number, if device 0 has partition table, it means
+ * the first partition; it no partition table, then take whole device as a
+ * FAT file system.
+ */
+#define FAT_ENV_DEVICE_AND_PART        "0"
 #define FAT_ENV_FILE           "uboot.env"
 #define CONFIG_ENV_IS_IN_FAT
 #define CONFIG_FAT_WRITE
index 868813f29b1f3e5d96437069dabd16bbdd676dd9..ec3145f430c549ee0438a409c71874520ea68ae4 100644 (file)
 #define CONFIG_SYS_FSL_I2C2_SPEED      400000
 #define CONFIG_SYS_FSL_I2C2_SLAVE      0x7F
 #define CONFIG_SYS_FSL_I2C2_OFFSET     0x3100
-/* Probing DP501 I2C-Bridge will hang */
-#define CONFIG_SYS_I2C_NOPROBES                { {0, 0x30}, {0, 0x37}, {0, 0x3a}, \
-                                         {0, 0x3b}, {0, 0x50} }
+
+#ifndef CONFIG_TRAILBLAZER
+#define CONFIG_CMD_I2C
+#endif
 
 #define CONFIG_PCA9698                 /* NXP PCA9698 */
 
index 78778970f4a51de4aa56fd0c1b425bf3ad6faa3f..6153a40e06198cc7fcac99fd2c906d6f1c08dbd0 100644 (file)
@@ -17,7 +17,7 @@
  * Include common defines/options for all AMCC eval boards
  */
 #define CONFIG_HOSTNAME                dlvsion-10g
-#define CONFIG_IDENT_STRING    " dlvision-10g 0.05"
+#define CONFIG_IDENT_STRING    " dlvision-10g 0.06"
 #include "amcc-common.h"
 
 #define CONFIG_BOARD_EARLY_INIT_F
@@ -40,6 +40,7 @@
 /* new uImage format support */
 #define CONFIG_FIT
 #define CONFIG_FIT_VERBOSE     /* enable fit_format_{error,warning}() */
+#define CONFIG_FIT_DISABLE_SHA256
 
 #define CONFIG_ENV_IS_IN_FLASH /* use FLASH for environment vars */
 
 /*
  * Commands additional to the ones defined in amcc-common.h
  */
-#define CONFIG_CMD_CACHE
 #define CONFIG_CMD_DTT
+#undef CONFIG_CMD_DHCP
+#undef CONFIG_CMD_DIAG
 #undef CONFIG_CMD_EEPROM
+#undef CONFIG_CMD_ELF
+#undef CONFIG_CMD_I2C
+#undef CONFIG_CMD_IRQ
+#undef CONFIG_CMD_NFS
 
 /*
  * SDRAM configuration (please see cpu/ppc/sdram.[ch])
 /*
  * I2C stuff
  */
+#define CONFIG_SYS_I2C_PPC4XX
+#define CONFIG_SYS_I2C_PPC4XX_CH0
 #define CONFIG_SYS_I2C_PPC4XX_SPEED_0          100000
+#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0          0x7F
+
+#define CONFIG_SYS_I2C_IHS
+#define CONFIG_SYS_I2C_IHS_CH0
+#define CONFIG_SYS_I2C_IHS_SPEED_0             50000
+#define CONFIG_SYS_I2C_IHS_SLAVE_0             0x7F
+#define CONFIG_SYS_I2C_IHS_CH1
+#define CONFIG_SYS_I2C_IHS_SPEED_1             50000
+#define CONFIG_SYS_I2C_IHS_SLAVE_1             0x7F
+
+#define CONFIG_SYS_SPD_BUS_NUM         2
 
 /* Temp sensor/hwmon/dtt */
+#define CONFIG_SYS_DTT_BUS_NUM 2
 #define CONFIG_DTT_LM63                1       /* National LM63        */
 #define CONFIG_DTT_SENSORS     { 0x4c, 0x4e, 0x18 } /* Sensor addresses */
 #define CONFIG_DTT_PWM_LOOKUPTABLE     \
                  { 54, 27 }, { 56, 31 }, { 58, 36 }, { 60, 40 } }
 #define CONFIG_DTT_TACH_LIMIT  0xa10
 
+#define CONFIG_SYS_ICS8N3QV01_I2C      {0, 1}
+#define CONFIG_SYS_SIL1178_I2C         {0, 1}
+
 /* EBC peripherals */
 
 #define CONFIG_SYS_FLASH_BASE          0xFC000000
 /*
  * OSD Setup
  */
-#define CONFIG_SYS_ICS8N3QV01
 #define CONFIG_SYS_MPC92469AC
-#define CONFIG_SYS_SIL1178
 #define CONFIG_SYS_OSD_SCREENS         CONFIG_SYS_FPGA_COUNT
 
 #endif /* __CONFIG_H */
index 9da6cc685592b95d5593c04cbe54b300d2451fe8..8e32c25803e4d3cf2e5f3d24914619dda9ba6132 100644 (file)
@@ -40,6 +40,7 @@
 /* new uImage format support */
 #define CONFIG_FIT
 #define CONFIG_FIT_VERBOSE     /* enable fit_format_{error,warning}() */
+#define CONFIG_FIT_DISABLE_SHA256
 
 #define CONFIG_ENV_IS_IN_FLASH /* use FLASH for environment vars */
 
 /*
  * Commands additional to the ones defined in amcc-common.h
  */
-#define CONFIG_CMD_CACHE
 #define CONFIG_CMD_DTT
+#undef CONFIG_CMD_DHCP
+#undef CONFIG_CMD_DIAG
 #undef CONFIG_CMD_EEPROM
+#undef CONFIG_CMD_ELF
+#undef CONFIG_CMD_I2C
+#undef CONFIG_CMD_IRQ
+#undef CONFIG_CMD_NFS
 
 /*
  * SDRAM configuration (please see cpu/ppc/sdram.[ch])
index f36c2a3504e442f718bba1843bcaaf79d8b6fca1..ae05bcbfbf433c1893260840c35ceac879f8f33d 100644 (file)
@@ -17,7 +17,7 @@
  * Include common defines/options for all AMCC eval boards
  */
 #define CONFIG_HOSTNAME                iocon
-#define CONFIG_IDENT_STRING    " iocon 0.05"
+#define CONFIG_IDENT_STRING    " iocon 0.06"
 #include "amcc-common.h"
 
 #define CONFIG_BOARD_EARLY_INIT_F
@@ -39,6 +39,7 @@
 /* new uImage format support */
 #define CONFIG_FIT
 #define CONFIG_FIT_VERBOSE     /* enable fit_format_{error,warning}() */
+#define CONFIG_FIT_DISABLE_SHA256
 
 #define CONFIG_ENV_IS_IN_FLASH /* use FLASH for environment vars */
 
 #define CONFIG_CMD_CACHE
 #define CONFIG_CMD_FPGAD
 #undef CONFIG_CMD_EEPROM
+#undef CONFIG_CMD_ELF
+#undef CONFIG_CMD_I2C
+#undef CONFIG_CMD_IRQ
+#undef CONFIG_CMD_NFS
 
 /*
  * SDRAM configuration (please see cpu/ppc/sdram.[ch])
 #define CONFIG_SYS_I2C_PPC4XX_CH0
 #define CONFIG_SYS_I2C_PPC4XX_SPEED_0          400000
 #define CONFIG_SYS_I2C_PPC4XX_SLAVE_0          0x7F
+#define CONFIG_SYS_I2C_IHS
 
 #define CONFIG_SYS_I2C_SPEED           400000
+#define CONFIG_SYS_SPD_BUS_NUM         4
 
 #define CONFIG_PCA953X                 /* NXP PCA9554 */
 #define CONFIG_PCA9698                 /* NXP PCA9698 */
 
+#define CONFIG_SYS_I2C_IHS_CH0
+#define CONFIG_SYS_I2C_IHS_SPEED_0             50000
+#define CONFIG_SYS_I2C_IHS_SLAVE_0             0x7F
+#define CONFIG_SYS_I2C_IHS_CH1
+#define CONFIG_SYS_I2C_IHS_SPEED_1             50000
+#define CONFIG_SYS_I2C_IHS_SLAVE_1             0x7F
+#define CONFIG_SYS_I2C_IHS_CH2
+#define CONFIG_SYS_I2C_IHS_SPEED_2             50000
+#define CONFIG_SYS_I2C_IHS_SLAVE_2             0x7F
+#define CONFIG_SYS_I2C_IHS_CH3
+#define CONFIG_SYS_I2C_IHS_SPEED_3             50000
+#define CONFIG_SYS_I2C_IHS_SLAVE_3             0x7F
+
 /*
  * Software (bit-bang) I2C driver configuration
  */
 #define CONFIG_SYS_I2C_SOFT_SPEED_4            50000
 #define CONFIG_SYS_I2C_SOFT_SLAVE_4            0x7F
 
-#define CONFIG_SYS_CH7301_I2C                  {1, 2, 3, 4}
+#define CONFIG_SYS_ICS8N3QV01_I2C              {5, 6, 7, 8}
+#define CONFIG_SYS_CH7301_I2C                  {5, 6, 7, 8}
+#define CONFIG_SYS_DP501_I2C                   {0, 1, 2, 3}
 
 #ifndef __ASSEMBLY__
 void fpga_gpio_set(unsigned int bus, int pin);
@@ -149,12 +171,6 @@ int fpga_gpio_get(unsigned int bus, int pin);
        } while (0)
 #define I2C_DELAY      udelay(25)      /* 1/4 I2C clock duration */
 
-/*
- * OSD hardware
- */
-#define CONFIG_SYS_MPC92469AC
-#define CONFIG_SYS_CH7301
-
 /*
  * FLASH organization
  */
@@ -283,8 +299,9 @@ int fpga_gpio_get(unsigned int bus, int pin);
  * OSD Setup
  */
 #define CONFIG_SYS_MPC92469AC
-#define CONFIG_SYS_CH7301
 #define CONFIG_SYS_OSD_SCREENS         1
+#define CONFIG_SYS_DP501_DIFFERENTIAL
+#define CONFIG_SYS_DP501_VCAPCTRL0     0x01 /* DDR mode 0, DE for H/VSYNC */
 
 #define CONFIG_BITBANGMII              /* bit-bang MII PHY management */
 #define CONFIG_BITBANGMII_MULTI
index d549985886c915bc91fb6dc848927cee57c6a592..4937730ee30e59c36b753a7c32f9de5dcdb03c4b 100644 (file)
@@ -37,6 +37,7 @@
 /* new uImage format support */
 #define CONFIG_FIT
 #define CONFIG_FIT_VERBOSE     /* enable fit_format_{error,warning}() */
+#define CONFIG_FIT_DISABLE_SHA256
 
 #define CONFIG_ENV_IS_IN_FLASH /* use FLASH for environment vars */
 
 /*
  * Commands additional to the ones defined in amcc-common.h
  */
-#define CONFIG_CMD_CACHE
-#define CONFIG_CMD_DATE
 #define CONFIG_CMD_DTT
+#undef CONFIG_CMD_DHCP
+#undef CONFIG_CMD_DIAG
 #undef CONFIG_CMD_EEPROM
+#undef CONFIG_CMD_ELF
+#undef CONFIG_CMD_I2C
+#undef CONFIG_CMD_IRQ
+#undef CONFIG_CMD_NFS
 
 /*
  * SDRAM configuration (please see cpu/ppc/sdram.[ch])
index c02348354a0cdc07a232b013b5e00ebb219ea8d9..3782049ee6db6c1ff6d1dc5bbc02cc7eab7eed43 100644 (file)
 #define CONFIG_CMD_LED         /* LED support                  */
 #define CONFIG_CMD_SETEXPR     /* Evaluate expressions         */
 #define CONFIG_CMD_GPIO     /* Enable gpio command */
+#define CONFIG_CMD_DHCP
 
 #define CONFIG_VIDEO_OMAP3     /* DSS Support                  */
 
diff --git a/include/configs/quantum.h b/include/configs/quantum.h
deleted file mode 100644 (file)
index f3540c1..0000000
+++ /dev/null
@@ -1,430 +0,0 @@
-/*
- * (C) Copyright 2003-2010
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/*
- * board/config.h - configuration options, board specific
- * changes for 16M board
- */
-
-#ifndef __CONFIG_H
-#define __CONFIG_H
-
-/*
- * High Level Configuration Options
- * (easy to change)
- */
-
-#undef CONFIG_MPC860
-#define CONFIG_MPC850          1       /* This is a MPC850 CPU         */
-#define CONFIG_RPXLITE         1       /* QUANTUM is the RPXlite clone */
-#define CONFIG_RMU             1   /* The QUNATUM is based on our RMU */
-
-#define        CONFIG_SYS_TEXT_BASE    0xfff00000
-
-#define CONFIG_8xx_CONS_SMC1   1       /* Console is on SMC1           */
-#undef CONFIG_8xx_CONS_SMC2
-#undef CONFIG_8xx_CONS_NONE
-#define CONFIG_BAUDRATE                9600    /* console baudrate = 9600bps   */
-#if 0
-#define CONFIG_BOOTDELAY       -1      /* autoboot disabled            */
-#else
-#define CONFIG_BOOTDELAY       5       /* autoboot after 5 seconds     */
-#endif
-
-/* default developmenmt environment */
-
-#define CONFIG_ETHADDR 00:0B:17:00:00:00
-
-#define CONFIG_IPADDR  10.10.69.10
-#define CONFIG_SERVERIP 10.10.69.49
-#define CONFIG_NETMASK 255.255.255.0
-#define CONFIG_HOSTNAME QUANTUM
-#define CONFIG_ROOTPATH "/opt/eldk/pcc_8xx"
-
-#define CONFIG_BOOTARGS         "root=/dev/ram rw"
-
-#define CONFIG_BOOTCOMMAND "bootm ff000000"
-
-#define CONFIG_EXTRA_ENV_SETTINGS \
-    "serial#=12345\0"          \
-       "nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath}\0"    \
-       "ramargs=setenv bootargs root=/dev/ram rw\0" \
-    "addip=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off\0"
-
-/*
- * Select the more full-featured memory test (Barr embedded systems)
- */
-#define CONFIG_SYS_ALT_MEMTEST
-
-#define CONFIG_LOADS_ECHO      1       /* echo on for serial download  */
-#undef CONFIG_SYS_LOADS_BAUD_CHANGE            /* don't allow baudrate change  */
-
-
-/* M48T02 Paralled access timekeeper with same interface as the M48T35A*/
-#define CONFIG_RTC_M48T35A 1
-
-#if 0
-#define CONFIG_WATCHDOG 1              /* watchdog enabled             */
-#else
-#undef CONFIG_WATCHDOG
-#endif
-
-/*  NVRAM and RTC */
-#define CONFIG_SYS_NVRAM_BASE_ADDR 0xFA000000
-#define CONFIG_SYS_NVRAM_SIZE 2048
-
-
-/*
- * Command line configuration.
- */
-#include <config_cmd_default.h>
-
-#define CONFIG_CMD_DATE
-#define CONFIG_CMD_DHCP
-#define CONFIG_CMD_NFS
-#define CONFIG_CMD_PING
-#define CONFIG_CMD_REGINFO
-#define CONFIG_CMD_SNTP
-
-
-/*
- * BOOTP options
- */
-#define CONFIG_BOOTP_SUBNETMASK
-#define CONFIG_BOOTP_GATEWAY
-#define CONFIG_BOOTP_HOSTNAME
-#define CONFIG_BOOTP_BOOTPATH
-#define CONFIG_BOOTP_BOOTFILESIZE
-
-
-#define CONFIG_AUTOBOOT_KEYED  /* Enable password protection */
-#define CONFIG_AUTOBOOT_PROMPT         \
-       "\nEnter password - autoboot in %d sec...\n", bootdelay
-#define CONFIG_AUTOBOOT_DELAY_STR      "system"
-/*
- * Miscellaneous configurable options
- */
-#define CONFIG_SYS_LONGHELP                    /* undef to save memory         */
-#if defined(CONFIG_CMD_KGDB)
-#define CONFIG_SYS_CBSIZE      1024            /* Console I/O Buffer Size      */
-#else
-#define CONFIG_SYS_CBSIZE      256             /* Console I/O Buffer Size      */
-#endif
-#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
-#define CONFIG_SYS_MAXARGS     16              /* max number of command args   */
-#define CONFIG_SYS_BARGSIZE    CONFIG_SYS_CBSIZE       /* Boot Argument Buffer Size    */
-
-#define CONFIG_SYS_MEMTEST_START       0x00040000      /* memtest works on     */
-#define CONFIG_SYS_MEMTEST_END         0x01f00000      /* 256K ... 15 MB in DRAM       */
-
-#define CONFIG_SYS_LOAD_ADDR           0x100000        /* default load address */
-
-/*
- * Low Level Configuration Settings
- * (address mappings, register initial values, etc.)
- * You should know what you are doing if you make changes here.
- */
-/*-----------------------------------------------------------------------
- * Internal Memory Mapped Register
- */
-#define CONFIG_SYS_IMMR                0xFA200000
-
-/*-----------------------------------------------------------------------
- * Definitions for initial stack pointer and data area (in DPRAM)
- */
-#define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define CONFIG_SYS_INIT_RAM_SIZE       0x2F00  /* Size of used area in DPRAM   */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
-#define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
-
-/*-----------------------------------------------------------------------
- * Start addresses for the final memory configuration
- * (Set up by the startup code)
- * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0
- */
-#define CONFIG_SYS_SDRAM_BASE          0x00000000
-#define CONFIG_SYS_FLASH_BASE  0xFF000000
-
-#if 1
-    #define CONFIG_FLASH_CFI_DRIVER
-#else
-    #undef CONFIG_FLASH_CFI_DRIVER
-#endif
-
-
-#ifdef CONFIG_FLASH_CFI_DRIVER
-    #define CONFIG_SYS_FLASH_CFI 1
-    #undef CONFIG_SYS_FLASH_USE_BUFFER_WRITE
-    #define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE}
-#endif
-
-/*%%% #define CONFIG_SYS_FLASH_BASE            0xFFF00000 */
-#if defined(DEBUG) || defined(CONFIG_CMD_IDE)
-#define CONFIG_SYS_MONITOR_LEN         (256 << 10)     /* Reserve 256 kB for Monitor   */
-#else
-#define CONFIG_SYS_MONITOR_LEN         (128 << 10)     /* Reserve 128 kB for Monitor   */
-#endif
-#define CONFIG_SYS_MONITOR_BASE        0xFFF00000
-/*%%% #define CONFIG_SYS_MONITOR_BASE  CONFIG_SYS_FLASH_BASE */
-#define CONFIG_SYS_MALLOC_LEN          (128 << 10)     /* Reserve 128 kB for malloc()  */
-
-/*
- * For booting Linux, the board info and command line data
- * have to be in the first 8 MB of memory, since this is
- * the maximum mapped by the Linux kernel during initialization.
- */
-#define CONFIG_SYS_BOOTMAPSZ           (8 << 20)       /* Initial Memory map for Linux */
-
-/*-----------------------------------------------------------------------
- * FLASH organization
- */
-#define CONFIG_SYS_MAX_FLASH_BANKS     1       /* max number of memory banks           */
-#define CONFIG_SYS_MAX_FLASH_SECT      512     /* max number of sectors on one chip */
-
-#define CONFIG_SYS_FLASH_ERASE_TOUT    120000  /* Timeout for Flash Erase (in ms)      */
-#define CONFIG_SYS_FLASH_WRITE_TOUT    500     /* Timeout for Flash Write (in ms)      */
-
-#define CONFIG_ENV_IS_IN_FLASH 1
-#define CONFIG_ENV_OFFSET          0x00040000  /*   Offset   of Environment Sector     absolute address 0xfff40000*/
-#define CONFIG_ENV_SECT_SIZE   0x40000 /* Total Size of Environment Sector     */
-#define CONFIG_ENV_SIZE                CONFIG_ENV_SECT_SIZE
-#define CONFIG_ENV_ADDR                (CONFIG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET)
-
-/* Address and size of Redundant Environment Sector    */
-#define CONFIG_ENV_OFFSET_REDUND       (CONFIG_ENV_OFFSET+CONFIG_ENV_SIZE)
-#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
-
-/* FPGA */
-#define CONFIG_MISC_INIT_R
-#define CONFIG_SYS_FPGA_SPARTAN2
-#define CONFIG_SYS_FPGA_PROG_FEEDBACK
-
-
-/*-----------------------------------------------------------------------
- * Reset address
- */
-#define CONFIG_SYS_RESET_ADDRESS       ((ulong)((((immap_t *)CONFIG_SYS_IMMR)->im_clkrst.res)))
-
-/*-----------------------------------------------------------------------
- * Cache Configuration
- */
-#define CONFIG_SYS_CACHELINE_SIZE      16      /* For all MPC8xx CPUs                  */
-#if defined(CONFIG_CMD_KGDB)
-#define CONFIG_SYS_CACHELINE_SHIFT     4       /* log base 2 of the above value        */
-#endif
-
-/*-----------------------------------------------------------------------
- * SYPCR - System Protection Control                           11-9
- * SYPCR can only be written once after reset!
- *-----------------------------------------------------------------------
- * Software & Bus Monitor Timer max, Bus Monitor enable, SW Watchdog freeze
- */
-#if defined(CONFIG_WATCHDOG)
-#define CONFIG_SYS_SYPCR       (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | \
-                        SYPCR_SWE  | SYPCR_SWRI| SYPCR_SWP)
-#else
-#define CONFIG_SYS_SYPCR       (SYPCR_SWTC | 0x00000600 | SYPCR_BME | SYPCR_SWF | SYPCR_SWP)
-#endif
-
-/*-----------------------------------------------------------------------
- * SIUMCR - SIU Module Configuration                           11-6
- *-----------------------------------------------------------------------
- * PCMCIA config., multi-function pin tri-state
- */
-#define CONFIG_SYS_SIUMCR      (SIUMCR_MLRC10)
-
-/*-----------------------------------------------------------------------
- * TBSCR - Time Base Status and Control                                11-26
- *-----------------------------------------------------------------------
- * Clear Reference Interrupt Status, Timebase freezing enabled
- */
-#define CONFIG_SYS_TBSCR       (TBSCR_REFA | TBSCR_REFB | TBSCR_TBF | TBSCR_TBE)
-
-/*-----------------------------------------------------------------------
- * RTCSC - Real-Time Clock Status and Control Register         11-27
- *-----------------------------------------------------------------------
- */
-/*%%%#define CONFIG_SYS_RTCSC  (RTCSC_SEC | RTCSC_ALR | RTCSC_RTF| RTCSC_RTE) */
-#define CONFIG_SYS_RTCSC       (RTCSC_SEC | RTCSC_RTE)
-
-/*-----------------------------------------------------------------------
- * PISCR - Periodic Interrupt Status and Control               11-31
- *-----------------------------------------------------------------------
- * Clear Periodic Interrupt Status, Interrupt Timer freezing enabled
- */
-#define CONFIG_SYS_PISCR (PISCR_PS | PISCR_PITF)
-
-/*-----------------------------------------------------------------------
- * PLPRCR - PLL, Low-Power, and Reset Control Register         15-30
- *-----------------------------------------------------------------------
- * Reset PLL lock status sticky bit, timer expired status bit and timer
- * interrupt status bit
- *
- * If this is a 80 MHz CPU, set PLL multiplication factor to 5 (5*16=80)!
- */
-/* up to 50 MHz we use a 1:1 clock */
-#define CONFIG_SYS_PLPRCR      ( (5 << PLPRCR_MF_SHIFT) | PLPRCR_TEXPS )
-
-/*-----------------------------------------------------------------------
- * SCCR - System Clock and reset Control Register              15-27
- *-----------------------------------------------------------------------
- * Set clock output, timebase and RTC source and divider,
- * power management and some other internal clocks
- */
-#define SCCR_MASK      SCCR_EBDF00
-/* up to 50 MHz we use a 1:1 clock */
-#define CONFIG_SYS_SCCR        (SCCR_COM00 | SCCR_TBS)
-
-/*-----------------------------------------------------------------------
- * PCMCIA stuff
- *-----------------------------------------------------------------------
- *
- */
-#define CONFIG_SYS_PCMCIA_MEM_ADDR     (0xE0000000)
-#define CONFIG_SYS_PCMCIA_MEM_SIZE     ( 64 << 20 )
-#define CONFIG_SYS_PCMCIA_DMA_ADDR     (0xE4000000)
-#define CONFIG_SYS_PCMCIA_DMA_SIZE     ( 64 << 20 )
-#define CONFIG_SYS_PCMCIA_ATTRB_ADDR   (0xE8000000)
-#define CONFIG_SYS_PCMCIA_ATTRB_SIZE   ( 64 << 20 )
-#define CONFIG_SYS_PCMCIA_IO_ADDR      (0xEC000000)
-#define CONFIG_SYS_PCMCIA_IO_SIZE      ( 64 << 20 )
-
-/*-----------------------------------------------------------------------
- * IDE/ATA stuff (Supports IDE harddisk on PCMCIA Adapter)
- *-----------------------------------------------------------------------
- */
-
-#define CONFIG_IDE_PREINIT     1       /* Use preinit IDE hook */
-#define CONFIG_IDE_8xx_PCCARD  1       /* Use IDE with PC Card Adapter */
-
-#undef CONFIG_IDE_8xx_DIRECT           /* Direct IDE    not supported  */
-#undef CONFIG_IDE_LED                  /* LED   for ide not supported  */
-#undef CONFIG_IDE_RESET                /* reset for ide not supported  */
-
-#define CONFIG_SYS_IDE_MAXBUS          1       /* max. 1 IDE bus               */
-#define CONFIG_SYS_IDE_MAXDEVICE       1       /* max. 1 drive per IDE bus     */
-
-#define CONFIG_SYS_ATA_IDE0_OFFSET     0x0000
-
-#define CONFIG_SYS_ATA_BASE_ADDR       CONFIG_SYS_PCMCIA_MEM_ADDR
-
-/* Offset for data I/O                 */
-#define CONFIG_SYS_ATA_DATA_OFFSET     (CONFIG_SYS_PCMCIA_MEM_SIZE + 0x320)
-
-/* Offset for normal register accesses */
-#define CONFIG_SYS_ATA_REG_OFFSET      (2 * CONFIG_SYS_PCMCIA_MEM_SIZE + 0x320)
-
-/* Offset for alternate registers      */
-#define CONFIG_SYS_ATA_ALT_OFFSET      0x0100
-
-/*-----------------------------------------------------------------------
- *
- *-----------------------------------------------------------------------
- *
- */
-/*#define      CONFIG_SYS_DER 0x2002000F*/
-#define CONFIG_SYS_DER 0
-
-/*
- * Init Memory Controller:
- *
- * BR0 and OR0 (FLASH)
- */
-
-#define FLASH_BASE_PRELIM      0xFE000000      /* FLASH base */
-#define CONFIG_SYS_PRELIM_OR_AM        0xFE000000      /* OR addr mask */
-
-/* FLASH timing: ACS = 0, TRLX = 0, CSNT = 0, SCY = 4, ETHR = 0, BIH = 1 */
-#define CONFIG_SYS_OR_TIMING_FLASH (OR_SCY_4_CLK | OR_BI)
-
-#define CONFIG_SYS_OR0_PRELIM  (CONFIG_SYS_PRELIM_OR_AM | CONFIG_SYS_OR_TIMING_FLASH)
-#define CONFIG_SYS_BR0_PRELIM  ((FLASH_BASE_PRELIM & BR_BA_MSK) | BR_V)
-
-/*
- * BR1 and OR1 (SDRAM)
- *
- */
-#define SDRAM_BASE_PRELIM      0x00000000      /* SDRAM base   */
-#define SDRAM_MAX_SIZE         0x08000000      /* max 128 MB */
-
-/* SDRAM timing: Multiplexed addresses, GPL5 output to GPL5_A (don't care)     */
-#define CONFIG_SYS_OR_TIMING_SDRAM     0x00000E00
-
-#define CONFIG_SYS_OR1_PRELIM  (0xF0000000 | CONFIG_SYS_OR_TIMING_SDRAM ) /* map 256 MB */
-#define CONFIG_SYS_BR1_PRELIM  ((SDRAM_BASE_PRELIM & BR_BA_MSK) | BR_MS_UPMA | BR_V )
-
-/* RPXLITE mem setting */
-#define CONFIG_SYS_BR3_PRELIM  0xFA400001              /* FPGA */
-#define CONFIG_SYS_OR3_PRELIM  0xFFFF8910
-
-#define CONFIG_SYS_BR4_PRELIM  0xFA000401              /* NVRAM&SRAM */
-#define CONFIG_SYS_OR4_PRELIM  0xFFFE0970
-
-/*
- * Memory Periodic Timer Prescaler
- */
-
-/* periodic timer for refresh */
-#define CONFIG_SYS_MAMR_PTA    20
-
-/*
- * Refresh clock Prescalar
- */
-#define CONFIG_SYS_MPTPR       MPTPR_PTP_DIV2
-
-/*
- * MAMR settings for SDRAM
- */
-
-/* 9 column SDRAM */
-#define CONFIG_SYS_MAMR_9COL   ((CONFIG_SYS_MAMR_PTA << MAMR_PTA_SHIFT)  | MAMR_PTAE       |   \
-                        MAMR_AMA_TYPE_1 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A10 |   \
-                        MAMR_RLFA_16X | MAMR_WLFA_16X | MAMR_TLFA_16X)
-
-/*
- * BCSRx
- *
- * Board Status and Control Registers
- *
- */
-
-#define BCSR0 0xFA400000
-#define BCSR1 0xFA400001
-#define BCSR2 0xFA400002
-#define BCSR3 0xFA400003
-
-#define BCSR0_ENMONXCVR 0x01   /* Monitor XVCR Control */
-#define BCSR0_ENNVRAM  0x02    /* CS4# Control */
-#define BCSR0_LED5     0x04    /* LED5 control 0='on' 1='off' */
-#define BCSR0_LED4     0x08    /* LED4 control 0='on' 1='off' */
-#define BCSR0_FULLDPLX 0x10    /* Ethernet XCVR Control */
-#define BCSR0_COLTEST  0x20
-#define BCSR0_ETHLPBK  0x40
-#define BCSR0_ETHEN    0x80
-
-#define BCSR1_PCVCTL7  0x01    /* PC Slot B Control */
-#define BCSR1_PCVCTL6  0x02
-#define BCSR1_PCVCTL5  0x04
-#define BCSR1_PCVCTL4  0x08
-#define BCSR1_IPB5SEL  0x10
-
-#define BCSR2_ENPA5HDR 0x08    /* USB Control */
-#define BCSR2_ENUSBCLK 0x10
-#define BCSR2_USBPWREN 0x20
-#define BCSR2_USBSPD   0x40
-#define BCSR2_USBSUSP  0x80
-
-#define BCSR3_BWRTC    0x01    /* Real Time Clock Battery */
-#define BCSR3_BWNVR    0x02    /* NVRAM Battery */
-#define BCSR3_RDY_BSY  0x04    /* Flash Operation */
-#define BCSR3_RPXL     0x08    /* Reserved (reads back '1') */
-#define BCSR3_D27      0x10    /* Dip Switch settings */
-#define BCSR3_D26      0x20
-#define BCSR3_D25      0x40
-#define BCSR3_D24      0x80
-
-#endif /* __CONFIG_H */
diff --git a/include/configs/spc1920.h b/include/configs/spc1920.h
deleted file mode 100644 (file)
index 127de00..0000000
+++ /dev/null
@@ -1,405 +0,0 @@
-/*
- * (C) Copyright 2006
- * Markus Klotzbuecher, DENX Software Engineering, mk@denx.de
- *
- * Configuation settings for the SPC1920 board.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#ifndef __H
-#define __CONFIG_H
-
-#define CONFIG_SPC1920                 1       /* SPC1920 board */
-#define CONFIG_MPC885                  1       /* MPC885 CPU */
-
-#define        CONFIG_SYS_TEXT_BASE    0xFFF00000
-
-#define        CONFIG_8xx_CONS_SMC1            /* Console is on SMC1 */
-#undef CONFIG_8xx_CONS_SMC2
-#undef CONFIG_8xx_CONS_NONE
-
-#define CONFIG_MII
-#define CONFIG_MII_INIT                1
-#undef CONFIG_ETHER_ON_FEC1
-#define CONFIG_ETHER_ON_FEC2
-#define FEC_ENET
-#define CONFIG_FEC2_PHY                1
-
-#define CONFIG_BAUDRATE                19200
-
-/* use PLD CLK4 instead of brg */
-#define CONFIG_SYS_SPC1920_SMC1_CLK4
-
-#define CONFIG_8xx_OSCLK               10000000 /* 10 MHz oscillator on EXTCLK  */
-#define CONFIG_8xx_CPUCLK_DEFAULT      50000000
-#define CONFIG_SYS_8xx_CPUCLK_MIN              40000000
-#define CONFIG_SYS_8xx_CPUCLK_MAX              133000000
-
-#define CONFIG_SYS_RESET_ADDRESS               0xC0000000
-
-#define CONFIG_BOARD_EARLY_INIT_F
-#define CONFIG_LAST_STAGE_INIT
-
-#if 0
-#define CONFIG_BOOTDELAY       -1      /* autoboot disabled            */
-#else
-#define CONFIG_BOOTDELAY       5       /* autoboot after 5 seconds     */
-#endif
-
-#define CONFIG_ENV_OVERWRITE
-
-#define CONFIG_NFSBOOTCOMMAND                                                  \
-    "dhcp;"                                                                    \
-    "setenv bootargs root=/dev/nfs rw nfsroot=$rootpath "                      \
-    "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:eth0:off;"             \
-    "bootm"
-
-#define CONFIG_BOOTCOMMAND                                                     \
-    "setenv bootargs root=/dev/mtdblock2 rw mtdparts=phys:1280K(ROM)ro,-(root) "\
-    "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:eth0:off;"             \
-    "bootm fe080000"
-
-#undef CONFIG_BOOTARGS
-
-#undef CONFIG_WATCHDOG                 /* watchdog disabled            */
-#define CONFIG_BZIP2    /* include support for bzip2 compressed images */
-
-
-/*
- * BOOTP options
- */
-#define CONFIG_BOOTP_BOOTFILESIZE
-#define CONFIG_BOOTP_BOOTPATH
-#define CONFIG_BOOTP_GATEWAY
-#define CONFIG_BOOTP_HOSTNAME
-
-
-/*
- * Command line configuration.
- */
-#include <config_cmd_default.h>
-
-#define CONFIG_CMD_ASKENV
-#define CONFIG_CMD_DATE
-#define CONFIG_CMD_ECHO
-#define CONFIG_CMD_IMMAP
-#define CONFIG_CMD_JFFS2
-#define CONFIG_CMD_NET
-#define CONFIG_CMD_PING
-#define CONFIG_CMD_DHCP
-#define CONFIG_CMD_I2C
-#define CONFIG_CMD_MII
-
-/*
- * Miscellaneous configurable options
- */
-#define        CONFIG_SYS_LONGHELP                             /* undef to save memory         */
-#define CONFIG_SYS_HUSH_PARSER
-
-#if defined(CONFIG_CMD_KGDB)
-#define        CONFIG_SYS_CBSIZE               1024            /* Console I/O Buffer Size      */
-#else
-#define        CONFIG_SYS_CBSIZE               256             /* Console I/O Buffer Size      */
-#endif
-
-#define        CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) /* Print Buffer Size     */
-#define        CONFIG_SYS_MAXARGS              16              /* max number of command args   */
-#define CONFIG_SYS_BARGSIZE            CONFIG_SYS_CBSIZE       /* Boot Argument Buffer Size    */
-
-#define CONFIG_SYS_LOAD_ADDR           0x00100000
-
-#define CONFIG_SYS_BAUDRATE_TABLE      { 2400, 4800, 9600, 19200 }
-
-/*
- * Low Level Configuration Settings
- * (address mappings, register initial values, etc.)
- * You should know what you are doing if you make changes here.
- */
-
-/*-----------------------------------------------------------------------
- * Internal Memory Mapped Register
- */
-#define CONFIG_SYS_IMMR                0xF0000000
-
-/*-----------------------------------------------------------------------
- * Definitions for initial stack pointer and data area (in DPRAM)
- */
-#define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
-#define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
-
-/*-----------------------------------------------------------------------
- * Start addresses for the final memory configuration
- * (Set up by the startup code)
- * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0
- */
-#define CONFIG_SYS_MEMTEST_START       0x0400000       /* memtest works on     */
-#define CONFIG_SYS_MEMTEST_END         0x0C00000       /* 4 ... 12 MB in DRAM  */
-
-/*
- * For booting Linux, the board info and command line data
- * have to be in the first 8 MB of memory, since this is
- * the maximum mapped by the Linux kernel during initialization.
- */
-#define        CONFIG_SYS_BOOTMAPSZ            (8 << 20)       /* Initial Memory map for Linux */
-
-#define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE
-#define        CONFIG_SYS_MONITOR_LEN          (256 << 10)     /* Reserve 256 KB for monitor   */
-
-#ifdef CONFIG_BZIP2
-#define        CONFIG_SYS_MALLOC_LEN           (2500 << 10)    /* Reserve ~2.5 MB for malloc() */
-#else
-#define        CONFIG_SYS_MALLOC_LEN           (384 << 10)     /* Reserve 384 kB for malloc()  */
-#endif /* CONFIG_BZIP2 */
-
-#define        CONFIG_SYS_ALLOC_DPRAM          1       /* use allocation routines      */
-
-/*
- * Flash
- */
-/*-----------------------------------------------------------------------
- * Flash organisation
- */
-#define CONFIG_SYS_FLASH_BASE          0xFE000000
-#define CONFIG_SYS_FLASH_CFI                           /* The flash is CFI compatible  */
-#define CONFIG_FLASH_CFI_DRIVER                    /* Use common CFI driver        */
-#define CONFIG_SYS_MAX_FLASH_BANKS     1               /* Max number of flash banks    */
-#define CONFIG_SYS_MAX_FLASH_SECT      128             /* Max num of sects on one chip */
-
-/* Environment is in flash */
-#define CONFIG_ENV_IS_IN_FLASH
-#define CONFIG_ENV_SECT_SIZE       0x40000         /* We use one complete sector   */
-#define CONFIG_ENV_ADDR                (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
-
-#define CONFIG_ENV_OVERWRITE
-
-/*-----------------------------------------------------------------------
- * Cache Configuration
- */
-#define CONFIG_SYS_CACHELINE_SIZE      16      /* For all MPC8xx CPUs                  */
-#define CONFIG_SYS_CACHELINE_SHIFT     4       /* log base 2 of the above value        */
-
-#ifdef CONFIG_CMD_DATE
-# define CONFIG_RTC_DS3231
-# define CONFIG_SYS_I2C_RTC_ADDR      0x68
-#endif
-
-/*-----------------------------------------------------------------------
- * I2C configuration
- */
-#if defined(CONFIG_CMD_I2C)
-/* enable I2C and select the hardware/software driver */
-#define CONFIG_SYS_I2C
-#define CONFIG_SYS_I2C_SOFT            /* I2C bit-banged */
-#define CONFIG_SYS_I2C_SOFT_SPEED      93000   /* 93 kHz is supposed to work */
-#define CONFIG_SYS_I2C_SOFT_SLAVE      0xFE
-/*
- * Software (bit-bang) I2C driver configuration
- */
-#define PB_SCL         0x00000020      /* PB 26 */
-#define PB_SDA         0x00000010      /* PB 27 */
-
-#define I2C_INIT       (immr->im_cpm.cp_pbdir |=  PB_SCL)
-#define I2C_ACTIVE     (immr->im_cpm.cp_pbdir |=  PB_SDA)
-#define I2C_TRISTATE   (immr->im_cpm.cp_pbdir &= ~PB_SDA)
-#define I2C_READ       ((immr->im_cpm.cp_pbdat & PB_SDA) != 0)
-#define I2C_SDA(bit)   if(bit) immr->im_cpm.cp_pbdat |=  PB_SDA; \
-                      else    immr->im_cpm.cp_pbdat &= ~PB_SDA
-#define I2C_SCL(bit)   if(bit) immr->im_cpm.cp_pbdat |=  PB_SCL; \
-                      else    immr->im_cpm.cp_pbdat &= ~PB_SCL
-#define I2C_DELAY      udelay(2)       /* 1/4 I2C clock duration */
-#endif
-
-/*-----------------------------------------------------------------------
- * SYPCR - System Protection Control                           11-9
- * SYPCR can only be written once after reset!
- *-----------------------------------------------------------------------
- * Software & Bus Monitor Timer max, Bus Monitor enable, SW Watchdog freeze
- */
-#if defined(CONFIG_WATCHDOG)
-#define CONFIG_SYS_SYPCR       (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | \
-                        SYPCR_SWE  | SYPCR_SWRI| SYPCR_SWP)
-#else
-#define CONFIG_SYS_SYPCR       (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | SYPCR_SWP)
-#endif
-
-/*-----------------------------------------------------------------------
- * SIUMCR - SIU Module Configuration                           11-6
- *-----------------------------------------------------------------------
- * PCMCIA config., multi-function pin tri-state
- */
-#define CONFIG_SYS_SIUMCR      (SIUMCR_FRC)
-
-/*-----------------------------------------------------------------------
- * TBSCR - Time Base Status and Control                                11-26
- *-----------------------------------------------------------------------
- * Clear Reference Interrupt Status, Timebase freezing enabled
- */
-#define CONFIG_SYS_TBSCR       (TBSCR_REFA | TBSCR_REFB | TBSCR_TBE)
-
-/*-----------------------------------------------------------------------
- * PISCR - Periodic Interrupt Status and Control               11-31
- *-----------------------------------------------------------------------
- * Clear Periodic Interrupt Status, Interrupt Timer freezing enabled
- */
-#define CONFIG_SYS_PISCR       (PISCR_PS | PISCR_PITF)
-
-/*-----------------------------------------------------------------------
- * SCCR - System Clock and reset Control Register              15-27
- *-----------------------------------------------------------------------
- * Set clock output, timebase and RTC source and divider,
- * power management and some other internal clocks
- */
-#define SCCR_MASK      SCCR_EBDF11
-/* #define CONFIG_SYS_SCCR     SCCR_TBS */
-#define CONFIG_SYS_SCCR        (SCCR_COM00   | SCCR_DFSYNC00 | SCCR_DFBRG00  | \
-                        SCCR_DFNL000 | SCCR_DFNH000  | SCCR_DFLCD000 | \
-                        SCCR_DFALCD00)
-
-/*-----------------------------------------------------------------------
- * DER - Debug Enable Register
- *-----------------------------------------------------------------------
- * Set to zero to prevent the processor from entering debug mode
- */
-#define CONFIG_SYS_DER          0
-
-
-/* Because of the way the 860 starts up and assigns CS0 the entire
- * address space, we have to set the memory controller differently.
- * Normally, you write the option register first, and then enable the
- * chip select by writing the base register.  For CS0, you must write
- * the base register first, followed by the option register.
- */
-
-
-/*
- * Init Memory Controller:
- */
-
-/* BR0 and OR0 (FLASH) */
-#define FLASH_BASE0_PRELIM     CONFIG_SYS_FLASH_BASE   /* FLASH bank #0 */
-
-
-/* used to re-map FLASH both when starting from SRAM or FLASH:
- * restrict access enough to keep SRAM working (if any)
- * but not too much to meddle with FLASH accesses
- */
-#define CONFIG_SYS_REMAP_OR_AM         0x80000000      /* OR addr mask */
-#define CONFIG_SYS_PRELIM_OR_AM        0xE0000000      /* OR addr mask */
-
-/*
- * FLASH timing:
- */
-#define CONFIG_SYS_OR_TIMING_FLASH     (OR_ACS_DIV1  | OR_TRLX | OR_CSNT_SAM | \
-                                OR_SCY_6_CLK | OR_EHTR | OR_BI)
-
-#define CONFIG_SYS_OR0_REMAP   (CONFIG_SYS_REMAP_OR_AM  | CONFIG_SYS_OR_TIMING_FLASH)
-#define CONFIG_SYS_OR0_PRELIM  (CONFIG_SYS_PRELIM_OR_AM | CONFIG_SYS_OR_TIMING_FLASH)
-#define CONFIG_SYS_BR0_PRELIM  ((FLASH_BASE0_PRELIM & BR_BA_MSK) | BR_V )
-
-
-/*
- * SDRAM CS1 UPMB
- */
-#define        CONFIG_SYS_SDRAM_BASE   0x00000000
-#define CONFIG_SYS_SDRAM_BASE_PRELIM CONFIG_SYS_SDRAM_BASE
-#define SDRAM_MAX_SIZE 0x4000000 /* max 64 MB */
-
-#define CONFIG_SYS_PRELIM_OR1_AM       0xF0000000
-/* #define CONFIG_SYS_OR1_TIMING  OR_CSNT_SAM/\*  | OR_G5LS /\\* *\\/ *\/ */
-#define SDRAM_TIMING   OR_SCY_0_CLK    /* SDRAM-Timing */
-
-#define CONFIG_SYS_OR1_PRELIM  (CONFIG_SYS_PRELIM_OR1_AM | OR_CSNT_SAM | OR_G5LS | SDRAM_TIMING)
-#define CONFIG_SYS_BR1_PRELIM  ((CONFIG_SYS_SDRAM_BASE_PRELIM & BR_BA_MSK) | BR_MS_UPMB | BR_V)
-
-/* #define CONFIG_SYS_OR1_FINAL   ((CONFIG_SYS_OR1_AM & OR_AM_MSK) | CONFIG_SYS_OR1_TIMING) */
-/* #define CONFIG_SYS_BR1_FINAL   ((CONFIG_SYS_SDRAM_BASE & BR_BA_MSK) | BR_MS_UPMB | BR_V) */
-
-#define CONFIG_SYS_PTB_PER_CLK ((4096 * 16 * 1000) / (4 * 64))
-#define CONFIG_SYS_PTA_PER_CLK 195
-#define CONFIG_SYS_MBMR_PTB    195
-#define CONFIG_SYS_MPTPR       MPTPR_PTP_DIV16
-#define CONFIG_SYS_MAR         0x88
-
-#define CONFIG_SYS_MBMR_8COL  ((CONFIG_SYS_MBMR_PTB << MBMR_PTB_SHIFT) | \
-                       MBMR_AMB_TYPE_0 | \
-                       MBMR_G0CLB_A10 | \
-                       MBMR_DSB_1_CYCL | \
-                       MBMR_RLFB_1X | \
-                       MBMR_WLFB_1X | \
-                       MBMR_TLFB_4X) /* 0x04804114 */ /* 0x10802114 */
-
-#define CONFIG_SYS_MBMR_9COL  ((CONFIG_SYS_MBMR_PTB << MBMR_PTB_SHIFT) | \
-                       MBMR_AMB_TYPE_1 | \
-                       MBMR_G0CLB_A10 | \
-                       MBMR_DSB_1_CYCL | \
-                       MBMR_RLFB_1X | \
-                       MBMR_WLFB_1X | \
-                       MBMR_TLFB_4X) /* 0x04804114 */ /* 0x10802114 */
-
-
-/*
- * DSP Host Port Interface CS3
- */
-#define CONFIG_SYS_SPC1920_HPI_BASE   0x90000000
-#define CONFIG_SYS_PRELIM_OR3_AM      0xF8000000
-
-#define CONFIG_SYS_OR3         (CONFIG_SYS_PRELIM_OR3_AM | \
-                                      OR_G5LS | \
-                                      OR_SCY_0_CLK | \
-                                      OR_BI)
-
-#define CONFIG_SYS_BR3 ((CONFIG_SYS_SPC1920_HPI_BASE & BR_BA_MSK) | \
-                                              BR_MS_UPMA | \
-                                              BR_PS_16 | \
-                                              BR_V)
-
-#define CONFIG_SYS_MAMR (MAMR_GPL_A4DIS | \
-               MAMR_RLFA_5X | \
-               MAMR_WLFA_5X)
-
-#define CONFIG_SPC1920_HPI_TEST
-
-#ifdef CONFIG_SPC1920_HPI_TEST
-#define HPI_REG(x)             (*((volatile u16 *) (CONFIG_SYS_SPC1920_HPI_BASE + x)))
-#define HPI_HPIC_1             HPI_REG(0)
-#define HPI_HPIC_2             HPI_REG(2)
-#define HPI_HPIA_1             HPI_REG(0x2000008)
-#define HPI_HPIA_2             HPI_REG(0x2000008 + 2)
-#define HPI_HPID_INC_1         HPI_REG(0x1000004)
-#define HPI_HPID_INC_2         HPI_REG(0x1000004 + 2)
-#define HPI_HPID_NOINC_1       HPI_REG(0x300000c)
-#define HPI_HPID_NOINC_2       HPI_REG(0x300000c + 2)
-#endif /* CONFIG_SPC1920_HPI_TEST */
-
-/*
- * Ramtron FM18L08 FRAM 32KB on CS4
- */
-#define CONFIG_SYS_SPC1920_FRAM_BASE   0x80100000
-#define CONFIG_SYS_PRELIM_OR4_AM       0xffff8000
-#define CONFIG_SYS_OR4         (CONFIG_SYS_PRELIM_OR4_AM | \
-                                       OR_ACS_DIV2 | \
-                                       OR_BI | \
-                                       OR_SCY_4_CLK | \
-                                       OR_TRLX)
-
-#define CONFIG_SYS_BR4 ((CONFIG_SYS_SPC1920_FRAM_BASE & BR_BA_MSK) | BR_PS_8 | BR_V)
-
-/*
- * PLD CS5
- */
-#define CONFIG_SYS_SPC1920_PLD_BASE    0x80000000
-#define CONFIG_SYS_PRELIM_OR5_AM       0xffff8000
-
-#define CONFIG_SYS_OR5_PRELIM          (CONFIG_SYS_PRELIM_OR5_AM | \
-                                       OR_CSNT_SAM | \
-                                       OR_ACS_DIV1 | \
-                                       OR_BI | \
-                                       OR_SCY_0_CLK | \
-                                       OR_TRLX)
-
-#define CONFIG_SYS_BR5_PRELIM ((CONFIG_SYS_SPC1920_PLD_BASE & BR_BA_MSK) | BR_PS_8 | BR_V)
-
-#endif /* __CONFIG_H */
diff --git a/include/configs/v37.h b/include/configs/v37.h
deleted file mode 100644 (file)
index 0d01fe2..0000000
+++ /dev/null
@@ -1,375 +0,0 @@
-/*
- * (C) Copyright 2000, 2001
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/*
- * board/config.h - configuration options, board specific
- */
-
-#ifndef __CONFIG_H
-#define __CONFIG_H
-
-/*
- * High Level Configuration Options
- * (easy to change)
- */
-
-#define CONFIG_MPC823          1       /* This is a MPC823 CPU         */
-#define CONFIG_V37             1       /* ...on a Marel V37 board      */
-
-#define        CONFIG_SYS_TEXT_BASE    0x40000000
-
-#define CONFIG_LCD
-#define CONFIG_MPC8XX_LCD
-#define CONFIG_SHARP_LQ084V1DG21
-#undef CONFIG_LCD_LOGO
-
-/*-----------------------------------------------------------------------------
- * I2C Configuration
- *-----------------------------------------------------------------------------
- */
-#define CONFIG_I2C              1
-#define CONFIG_SYS_I2C_SLAVE           0x2
-
-#define        CONFIG_8xx_CONS_SMC1    1
-#undef CONFIG_8xx_CONS_SMC2            /* Console is on SMC2           */
-#undef CONFIG_8xx_CONS_NONE
-#define CONFIG_BAUDRATE                9600    /* console baudrate = 115kbps   */
-#if 0
-#define CONFIG_BOOTDELAY       -1      /* autoboot disabled            */
-#else
-#define CONFIG_BOOTDELAY       2       /* autoboot after 2 seconds     */
-#endif
-
-#define        CONFIG_CLOCKS_IN_MHZ    1       /* clocks passsed to Linux in MHz */
-#define CONFIG_PREBOOT "echo;echo Type \\\"run flash_nfs\\\" to mount root filesystem over NFS;echo"
-
-#undef CONFIG_BOOTARGS
-
-#define CONFIG_BOOTCOMMAND                                                     \
-       "tftpboot; "                                                            \
-       "setenv bootargs console=tty0 "                                   \
-       "root=/dev/nfs rw nfsroot=${serverip}:${rootpath} "                     \
-       "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; "   \
-       "bootm"
-
-#define CONFIG_LOADS_ECHO      1       /* echo on for serial download  */
-#undef CONFIG_SYS_LOADS_BAUD_CHANGE            /* don't allow baudrate change  */
-
-#undef CONFIG_WATCHDOG                 /* watchdog disabled            */
-
-#define        CONFIG_CAN_DRIVER       1       /* CAN Driver support enabled   */
-
-/*
- * BOOTP options
- */
-#define CONFIG_BOOTP_SUBNETMASK
-#define CONFIG_BOOTP_GATEWAY
-#define CONFIG_BOOTP_HOSTNAME
-#define CONFIG_BOOTP_BOOTPATH
-#define CONFIG_BOOTP_BOOTFILESIZE
-
-
-#define CONFIG_MAC_PARTITION
-#define CONFIG_DOS_PARTITION
-
-#define        CONFIG_RTC_MPC8xx               /* use internal RTC of MPC8xx   */
-
-
-/*
- * Command line configuration.
- */
-#include <config_cmd_default.h>
-
-#define CONFIG_CMD_JFFS2
-#define CONFIG_CMD_DATE
-
-
-/*
- * JFFS2 partitions
- *
- */
-/* No command line, one static partition, whole device */
-#undef CONFIG_CMD_MTDPARTS
-#define CONFIG_JFFS2_DEV               "nor1"
-#define CONFIG_JFFS2_PART_SIZE         0xFFFFFFFF
-#define CONFIG_JFFS2_PART_OFFSET       0x00000000
-
-/* mtdparts command line support */
-/* Note: fake mtd_id used, no linux mtd map file */
-/*
-#define CONFIG_CMD_MTDPARTS
-#define MTDIDS_DEFAULT         "nor1=v37-1"
-#define MTDPARTS_DEFAULT       "mtdparts=v37-1:-(jffs2)"
-*/
-
-/*
- * Miscellaneous configurable options
- */
-#define        CONFIG_SYS_LONGHELP                     /* undef to save memory         */
-#if defined(CONFIG_CMD_KGDB)
-#define        CONFIG_SYS_CBSIZE       1024            /* Console I/O Buffer Size      */
-#else
-#define        CONFIG_SYS_CBSIZE       256             /* Console I/O Buffer Size      */
-#endif
-#define        CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
-#define        CONFIG_SYS_MAXARGS      16              /* max number of command args   */
-#define CONFIG_SYS_BARGSIZE    CONFIG_SYS_CBSIZE       /* Boot Argument Buffer Size    */
-
-#define CONFIG_SYS_MEMTEST_START       0x0400000       /* memtest works on     */
-#define CONFIG_SYS_MEMTEST_END         0x0C00000       /* 4 ... 12 MB in DRAM  */
-
-#define        CONFIG_SYS_LOAD_ADDR            0x100000        /* default load address */
-
-/*
- * Low Level Configuration Settings
- * (address mappings, register initial values, etc.)
- * You should know what you are doing if you make changes here.
- */
-/*-----------------------------------------------------------------------
- * Internal Memory Mapped Register
- */
-#define CONFIG_SYS_IMMR                0xF0000000
-
-/*-----------------------------------------------------------------------
- * Definitions for initial stack pointer and data area (in DPRAM)
- */
-#define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_SYS_IMMR
-#define        CONFIG_SYS_INIT_RAM_SIZE        0x2F00  /* Size of used area in DPRAM   */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
-#define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_GBL_DATA_OFFSET
-
-/*-----------------------------------------------------------------------
- * Start addresses for the final memory configuration
- * (Set up by the startup code)
- * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0
- */
-#define        CONFIG_SYS_SDRAM_BASE           0x00000000
-#define CONFIG_SYS_FLASH_BASE0         0x40000000
-#define CONFIG_SYS_FLASH_BASE1         0x60000000
-#define CONFIG_SYS_FLASH_BASE          CONFIG_SYS_FLASH_BASE1
-
-#if defined(DEBUG)
-#define        CONFIG_SYS_MONITOR_LEN          (256 << 10)     /* Reserve 256 kB for Monitor   */
-#else
-#define        CONFIG_SYS_MONITOR_LEN          (192 << 10)     /* Reserve 192 kB for Monitor   */
-#endif
-#define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_FLASH_BASE0
-#define        CONFIG_SYS_MALLOC_LEN           (128 << 10)     /* Reserve 128 kB for malloc()  */
-
-/*
- * For booting Linux, the board info and command line data
- * have to be in the first 8 MB of memory, since this is
- * the maximum mapped by the Linux kernel during initialization.
- */
-#define        CONFIG_SYS_BOOTMAPSZ            (8 << 20)       /* Initial Memory map for Linux */
-
-/*-----------------------------------------------------------------------
- * FLASH organization
- */
-#define CONFIG_SYS_MAX_FLASH_BANKS     2       /* max number of memory banks           */
-#define CONFIG_SYS_MAX_FLASH_SECT      35      /* max number of sectors on one chip    */
-
-#define CONFIG_SYS_FLASH_ERASE_TOUT    120000  /* Timeout for Flash Erase (in ms)      */
-#define CONFIG_SYS_FLASH_WRITE_TOUT    500     /* Timeout for Flash Write (in ms)      */
-
-#define        CONFIG_ENV_IS_IN_NVRAM  1
-#define        CONFIG_ENV_ADDR         0x80000000/* Address of Environment */
-#define        CONFIG_ENV_SIZE         0x4000  /* Total Size of Environment Sector     */
-
-#define CONFIG_ENV_OFFSET              0
-
-/*-----------------------------------------------------------------------
- * Cache Configuration
- */
-#define CONFIG_SYS_CACHELINE_SIZE      16      /* For all MPC8xx CPUs                  */
-#if defined(CONFIG_CMD_KGDB)
-#define CONFIG_SYS_CACHELINE_SHIFT     4       /* log base 2 of the above value        */
-#endif
-
-/*-----------------------------------------------------------------------
- * SYPCR - System Protection Control                           11-9
- * SYPCR can only be written once after reset!
- *-----------------------------------------------------------------------
- * Software & Bus Monitor Timer max, Bus Monitor enable, SW Watchdog freeze
- */
-#if defined(CONFIG_WATCHDOG)
-#define CONFIG_SYS_SYPCR       (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | \
-                        SYPCR_SWE  | SYPCR_SWRI| SYPCR_SWP)
-#else
-#define CONFIG_SYS_SYPCR       0xFFFFFF88
-#endif
-
-/*-----------------------------------------------------------------------
- * SIUMCR - SIU Module Configuration                           11-6
- *-----------------------------------------------------------------------
- * PCMCIA config., multi-function pin tri-state
- */
-#define CONFIG_SYS_SIUMCR      (SIUMCR_DBGC00 | SIUMCR_DBPC00 | SIUMCR_FRC | SIUMCR_GB5E)
-
-/*-----------------------------------------------------------------------
- * TBSCR - Time Base Status and Control                                11-26
- *-----------------------------------------------------------------------
- * Clear Reference Interrupt Status, Timebase freezing enabled
- */
-#define CONFIG_SYS_TBSCR       (TBSCR_REFA | TBSCR_REFB | TBSCR_TBE)
-
-/*-----------------------------------------------------------------------
- * RTCSC - Real-Time Clock Status and Control Register         11-27
- *-----------------------------------------------------------------------
- */
-/*%%%#define CONFIG_SYS_RTCSC  (RTCSC_SEC | RTCSC_ALR | RTCSC_RTF| RTCSC_RTE) */
-#define CONFIG_SYS_RTCSC       (RTCSC_SEC | RTCSC_RTE)
-
-/*-----------------------------------------------------------------------
- * PISCR - Periodic Interrupt Status and Control               11-31
- *-----------------------------------------------------------------------
- * Clear Periodic Interrupt Status, Interrupt Timer freezing enabled
- */
-#define CONFIG_SYS_PISCR (PISCR_PS | PISCR_PITF)
-/*
-#define CONFIG_SYS_PISCR (PISCR_PS | PISCR_PITF)
-*/
-
-/*-----------------------------------------------------------------------
- * PLPRCR - PLL, Low-Power, and Reset Control Register         15-30
- *-----------------------------------------------------------------------
- * Reset PLL lock status sticky bit, timer expired status bit and timer
- * interrupt status bit
- *
- * If this is a 80 MHz CPU, set PLL multiplication factor to 5 (5*16=80)!
- */
-/* up to 50 MHz we use a 1:1 clock */
-#define CONFIG_SYS_PLPRCR      ( (1524 << PLPRCR_MF_SHIFT) | PLPRCR_SPLSS | PLPRCR_TMIST | PLPRCR_TEXPS )
-
-/*-----------------------------------------------------------------------
- * SCCR - System Clock and reset Control Register              15-27
- *-----------------------------------------------------------------------
- * Set clock output, timebase and RTC source and divider,
- * power management and some other internal clocks
- */
-#define SCCR_MASK      SCCR_EBDF11
-/* up to 50 MHz we use a 1:1 clock */
-#define CONFIG_SYS_SCCR        (SCCR_COM00 | SCCR_TBS)
-
-/*-----------------------------------------------------------------------
- * PCMCIA stuff
- *-----------------------------------------------------------------------
- *
- */
-#define CONFIG_SYS_PCMCIA_MEM_ADDR     (0xE0000000)
-#define CONFIG_SYS_PCMCIA_MEM_SIZE     ( 64 << 20 )
-#define CONFIG_SYS_PCMCIA_DMA_ADDR     (0xE4000000)
-#define CONFIG_SYS_PCMCIA_DMA_SIZE     ( 64 << 20 )
-#define CONFIG_SYS_PCMCIA_ATTRB_ADDR   (0xE8000000)
-#define CONFIG_SYS_PCMCIA_ATTRB_SIZE   ( 64 << 20 )
-#define CONFIG_SYS_PCMCIA_IO_ADDR      (0xEC000000)
-#define CONFIG_SYS_PCMCIA_IO_SIZE      ( 64 << 20 )
-
-/*-----------------------------------------------------------------------
- * IDE/ATA stuff (Supports IDE harddisk on PCMCIA Adapter)
- *-----------------------------------------------------------------------
- */
-
-#undef CONFIG_IDE_PCCARD               /* Use IDE with PC Card Adapter */
-
-#undef CONFIG_IDE_PCMCIA               /* Direct IDE    not supported  */
-#undef CONFIG_IDE_LED                  /* LED   for ide not supported  */
-#undef CONFIG_IDE_RESET                /* reset for ide not supported  */
-
-#define CONFIG_SYS_IDE_MAXBUS          1       /* max. 1 IDE bus               */
-#define CONFIG_SYS_IDE_MAXDEVICE       1       /* max. 1 drive per IDE bus     */
-
-#define CONFIG_SYS_ATA_IDE0_OFFSET     0x0000
-
-#define CONFIG_SYS_ATA_BASE_ADDR       CONFIG_SYS_PCMCIA_MEM_ADDR
-
-/* Offset for data I/O                 */
-#define CONFIG_SYS_ATA_DATA_OFFSET     (CONFIG_SYS_PCMCIA_MEM_SIZE + 0x320)
-
-/* Offset for normal register accesses */
-#define CONFIG_SYS_ATA_REG_OFFSET      (2 * CONFIG_SYS_PCMCIA_MEM_SIZE + 0x320)
-
-/* Offset for alternate registers      */
-#define CONFIG_SYS_ATA_ALT_OFFSET      0x0100
-
-/*-----------------------------------------------------------------------
- *
- *-----------------------------------------------------------------------
- *
- */
-#define CONFIG_SYS_DER 0
-
-/*
- * Init Memory Controller:
- *
- * BR0 and OR0 (FLASH)
- */
-
-#define FLASH_BASE0_PRELIM     0x40000000      /* FLASH bank #0        */
-#define FLASH_BASE1_PRELIM     0x60000000      /* FLASH bank #1        */
-
-#define CONFIG_SYS_PRELIM_OR_AM        0xFE000000      /* OR addr mask */
-
-#define CONFIG_SYS_OR_TIMING_FLASH     0xF56
-
-#define CONFIG_SYS_OR0_PRELIM  (CONFIG_SYS_PRELIM_OR_AM | CONFIG_SYS_OR_TIMING_FLASH)
-#define CONFIG_SYS_BR0_PRELIM  ((FLASH_BASE0_PRELIM & BR_BA_MSK) | BR_PS_16 | BR_V)
-
-#define CONFIG_SYS_OR5_PRELIM  (CONFIG_SYS_PRELIM_OR_AM | CONFIG_SYS_OR_TIMING_FLASH)
-#define CONFIG_SYS_BR5_PRELIM  ((FLASH_BASE1_PRELIM & BR_BA_MSK) | BR_PS_32 | BR_V)
-
-/*
- * BR1 and OR1 (Battery backed SRAM)
- */
-#define        CONFIG_SYS_BR1_PRELIM   0x80000401
-#define CONFIG_SYS_OR1_PRELIM  0xFFC00736
-
-/*
- * BR2 and OR2 (SDRAM)
- */
-#define SDRAM_BASE_PRELIM      0x00000000      /* SDRAM base   */
-#define        SDRAM_MAX_SIZE          0x04000000      /* max 64 MB */
-
-#define CONFIG_SYS_OR_TIMING_SDRAM     0x00000A00
-
-#define CONFIG_SYS_OR2_PRELIM  (CONFIG_SYS_PRELIM_OR_AM | CONFIG_SYS_OR_TIMING_SDRAM )
-#define CONFIG_SYS_BR2_PRELIM  ((SDRAM_BASE_PRELIM & BR_BA_MSK) | BR_MS_UPMA | BR_V )
-
-/* Marel V37 mem setting */
-
-#define        CONFIG_SYS_BR3_CAN      0xC0000401
-#define CONFIG_SYS_OR3_CAN     0xFFFF0724
-
-/*
-#define        CONFIG_SYS_BR3_PRELIM   0xFA400001
-#define CONFIG_SYS_OR3_PRELIM  0xFFFF8910
-#define        CONFIG_SYS_BR4_PRELIM   0xFA000401
-#define CONFIG_SYS_OR4_PRELIM  0xFFFE0970
-*/
-
-/*
- * Memory Periodic Timer Prescaler
- */
-
-/* periodic timer for refresh */
-#define CONFIG_SYS_MAMR_PTA    97              /* start with divider for 100 MHz       */
-
-/*
- * Refresh clock Prescalar
- */
-#define CONFIG_SYS_MPTPR       MPTPR_PTP_DIV16
-
-/*
- * MAMR settings for SDRAM
- */
-
-/* 10 column SDRAM */
-#define CONFIG_SYS_MAMR_10COL  ((CONFIG_SYS_MAMR_PTA << MAMR_PTA_SHIFT)  | MAMR_PTAE       |   \
-                        MAMR_AMA_TYPE_2 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A12 |   \
-                        MAMR_GPL_A4DIS | MAMR_RLFA_4X | MAMR_WLFA_3X | MAMR_TLFA_16X)
-
-#endif /* __CONFIG_H */
index 85ddbcb93be6c4bed23190a3691d13826e30651d..276a01e744ed8b4914c6dd64130c93212c128abe 100644 (file)
@@ -43,10 +43,12 @@ struct ihs_gpio {
 };
 
 struct ihs_i2c {
-       u16 write_mailbox;
+       u16 interrupt_status;
+       u16 interrupt_enable;
        u16 write_mailbox_ext;
-       u16 read_mailbox;
+       u16 write_mailbox;
        u16 read_mailbox_ext;
+       u16 read_mailbox;
 };
 
 struct ihs_osd {
@@ -84,7 +86,6 @@ struct ihs_fpga {
 #endif
 
 #ifdef CONFIG_IO64
-
 struct ihs_fpga_channel {
        u16 status_int;
        u16 config_int;
@@ -121,9 +122,9 @@ struct ihs_fpga {
        u16 reserved_0[6];      /* 0x0008 */
        struct ihs_gpio gpio;   /* 0x0014 */
        u16 mpc3w_control;      /* 0x001a */
-       u16 reserved_1[19];     /* 0x001c */
-       u16 videocontrol;       /* 0x0042 */
-       u16 reserved_2[14];     /* 0x0044 */
+       u16 reserved_1[18];     /* 0x001c */
+       struct ihs_i2c i2c;     /* 0x0040 */
+       u16 reserved_2[10];     /* 0x004c */
        u16 mc_int;             /* 0x0060 */
        u16 mc_int_en;          /* 0x0062 */
        u16 mc_status;          /* 0x0064 */
@@ -150,15 +151,13 @@ struct ihs_fpga {
        u16 fpga_features;      /* 0x0006 */
        u16 reserved_0[10];     /* 0x0008 */
        u16 extended_interrupt; /* 0x001c */
-       u16 reserved_1[9];      /* 0x001e */
-       struct ihs_i2c i2c;     /* 0x0030 */
-       u16 reserved_2[16];     /* 0x0038 */
+       u16 reserved_1[29];     /* 0x001e */
        u16 mpc3w_control;      /* 0x0058 */
-       u16 reserved_3[34];     /* 0x005a */
-       u16 videocontrol;       /* 0x009e */
-       u16 reserved_4[176];    /* 0x00a0 */
+       u16 reserved_2[3];      /* 0x005a */
+       struct ihs_i2c i2c;     /* 0x0060 */
+       u16 reserved_3[205];    /* 0x0066 */
        struct ihs_osd osd;     /* 0x0200 */
-       u16 reserved_5[761];    /* 0x020e */
+       u16 reserved_4[761];    /* 0x020e */
        u16 videomem[31736];    /* 0x0800 */
 };
 #endif
index 0a072f5336c7f24fe1e81a9838c7565b3606820b..3e8f78d583de7da387567579d3b0920d536a9c0f 100644 (file)
@@ -72,6 +72,11 @@ struct lmb;
 #  define IMAGE_ENABLE_SHA256  1
 # endif
 
+#ifdef CONFIG_FIT_DISABLE_SHA256
+#undef CONFIG_SHA256
+#undef IMAGE_ENABLE_SHA256
+#endif
+
 #ifndef IMAGE_ENABLE_CRC32
 #define IMAGE_ENABLE_CRC32     0
 #endif
index 5f84cd3c5b2ccad57c78fdf01419f0e50e2b11db..cc2ee3f9564e553595e52767cfd23da747ea3767 100644 (file)
@@ -258,10 +258,6 @@ extern vidinfo_t panel_info;
 
 /* Video functions */
 
-#if defined(CONFIG_RBC823)
-void   lcd_disable(void);
-#endif
-
 void   lcd_putc(const char c);
 void   lcd_puts(const char *s);
 void   lcd_printf(const char *fmt, ...);
index 952a67c17c279535a7a62e4d92b651d8be5d0c0a..8aec2541b8327c43d1bf7aa5d9a10b67449d6598 100644 (file)
 
 #if !defined(CONFIG_PCMCIA_SLOT_A) && !defined(CONFIG_PCMCIA_SLOT_B)
 
-                                       /* The RPX series use SLOT_B    */
-#if defined(CONFIG_RPXLITE)
-# define CONFIG_PCMCIA_SLOT_B
-#elif defined(CONFIG_FADS)             /* The FADS series are a mess   */
-# if defined(CONFIG_MPC86x) || defined(CONFIG_MPC821)
-#  define CONFIG_PCMCIA_SLOT_A
-# else
-#  define CONFIG_PCMCIA_SLOT_B
-# endif
-#elif defined(CONFIG_TQM8xxL) || defined(CONFIG_SVM_SC8xx)
+#if defined(CONFIG_TQM8xxL) || defined(CONFIG_SVM_SC8xx)
 # define       CONFIG_PCMCIA_SLOT_B    /* The TQM8xxL use SLOT_B       */
 #elif defined(CONFIG_SPD823TS)         /* The SPD8xx  use SLOT_B       */
 # define CONFIG_PCMCIA_SLOT_B
@@ -44,8 +35,6 @@
 # define CONFIG_PCMCIA_SLOT_B
 #elif defined(CONFIG_ATC)              /* The ATC use SLOT_A   */
 # define CONFIG_PCMCIA_SLOT_A
-#elif defined(CONFIG_NETTA)
-# define CONFIG_PCMCIA_SLOT_A
 #elif defined(CONFIG_UC100)            /* The UC100 use SLOT_B         */
 # define CONFIG_PCMCIA_SLOT_B
 #else
index ecff60d59f90f1893b21579876609c823b99490d..0eb91b869510b3fa8a8c06a958007ff343f8fdb4 100644 (file)
@@ -231,28 +231,6 @@ void status_led_set  (int led, int state);
 
 # define STATUS_LED_BOOT        0               /* LED 0 used for boot status */
 
-/*****  RBC823    ********************************************************/
-#elif defined(CONFIG_RBC823)
-
-# define STATUS_LED_PAR         im_ioport.iop_pcpar
-# define STATUS_LED_DIR         im_ioport.iop_pcdir
-#  undef STATUS_LED_ODR
-# define STATUS_LED_DAT         im_ioport.iop_pcdat
-
-# define STATUS_LED_BIT         0x0002          /* LED 0 is on PC.14 */
-# define STATUS_LED_PERIOD      (CONFIG_SYS_HZ / 2)
-# define STATUS_LED_STATE       STATUS_LED_BLINKING
-# define STATUS_LED_BIT1        0x0004          /* LED 1 is on PC.13 */
-# define STATUS_LED_PERIOD1     (CONFIG_SYS_HZ)
-# define STATUS_LED_STATE1      STATUS_LED_OFF
-
-# define STATUS_LED_ACTIVE      1               /* LED on for bit == 1  */
-
-# define STATUS_LED_BOOT        0               /* LED 0 used for boot status */
-
-/*****  NetPhone   ********************************************************/
-#elif defined(CONFIG_NETPHONE) || defined(CONFIG_NETTA2)
-/* XXX empty just to avoid the error */
 /*****  STx XTc    ********************************************************/
 #elif defined(CONFIG_STXXTC)
 /* XXX empty just to avoid the error */
index 2bf5897528d9fbc14377033a48dad47f5b9e3386..401f2623f35f97ad7a589ff41e32db526e8b870e 100755 (executable)
--- a/mkconfig
+++ b/mkconfig
@@ -55,6 +55,11 @@ CONFIG_NAME="${7%_config}"
 arch="$2"
 cpu=`echo $3 | awk 'BEGIN {FS = ":"} ; {print $1}'`
 spl_cpu=`echo $3 | awk 'BEGIN {FS = ":"} ; {print $2}'`
+
+if [ "$cpu" = "-" ] ; then
+       cpu=
+fi
+
 if [ "$6" = "<none>" ] ; then
        board=
 elif [ "$6" = "-" ] ; then
@@ -114,10 +119,10 @@ fi
 
 rm -f asm/arch
 
-if [ -z "${soc}" ] ; then
-       ln -s ${LNPREFIX}arch-${cpu} asm/arch
-else
+if [ "${soc}" ] ; then
        ln -s ${LNPREFIX}arch-${soc} asm/arch
+elif [ "${cpu}" ] ; then
+       ln -s ${LNPREFIX}arch-${cpu} asm/arch
 fi
 
 if [ -z "$KBUILD_SRC" ] ; then
index d12250018ae7b33b58f7df8322f652ba1f9aa2ee..3a8b483e3c73840485ec091ea21f858a4f761df2 100644 (file)
@@ -114,19 +114,6 @@ static void scc_init (int scc_index)
        immr->im_cpm.cp_scc[scc_index].scc_gsmrl &=
                        ~(SCC_GSMRL_ENR | SCC_GSMRL_ENT);
 
-#if defined(CONFIG_FADS)
-#if defined(CONFIG_MPC860T) || defined(CONFIG_MPC86xADS)
-       /* The FADS860T and MPC86xADS don't use the MODEM_EN or DATA_VOICE signals. */
-       *((uint *) BCSR4) &= ~BCSR4_ETHLOOP;
-       *((uint *) BCSR4) |= BCSR4_TFPLDL | BCSR4_TPSQEL;
-       *((uint *) BCSR1) &= ~BCSR1_ETHEN;
-#else
-       *((uint *) BCSR4) &= ~(BCSR4_ETHLOOP | BCSR4_MODEM_EN);
-       *((uint *) BCSR4) |= BCSR4_TFPLDL | BCSR4_TPSQEL | BCSR4_DATA_VOICE;
-       *((uint *) BCSR1) &= ~BCSR1_ETHEN;
-#endif
-#endif
-
        pram_ptr = (scc_enet_t *) & (immr->im_cpm.cp_dparam[proff[scc_index]]);
 
        rxIdx = 0;
@@ -365,23 +352,12 @@ static void scc_init (int scc_index)
        immr->im_cpm.cp_scc[scc_index].scc_psmr = SCC_PSMR_ENCRC |
                        SCC_PSMR_NIB22 | SCC_PSMR_LPB;
 
-#ifdef CONFIG_RPXLITE
-       *((uchar *) BCSR0) |= BCSR0_ETHEN;
-#endif
-
        /*
         * Set the ENT/ENR bits in the GSMR Low -- Enable Transmit/Receive
         */
 
        immr->im_cpm.cp_scc[scc_index].scc_gsmrl |=
                        (SCC_GSMRL_ENR | SCC_GSMRL_ENT);
-
-       /*
-        * Work around transmit problem with first eth packet
-        */
-#if defined (CONFIG_FADS)
-       udelay (10000);                         /* wait 10 ms */
-#endif
 }
 
 static void scc_halt (int scc_index)
index 5214c71b085cd394cc975bda57e39f03ac06524a..e54a4cacfabe2d3c8736a0c50b158644c01d7fa7 100644 (file)
@@ -100,17 +100,6 @@ static void smc_init (int smc_index)
        im->im_sdma.sdma_sdmr = 0x00;
 #endif
 
-#if defined(CONFIG_FADS)
-       /* Enable RS232 */
-       *((uint *) BCSR1) &=
-                       ~(smc_index == 1 ? BCSR1_RS232EN_1 : BCSR1_RS232EN_2);
-#endif
-
-#if defined(CONFIG_RPXLITE)
-       /* Enable Monitor Port Transceiver */
-       *((uchar *) BCSR0) |= BCSR0_ENMONXCVR;
-#endif
-
        /* Set the physical address of the host memory buffers in
         * the buffer descriptors.
         */