]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Driver/DDR: Moving Freescale DDR driver to a common driver
authorYork Sun <yorksun@freescale.com>
Mon, 30 Sep 2013 16:22:09 +0000 (09:22 -0700)
committerYork Sun <yorksun@freescale.com>
Mon, 25 Nov 2013 19:43:43 +0000 (11:43 -0800)
Freescale DDR driver has been used for mpc83xx, mpc85xx, mpc86xx SoCs.
The similar DDR controllers will be used for ARM-based SoCs.

Signed-off-by: York Sun <yorksun@freescale.com>
170 files changed:
Makefile
README
arch/powerpc/cpu/mpc83xx/Makefile
arch/powerpc/cpu/mpc83xx/ecc.c
arch/powerpc/cpu/mpc85xx/Makefile
arch/powerpc/cpu/mpc85xx/cpu.c
arch/powerpc/cpu/mpc85xx/mp.c
arch/powerpc/cpu/mpc86xx/Makefile
arch/powerpc/cpu/mpc8xxx/Makefile
arch/powerpc/cpu/mpc8xxx/ddr/Makefile [deleted file]
arch/powerpc/include/asm/config.h
arch/powerpc/include/asm/config_mpc85xx.h
arch/powerpc/include/asm/config_mpc86xx.h
arch/powerpc/include/asm/immap_83xx.h
arch/powerpc/include/asm/immap_85xx.h
arch/powerpc/include/asm/immap_86xx.h
board/exmeritus/hww1u1a/ddr.c
board/exmeritus/hww1u1a/hww1u1a.c
board/freescale/b4860qds/ddr.c
board/freescale/bsc9131rdb/ddr.c
board/freescale/bsc9131rdb/spl_minimal.c
board/freescale/bsc9132qds/bsc9132qds.c
board/freescale/bsc9132qds/ddr.c
board/freescale/bsc9132qds/spl_minimal.c
board/freescale/c29xpcie/ddr.c
board/freescale/corenet_ds/ddr.c
board/freescale/corenet_ds/eth_p4080.c
board/freescale/corenet_ds/p3041ds_ddr.c
board/freescale/corenet_ds/p4080ds_ddr.c
board/freescale/corenet_ds/p5020ds_ddr.c
board/freescale/corenet_ds/p5040ds_ddr.c
board/freescale/mpc8349emds/Makefile
board/freescale/mpc8349emds/ddr.c
board/freescale/mpc8349emds/mpc8349emds.c
board/freescale/mpc8536ds/ddr.c
board/freescale/mpc8536ds/mpc8536ds.c
board/freescale/mpc8540ads/ddr.c
board/freescale/mpc8540ads/mpc8540ads.c
board/freescale/mpc8541cds/ddr.c
board/freescale/mpc8541cds/mpc8541cds.c
board/freescale/mpc8544ds/ddr.c
board/freescale/mpc8544ds/mpc8544ds.c
board/freescale/mpc8548cds/ddr.c
board/freescale/mpc8548cds/mpc8548cds.c
board/freescale/mpc8555cds/ddr.c
board/freescale/mpc8555cds/mpc8555cds.c
board/freescale/mpc8560ads/ddr.c
board/freescale/mpc8560ads/mpc8560ads.c
board/freescale/mpc8568mds/ddr.c
board/freescale/mpc8568mds/mpc8568mds.c
board/freescale/mpc8569mds/ddr.c
board/freescale/mpc8569mds/mpc8569mds.c
board/freescale/mpc8572ds/ddr.c
board/freescale/mpc8572ds/mpc8572ds.c
board/freescale/mpc8610hpcd/Makefile
board/freescale/mpc8610hpcd/ddr.c
board/freescale/mpc8610hpcd/mpc8610hpcd.c
board/freescale/mpc8641hpcn/Makefile
board/freescale/mpc8641hpcn/ddr.c
board/freescale/mpc8641hpcn/mpc8641hpcn.c
board/freescale/p1010rdb/ddr.c
board/freescale/p1010rdb/spl_minimal.c
board/freescale/p1022ds/ddr.c
board/freescale/p1022ds/p1022ds.c
board/freescale/p1022ds/spl_minimal.c
board/freescale/p1023rdb/ddr.c
board/freescale/p1023rdb/p1023rdb.c
board/freescale/p1023rds/p1023rds.c
board/freescale/p1_p2_rdb/ddr.c
board/freescale/p1_p2_rdb_pc/ddr.c
board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
board/freescale/p1_p2_rdb_pc/spl_minimal.c
board/freescale/p1_twr/ddr.c
board/freescale/p1_twr/p1_twr.c
board/freescale/p2020come/ddr.c
board/freescale/p2020ds/ddr.c
board/freescale/p2020ds/p2020ds.c
board/freescale/p2041rdb/ddr.c
board/freescale/t1040qds/ddr.c
board/freescale/t104xrdb/ddr.c
board/freescale/t4qds/ddr.c
board/freescale/t4qds/eth.c
board/gdsys/p1022/controlcenterd.c
board/gdsys/p1022/ddr.c
board/keymile/kmp204x/ddr.c
board/sbc8548/Makefile
board/sbc8548/ddr.c
board/sbc8548/sbc8548.c
board/sbc8641d/Makefile
board/sbc8641d/ddr.c
board/sbc8641d/sbc8641d.c
board/socrates/Makefile
board/socrates/ddr.c
board/socrates/sdram.c
board/stx/stxgp3/Makefile
board/stx/stxgp3/ddr.c
board/stx/stxgp3/stxgp3.c
board/stx/stxssa/Makefile
board/stx/stxssa/ddr.c
board/stx/stxssa/stxssa.c
board/xes/xpedite517x/ddr.c
board/xes/xpedite517x/xpedite517x.c
board/xes/xpedite520x/ddr.c
board/xes/xpedite537x/ddr.c
board/xes/xpedite550x/ddr.c
drivers/ddr/fsl/Makefile [new file with mode: 0644]
drivers/ddr/fsl/ctrl_regs.c [moved from arch/powerpc/cpu/mpc8xxx/ddr/ctrl_regs.c with 97% similarity]
drivers/ddr/fsl/ddr1_dimm_params.c [moved from arch/powerpc/cpu/mpc8xxx/ddr/ddr1_dimm_params.c with 99% similarity]
drivers/ddr/fsl/ddr2_dimm_params.c [moved from arch/powerpc/cpu/mpc8xxx/ddr/ddr2_dimm_params.c with 99% similarity]
drivers/ddr/fsl/ddr3_dimm_params.c [moved from arch/powerpc/cpu/mpc8xxx/ddr/ddr3_dimm_params.c with 99% similarity]
drivers/ddr/fsl/interactive.c [moved from arch/powerpc/cpu/mpc8xxx/ddr/interactive.c with 99% similarity]
drivers/ddr/fsl/lc_common_dimm_params.c [moved from arch/powerpc/cpu/mpc8xxx/ddr/lc_common_dimm_params.c with 98% similarity]
drivers/ddr/fsl/main.c [moved from arch/powerpc/cpu/mpc8xxx/ddr/main.c with 99% similarity]
drivers/ddr/fsl/mpc85xx_ddr_gen1.c [moved from arch/powerpc/cpu/mpc85xx/ddr-gen1.c with 93% similarity]
drivers/ddr/fsl/mpc85xx_ddr_gen2.c [moved from arch/powerpc/cpu/mpc85xx/ddr-gen2.c with 96% similarity]
drivers/ddr/fsl/mpc85xx_ddr_gen3.c [moved from arch/powerpc/cpu/mpc85xx/ddr-gen3.c with 97% similarity]
drivers/ddr/fsl/mpc86xx_ddr.c [moved from arch/powerpc/cpu/mpc86xx/ddr-8641.c with 95% similarity]
drivers/ddr/fsl/options.c [moved from arch/powerpc/cpu/mpc8xxx/ddr/options.c with 97% similarity]
drivers/ddr/fsl/util.c [moved from arch/powerpc/cpu/mpc8xxx/ddr/util.c with 96% similarity]
include/common_timing_params.h [moved from arch/powerpc/cpu/mpc8xxx/ddr/common_timing_params.h with 100% similarity]
include/configs/B4860QDS.h
include/configs/BSC9131RDB.h
include/configs/BSC9132QDS.h
include/configs/C29XPCIE.h
include/configs/HWW1U1A.h
include/configs/MPC8349EMDS.h
include/configs/MPC8536DS.h
include/configs/MPC8540ADS.h
include/configs/MPC8541CDS.h
include/configs/MPC8544DS.h
include/configs/MPC8548CDS.h
include/configs/MPC8555CDS.h
include/configs/MPC8560ADS.h
include/configs/MPC8568MDS.h
include/configs/MPC8569MDS.h
include/configs/MPC8572DS.h
include/configs/MPC8610HPCD.h
include/configs/MPC8641HPCN.h
include/configs/P1010RDB.h
include/configs/P1022DS.h
include/configs/P1023RDB.h
include/configs/P1_P2_RDB.h
include/configs/P2020COME.h
include/configs/P2020DS.h
include/configs/P2041RDB.h
include/configs/T1040QDS.h
include/configs/T1040RDB.h
include/configs/T1042RDB_PI.h
include/configs/controlcenterd.h
include/configs/corenet_ds.h
include/configs/km/kmp204x-common.h
include/configs/mpq101.h
include/configs/p1_p2_rdb_pc.h
include/configs/p1_twr.h
include/configs/sbc8548.h
include/configs/socrates.h
include/configs/stxgp3.h
include/configs/stxssa.h
include/configs/t4qds.h
include/configs/xpedite517x.h
include/configs/xpedite520x.h
include/configs/xpedite537x.h
include/configs/xpedite550x.h
include/fsl_ddr.h [moved from arch/powerpc/cpu/mpc8xxx/ddr/ddr.h with 97% similarity]
include/fsl_ddr_dimm_params.h [moved from arch/powerpc/include/asm/fsl_ddr_dimm_params.h with 100% similarity]
include/fsl_ddr_sdram.h [moved from arch/powerpc/include/asm/fsl_ddr_sdram.h with 98% similarity]
nand_spl/board/freescale/mpc8569mds/nand_boot.c
nand_spl/board/freescale/p1023rds/nand_boot.c
nand_spl/board/freescale/p1_p2_rdb/nand_boot.c
spl/Makefile

index b8713a49359973cadd5e1dc68bacc9774083fcf6..2ad1d37a627ae2117caa70d70a24088b70672e0a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -267,6 +267,7 @@ LIBS-y += drivers/power/ \
        drivers/power/battery/
 LIBS-y += drivers/spi/
 LIBS-$(CONFIG_FMAN_ENET) += drivers/net/fm/
+LIBS-$(CONFIG_SYS_FSL_DDR) += drivers/ddr/fsl/
 LIBS-y += drivers/serial/
 LIBS-y += drivers/usb/eth/
 LIBS-y += drivers/usb/gadget/
diff --git a/README b/README
index c97ff0af0b6283057b53ba992682b7cbfdbc7831..49f4b3af2f6710819b17cb56494b4eb0fc683158 100644 (file)
--- a/README
+++ b/README
@@ -423,16 +423,47 @@ The following options need to be configured:
                CONFIG_SYS_FSL_DSP_CCSRBAR_DEFAULT
                This value denotes start offset of DSP CCSR space.
 
-               CONFIG_SYS_FSL_DDR_EMU
-               Specify emulator support for DDR. Some DDR features such as
-               deskew training are not available.
-
 - Generic CPU options:
                CONFIG_SYS_BIG_ENDIAN, CONFIG_SYS_LITTLE_ENDIAN
 
                Defines the endianess of the CPU. Implementation of those
                values is arch specific.
 
+               CONFIG_SYS_FSL_DDR
+               Freescale DDR driver in use. This type of DDR controller is
+               found in mpc83xx, mpc85xx, mpc86xx as well as some ARM core
+               SoCs.
+
+               CONFIG_SYS_FSL_DDR_ADDR
+               Freescale DDR memory-mapped register base.
+
+               CONFIG_SYS_FSL_DDR_EMU
+               Specify emulator support for DDR. Some DDR features such as
+               deskew training are not available.
+
+               CONFIG_SYS_FSL_DDRC_GEN1
+               Freescale DDR1 controller.
+
+               CONFIG_SYS_FSL_DDRC_GEN2
+               Freescale DDR2 controller.
+
+               CONFIG_SYS_FSL_DDRC_GEN3
+               Freescale DDR3 controller.
+
+               CONFIG_SYS_FSL_DDR1
+               Board config to use DDR1. It can be enabled for SoCs with
+               Freescale DDR1 or DDR2 controllers, depending on the board
+               implemetation.
+
+               CONFIG_SYS_FSL_DDR2
+               Board config to use DDR2. It can be eanbeld for SoCs with
+               Freescale DDR2 or DDR3 controllers, depending on the board
+               implementation.
+
+               CONFIG_SYS_FSL_DDR3
+               Board config to use DDR3. It can be enabled for SoCs with
+               Freescale DDR3 controllers.
+
 - Intel Monahans options:
                CONFIG_SYS_MONAHANS_RUN_MODE_OSC_RATIO
 
@@ -3182,7 +3213,7 @@ FIT uImage format:
 
                CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
                Set for the SPL on PPC mpc8xxx targets, support for
-               arch/powerpc/cpu/mpc8xxx/ddr/libddr.o in SPL binary.
+               drivers/ddr/fsl/libddr.o in SPL binary.
 
                CONFIG_SPL_COMMON_INIT_DDR
                Set for common ddr init with serial presence detect in
index d3f700147837aebb6cf5ededc0f8e9a6b3a281ca..c345dd6ae64f915d264637c59e0c099ceda0fffe 100644 (file)
@@ -38,11 +38,11 @@ obj-$(CONFIG_OF_LIBFDT) += fdt.o
 # Stub implementations of cache management functions for USB
 obj-y += cache.o
 
-ifdef CONFIG_FSL_DDR2
-obj-$(CONFIG_MPC8349) += ../mpc85xx/ddr-gen2.o
+ifdef CONFIG_SYS_FSL_DDR2
+obj-$(CONFIG_MPC8349) += $(SRCTREE)/drivers/ddr/fsl/mpc85xx_ddr_gen2.o
 else
 obj-y += spd_sdram.o
 endif
-obj-$(CONFIG_FSL_DDR2) += law.o
+obj-$(CONFIG_SYS_FSL_DDR2) += law.o
 
 endif # not minimal
index 120b37ba63810d14667f199410df7c1db26a8dad..6b7f72aa7de0f94d2527d6a1bd6b1a7987931ea8 100644 (file)
@@ -15,7 +15,7 @@
 void ecc_print_status(void)
 {
        immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
-#ifdef CONFIG_FSL_DDR2
+#ifdef CONFIG_SYS_FSL_DDR2
        ccsr_ddr_t *ddr = &immap->ddr;
 #else
        ddr83xx_t *ddr = &immap->ddr;
@@ -99,7 +99,7 @@ void ecc_print_status(void)
 int do_ecc(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
 {
        immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
-#ifdef CONFIG_FSL_DDR2
+#ifdef CONFIG_SYS_FSL_DDR2
        ccsr_ddr_t *ddr = &immap->ddr;
 #else
        ddr83xx_t *ddr = &immap->ddr;
index a34014f305f633954e9a5fac337e77e8084737cb..91c8402047914df46c03eb19ce211dc958c09b53 100644 (file)
@@ -29,51 +29,6 @@ obj-$(CONFIG_MP)     += release.o
 obj-$(CONFIG_CMD_ERRATA) += cmd_errata.o
 obj-$(CONFIG_CPM2)     += commproc.o
 
-# supports ddr1
-obj-$(CONFIG_MPC8540) += ddr-gen1.o
-obj-$(CONFIG_MPC8560) += ddr-gen1.o
-obj-$(CONFIG_MPC8541) += ddr-gen1.o
-obj-$(CONFIG_MPC8555) += ddr-gen1.o
-
-# supports ddr1/2
-obj-$(CONFIG_MPC8548) += ddr-gen2.o
-obj-$(CONFIG_MPC8568) += ddr-gen2.o
-obj-$(CONFIG_MPC8544) += ddr-gen2.o
-
-# supports ddr1/2/3
-obj-$(CONFIG_PPC_C29X) += ddr-gen3.o
-obj-$(CONFIG_MPC8572) += ddr-gen3.o
-obj-$(CONFIG_MPC8536) += ddr-gen3.o
-obj-$(CONFIG_MPC8569)  += ddr-gen3.o
-obj-$(CONFIG_P1010)    += ddr-gen3.o
-obj-$(CONFIG_P1011)    += ddr-gen3.o
-obj-$(CONFIG_P1012)    += ddr-gen3.o
-obj-$(CONFIG_P1013)    += ddr-gen3.o
-obj-$(CONFIG_P1014)    += ddr-gen3.o
-obj-$(CONFIG_P1020)    += ddr-gen3.o
-obj-$(CONFIG_P1021)    += ddr-gen3.o
-obj-$(CONFIG_P1022)    += ddr-gen3.o
-obj-$(CONFIG_P1023)    += ddr-gen3.o
-obj-$(CONFIG_P1024)    += ddr-gen3.o
-obj-$(CONFIG_P1025)    += ddr-gen3.o
-obj-$(CONFIG_P2010)    += ddr-gen3.o
-obj-$(CONFIG_P2020)    += ddr-gen3.o
-obj-$(CONFIG_PPC_P2041)        += ddr-gen3.o
-obj-$(CONFIG_PPC_P3041)        += ddr-gen3.o
-obj-$(CONFIG_PPC_P4080)        += ddr-gen3.o
-obj-$(CONFIG_PPC_P5020)        += ddr-gen3.o
-obj-$(CONFIG_PPC_P5040)        += ddr-gen3.o
-obj-$(CONFIG_PPC_T4240)        += ddr-gen3.o
-obj-$(CONFIG_PPC_T4160)        += ddr-gen3.o
-obj-$(CONFIG_PPC_B4420)        += ddr-gen3.o
-obj-$(CONFIG_PPC_B4860)        += ddr-gen3.o
-obj-$(CONFIG_BSC9131)          += ddr-gen3.o
-obj-$(CONFIG_BSC9132)          += ddr-gen3.o
-obj-$(CONFIG_PPC_T1040)        += ddr-gen3.o
-obj-$(CONFIG_PPC_T1042)        += ddr-gen3.o
-obj-$(CONFIG_PPC_T1020)        += ddr-gen3.o
-obj-$(CONFIG_PPC_T1022)        += ddr-gen3.o
-
 obj-$(CONFIG_CPM2)     += ether_fcc.o
 obj-$(CONFIG_OF_LIBFDT) += fdt.o
 obj-$(CONFIG_FSL_CORENET) += liodn.o
index 1a0196c7c421db4924c9531c55574b4b467696af..552acc6879da371b024cc3e1c563f1fc215e2a64 100644 (file)
@@ -22,7 +22,7 @@
 #include <asm/fsl_lbc.h>
 #include <post.h>
 #include <asm/processor.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -453,21 +453,21 @@ static void dump_spd_ddr_reg(void)
        for (i = 0; i < CONFIG_NUM_DDR_CONTROLLERS; i++) {
                switch (i) {
                case 0:
-                       ddr[i] = (void *)CONFIG_SYS_MPC8xxx_DDR_ADDR;
+                       ddr[i] = (void *)CONFIG_SYS_FSL_DDR_ADDR;
                        break;
-#if defined(CONFIG_SYS_MPC8xxx_DDR2_ADDR) && (CONFIG_NUM_DDR_CONTROLLERS > 1)
+#if defined(CONFIG_SYS_FSL_DDR2_ADDR) && (CONFIG_NUM_DDR_CONTROLLERS > 1)
                case 1:
-                       ddr[i] = (void *)CONFIG_SYS_MPC8xxx_DDR2_ADDR;
+                       ddr[i] = (void *)CONFIG_SYS_FSL_DDR2_ADDR;
                        break;
 #endif
-#if defined(CONFIG_SYS_MPC8xxx_DDR3_ADDR) && (CONFIG_NUM_DDR_CONTROLLERS > 2)
+#if defined(CONFIG_SYS_FSL_DDR3_ADDR) && (CONFIG_NUM_DDR_CONTROLLERS > 2)
                case 2:
-                       ddr[i] = (void *)CONFIG_SYS_MPC8xxx_DDR3_ADDR;
+                       ddr[i] = (void *)CONFIG_SYS_FSL_DDR3_ADDR;
                        break;
 #endif
-#if defined(CONFIG_SYS_MPC8xxx_DDR4_ADDR) && (CONFIG_NUM_DDR_CONTROLLERS > 3)
+#if defined(CONFIG_SYS_FSL_DDR4_ADDR) && (CONFIG_NUM_DDR_CONTROLLERS > 3)
                case 3:
-                       ddr[i] = (void *)CONFIG_SYS_MPC8xxx_DDR4_ADDR;
+                       ddr[i] = (void *)CONFIG_SYS_FSL_DDR4_ADDR;
                        break;
 #endif
                default:
index 5f198eb305d0d24d8bd7b206f0b4fdc995c2c778..88c8e65930e6918002fd8495fb4dc9644f704e53 100644 (file)
@@ -11,7 +11,7 @@
 #include <asm/io.h>
 #include <asm/mmu.h>
 #include <asm/fsl_law.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include "mp.h"
 
 DECLARE_GLOBAL_DATA_PTR;
index bcb786dcab7573b7e74aa6a19f5f58ba93dd76ea..0f790b0efc4440a9f4b8c21c556546d1edfae97f 100644 (file)
@@ -16,9 +16,6 @@ obj-$(CONFIG_MP) += release.o
 
 obj-y  += cpu.o
 obj-y  += cpu_init.o
-# 8610 & 8641 are identical w/regards to DDR
-obj-$(CONFIG_MPC8610) += ddr-8641.o
-obj-$(CONFIG_MPC8641) += ddr-8641.o
 obj-$(CONFIG_OF_LIBFDT) += fdt.o
 obj-y  += interrupts.o
 obj-$(CONFIG_MP) += mp.o
index 1d083bf35488ad343c48dc1f6562c1a2b906f0f9..395fed16b6f1ee080fbc0d773a817f302229f375 100644 (file)
@@ -31,9 +31,3 @@ obj-$(CONFIG_SYS_SRIO) += srio.o
 obj-$(CONFIG_FSL_LAW) += law.o
 
 endif
-
-ifdef CONFIG_SPL_BUILD
-obj-$(CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT) += ddr/
-else
-obj-y += ddr/
-endif
diff --git a/arch/powerpc/cpu/mpc8xxx/ddr/Makefile b/arch/powerpc/cpu/mpc8xxx/ddr/Makefile
deleted file mode 100644 (file)
index 8cbc06c..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# Copyright 2008-2011 Freescale Semiconductor, Inc.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# Version 2 as published by the Free Software Foundation.
-#
-
-obj-$(CONFIG_FSL_DDR1) += main.o util.o ctrl_regs.o options.o \
-                                  lc_common_dimm_params.o
-
-obj-$(CONFIG_FSL_DDR2) += main.o util.o ctrl_regs.o options.o \
-                                  lc_common_dimm_params.o
-
-obj-$(CONFIG_FSL_DDR3) += main.o util.o ctrl_regs.o options.o \
-                                  lc_common_dimm_params.o
-ifdef CONFIG_DDR_SPD
-SPD := y
-endif
-ifdef CONFIG_SPD_EEPROM
-SPD := y
-endif
-ifdef SPD
-obj-$(CONFIG_FSL_DDR1) += ddr1_dimm_params.o
-obj-$(CONFIG_FSL_DDR2) += ddr2_dimm_params.o
-obj-$(CONFIG_FSL_DDR3) += ddr3_dimm_params.o
-endif
-
-obj-$(CONFIG_FSL_DDR_INTERACTIVE) += interactive.o
index 3c17c99146427b167577ff1d987d98c9aad1c9c5..423a6fb8dc6419d3ef4020086777a9a3510a2011 100644 (file)
@@ -9,10 +9,16 @@
 
 #ifdef CONFIG_MPC85xx
 #include <asm/config_mpc85xx.h>
+#define CONFIG_SYS_FSL_DDR
 #endif
 
 #ifdef CONFIG_MPC86xx
 #include <asm/config_mpc86xx.h>
+#define CONFIG_SYS_FSL_DDR
+#endif
+
+#ifdef CONFIG_MPC83xx
+#define CONFIG_SYS_FSL_DDR
 #endif
 
 #ifndef HWCONFIG_BUFFER_SIZE
index d4cd27dd00811b9607bd2e0b8de925c8b687575d..047fdf1d8c1f043e228d9df7f86fa8525795454d 100644 (file)
 #elif defined(CONFIG_MPC8540)
 #define CONFIG_MAX_CPUS                        1
 #define CONFIG_SYS_FSL_NUM_LAWS                8
+#define CONFIG_SYS_FSL_DDRC_GEN1
 #define CONFIG_SYS_CCSRBAR_DEFAULT     0xff700000
 
 #elif defined(CONFIG_MPC8541)
 #define CONFIG_MAX_CPUS                        1
 #define CONFIG_SYS_FSL_NUM_LAWS                8
+#define CONFIG_SYS_FSL_DDRC_GEN1
 #define CONFIG_SYS_FSL_SEC_COMPAT      2
 #define CONFIG_SYS_CCSRBAR_DEFAULT     0xff700000
 
 #elif defined(CONFIG_MPC8544)
 #define CONFIG_MAX_CPUS                        1
 #define CONFIG_SYS_FSL_NUM_LAWS                10
+#define CONFIG_SYS_FSL_DDRC_GEN2
 #define CONFIG_SYS_PPC_E500_DEBUG_TLB  0
 #define CONFIG_SYS_FSL_SEC_COMPAT      2
 #define CONFIG_SYS_CCSRBAR_DEFAULT     0xff700000
@@ -59,6 +62,7 @@
 #elif defined(CONFIG_MPC8548)
 #define CONFIG_MAX_CPUS                        1
 #define CONFIG_SYS_FSL_NUM_LAWS                10
+#define CONFIG_SYS_FSL_DDRC_GEN2
 #define CONFIG_SYS_PPC_E500_DEBUG_TLB  0
 #define CONFIG_SYS_FSL_SEC_COMPAT      2
 #define CONFIG_SYS_CCSRBAR_DEFAULT     0xff700000
 #elif defined(CONFIG_MPC8555)
 #define CONFIG_MAX_CPUS                        1
 #define CONFIG_SYS_FSL_NUM_LAWS                8
+#define CONFIG_SYS_FSL_DDRC_GEN1
 #define CONFIG_SYS_FSL_SEC_COMPAT      2
 #define CONFIG_SYS_CCSRBAR_DEFAULT     0xff700000
 
 #elif defined(CONFIG_MPC8560)
 #define CONFIG_MAX_CPUS                        1
 #define CONFIG_SYS_FSL_NUM_LAWS                8
+#define CONFIG_SYS_FSL_DDRC_GEN1
 #define CONFIG_SYS_CCSRBAR_DEFAULT     0xff700000
 
 #elif defined(CONFIG_MPC8568)
 #define CONFIG_MAX_CPUS                        1
 #define CONFIG_SYS_FSL_NUM_LAWS                10
+#define CONFIG_SYS_FSL_DDRC_GEN2
 #define CONFIG_SYS_FSL_SEC_COMPAT      2
 #define QE_MURAM_SIZE                  0x10000UL
 #define MAX_QE_RISC                    2
@@ -738,4 +745,10 @@ defined(CONFIG_PPC_T1020) || defined(CONFIG_PPC_T1022)
 #define CONFIG_SYS_FSL_THREADS_PER_CORE 1
 #endif
 
+#if !defined(CONFIG_SYS_FSL_DDRC_GEN1) && \
+       !defined(CONFIG_SYS_FSL_DDRC_GEN2) && \
+       !defined(CONFIG_SYS_FSL_DDRC_GEN3)
+#define CONFIG_SYS_FSL_DDRC_GEN3
+#endif
+
 #endif /* _ASM_MPC85xx_CONFIG_H_ */
index 694b110302d5c4c517442e4ade3b26ecd6d9a76a..4f9b2252be671f1012cdd495d514ba2ecf7b5f55 100644 (file)
@@ -7,6 +7,8 @@
 #ifndef _ASM_MPC86xx_CONFIG_H_
 #define _ASM_MPC86xx_CONFIG_H_
 
+#define CONFIG_SYS_FSL_DDR_86XX
+
 /* SoC specific defines for Freescale MPC86xx processors */
 
 #if defined(CONFIG_MPC8610)
index 289f7cac52b4dc5d89181531f550696703571de2..1042b0c308d9e3053ecef8ccef2f232aed395310 100644 (file)
@@ -279,7 +279,7 @@ typedef struct qesba83xx {
 /*
  * DDR Memory Controller Memory Map
  */
-#if defined(CONFIG_FSL_DDR2) || defined(CONFIG_FSL_DDR3)
+#if defined(CONFIG_SYS_FSL_DDR2) || defined(CONFIG_SYS_FSL_DDR3)
 typedef struct ccsr_ddr {
        u32     cs0_bnds;               /* Chip Select 0 Memory Bounds */
        u8      res1[4];
@@ -739,7 +739,7 @@ typedef struct immap {
        u8                      dll_ddr[0x100];
        u8                      dll_lbc[0x100];
        u8                      res1[0xE00];
-#if defined(CONFIG_FSL_DDR2) || defined(CONFIG_FSL_DDR3)
+#if defined(CONFIG_SYS_FSL_DDR2) || defined(CONFIG_SYS_FSL_DDR3)
        ccsr_ddr_t              ddr;    /* DDR Memory Controller Memory */
 #else
        ddr83xx_t               ddr;    /* DDR Memory Controller Memory */
@@ -1029,7 +1029,7 @@ typedef struct immap {
 #endif
 
 #define CONFIG_SYS_MPC8xxx_DDR_OFFSET  (0x2000)
-#define CONFIG_SYS_MPC8xxx_DDR_ADDR \
+#define CONFIG_SYS_FSL_DDR_ADDR \
                        (CONFIG_SYS_IMMR + CONFIG_SYS_MPC8xxx_DDR_OFFSET)
 #define CONFIG_SYS_MPC83xx_DMA_OFFSET  (0x8000)
 #define CONFIG_SYS_MPC83xx_DMA_ADDR \
index 631261857e1299333f517c6369135b24098fd99d..d479216850ff5ff255a80cc4fd60bed71cb5219a 100644 (file)
@@ -3048,11 +3048,11 @@ struct ccsr_pman {
        (CONFIG_SYS_IMMR + CONFIG_SYS_FSL_CORENET_RCPM_OFFSET)
 #define CONFIG_SYS_MPC85xx_ECM_ADDR \
        (CONFIG_SYS_IMMR + CONFIG_SYS_MPC85xx_ECM_OFFSET)
-#define CONFIG_SYS_MPC8xxx_DDR_ADDR \
+#define CONFIG_SYS_FSL_DDR_ADDR \
        (CONFIG_SYS_IMMR + CONFIG_SYS_MPC8xxx_DDR_OFFSET)
-#define CONFIG_SYS_MPC8xxx_DDR2_ADDR \
+#define CONFIG_SYS_FSL_DDR2_ADDR \
        (CONFIG_SYS_IMMR + CONFIG_SYS_MPC8xxx_DDR2_OFFSET)
-#define CONFIG_SYS_MPC8xxx_DDR3_ADDR \
+#define CONFIG_SYS_FSL_DDR3_ADDR \
        (CONFIG_SYS_IMMR + CONFIG_SYS_MPC8xxx_DDR3_OFFSET)
 #define CONFIG_SYS_LBC_ADDR \
        (CONFIG_SYS_IMMR + CONFIG_SYS_MPC85xx_LBC_OFFSET)
index 2a704fe6b7be430349aec7daef3ecafd5e6d26ee..046a4347199a503ec057b605e292c4cb24f7b012 100644 (file)
@@ -1253,9 +1253,9 @@ typedef struct immap {
 extern immap_t  *immr;
 
 #define CONFIG_SYS_MPC8xxx_DDR_OFFSET  0x2000
-#define CONFIG_SYS_MPC8xxx_DDR_ADDR    (CONFIG_SYS_IMMR + CONFIG_SYS_MPC8xxx_DDR_OFFSET)
+#define CONFIG_SYS_FSL_DDR_ADDR        (CONFIG_SYS_IMMR + CONFIG_SYS_MPC8xxx_DDR_OFFSET)
 #define CONFIG_SYS_MPC8xxx_DDR2_OFFSET 0x6000
-#define CONFIG_SYS_MPC8xxx_DDR2_ADDR   (CONFIG_SYS_IMMR + CONFIG_SYS_MPC8xxx_DDR2_OFFSET)
+#define CONFIG_SYS_FSL_DDR2_ADDR       (CONFIG_SYS_IMMR + CONFIG_SYS_MPC8xxx_DDR2_OFFSET)
 #define CONFIG_SYS_MPC86xx_DMA_OFFSET  0x21000
 #define CONFIG_SYS_MPC86xx_DMA_ADDR    (CONFIG_SYS_IMMR + CONFIG_SYS_MPC86xx_DMA_OFFSET)
 #define CONFIG_SYS_MPC86xx_PIC_OFFSET  0x40000
index 23a71d5af5f90f256b3ada41f6086481acf18357..e1f6865f42c367703842260c46b9ee83a5210d44 100644 (file)
@@ -9,8 +9,8 @@
 
 #include <common.h>
 
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 
 void fsl_ddr_board_options(memctl_options_t *popts,
                                dimm_params_t *pdimm,
index 7c11e38d1c184ae62085c990a0541027b7843647..104987a9b60fdb5fee3b925f048c2059bffde160 100644 (file)
@@ -13,7 +13,7 @@
 #include <asm/cache.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_pci.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/io.h>
 #include <miiphy.h>
 #include <libfdt.h>
@@ -89,7 +89,7 @@ int checkboard(void)
         * and delay a while before we continue.
         */
        if (mpc85xx_gpio_get(GPIO_RESETS)) {
-               ccsr_ddr_t *ddr = (ccsr_ddr_t *)CONFIG_SYS_MPC8xxx_DDR_ADDR;
+               ccsr_ddr_t *ddr = (ccsr_ddr_t *)CONFIG_SYS_FSL_DDR_ADDR;
 
                puts("Debugger detected... extra device reset enabled!\n");
 
index 2d149231395cf58421be70e6e05a32a48e16124d..187c3b3ebcae5092868c1f72a50c621cab47f96d 100644 (file)
@@ -9,11 +9,11 @@
 #include <common.h>
 #include <i2c.h>
 #include <hwconfig.h>
+#include <fsl_ddr.h>
 #include <asm/mmu.h>
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 #include <asm/fsl_law.h>
-#include <../arch/powerpc/cpu/mpc8xxx/ddr/ddr.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
index a9e92f2ae04105b36484c46209868052c951794e..339c57625638a108495073fc47f40cef14b9b56f 100644 (file)
@@ -8,8 +8,8 @@
 #include <asm/mmu.h>
 #include <asm/immap_85xx.h>
 #include <asm/processor.h>
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 #include <asm/io.h>
 #include <asm/fsl_law.h>
 
index dd5ea95e331e4586762920eeccb12537c6703ac2..974627163a66e2d9174425299a853361488132da 100644 (file)
@@ -10,7 +10,7 @@
 #include <nand.h>
 #include <linux/compiler.h>
 #include <asm/fsl_law.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -20,7 +20,7 @@ DECLARE_GLOBAL_DATA_PTR;
  */
 static void sdram_init(void)
 {
-       ccsr_ddr_t *ddr = (ccsr_ddr_t *)CONFIG_SYS_MPC8xxx_DDR_ADDR;
+       ccsr_ddr_t *ddr = (ccsr_ddr_t *)CONFIG_SYS_FSL_DDR_ADDR;
 
        __raw_writel(CONFIG_SYS_DDR_CS0_BNDS, &ddr->cs0_bnds);
        __raw_writel(CONFIG_SYS_DDR_CS0_CONFIG, &ddr->cs0_config);
index a895e4e297cb86319cb7aba224386d5aca438cbe..31bbf62ee592679e0a70c116a1aa5b3f5ad3acbe 100644 (file)
@@ -20,7 +20,7 @@
 #include <asm/fsl_ifc.h>
 #include <hwconfig.h>
 #include <i2c.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 
 #ifdef CONFIG_PCI
 #include <pci.h>
@@ -134,7 +134,7 @@ void dsp_ddr_configure(void)
         *to the DSP DDR controller as connected DDR memories are similar.
         */
        ccsr_ddr_t __iomem *pa_ddr =
-                       (ccsr_ddr_t __iomem *)CONFIG_SYS_MPC8xxx_DDR_ADDR;
+                       (ccsr_ddr_t __iomem *)CONFIG_SYS_FSL_DDR_ADDR;
        ccsr_ddr_t temp_ddr;
        ccsr_ddr_t __iomem *dsp_ddr =
                        (ccsr_ddr_t __iomem *)CONFIG_SYS_FSL_DSP_CCSR_DDR_ADDR;
index b3130be86dede41bd6aee4ee6cb34b4009d9ad32..43f163a2c621bb2471eff741189a0073caed35ac 100644 (file)
@@ -8,8 +8,8 @@
 #include <asm/mmu.h>
 #include <asm/immap_85xx.h>
 #include <asm/processor.h>
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 #include <asm/io.h>
 #include <asm/fsl_law.h>
 
index 2bf0a0cfa88c615822b9ce64353e354f61711dd6..0249dc587ff580f905f65dec4ee6c99c45eb5347 100644 (file)
 #include <nand.h>
 #include <linux/compiler.h>
 #include <asm/fsl_law.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
 static void sdram_init(void)
 {
-       ccsr_ddr_t *ddr = (ccsr_ddr_t *)CONFIG_SYS_MPC8xxx_DDR_ADDR;
+       ccsr_ddr_t *ddr = (ccsr_ddr_t *)CONFIG_SYS_FSL_DDR_ADDR;
 #if CONFIG_DDR_CLK_FREQ == 100000000
        __raw_writel(CONFIG_SYS_DDR_CS0_BNDS, &ddr->cs0_bnds);
        __raw_writel(CONFIG_SYS_DDR_CS0_CONFIG, &ddr->cs0_config);
index 57a9b610ea0ffd2c72a19cbec21f23d89478c028..968655c1b3474454e5f5b78eb9b9b6abbd6287e8 100644 (file)
@@ -6,8 +6,8 @@
 
 #include <common.h>
 #include <asm/fsl_law.h>
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 
 #include "cpld.h"
 
index 18e2ff617b4481b2146fc0fcfd731468d9aa0f5f..e7e893a1aec412e6217c4cfd0f9cd6c22ca70412 100644 (file)
@@ -10,8 +10,8 @@
 #include <i2c.h>
 #include <hwconfig.h>
 #include <asm/mmu.h>
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 #include <asm/fsl_law.h>
 
 DECLARE_GLOBAL_DATA_PTR;
index e5beb551770770bb2a2d808d9becd8eea250ea15..5cbec7f5f269a7e5b56e97dc0eeed8f5bdcdaaaa 100644 (file)
@@ -12,7 +12,7 @@
 #include <asm/cache.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_law.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/fsl_serdes.h>
 #include <asm/fsl_portals.h>
 #include <asm/fsl_liodn.h>
index 5a8ed94b048ef171b581712c6f326a74c68d14a0..4dead9c0453f2a73bc9fa8c6d10144720332f734 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #include <common.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 
 fixed_ddr_parm_t fixed_ddr_parm_0[] = {
        {0, 0, NULL}
index 844e1d736a7a54752105a546cf86cbee70469255..d572a5fbedf2d83d1be54260685aa49c223b9ae1 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #include <common.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 
 #define CONFIG_SYS_DDR_TIMING_3_1200   0x01030000
 #define CONFIG_SYS_DDR_TIMING_0_1200   0xCC550104
index e65de364d73bff3134792d6e1abe03631b6e07d7..9aaf6db9972cfa77b0daf2de5c60fc6065d51109 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #include <common.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 
 fixed_ddr_parm_t fixed_ddr_parm_0[] = {
        {0, 0, NULL}
index e65de364d73bff3134792d6e1abe03631b6e07d7..9aaf6db9972cfa77b0daf2de5c60fc6065d51109 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #include <common.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 
 fixed_ddr_parm_t fixed_ddr_parm_0[] = {
        {0, 0, NULL}
index 23880f52f542cab58d5c99fe5f403ed437d7f0a2..5c315f9f68436045a51f0f9417e2d029f2ded097 100644 (file)
@@ -7,4 +7,4 @@
 
 obj-y += mpc8349emds.o
 obj-$(CONFIG_PCI) += pci.o
-obj-$(CONFIG_FSL_DDR2) += ddr.o
+obj-$(CONFIG_SYS_FSL_DDR2) += ddr.o
index 3d257d0fbf2a3705cde56a5aa6d310ec7a0d2cdd..aae003d1210517a859eea3273534cb91045369fa 100644 (file)
@@ -6,8 +6,8 @@
 
 #include <common.h>
 
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 
 struct board_specific_parameters {
        u32 n_ranks;
index ec48487294834e7b3513bf3e44389dcb4921b780..d9092201aa549552bd2792a56b070d459f428131 100644 (file)
@@ -12,8 +12,8 @@
 #include <i2c.h>
 #include <spi.h>
 #include <miiphy.h>
-#ifdef CONFIG_FSL_DDR2
-#include <asm/fsl_ddr_sdram.h>
+#ifdef CONFIG_SYS_FSL_DDR2
+#include <fsl_ddr_sdram.h>
 #else
 #include <spd_sdram.h>
 #endif
@@ -57,7 +57,7 @@ phys_size_t initdram (int board_type)
        /* DDR SDRAM - Main SODIMM */
        im->sysconf.ddrlaw[0].bar = CONFIG_SYS_DDR_BASE & LAWBAR_BAR;
 #if defined(CONFIG_SPD_EEPROM)
-#ifndef CONFIG_FSL_DDR2
+#ifndef CONFIG_SYS_FSL_DDR2
        msize = spd_sdram() * 1024 * 1024;
 #if defined(CONFIG_DDR_ECC) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER)
        ddr_enable_ecc(msize);
index d10370c9f20fc0866f12a739b37c776eba7224ee..ebe3ba460ccd6ff1117514cd8a1cb26275adf7b9 100644 (file)
@@ -8,8 +8,8 @@
 
 #include <common.h>
 
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 
 void fsl_ddr_board_options(memctl_options_t *popts,
                                dimm_params_t *pdimm,
index 5daab692c6c4251d9eb14607ca4e7f4d9f107dd3..59e9a35089a12ac47525e45bd6e0c1a15e15fece 100644 (file)
@@ -12,7 +12,7 @@
 #include <asm/cache.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_pci.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/io.h>
 #include <asm/fsl_serdes.h>
 #include <spd.h>
index 9e798152783bca071e13c79b23c96c8ef218ebb9..41d4cfe7381402d22b18f62b4afd8ad3a84798b7 100644 (file)
@@ -8,8 +8,8 @@
 
 #include <common.h>
 
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 
 void fsl_ddr_board_options(memctl_options_t *popts,
                                dimm_params_t *pdimm,
index 175eefcc6b1cac3d44db68b5c2291d19ce61e132..97a5d19b5e288fe5b098a6a0e6d345bdb91b70f7 100644 (file)
@@ -14,7 +14,7 @@
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #include <asm/immap_85xx.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <libfdt.h>
 #include <fdt_support.h>
 
@@ -168,7 +168,7 @@ void lbc_sdram_init(void)
 phys_size_t fixed_sdram(void)
 {
   #ifndef CONFIG_SYS_RAMBOOT
-       volatile ccsr_ddr_t *ddr= (void *)(CONFIG_SYS_MPC8xxx_DDR_ADDR);
+       volatile ccsr_ddr_t *ddr = (void *)(CONFIG_SYS_FSL_DDR_ADDR);
 
        ddr->cs0_bnds = CONFIG_SYS_DDR_CS0_BNDS;
        ddr->cs0_config = CONFIG_SYS_DDR_CS0_CONFIG;
index 78d73b0ea8838f2890b81cd61de9cc4e5837c5d9..d2ac6c4ad47d68768431f8c744c1bf24d6608929 100644 (file)
@@ -8,8 +8,8 @@
 
 #include <common.h>
 
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 
 void fsl_ddr_board_options(memctl_options_t *popts,
                                dimm_params_t *pdimm,
index 8115e5c69b5e4ff0c27700e9b1a6f2057d6d7170..7b264dddd157c7cae75bcb228e98ed8ff05e18e1 100644 (file)
@@ -11,7 +11,7 @@
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #include <asm/immap_85xx.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <ioports.h>
 #include <spd_sdram.h>
 #include <libfdt.h>
index 6cf9bc1d75f538e650a76df057a3d772158263d8..aa30cabb030a432e24c437b0031cc86b4bd393cc 100644 (file)
@@ -8,8 +8,8 @@
 
 #include <common.h>
 
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 
 void fsl_ddr_board_options(memctl_options_t *popts,
                                dimm_params_t *pdimm,
index dfd8fa652258fbdee9c4ca69de2936493f42a6bf..1b33db6f31448b58651ebb5d8971f2f1f4caccf4 100644 (file)
@@ -11,7 +11,7 @@
 #include <asm/mmu.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_pci.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/fsl_serdes.h>
 #include <asm/io.h>
 #include <miiphy.h>
index 996ffe206da7bb31a7f3228c84b359709dfaa120..b31ea3432e51f5dfe2779e65341d02e73a1dfac4 100644 (file)
@@ -8,8 +8,8 @@
 
 #include <common.h>
 
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 
 void fsl_ddr_board_options(memctl_options_t *popts,
                                dimm_params_t *pdimm,
index 51e4bb5dcb4dd072bf6a89451c88b0d2e1844ec6..ca9b43c6b621ff3a18fcb8d39b9f9882cb6bf7fd 100644 (file)
@@ -12,7 +12,7 @@
 #include <asm/mmu.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_pci.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/fsl_serdes.h>
 #include <miiphy.h>
 #include <libfdt.h>
index 78d73b0ea8838f2890b81cd61de9cc4e5837c5d9..d2ac6c4ad47d68768431f8c744c1bf24d6608929 100644 (file)
@@ -8,8 +8,8 @@
 
 #include <common.h>
 
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 
 void fsl_ddr_board_options(memctl_options_t *popts,
                                dimm_params_t *pdimm,
index e2093d1bbc526af5a776af25966bb9eb5b87f314..de5f5669e62f2bc42dd66234204fc767844ffd2a 100644 (file)
@@ -9,7 +9,7 @@
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #include <asm/immap_85xx.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <ioports.h>
 #include <spd_sdram.h>
 #include <libfdt.h>
index 9e798152783bca071e13c79b23c96c8ef218ebb9..41d4cfe7381402d22b18f62b4afd8ad3a84798b7 100644 (file)
@@ -8,8 +8,8 @@
 
 #include <common.h>
 
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 
 void fsl_ddr_board_options(memctl_options_t *popts,
                                dimm_params_t *pdimm,
index 90a2522cb91c3731aba376f6895b61ed864c5e7d..7104e33156efc2f7918b301bec24d23deebe8352 100644 (file)
@@ -14,7 +14,7 @@
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #include <asm/immap_85xx.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <ioports.h>
 #include <spd_sdram.h>
 #include <miiphy.h>
@@ -373,7 +373,7 @@ void lbc_sdram_init(void)
 phys_size_t fixed_sdram(void)
 {
   #ifndef CONFIG_SYS_RAMBOOT
-       volatile ccsr_ddr_t *ddr= (void *)(CONFIG_SYS_MPC8xxx_DDR_ADDR);
+       volatile ccsr_ddr_t *ddr = (void *)(CONFIG_SYS_FSL_DDR_ADDR);
 
        ddr->cs0_bnds = CONFIG_SYS_DDR_CS0_BNDS;
        ddr->cs0_config = CONFIG_SYS_DDR_CS0_CONFIG;
index b1f4f1f8481f0c09a9b3dbe043b59eb68810ae7d..6db92ef2dab598540259f8d00af406ea33dc4fef 100644 (file)
@@ -8,8 +8,8 @@
 
 #include <common.h>
 
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 
 void fsl_ddr_board_options(memctl_options_t *popts,
                                dimm_params_t *pdimm,
index ae80697b3851bbdaf5e4c428a1c874d5eb5342ec..a8fdcb5f917704ab824b9cde76a74bc578c7d012 100644 (file)
@@ -12,7 +12,7 @@
 #include <asm/mmu.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_pci.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/fsl_serdes.h>
 #include <spd_sdram.h>
 #include <i2c.h>
index 68f686b7e6abdef1c07e8494639eb1da2e5b20ac..ef404b1d6f08519d1034b4ffb20b1d2aea7870e5 100644 (file)
@@ -8,8 +8,8 @@
 
 #include <common.h>
 
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 
 void fsl_ddr_board_options(memctl_options_t *popts,
                                dimm_params_t *pdimm,
index c928a964f9fd754c27924dcb9d422d1b6ed7197a..60f55773dae6f875c88082d75c206d08d04da697 100644 (file)
@@ -14,7 +14,7 @@
 #include <asm/cache.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_pci.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/fsl_serdes.h>
 #include <asm/io.h>
 #include <spd_sdram.h>
@@ -231,7 +231,7 @@ int checkboard (void)
 #if !defined(CONFIG_SPD_EEPROM)
 phys_size_t fixed_sdram(void)
 {
-       volatile ccsr_ddr_t *ddr = (ccsr_ddr_t *)CONFIG_SYS_MPC8xxx_DDR_ADDR;
+       volatile ccsr_ddr_t *ddr = (ccsr_ddr_t *)CONFIG_SYS_FSL_DDR_ADDR;
        uint d_init;
 
        out_be32(&ddr->cs0_bnds, CONFIG_SYS_DDR_CS0_BNDS);
index 52e4f4224c72453dabfbcf2e556a78a6827817c1..2bfc1a170c6683ebf40ae97afaa70ab9b9e29d01 100644 (file)
@@ -8,8 +8,8 @@
 
 #include <common.h>
 
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 
 struct board_specific_parameters {
        u32 n_ranks;
index 657df6a71819d19a73b7040ead079f1c137d44d8..2fb425713236285596bbd88113693c4be25333c8 100644 (file)
@@ -12,7 +12,7 @@
 #include <asm/cache.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_pci.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/io.h>
 #include <asm/fsl_serdes.h>
 #include <miiphy.h>
index 933ea179ba40f01cf55d4d52dc7b8a83223c6e31..2613004f891a6099c47afde724dcd55a690ca84e 100644 (file)
@@ -4,6 +4,6 @@
 #
 
 obj-y  += mpc8610hpcd.o
-obj-$(CONFIG_FSL_DDR2) += ddr.o
+obj-$(CONFIG_SYS_FSL_DDR2) += ddr.o
 obj-y  += law.o
 obj-$(CONFIG_FSL_DIU_FB)       += mpc8610hpcd_diu.o
index 6cf9bc1d75f538e650a76df057a3d772158263d8..aa30cabb030a432e24c437b0031cc86b4bd393cc 100644 (file)
@@ -8,8 +8,8 @@
 
 #include <common.h>
 
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 
 void fsl_ddr_board_options(memctl_options_t *popts,
                                dimm_params_t *pdimm,
index ffdcf2444cb0c092e57cb04fbf5cae34ec138684..aa99623a43d09019ba50826f1a8d4528e61ebb81 100644 (file)
@@ -10,7 +10,7 @@
 #include <asm/processor.h>
 #include <asm/immap_86xx.h>
 #include <asm/fsl_pci.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/fsl_serdes.h>
 #include <i2c.h>
 #include <asm/io.h>
index 8d53af8227bbdc143001145c05b37ef743518520..86c70bcb9dbb3224d27b256b82e920e2a6f444ad 100644 (file)
@@ -7,4 +7,4 @@
 
 obj-y  += mpc8641hpcn.o
 obj-y  += law.o
-obj-$(CONFIG_FSL_DDR2) += ddr.o
+obj-$(CONFIG_SYS_FSL_DDR2) += ddr.o
index 651652a77d83fdc3ce4e418b57363a2c716b3fe4..7cd0395651ba69c3d7161bcdb75bb5f25282ed15 100644 (file)
@@ -8,8 +8,8 @@
 
 #include <common.h>
 
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 
 struct board_specific_parameters {
        u32 n_ranks;
index 46a543ebccfb088ccb50d3e82945343d580ce483..0cd9df1cc997f5c6d488fdd2ff3f9b479b63cb72 100644 (file)
@@ -9,7 +9,7 @@
 #include <asm/processor.h>
 #include <asm/immap_86xx.h>
 #include <asm/fsl_pci.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/fsl_serdes.h>
 #include <asm/io.h>
 #include <libfdt.h>
index ab1b41d8320cd6acab49d0656de02c2171d589ba..b0d95ea006772c4968458323ff4a025195602471 100644 (file)
@@ -8,8 +8,8 @@
 #include <asm/mmu.h>
 #include <asm/immap_85xx.h>
 #include <asm/processor.h>
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 #include <asm/io.h>
 #include <asm/fsl_law.h>
 
index d0e712eb303112fadc49e5182b28867d336ab244..aa2a3448c5f75f1c6fa9ee0246104030bc4060ae 100644 (file)
@@ -10,7 +10,7 @@
 #include <nand.h>
 #include <asm/mmu.h>
 #include <asm/immap_85xx.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/fsl_law.h>
 #include <asm/global_data.h>
 
@@ -19,7 +19,7 @@ DECLARE_GLOBAL_DATA_PTR;
 
 void sdram_init(void)
 {
-       ccsr_ddr_t *ddr = (ccsr_ddr_t *)CONFIG_SYS_MPC8xxx_DDR_ADDR;
+       ccsr_ddr_t *ddr = (ccsr_ddr_t *)CONFIG_SYS_FSL_DDR_ADDR;
        ccsr_gur_t *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR;
        u32 ddr_ratio;
        unsigned long ddr_freq_mhz;
index 94d2c2b0dbdd5aeb18c246863ffc9343dc0c5c1e..09212bcee8cfd61064cf5cc488ab20fa57fdd243 100644 (file)
@@ -8,8 +8,8 @@
 
 #include <common.h>
 
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 
 struct board_specific_parameters {
        u32 n_ranks;
index 3d1951cdba165ed459cca2a369867dfeb338c4fe..ba789a4daf1894a9e58dff4979127809fd10dea3 100644 (file)
@@ -14,7 +14,7 @@
 #include <asm/cache.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_pci.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/fsl_serdes.h>
 #include <asm/io.h>
 #include <libfdt.h>
index 8b343968437be445424cc94d06d71f7c20e9f115..6c7e1ac3cbafd4d691cd7d4364b32fbd798f9e78 100644 (file)
@@ -9,7 +9,7 @@
 #include <asm/io.h>
 #include <nand.h>
 #include <asm/fsl_law.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 
 
 const static u32 sysclk_tbl[] = {
index 9fb61fdab36da738d856717e2cd64af9541f7462..d587df527ab1ac5dae565008355b8057c8929ab0 100644 (file)
@@ -8,8 +8,8 @@
 #include <asm/mmu.h>
 #include <asm/immap_85xx.h>
 #include <asm/processor.h>
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 #include <asm/io.h>
 #include <asm/fsl_law.h>
 
index b52b09206996b2c617f2a48454c58f404aa903b7..d2d4f8390aadfb8c6e5bb38fd38d6fa3f8779f21 100644 (file)
@@ -16,7 +16,7 @@
 #include <asm/mmu.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_pci.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/fsl_portals.h>
 #include <libfdt.h>
 #include <fdt_support.h>
index 7c54b65c1dc0a68244b784b0547566b2b7517f5a..2cfcdc41f300af5ef2187b69a604e8fc76d61a32 100644 (file)
@@ -16,7 +16,7 @@
 #include <asm/mmu.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_pci.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/fsl_portals.h>
 #include <libfdt.h>
 #include <fdt_support.h>
@@ -58,7 +58,7 @@ int checkboard(void)
 phys_size_t fixed_sdram(void)
 {
 #ifndef CONFIG_SYS_RAMBOOT
-       ccsr_ddr_t *ddr = (ccsr_ddr_t *)CONFIG_SYS_MPC8xxx_DDR_ADDR;
+       ccsr_ddr_t *ddr = (ccsr_ddr_t *)CONFIG_SYS_FSL_DDR_ADDR;
 
        set_next_law(0, LAW_SIZE_2G, LAW_TRGT_IF_DDR_1);
 
index 5bee22e638044a282f69b44030560cb7e6ef1afe..17d3beac3905ebdecaf4392ea50725bd1a4cc869 100644 (file)
@@ -8,7 +8,7 @@
 #include <asm/mmu.h>
 #include <asm/immap_85xx.h>
 #include <asm/processor.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/io.h>
 #include <asm/fsl_law.h>
 
index 81cc0930bc2ca2f4f9576507eb0f68fa1d227acf..946d5032e74616e71124329428b934789a66eb3c 100644 (file)
@@ -10,8 +10,8 @@
 #include <asm/mmu.h>
 #include <asm/immap_85xx.h>
 #include <asm/processor.h>
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 #include <asm/io.h>
 #include <asm/fsl_law.h>
 
index 50553dacd957f984154db83353bd8924bc197936..966abb24a681e4d9261ebe89d4059f205dd20a21 100644 (file)
@@ -14,7 +14,7 @@
 #include <asm/cache.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_pci.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/io.h>
 #include <asm/fsl_law.h>
 #include <asm/fsl_lbc.h>
index adfa7b1e0f4db655ed1425e0ae711b62203e3946..92437bc787528ea9ae8f0d948a19f7ae904165f8 100644 (file)
@@ -10,7 +10,7 @@
 #include <nand.h>
 #include <linux/compiler.h>
 #include <asm/fsl_law.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
index 67f69d79bd6fcbabaf7523d9ef56e0d3ed984882..a2ce75a40d7b89318359cc080ff1332d9670d54f 100644 (file)
@@ -8,8 +8,8 @@
 #include <asm/mmu.h>
 #include <asm/immap_85xx.h>
 #include <asm/processor.h>
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 #include <asm/io.h>
 #include <asm/fsl_law.h>
 
index ea8db6fc07d97cce926b45eaf3037e0e8b8858bf..0e0d0587d794741504a5bfb5ffca02b3539aad65 100644 (file)
@@ -14,7 +14,7 @@
 #include <asm/cache.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_pci.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/io.h>
 #include <asm/fsl_law.h>
 #include <asm/fsl_lbc.h>
index da804771fbb3a5aac099e58418c76b03fea04911..b642e1255ca3141def00e73569b14caf5fffdf33 100644 (file)
@@ -5,8 +5,8 @@
  */
 #include <common.h>
 
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 
 void fsl_ddr_board_options(memctl_options_t *popts,
                                dimm_params_t *pdimm,
index b12141f296365caff53394917f1e7fd67e5405e4..debe70b18b9a3d1813f4db56f9746d41d79a5ef2 100644 (file)
@@ -8,8 +8,8 @@
 
 #include <common.h>
 
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 
 struct board_specific_parameters {
        u32 n_ranks;
@@ -37,7 +37,7 @@ static const struct board_specific_parameters dimm0[] = {
         *   num|  hi|  clk| cpo|wrdata|2T
         * ranks| mhz|adjst|    | delay|
         */
-#ifdef CONFIG_FSL_DDR2
+#ifdef CONFIG_SYS_FSL_DDR2
        {2,  549,    4,   0x1f,    2,  0},
        {2,  680,    4,   0x1f,    3,  0},
        {2,  850,    4,   0x1f,    4,  0},
index 58a42231a9387548595a05921d713bc8fa3464ef..dd8c6b10fb72d67ef3e891cdfc0c64ffb0cbeb08 100644 (file)
@@ -12,7 +12,7 @@
 #include <asm/cache.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_pci.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/io.h>
 #include <asm/fsl_serdes.h>
 #include <miiphy.h>
@@ -68,7 +68,7 @@ int checkboard(void)
 
 phys_size_t fixed_sdram(void)
 {
-       volatile ccsr_ddr_t *ddr = (ccsr_ddr_t *)CONFIG_SYS_MPC8xxx_DDR_ADDR;
+       volatile ccsr_ddr_t *ddr = (ccsr_ddr_t *)CONFIG_SYS_FSL_DDR_ADDR;
        uint d_init;
 
        ddr->cs0_config = CONFIG_SYS_DDR_CS0_CONFIG;
index cc1bfae394e07049ca8e70f68fc0017c5f9976cb..b8bbcdf2a86ce5d8a05f18d98e456f246a50acc0 100644 (file)
@@ -10,8 +10,8 @@
 #include <i2c.h>
 #include <hwconfig.h>
 #include <asm/mmu.h>
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 #include <asm/fsl_law.h>
 
 struct board_specific_parameters {
index 4fd17da160a457649f7ef75d26acab602ea63bcb..da89a36b96ad58b23aacf68f3c9f85c123dd95f6 100644 (file)
@@ -8,8 +8,8 @@
 #include <i2c.h>
 #include <hwconfig.h>
 #include <asm/mmu.h>
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 #include <asm/fsl_law.h>
 #include "ddr.h"
 
index 8f58dd6832ab87f04f47840bbd59208b995ddd43..9009afa3ad890625346b7046b370ce789b9bc8a6 100644 (file)
@@ -8,8 +8,8 @@
 #include <i2c.h>
 #include <hwconfig.h>
 #include <asm/mmu.h>
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 #include <asm/fsl_law.h>
 #include "ddr.h"
 
index d70c31051df6d694eda046bd7733d51a3fb00720..7586cc3c4bda640e0e07ee786fdd6490bee8e2e4 100644 (file)
@@ -10,8 +10,8 @@
 #include <i2c.h>
 #include <hwconfig.h>
 #include <asm/mmu.h>
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 #include <asm/fsl_law.h>
 #include "ddr.h"
 
index b5f488bcba46c6d6de8b70db79cd3afd354ba5b9..24cf907430df12fb154a022c7702fc19b2cb2a85 100644 (file)
@@ -12,7 +12,7 @@
 #include <asm/cache.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_law.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/fsl_serdes.h>
 #include <asm/fsl_portals.h>
 #include <asm/fsl_liodn.h>
index 81c22bc94cd3b3ea11c3d93515d3ecdf474b409c..8ccd9ce6baa2c9e7e080d01cd9a2da47c0aa69df 100644 (file)
@@ -29,7 +29,7 @@
 #include <asm/cache.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_pci.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/fsl_serdes.h>
 #include <asm/io.h>
 #include <libfdt.h>
index 4a652de43069a541ad20ec3738ab9db9bb511481..7596736bfd4873c0ae95c4a512131582cd759b86 100644 (file)
@@ -12,8 +12,8 @@
 #include <common.h>
 #include <i2c.h>
 
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 
 void fsl_ddr_board_options(memctl_options_t *popts, dimm_params_t *pdimm,
                           unsigned int ctrl_num)
index bd425aab1ad439284ba76ca19d71e14d51c6d84d..34ac6979bd7d13c602f47f8ef218e9123d39ba02 100644 (file)
@@ -11,8 +11,8 @@
 #include <i2c.h>
 #include <hwconfig.h>
 #include <asm/mmu.h>
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 
 void fsl_ddr_board_options(memctl_options_t *popts,
                                dimm_params_t *pdimm,
index b1e32a668b096bd0420546c89c7499401723b653..4c9b6cd60c4788454d6c39d88c093e01d7bf4faa 100644 (file)
@@ -11,4 +11,4 @@
 obj-y  += sbc8548.o
 obj-y  += law.o
 obj-y  += tlb.o
-obj-$(CONFIG_FSL_DDR2) += ddr.o
+obj-$(CONFIG_SYS_FSL_DDR2) += ddr.o
index 95085611336af8d32c5940306bcd6d40958fe9d6..8817103ba779df83c401230ea73822c0f5b8b5a2 100644 (file)
@@ -9,8 +9,8 @@
 #include <common.h>
 #include <i2c.h>
 
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 
 void fsl_ddr_board_options(memctl_options_t *popts,
                                dimm_params_t *pdimm,
@@ -91,7 +91,7 @@ void get_spd(generic_spd_eeprom_t *spd, u8 i2c_address)
  */
 phys_size_t fixed_sdram(void)
 {
-       volatile ccsr_ddr_t *ddr = (void *)(CONFIG_SYS_MPC8xxx_DDR_ADDR);
+       volatile ccsr_ddr_t *ddr = (void *)(CONFIG_SYS_FSL_DDR_ADDR);
 
        out_be32(&ddr->cs0_bnds,        0x0000007f);
        out_be32(&ddr->cs1_bnds,        0x008000ff);
index 3cd945f2c2e2f6dc781665cd88fa5a27e781d2bd..d584276253a5e33414a085d2e5414844cfd11a94 100644 (file)
@@ -15,7 +15,7 @@
 #include <asm/processor.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_pci.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/fsl_serdes.h>
 #include <spd_sdram.h>
 #include <netdev.h>
index 9626b06a5a026a9cc604cb2227bc342bb18b6c7b..a9b20266bcf63d05cc2666bd5073302ed33a5ad1 100644 (file)
@@ -7,4 +7,4 @@
 
 obj-y  += sbc8641d.o
 obj-y  += law.o
-obj-$(CONFIG_FSL_DDR2) += ddr.o
+obj-$(CONFIG_SYS_FSL_DDR2) += ddr.o
index 996ffe206da7bb31a7f3228c84b359709dfaa120..b31ea3432e51f5dfe2779e65341d02e73a1dfac4 100644 (file)
@@ -8,8 +8,8 @@
 
 #include <common.h>
 
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 
 void fsl_ddr_board_options(memctl_options_t *popts,
                                dimm_params_t *pdimm,
index 0b5e8dc17e1ab8f78e3ab7ad8a8688e0ed28a7da..8160c7b5806bffb251e6eec37df37984bfd629b7 100644 (file)
@@ -18,7 +18,7 @@
 #include <asm/processor.h>
 #include <asm/immap_86xx.h>
 #include <asm/fsl_pci.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/fsl_serdes.h>
 #include <libfdt.h>
 #include <fdt_support.h>
index 0a088100e8439e83f2d844b3dc0f3f6f46d1b8c5..79bda718d51ecb7bfa8bbf479b23951f4eab9eeb 100644 (file)
@@ -12,4 +12,4 @@ obj-y += law.o
 obj-y  += tlb.o
 obj-y  += nand.o
 obj-y  += sdram.o
-obj-$(CONFIG_FSL_DDR2) += ddr.o
+obj-$(CONFIG_SYS_FSL_DDR2) += ddr.o
index e9db476f4831f187db64c1228759e3e3aa66b3f3..6bad4da39470bbc4090d320e6d580b05ed49bcca 100644 (file)
@@ -8,8 +8,8 @@
 
 #include <common.h>
 
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 
 void fsl_ddr_board_options(memctl_options_t *popts,
                                dimm_params_t *pdimm,
index 313efae90f0cacc71fbd5c4b6d97b7f27531a14a..356e8e82e7881f3098fc9f4c9f7ba2030679d445 100644 (file)
@@ -8,7 +8,7 @@
 #include <common.h>
 #include <asm/processor.h>
 #include <asm/immap_85xx.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #include <spd_sdram.h>
@@ -24,7 +24,7 @@
  */
 phys_size_t fixed_sdram(void)
 {
-       volatile ccsr_ddr_t *ddr = (void *)(CONFIG_SYS_MPC8xxx_DDR_ADDR);
+       volatile ccsr_ddr_t *ddr = (void *)(CONFIG_SYS_FSL_DDR_ADDR);
 
        /*
         * Disable memory controller.
index 9b724347de65888db3ea524a09e1820f5fae6f38..78e2d6c96f7e39f9c48cb3b8f6c29da4139f911b 100644 (file)
@@ -9,4 +9,4 @@ obj-y   += stxgp3.o
 obj-y  += law.o
 obj-y  += tlb.o
 obj-y  += flash.o
-obj-$(CONFIG_FSL_DDR1) += ddr.o
+obj-$(CONFIG_SYS_FSL_DDR1) += ddr.o
index 9e798152783bca071e13c79b23c96c8ef218ebb9..41d4cfe7381402d22b18f62b4afd8ad3a84798b7 100644 (file)
@@ -8,8 +8,8 @@
 
 #include <common.h>
 
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 
 void fsl_ddr_board_options(memctl_options_t *popts,
                                dimm_params_t *pdimm,
index bd683f6af81a92e1f9284c8b84bf0ff828d2840e..c80d5259ce1bbc8f9b34080929e562883e3ee119 100644 (file)
@@ -18,7 +18,7 @@
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #include <asm/immap_85xx.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <ioports.h>
 #include <asm/io.h>
 #include <spd_sdram.h>
index 17e0aaea7e93e1623eb5a4c54f793c0bc7d3cd68..b1d4b0a2708dffa92159155ccef526f2048d4ae0 100644 (file)
@@ -8,4 +8,4 @@
 obj-y  += stxssa.o
 obj-y  += law.o
 obj-y  += tlb.o
-obj-$(CONFIG_FSL_DDR1) += ddr.o
+obj-$(CONFIG_SYS_FSL_DDR1) += ddr.o
index 71be3bf636e063514245b5b95708e76d17e4cee2..1ccd4c5183a208d6ffcbc4b48f918f8eec93a453 100644 (file)
@@ -9,8 +9,8 @@
 #include <common.h>
 #include <i2c.h>
 
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 
 void fsl_ddr_board_options(memctl_options_t *popts,
                                dimm_params_t *pdimm,
index c08a18bffe7070f9005feebaa0ad38e775899676..f5c3d750cee634d9dae12b316ace5260d5a1b87a 100644 (file)
@@ -19,7 +19,7 @@
 #include <asm/mmu.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_pci.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <ioports.h>
 #include <asm/io.h>
 #include <spd_sdram.h>
index f48c02fdae9bc9c188edcb718f643bbfa42400bc..fd602ea7e08c16c2ca709a2bf51e17e419bfa116 100644 (file)
@@ -7,8 +7,8 @@
 
 #include <common.h>
 #include <i2c.h>
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 
 void get_spd(ddr2_spd_eeprom_t *spd, u8 i2c_address)
 {
index 178204251075ab5b2f4a7504f9067557b430d3aa..b7ad3495025f85a8966c19b219ae65ce01572c0c 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <common.h>
 #include <asm/processor.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/mmu.h>
 #include <asm/io.h>
 #include <fdt_support.h>
index 3671cb8af9a8af700c8e17863cc896629f70ca42..5c5eadc93ffb0b61c206859a1b0d0fb5d8ac5e7d 100644 (file)
@@ -9,8 +9,8 @@
 #include <common.h>
 #include <i2c.h>
 
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 
 void get_spd(ddr2_spd_eeprom_t *spd, unsigned char i2c_address)
 {
index f41ae737552eabd15c40b7ac55bae2f069dc7217..56b5a187d827f85b4251f13d4e776ee21d2207e7 100644 (file)
@@ -8,8 +8,8 @@
 #include <common.h>
 #include <i2c.h>
 
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 
 void get_spd(ddr2_spd_eeprom_t *spd, u8 i2c_address)
 {
index 9fc6f048c47be6a4c7f3832cd2052e545d612036..0c0605e3a9a9ea1e550bc8aebf408018291efabd 100644 (file)
@@ -8,8 +8,8 @@
 #include <common.h>
 #include <i2c.h>
 
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 
 void get_spd(ddr3_spd_eeprom_t *spd, u8 i2c_address)
 {
diff --git a/drivers/ddr/fsl/Makefile b/drivers/ddr/fsl/Makefile
new file mode 100644 (file)
index 0000000..a328b43
--- /dev/null
@@ -0,0 +1,34 @@
+#
+# Copyright 2008-2011 Freescale Semiconductor, Inc.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# Version 2 as published by the Free Software Foundation.
+#
+
+obj-$(CONFIG_SYS_FSL_DDR1)     += main.o util.o ctrl_regs.o options.o \
+                                  lc_common_dimm_params.o
+
+obj-$(CONFIG_SYS_FSL_DDR2)     += main.o util.o ctrl_regs.o options.o \
+                                  lc_common_dimm_params.o
+
+obj-$(CONFIG_SYS_FSL_DDR3)     += main.o util.o ctrl_regs.o options.o \
+                                  lc_common_dimm_params.o
+ifdef CONFIG_DDR_SPD
+SPD := y
+endif
+ifdef CONFIG_SPD_EEPROM
+SPD := y
+endif
+ifdef SPD
+obj-$(CONFIG_SYS_FSL_DDR1)     += ddr1_dimm_params.o
+obj-$(CONFIG_SYS_FSL_DDR2)     += ddr2_dimm_params.o
+obj-$(CONFIG_SYS_FSL_DDR3)     += ddr3_dimm_params.o
+endif
+
+obj-$(CONFIG_FSL_DDR_INTERACTIVE)      += interactive.o
+obj-$(CONFIG_SYS_FSL_DDRC_GEN1)        += mpc85xx_ddr_gen1.o
+obj-$(CONFIG_SYS_FSL_DDRC_GEN2)        += mpc85xx_ddr_gen2.o
+obj-$(CONFIG_SYS_FSL_DDRC_GEN3)        += mpc85xx_ddr_gen3.o
+obj-$(CONFIG_SYS_FSL_DDR_86XX)         += mpc86xx_ddr.o
+obj-$(CONFIG_FSL_DDR_INTERACTIVE)      += interactive.o
similarity index 97%
rename from arch/powerpc/cpu/mpc8xxx/ddr/ctrl_regs.c
rename to drivers/ddr/fsl/ctrl_regs.c
index dcfc48aa957f6774c488b34b8eb00a2bd645626c..aed4569cb4e6f31694fcc18638ff03eef2073699 100644 (file)
  */
 
 #include <common.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 
-#include "ddr.h"
+#include <fsl_ddr.h>
+#include <asm/io.h>
 
-#define _DDR_ADDR CONFIG_SYS_MPC8xxx_DDR_ADDR
+#define _DDR_ADDR CONFIG_SYS_FSL_DDR_ADDR
 
 static u32 fsl_ddr_get_version(void)
 {
@@ -68,9 +69,9 @@ static inline int fsl_ddr_get_rtt(void)
 {
        int rtt;
 
-#if defined(CONFIG_FSL_DDR1)
+#if defined(CONFIG_SYS_FSL_DDR1)
        rtt = 0;
-#elif defined(CONFIG_FSL_DDR2)
+#elif defined(CONFIG_SYS_FSL_DDR2)
        rtt = 3;
 #else
        rtt = 0;
@@ -217,7 +218,7 @@ static void set_csn_config_2(int i, fsl_ddr_cfg_regs_t *ddr)
 
 /* -3E = 667 CL5, -25 = CL6 800, -25E = CL5 800 */
 
-#if !defined(CONFIG_FSL_DDR1)
+#if !defined(CONFIG_SYS_FSL_DDR1)
 static inline int avoid_odt_overlap(const dimm_params_t *dimm_params)
 {
 #if CONFIG_DIMM_SLOTS_PER_CTLR == 1
@@ -263,7 +264,7 @@ static void set_timing_cfg_0(fsl_ddr_cfg_regs_t *ddr,
        /* Mode register set cycle time (tMRD). */
        unsigned char tmrd_mclk;
 
-#ifdef CONFIG_FSL_DDR3
+#ifdef CONFIG_SYS_FSL_DDR3
        /*
         * (tXARD and tXARDS). Empirical?
         * The DDR3 spec has not tXARD,
@@ -302,7 +303,7 @@ static void set_timing_cfg_0(fsl_ddr_cfg_regs_t *ddr,
                pre_pd_exit_mclk = act_pd_exit_mclk;
                taxpd_mclk = 1;
        }
-#else /* CONFIG_FSL_DDR2 */
+#else /* CONFIG_SYS_FSL_DDR2 */
        /*
         * (tXARD and tXARDS). Empirical?
         * tXARD = 2 for DDR2
@@ -330,7 +331,7 @@ static void set_timing_cfg_0(fsl_ddr_cfg_regs_t *ddr,
                );
        debug("FSLDDR: timing_cfg_0 = 0x%08x\n", ddr->timing_cfg_0);
 }
-#endif /* defined(CONFIG_FSL_DDR2) */
+#endif /* defined(CONFIG_SYS_FSL_DDR2) */
 
 /* DDR SDRAM Timing Configuration 3 (TIMING_CFG_3) */
 static void set_timing_cfg_3(fsl_ddr_cfg_regs_t *ddr,
@@ -420,9 +421,9 @@ static void set_timing_cfg_1(fsl_ddr_cfg_regs_t *ddr,
         *      4.5                     1000
         *      5.0             5       1001
         */
-#if defined(CONFIG_FSL_DDR1)
+#if defined(CONFIG_SYS_FSL_DDR1)
        caslat_ctrl = (cas_latency + 1) & 0x07;
-#elif defined(CONFIG_FSL_DDR2)
+#elif defined(CONFIG_SYS_FSL_DDR2)
        caslat_ctrl = 2 * cas_latency - 1;
 #else
        /*
@@ -447,7 +448,7 @@ static void set_timing_cfg_1(fsl_ddr_cfg_regs_t *ddr,
        /*
         * JEDEC has min requirement for tRRD
         */
-#if defined(CONFIG_FSL_DDR3)
+#if defined(CONFIG_SYS_FSL_DDR3)
        if (acttoact_mclk < 4)
                acttoact_mclk = 4;
 #endif
@@ -455,10 +456,10 @@ static void set_timing_cfg_1(fsl_ddr_cfg_regs_t *ddr,
        /*
         * JEDEC has some min requirements for tWTR
         */
-#if defined(CONFIG_FSL_DDR2)
+#if defined(CONFIG_SYS_FSL_DDR2)
        if (wrtord_mclk < 2)
                wrtord_mclk = 2;
-#elif defined(CONFIG_FSL_DDR3)
+#elif defined(CONFIG_SYS_FSL_DDR3)
        if (wrtord_mclk < 4)
                wrtord_mclk = 4;
 #endif
@@ -504,7 +505,7 @@ static void set_timing_cfg_2(fsl_ddr_cfg_regs_t *ddr,
        add_lat_mclk = additive_latency;
        cpo = popts->cpo_override;
 
-#if defined(CONFIG_FSL_DDR1)
+#if defined(CONFIG_SYS_FSL_DDR1)
        /*
         * This is a lie.  It should really be 1, but if it is
         * set to 1, bits overlap into the old controller's
@@ -512,7 +513,7 @@ static void set_timing_cfg_2(fsl_ddr_cfg_regs_t *ddr,
         * the HW will magically treat it as 1 for DDR 1.  Oh Yea.
         */
        wr_lat = 0;
-#elif defined(CONFIG_FSL_DDR2)
+#elif defined(CONFIG_SYS_FSL_DDR2)
        wr_lat = cas_latency - 1;
 #else
        wr_lat = compute_cas_write_latency();
@@ -522,10 +523,10 @@ static void set_timing_cfg_2(fsl_ddr_cfg_regs_t *ddr,
        /*
         * JEDEC has some min requirements for tRTP
         */
-#if defined(CONFIG_FSL_DDR2)
+#if defined(CONFIG_SYS_FSL_DDR2)
        if (rd_to_pre  < 2)
                rd_to_pre  = 2;
-#elif defined(CONFIG_FSL_DDR3)
+#elif defined(CONFIG_SYS_FSL_DDR3)
        if (rd_to_pre < 4)
                rd_to_pre = 4;
 #endif
@@ -709,7 +710,7 @@ static void set_ddr_sdram_cfg_2(fsl_ddr_cfg_regs_t *ddr,
         *        * ({EXT_REFREC || REFREC} + 8 + 2)]}
         *      << DDR_SDRAM_INTERVAL[REFINT]
         */
-#if defined(CONFIG_FSL_DDR3)
+#if defined(CONFIG_SYS_FSL_DDR3)
        obc_cfg = popts->otf_burst_chop_en;
 #else
        obc_cfg = 0;
@@ -738,7 +739,7 @@ static void set_ddr_sdram_cfg_2(fsl_ddr_cfg_regs_t *ddr,
        d_init = 0;
 #endif
 
-#if defined(CONFIG_FSL_DDR3)
+#if defined(CONFIG_SYS_FSL_DDR3)
        md_en = popts->mirrored_dimm;
 #endif
        qd_en = popts->quad_rank_present ? 1 : 0;
@@ -771,7 +772,7 @@ static void set_ddr_sdram_mode_2(fsl_ddr_cfg_regs_t *ddr,
        unsigned short esdmode2 = 0;    /* Extended SDRAM mode 2 */
        unsigned short esdmode3 = 0;    /* Extended SDRAM mode 3 */
 
-#if defined(CONFIG_FSL_DDR3)
+#if defined(CONFIG_SYS_FSL_DDR3)
        int i;
        unsigned int rtt_wr = 0;        /* Rtt_WR - dynamic ODT off */
        unsigned int srt = 0;   /* self-refresh temerature, normal range */
@@ -800,7 +801,7 @@ static void set_ddr_sdram_mode_2(fsl_ddr_cfg_regs_t *ddr,
                                 );
        debug("FSLDDR: ddr_sdram_mode_2 = 0x%08x\n", ddr->ddr_sdram_mode_2);
 
-#ifdef CONFIG_FSL_DDR3
+#ifdef CONFIG_SYS_FSL_DDR3
        if (unq_mrs_en) {       /* unique mode registers are supported */
                for (i = 1; i < CONFIG_CHIP_SELECTS_PER_CTRL; i++) {
                        if (popts->rtt_override)
@@ -861,7 +862,7 @@ static void set_ddr_sdram_interval(fsl_ddr_cfg_regs_t *ddr,
        debug("FSLDDR: ddr_sdram_interval = 0x%08x\n", ddr->ddr_sdram_interval);
 }
 
-#if defined(CONFIG_FSL_DDR3)
+#if defined(CONFIG_SYS_FSL_DDR3)
 /* DDR SDRAM Mode configuration set (DDR_SDRAM_MODE) */
 static void set_ddr_sdram_mode(fsl_ddr_cfg_regs_t *ddr,
                               const memctl_options_t *popts,
@@ -1057,7 +1058,7 @@ static void set_ddr_sdram_mode(fsl_ddr_cfg_regs_t *ddr,
        }
 }
 
-#else /* !CONFIG_FSL_DDR3 */
+#else /* !CONFIG_SYS_FSL_DDR3 */
 
 /* DDR SDRAM Mode configuration set (DDR_SDRAM_MODE) */
 static void set_ddr_sdram_mode(fsl_ddr_cfg_regs_t *ddr,
@@ -1103,7 +1104,7 @@ static void set_ddr_sdram_mode(fsl_ddr_cfg_regs_t *ddr,
        unsigned int bt;
        unsigned int bl;        /* BL: Burst Length */
 
-#if defined(CONFIG_FSL_DDR2)
+#if defined(CONFIG_SYS_FSL_DDR2)
        const unsigned int mclk_ps = get_memory_clk_period_ps();
 #endif
        dqs_en = !popts->dqs_config;
@@ -1132,15 +1133,15 @@ static void set_ddr_sdram_mode(fsl_ddr_cfg_regs_t *ddr,
         */
        pd = 0;
 
-#if defined(CONFIG_FSL_DDR1)
+#if defined(CONFIG_SYS_FSL_DDR1)
        wr = 0;       /* Historical */
-#elif defined(CONFIG_FSL_DDR2)
+#elif defined(CONFIG_SYS_FSL_DDR2)
        wr = (common_dimm->twr_ps + mclk_ps - 1) / mclk_ps - 1;
 #endif
        dll_res = 0;
        mode = 0;
 
-#if defined(CONFIG_FSL_DDR1)
+#if defined(CONFIG_SYS_FSL_DDR1)
        if (1 <= cas_latency && cas_latency <= 4) {
                unsigned char mode_caslat_table[4] = {
                        0x5,    /* 1.5 clocks */
@@ -1152,7 +1153,7 @@ static void set_ddr_sdram_mode(fsl_ddr_cfg_regs_t *ddr,
        } else {
                printf("Warning: unknown cas_latency %d\n", cas_latency);
        }
-#elif defined(CONFIG_FSL_DDR2)
+#elif defined(CONFIG_SYS_FSL_DDR2)
        caslat = cas_latency;
 #endif
        bt = 0;
@@ -1249,7 +1250,7 @@ static void set_timing_cfg_4(fsl_ddr_cfg_regs_t *ddr,
        unsigned int wwt = 0; /* Write-to-write turnaround for same CS */
        unsigned int dll_lock = 0; /* DDR SDRAM DLL Lock Time */
 
-#if defined(CONFIG_FSL_DDR3)
+#if defined(CONFIG_SYS_FSL_DDR3)
        if (popts->burst_length == DDR_BL8) {
                /* We set BL/2 for fixed BL8 */
                rrt = 0;        /* BL/2 clocks */
@@ -1279,7 +1280,7 @@ static void set_timing_cfg_5(fsl_ddr_cfg_regs_t *ddr, unsigned int cas_latency)
        unsigned int wodt_on = 0;       /* Write to ODT on */
        unsigned int wodt_off = 0;      /* Write to ODT off */
 
-#if defined(CONFIG_FSL_DDR3)
+#if defined(CONFIG_SYS_FSL_DDR3)
        /* rodt_on = timing_cfg_1[caslat] - timing_cfg_2[wrlat] + 1 */
        rodt_on = cas_latency - ((ddr->timing_cfg_2 & 0x00780000) >> 19) + 1;
        rodt_off = 4;   /*  4 clocks */
@@ -1612,7 +1613,7 @@ compute_fsl_memctl_config_regs(const memctl_options_t *popts,
 
        set_ddr_eor(ddr, popts);
 
-#if !defined(CONFIG_FSL_DDR1)
+#if !defined(CONFIG_SYS_FSL_DDR1)
        set_timing_cfg_0(ddr, popts, dimm_params);
 #endif
 
similarity index 99%
rename from arch/powerpc/cpu/mpc8xxx/ddr/ddr1_dimm_params.c
rename to drivers/ddr/fsl/ddr1_dimm_params.c
index f137fcee34d67735a72d3cd0894dd8f3413d5121..7df27b90b764e5aa49c7a4f8ef548a31d2cd3a3c 100644 (file)
@@ -7,9 +7,9 @@
  */
 
 #include <common.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 
-#include "ddr.h"
+#include <fsl_ddr.h>
 
 /*
  * Calculate the Density of each Physical Rank.
similarity index 99%
rename from arch/powerpc/cpu/mpc8xxx/ddr/ddr2_dimm_params.c
rename to drivers/ddr/fsl/ddr2_dimm_params.c
index e4d02e8f61b8d8a84053f09128c659f2ef9ac547..d865df78a8d1f4d5e238f2db003f830cd49084d3 100644 (file)
@@ -7,9 +7,9 @@
  */
 
 #include <common.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 
-#include "ddr.h"
+#include <fsl_ddr.h>
 /*
  * Calculate the Density of each Physical Rank.
  * Returned size is in bytes.
similarity index 99%
rename from arch/powerpc/cpu/mpc8xxx/ddr/ddr3_dimm_params.c
rename to drivers/ddr/fsl/ddr3_dimm_params.c
index 4c8645da569c7da6efee644d3a032439f2552e76..a4b8c101f53b1cf7970b9a39f3c9fc4a587dd080 100644 (file)
@@ -12,9 +12,9 @@
  */
 
 #include <common.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 
-#include "ddr.h"
+#include <fsl_ddr.h>
 
 /*
  * Calculate the Density of each Physical Rank.
similarity index 99%
rename from arch/powerpc/cpu/mpc8xxx/ddr/interactive.c
rename to drivers/ddr/fsl/interactive.c
index 3b661129cb0395854427fd39f335b7aba8ba8e7e..ebf3ed6f388fc38c3a591555fb5bb565a349d847 100644 (file)
 #include <common.h>
 #include <linux/ctype.h>
 #include <asm/types.h>
+#include <asm/io.h>
 
-#include <asm/fsl_ddr_sdram.h>
-#include "ddr.h"
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr.h>
 
 /* Option parameter Structures */
 struct options_string {
@@ -402,7 +403,7 @@ static void fsl_ddr_options_edit(fsl_ddr_info_t *pinfo,
                CTRL_OPTIONS_CS(3, odt_rd_cfg),
                CTRL_OPTIONS_CS(3, odt_wr_cfg),
 #endif
-#if defined(CONFIG_FSL_DDR3)
+#if defined(CONFIG_SYS_FSL_DDR3)
                CTRL_OPTIONS_CS(0, odt_rtt_norm),
                CTRL_OPTIONS_CS(0, odt_rtt_wr),
 #if (CONFIG_CHIP_SELECTS_PER_CTRL > 1)
@@ -647,7 +648,7 @@ static void print_memctl_options(const memctl_options_t *popts)
                CTRL_OPTIONS_CS(3, odt_rd_cfg),
                CTRL_OPTIONS_CS(3, odt_wr_cfg),
 #endif
-#if defined(CONFIG_FSL_DDR3)
+#if defined(CONFIG_SYS_FSL_DDR3)
                CTRL_OPTIONS_CS(0, odt_rtt_norm),
                CTRL_OPTIONS_CS(0, odt_rtt_wr),
 #if (CONFIG_CHIP_SELECTS_PER_CTRL > 1)
@@ -710,7 +711,7 @@ static void print_memctl_options(const memctl_options_t *popts)
        print_option_table(options, n_opts, popts);
 }
 
-#ifdef CONFIG_FSL_DDR1
+#ifdef CONFIG_SYS_FSL_DDR1
 void ddr1_spd_dump(const ddr1_spd_eeprom_t *spd)
 {
        unsigned int i;
@@ -859,7 +860,7 @@ void ddr1_spd_dump(const ddr1_spd_eeprom_t *spd)
 }
 #endif
 
-#ifdef CONFIG_FSL_DDR2
+#ifdef CONFIG_SYS_FSL_DDR2
 void ddr2_spd_dump(const ddr2_spd_eeprom_t *spd)
 {
        unsigned int i;
@@ -1051,7 +1052,7 @@ void ddr2_spd_dump(const ddr2_spd_eeprom_t *spd)
 }
 #endif
 
-#ifdef CONFIG_FSL_DDR3
+#ifdef CONFIG_SYS_FSL_DDR3
 void ddr3_spd_dump(const ddr3_spd_eeprom_t *spd)
 {
        unsigned int i;
@@ -1246,11 +1247,11 @@ void ddr3_spd_dump(const ddr3_spd_eeprom_t *spd)
 
 static inline void generic_spd_dump(const generic_spd_eeprom_t *spd)
 {
-#if defined(CONFIG_FSL_DDR1)
+#if defined(CONFIG_SYS_FSL_DDR1)
        ddr1_spd_dump(spd);
-#elif defined(CONFIG_FSL_DDR2)
+#elif defined(CONFIG_SYS_FSL_DDR2)
        ddr2_spd_dump(spd);
-#elif defined(CONFIG_FSL_DDR3)
+#elif defined(CONFIG_SYS_FSL_DDR3)
        ddr3_spd_dump(spd);
 #endif
 }
similarity index 98%
rename from arch/powerpc/cpu/mpc8xxx/ddr/lc_common_dimm_params.c
rename to drivers/ddr/fsl/lc_common_dimm_params.c
index 332fe25c4816ae7913736f4439e3b8fefbbed80d..610318ad1e7e4cdfb15d37e83e43d9a7a2acc329 100644 (file)
@@ -7,11 +7,11 @@
  */
 
 #include <common.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 
-#include "ddr.h"
+#include <fsl_ddr.h>
 
-#if defined(CONFIG_FSL_DDR3)
+#if defined(CONFIG_SYS_FSL_DDR3)
 static unsigned int
 compute_cas_latency_ddr3(const dimm_params_t *dimm_params,
                         common_timing_params_t *outpdimm,
@@ -103,7 +103,7 @@ compute_lowest_common_dimm_parameters(const dimm_params_t *dimm_params,
 
        unsigned int temp1, temp2;
        unsigned int additive_latency = 0;
-#if !defined(CONFIG_FSL_DDR3)
+#if !defined(CONFIG_SYS_FSL_DDR3)
        const unsigned int mclk_ps = get_memory_clk_period_ps();
        unsigned int lowest_good_caslat;
        unsigned int not_ok;
@@ -265,7 +265,7 @@ compute_lowest_common_dimm_parameters(const dimm_params_t *dimm_params,
        if (temp1 != 0)
                printf("ERROR: Mix different RDIMM detected!\n");
 
-#if defined(CONFIG_FSL_DDR3)
+#if defined(CONFIG_SYS_FSL_DDR3)
        if (compute_cas_latency_ddr3(dimm_params, outpdimm, number_of_dimms))
                return 1;
 #else
@@ -386,7 +386,7 @@ compute_lowest_common_dimm_parameters(const dimm_params_t *dimm_params,
        }
        outpdimm->highest_common_derated_caslat = temp1;
        debug("highest common dereated CAS latency = %u\n", temp1);
-#endif /* #if defined(CONFIG_FSL_DDR3) */
+#endif /* #if defined(CONFIG_SYS_FSL_DDR3) */
 
        /* Determine if all DIMMs ECC capable. */
        temp1 = 1;
@@ -404,7 +404,7 @@ compute_lowest_common_dimm_parameters(const dimm_params_t *dimm_params,
        }
        outpdimm->all_dimms_ecc_capable = temp1;
 
-#ifndef CONFIG_FSL_DDR3
+#ifndef CONFIG_SYS_FSL_DDR3
        /* FIXME: move to somewhere else to validate. */
        if (mclk_ps > tckmax_max_ps) {
                printf("Warning: some of the installed DIMMs "
@@ -467,7 +467,7 @@ compute_lowest_common_dimm_parameters(const dimm_params_t *dimm_params,
 
        additive_latency = 0;
 
-#if defined(CONFIG_FSL_DDR2)
+#if defined(CONFIG_SYS_FSL_DDR2)
        if (lowest_good_caslat < 4) {
                additive_latency = (picos_to_mclk(trcd_ps) > lowest_good_caslat)
                        ? picos_to_mclk(trcd_ps) - lowest_good_caslat : 0;
@@ -478,7 +478,7 @@ compute_lowest_common_dimm_parameters(const dimm_params_t *dimm_params,
                }
        }
 
-#elif defined(CONFIG_FSL_DDR3)
+#elif defined(CONFIG_SYS_FSL_DDR3)
        /*
         * The system will not use the global auto-precharge mode.
         * However, it uses the page mode, so we set AL=0
similarity index 99%
rename from arch/powerpc/cpu/mpc8xxx/ddr/main.c
rename to drivers/ddr/fsl/main.c
index 34d8bc3ac0197297046074aff942e3727d86e6bc..c1cdbdf95514c9521e00d8ffeccf8632585a26f1 100644 (file)
 
 #include <common.h>
 #include <i2c.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/fsl_law.h>
 
-#include "ddr.h"
+#include <fsl_ddr.h>
 
 void fsl_ddr_set_lawbar(
                const common_timing_params_t *memctl_common_params,
similarity index 93%
rename from arch/powerpc/cpu/mpc85xx/ddr-gen1.c
rename to drivers/ddr/fsl/mpc85xx_ddr_gen1.c
index 4dd8c0b5bf2735e4b0b6f1c9732438536160ae0d..ff7d979d6aa95bfc4e9cdde650020409d621149f 100644 (file)
@@ -8,7 +8,7 @@
 
 #include <common.h>
 #include <asm/io.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 
 #if (CONFIG_CHIP_SELECTS_PER_CTRL > 4)
 #error Invalid setting for CONFIG_CHIP_SELECTS_PER_CTRL
@@ -18,7 +18,7 @@ void fsl_ddr_set_memctl_regs(const fsl_ddr_cfg_regs_t *regs,
                             unsigned int ctrl_num, int step)
 {
        unsigned int i;
-       volatile ccsr_ddr_t *ddr = (void *)CONFIG_SYS_MPC8xxx_DDR_ADDR;
+       volatile ccsr_ddr_t *ddr = (void *)CONFIG_SYS_FSL_DDR_ADDR;
 
        if (ctrl_num != 0) {
                printf("%s unexpected ctrl_num = %u\n", __FUNCTION__, ctrl_num);
@@ -73,7 +73,7 @@ void fsl_ddr_set_memctl_regs(const fsl_ddr_cfg_regs_t *regs,
 void
 ddr_enable_ecc(unsigned int dram_size)
 {
-       volatile ccsr_ddr_t *ddr= (void *)(CONFIG_SYS_MPC8xxx_DDR_ADDR);
+       volatile ccsr_ddr_t *ddr = (void *)(CONFIG_SYS_FSL_DDR_ADDR);
 
        dma_meminit(CONFIG_MEM_INIT_VALUE, dram_size);
 
similarity index 96%
rename from arch/powerpc/cpu/mpc85xx/ddr-gen2.c
rename to drivers/ddr/fsl/mpc85xx_ddr_gen2.c
index 542bc84acf941c44cf3ce8b7b7d2e1ee08d41967..c22dea5c24044096e535aca84bda6071dfee0a18 100644 (file)
@@ -9,7 +9,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/processor.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 
 #if (CONFIG_CHIP_SELECTS_PER_CTRL > 4)
 #error Invalid setting for CONFIG_CHIP_SELECTS_PER_CTRL
@@ -19,7 +19,7 @@ void fsl_ddr_set_memctl_regs(const fsl_ddr_cfg_regs_t *regs,
                             unsigned int ctrl_num, int step)
 {
        unsigned int i;
-       ccsr_ddr_t *ddr = (void *)CONFIG_SYS_MPC8xxx_DDR_ADDR;
+       ccsr_ddr_t *ddr = (void *)CONFIG_SYS_FSL_DDR_ADDR;
 
 #if defined(CONFIG_SYS_FSL_ERRATUM_NMG_DDR120) && defined(CONFIG_MPC85xx)
        ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
similarity index 97%
rename from arch/powerpc/cpu/mpc85xx/ddr-gen3.c
rename to drivers/ddr/fsl/mpc85xx_ddr_gen3.c
index 1be51d3307954ad3dd12eebab4605a78d8f99887..7b4e8ec93d3b12e7d49d3dd942e135d8e33a9a37 100644 (file)
@@ -8,7 +8,7 @@
 
 #include <common.h>
 #include <asm/io.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/processor.h>
 
 #if (CONFIG_CHIP_SELECTS_PER_CTRL > 4)
@@ -42,21 +42,21 @@ void fsl_ddr_set_memctl_regs(const fsl_ddr_cfg_regs_t *regs,
 
        switch (ctrl_num) {
        case 0:
-               ddr = (void *)CONFIG_SYS_MPC8xxx_DDR_ADDR;
+               ddr = (void *)CONFIG_SYS_FSL_DDR_ADDR;
                break;
-#if defined(CONFIG_SYS_MPC8xxx_DDR2_ADDR) && (CONFIG_NUM_DDR_CONTROLLERS > 1)
+#if defined(CONFIG_SYS_FSL_DDR2_ADDR) && (CONFIG_NUM_DDR_CONTROLLERS > 1)
        case 1:
-               ddr = (void *)CONFIG_SYS_MPC8xxx_DDR2_ADDR;
+               ddr = (void *)CONFIG_SYS_FSL_DDR2_ADDR;
                break;
 #endif
-#if defined(CONFIG_SYS_MPC8xxx_DDR3_ADDR) && (CONFIG_NUM_DDR_CONTROLLERS > 2)
+#if defined(CONFIG_SYS_FSL_DDR3_ADDR) && (CONFIG_NUM_DDR_CONTROLLERS > 2)
        case 2:
-               ddr = (void *)CONFIG_SYS_MPC8xxx_DDR3_ADDR;
+               ddr = (void *)CONFIG_SYS_FSL_DDR3_ADDR;
                break;
 #endif
-#if defined(CONFIG_SYS_MPC8xxx_DDR4_ADDR) && (CONFIG_NUM_DDR_CONTROLLERS > 3)
+#if defined(CONFIG_SYS_FSL_DDR4_ADDR) && (CONFIG_NUM_DDR_CONTROLLERS > 3)
        case 3:
-               ddr = (void *)CONFIG_SYS_MPC8xxx_DDR4_ADDR;
+               ddr = (void *)CONFIG_SYS_FSL_DDR4_ADDR;
                break;
 #endif
        default:
similarity index 95%
rename from arch/powerpc/cpu/mpc86xx/ddr-8641.c
rename to drivers/ddr/fsl/mpc86xx_ddr.c
index 33a91f9f78e7ad0a497738ff8dac2302c8290de3..caffbaf0194e7fbf99b7c73ad139ca90a1728352 100644 (file)
@@ -8,7 +8,7 @@
 
 #include <common.h>
 #include <asm/io.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 
 #if (CONFIG_CHIP_SELECTS_PER_CTRL > 4)
 #error Invalid setting for CONFIG_CHIP_SELECTS_PER_CTRL
@@ -22,10 +22,10 @@ void fsl_ddr_set_memctl_regs(const fsl_ddr_cfg_regs_t *regs,
 
        switch (ctrl_num) {
        case 0:
-               ddr = (void *)CONFIG_SYS_MPC8xxx_DDR_ADDR;
+               ddr = (void *)CONFIG_SYS_FSL_DDR_ADDR;
                break;
        case 1:
-               ddr = (void *)CONFIG_SYS_MPC8xxx_DDR2_ADDR;
+               ddr = (void *)CONFIG_SYS_FSL_DDR2_ADDR;
                break;
        default:
                printf("%s unexpected ctrl_num = %u\n", __FUNCTION__, ctrl_num);
similarity index 97%
rename from arch/powerpc/cpu/mpc8xxx/ddr/options.c
rename to drivers/ddr/fsl/options.c
index 129784555393562c063b2a06fa87e82bd6c69a2b..4aafcceaf5939ae16e764a8619e2bd12e2367613 100644 (file)
@@ -6,9 +6,9 @@
 
 #include <common.h>
 #include <hwconfig.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 
-#include "ddr.h"
+#include <fsl_ddr.h>
 
 /*
  * Use our own stack based buffer before relocation to allow accessing longer
@@ -29,7 +29,7 @@ struct dynamic_odt {
        unsigned int odt_rtt_wr;
 };
 
-#ifdef CONFIG_FSL_DDR3
+#ifdef CONFIG_SYS_FSL_DDR3
 static const struct dynamic_odt single_Q[4] = {
        {       /* cs0 */
                FSL_DDR_ODT_NEVER,
@@ -259,7 +259,7 @@ static const struct dynamic_odt odt_unknown[4] = {
                DDR3_RTT_OFF
        }
 };
-#else  /* CONFIG_FSL_DDR3 */
+#else  /* CONFIG_SYS_FSL_DDR3 */
 static const struct dynamic_odt single_Q[4] = {
        {0, 0, 0, 0},
        {0, 0, 0, 0},
@@ -507,7 +507,7 @@ unsigned int populate_memctl_options(int all_dimms_registered,
        unsigned int i;
        char buffer[HWCONFIG_BUFFER_SIZE];
        char *buf = NULL;
-#if defined(CONFIG_FSL_DDR3) || defined(CONFIG_FSL_DDR2)
+#if defined(CONFIG_SYS_FSL_DDR3) || defined(CONFIG_SYS_FSL_DDR2)
        const struct dynamic_odt *pdodt = odt_unknown;
 #endif
        ulong ddr_freq;
@@ -519,7 +519,7 @@ unsigned int populate_memctl_options(int all_dimms_registered,
        if (getenv_f("hwconfig", buffer, sizeof(buffer)) > 0)
                buf = buffer;
 
-#if defined(CONFIG_FSL_DDR3) || defined(CONFIG_FSL_DDR2)
+#if defined(CONFIG_SYS_FSL_DDR3) || defined(CONFIG_SYS_FSL_DDR2)
        /* Chip select options. */
        if (CONFIG_DIMM_SLOTS_PER_CTLR == 1) {
                switch (pdimm[0].n_ranks) {
@@ -585,7 +585,7 @@ unsigned int populate_memctl_options(int all_dimms_registered,
 
        /* Pick chip-select local options. */
        for (i = 0; i < CONFIG_CHIP_SELECTS_PER_CTRL; i++) {
-#if defined(CONFIG_FSL_DDR3) || defined(CONFIG_FSL_DDR2)
+#if defined(CONFIG_SYS_FSL_DDR3) || defined(CONFIG_SYS_FSL_DDR2)
                popts->cs_local_opts[i].odt_rd_cfg = pdodt[i].odt_rd_cfg;
                popts->cs_local_opts[i].odt_wr_cfg = pdodt[i].odt_wr_cfg;
                popts->cs_local_opts[i].odt_rtt_norm = pdodt[i].odt_rtt_norm;
@@ -655,9 +655,9 @@ unsigned int populate_memctl_options(int all_dimms_registered,
         * 0 for DDR1
         * 1 for DDR2
         */
-#if defined(CONFIG_FSL_DDR1)
+#if defined(CONFIG_SYS_FSL_DDR1)
        popts->dqs_config = 0;
-#elif defined(CONFIG_FSL_DDR2) || defined(CONFIG_FSL_DDR3)
+#elif defined(CONFIG_SYS_FSL_DDR2) || defined(CONFIG_SYS_FSL_DDR3)
        popts->dqs_config = 1;
 #endif
 
@@ -672,7 +672,7 @@ unsigned int populate_memctl_options(int all_dimms_registered,
         * presuming all dimms are similar
         * 0 = 64-bit, 1 = 32-bit, 2 = 16-bit
         */
-#if defined(CONFIG_FSL_DDR1) || defined(CONFIG_FSL_DDR2)
+#if defined(CONFIG_SYS_FSL_DDR1) || defined(CONFIG_SYS_FSL_DDR2)
        if (pdimm[0].n_ranks != 0) {
                if ((pdimm[0].data_width >= 64) && \
                        (pdimm[0].data_width <= 72))
@@ -703,7 +703,7 @@ unsigned int populate_memctl_options(int all_dimms_registered,
        popts->x4_en = (pdimm[0].device_width == 4) ? 1 : 0;
 
        /* Choose burst length. */
-#if defined(CONFIG_FSL_DDR3)
+#if defined(CONFIG_SYS_FSL_DDR3)
 #if defined(CONFIG_E500MC)
        popts->otf_burst_chop_en = 0;   /* on-the-fly burst chop disable */
        popts->burst_length = DDR_BL8;  /* Fixed 8-beat burst len */
@@ -722,7 +722,7 @@ unsigned int populate_memctl_options(int all_dimms_registered,
 #endif
 
        /* Choose ddr controller address mirror mode */
-#if defined(CONFIG_FSL_DDR3)
+#if defined(CONFIG_SYS_FSL_DDR3)
        popts->mirrored_dimm = pdimm[0].mirrored_dimm;
 #endif
 
@@ -785,22 +785,22 @@ unsigned int populate_memctl_options(int all_dimms_registered,
         * FIXME: varies depending upon number of column addresses or data
         * FIXME: width, was considering looking at pdimm->primary_sdram_width
         */
-#if defined(CONFIG_FSL_DDR1)
+#if defined(CONFIG_SYS_FSL_DDR1)
        popts->tfaw_window_four_activates_ps = mclk_to_picos(1);
 
-#elif defined(CONFIG_FSL_DDR2)
+#elif defined(CONFIG_SYS_FSL_DDR2)
        /*
         * x4/x8;  some datasheets have 35000
         * x16 wide columns only?  Use 50000?
         */
        popts->tfaw_window_four_activates_ps = 37500;
 
-#elif defined(CONFIG_FSL_DDR3)
+#elif defined(CONFIG_SYS_FSL_DDR3)
        popts->tfaw_window_four_activates_ps = pdimm[0].tfaw_ps;
 #endif
        popts->zq_en = 0;
        popts->wrlvl_en = 0;
-#if defined(CONFIG_FSL_DDR3)
+#if defined(CONFIG_SYS_FSL_DDR3)
        /*
         * due to ddr3 dimm is fly-by topology
         * we suggest to enable write leveling to
similarity index 96%
rename from arch/powerpc/cpu/mpc8xxx/ddr/util.c
rename to drivers/ddr/fsl/util.c
index acfe1f095fe4c541c3b2126211c2b7ae580658dc..45a7bcc080332a181795d9842232aca76b945f90 100644 (file)
@@ -10,7 +10,8 @@
 #include <asm/fsl_law.h>
 #include <div64.h>
 
-#include "ddr.h"
+#include <fsl_ddr.h>
+#include <asm/io.h>
 
 /* To avoid 64-bit full-divides, we factor this here */
 #define ULL_2E12 2000000000000ULL
@@ -133,7 +134,7 @@ u32 fsl_ddr_get_intl3r(void)
 
 void board_add_ram_info(int use_default)
 {
-       ccsr_ddr_t *ddr = (void *)(CONFIG_SYS_MPC8xxx_DDR_ADDR);
+       ccsr_ddr_t *ddr = (void *)(CONFIG_SYS_FSL_DDR_ADDR);
 
 #if    defined(CONFIG_E6500) && (CONFIG_NUM_DDR_CONTROLLERS == 3)
        u32 *mcintl3r = (void *) (CONFIG_SYS_IMMR + 0x18004);
@@ -146,13 +147,13 @@ void board_add_ram_info(int use_default)
 
 #if CONFIG_NUM_DDR_CONTROLLERS >= 2
        if (!(sdram_cfg & SDRAM_CFG_MEM_EN)) {
-               ddr = (void __iomem *)CONFIG_SYS_MPC8xxx_DDR2_ADDR;
+               ddr = (void __iomem *)CONFIG_SYS_FSL_DDR2_ADDR;
                sdram_cfg = in_be32(&ddr->sdram_cfg);
        }
 #endif
 #if CONFIG_NUM_DDR_CONTROLLERS >= 3
        if (!(sdram_cfg & SDRAM_CFG_MEM_EN)) {
-               ddr = (void __iomem *)CONFIG_SYS_MPC8xxx_DDR3_ADDR;
+               ddr = (void __iomem *)CONFIG_SYS_FSL_DDR3_ADDR;
                sdram_cfg = in_be32(&ddr->sdram_cfg);
        }
 #endif
index 268f66ec0eb818279376676cd45c49e273ad44e9..b2a5c19e0ef291645c17d69ddcfef6ba04f78249 100644 (file)
@@ -193,7 +193,7 @@ unsigned long get_board_ddr_clk(void);
 
 #define CONFIG_DDR_SPD
 #define CONFIG_SYS_DDR_RAW_TIMING
-#define CONFIG_FSL_DDR3
+#define CONFIG_SYS_FSL_DDR3
 #define CONFIG_FSL_DDR_INTERACTIVE
 
 #define CONFIG_SYS_SPD_BUS_NUM 0
index 036f264c97c0191daecfd101d13a63b3017cff0f..499d8c2054c971287e3e9abd9590ff2a2ba711aa 100644 (file)
@@ -80,7 +80,7 @@
 #define CONFIG_SYS_MEMTEST_END         0x01ffffff
 
 /* DDR Setup */
-#define CONFIG_FSL_DDR3
+#define CONFIG_SYS_FSL_DDR3
 #undef CONFIG_SYS_DDR_RAW_TIMING
 #undef CONFIG_DDR_SPD
 #define CONFIG_SYS_SPD_BUS_NUM         0
index 75889b35741eda6cc4e3071fa362f01203c6a100..a6601fee86b19d2c6f18b1caab3cd027656c6c07 100644 (file)
 #define CONFIG_SYS_MEMTEST_END         0x01ffffff
 
 /* DDR Setup */
-#define CONFIG_FSL_DDR3
+#define CONFIG_SYS_FSL_DDR3
 #define CONFIG_SYS_SPD_BUS_NUM         0
 #define SPD_EEPROM_ADDRESS1            0x54 /* I2C access */
 #define SPD_EEPROM_ADDRESS2            0x56 /* I2C access */
index 08156c531ddddede9280fa5fe39cbc5874031f9c..f173b07b4d62d871086b1db530afa2a20c04c381 100644 (file)
 #define CONFIG_PANIC_HANG
 
 /* DDR Setup */
-#define CONFIG_FSL_DDR3
+#define CONFIG_SYS_FSL_DDR3
 #define CONFIG_DDR_SPD
 #define CONFIG_SYS_SPD_BUS_NUM         0
 #define SPD_EEPROM_ADDRESS             0x50
index f3f2136668fa81cd30c3bc7d42cc23d288d5391e..bbfee7d30854780d1ac7afd9217b26d225e8d8d8 100644 (file)
 /* -------------------------------------------------------------------- */
 
 /* FreeScale DDR2/3 SDRAM Controller */
-#define CONFIG_FSL_DDR2                /* Our SDRAM slot is DDR2               */
+#define CONFIG_SYS_FSL_DDR2            /* Our SDRAM slot is DDR2               */
 #define CONFIG_DDR_ECC         /* Enable ECC by default                */
 #define CONFIG_DDR_SPD         /* Detect DDR config from SPD EEPROM    */
 #define CONFIG_SPD_EEPROM      /* ...why 2 config variables for this?  */
index 3f742a2bba610286ba91e8f2e9bcc0e552e77a65..a80a6966bf6a0368ce7b5b0fc216bb6d3dc42087 100644 (file)
 #define CONFIG_SPD_EEPROM              /* use SPD EEPROM for DDR setup*/
 
 /*
- * define CONFIG_FSL_DDR2 to use unified DDR driver
+ * define CONFIG_SYS_FSL_DDR2 to use unified DDR driver
  * undefine it to use old spd_sdram.c
  */
-#define CONFIG_FSL_DDR2
-#ifdef CONFIG_FSL_DDR2
+#define CONFIG_SYS_FSL_DDR2
+#ifdef CONFIG_SYS_FSL_DDR2
 #define CONFIG_SYS_SPD_BUS_NUM 0
 #define SPD_EEPROM_ADDRESS1    0x52
 #define SPD_EEPROM_ADDRESS2    0x51
index 8197f89e4e59be37f270af8798b13f63da9d5cd1..9ab1bc106b685ef745a420fb7375520f2ac29521 100644 (file)
 
 /* DDR Setup */
 #define CONFIG_VERY_BIG_RAM
-#define CONFIG_FSL_DDR2
+#define CONFIG_SYS_FSL_DDR2
 #undef CONFIG_FSL_DDR_INTERACTIVE
 #define CONFIG_SPD_EEPROM              /* Use SPD EEPROM for DDR setup */
 #define CONFIG_DDR_SPD
index 66893688e6aa51b937e2f05812f344143a45ad36..046b14bddac8f764e26e7fcb78143f77327bf15e 100644 (file)
@@ -78,7 +78,7 @@
 #define CONFIG_SYS_CCSRBAR_PHYS_LOW    CONFIG_SYS_CCSRBAR
 
 /* DDR Setup */
-#define CONFIG_FSL_DDR1
+#define CONFIG_SYS_FSL_DDR1
 #define CONFIG_SPD_EEPROM              /* Use SPD EEPROM for DDR setup*/
 #define CONFIG_DDR_SPD
 #undef CONFIG_FSL_DDR_INTERACTIVE
index e24c5974530875b59489a8a6ec00823d3ac9abef..eca3b537b41da5a3866f49f257018eb2c6ff165b 100644 (file)
@@ -51,7 +51,7 @@ extern unsigned long get_clock_freq(void);
 #define CONFIG_SYS_CCSRBAR_PHYS_LOW    CONFIG_SYS_CCSRBAR
 
 /* DDR Setup */
-#define CONFIG_FSL_DDR1
+#define CONFIG_SYS_FSL_DDR1
 #define CONFIG_SPD_EEPROM              /* Use SPD EEPROM for DDR setup*/
 #define CONFIG_DDR_SPD
 #undef CONFIG_FSL_DDR_INTERACTIVE
index 2e76df681b1eba20f95c99417135d371a2d04aff..8132ec055b90dfd4e05a2dc52da0090827cf764e 100644 (file)
@@ -63,7 +63,7 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 #define CONFIG_SYS_CCSRBAR_PHYS_LOW    CONFIG_SYS_CCSRBAR
 
 /* DDR Setup */
-#define CONFIG_FSL_DDR2
+#define CONFIG_SYS_FSL_DDR2
 #undef CONFIG_FSL_DDR_INTERACTIVE
 #define CONFIG_SPD_EEPROM              /* Use SPD EEPROM for DDR setup */
 #define CONFIG_DDR_SPD
index 9ff048af6d295e4a92185d77cc50ced2ee9d0efb..6acd54db8502686b207f80e385c00e16cfaeecba 100644 (file)
@@ -75,7 +75,7 @@ extern unsigned long get_clock_freq(void);
 #define CONFIG_SYS_CCSRBAR_PHYS_LOW    CONFIG_SYS_CCSRBAR
 
 /* DDR Setup */
-#define CONFIG_FSL_DDR2
+#define CONFIG_SYS_FSL_DDR2
 #undef CONFIG_FSL_DDR_INTERACTIVE
 #define CONFIG_SPD_EEPROM              /* Use SPD EEPROM for DDR setup*/
 #define CONFIG_DDR_SPD
index 7f0f927ea127aaeeb40d1682d4d5f28cb33c66cb..5ffdd01629bf146ef8936fd921f309685c778d36 100644 (file)
@@ -51,7 +51,7 @@ extern unsigned long get_clock_freq(void);
 #define CONFIG_SYS_CCSRBAR_PHYS_LOW    CONFIG_SYS_CCSRBAR
 
 /* DDR Setup */
-#define CONFIG_FSL_DDR1
+#define CONFIG_SYS_FSL_DDR1
 #define CONFIG_SPD_EEPROM              /* Use SPD EEPROM for DDR setup*/
 #define CONFIG_DDR_SPD
 #undef CONFIG_FSL_DDR_INTERACTIVE
index b7c4a603095219c009bc289d99e32868d02bf44e..bb9ae2dcb53438ba9c6d76b1f9353bcc674d6678 100644 (file)
@@ -75,7 +75,7 @@
 #define CONFIG_SYS_CCSRBAR_PHYS_LOW    CONFIG_SYS_CCSRBAR
 
 /* DDR Setup */
-#define CONFIG_FSL_DDR1
+#define CONFIG_SYS_FSL_DDR1
 #define CONFIG_SPD_EEPROM              /* Use SPD EEPROM for DDR setup*/
 #define CONFIG_DDR_SPD
 #undef CONFIG_FSL_DDR_INTERACTIVE
index c9a15395c3233381dec2ad65c4ee14b96dcc7c02..7406ac3be823da99fffd33e98968a501f0099a2d 100644 (file)
@@ -60,7 +60,7 @@ extern unsigned long get_clock_freq(void);
 #define CONFIG_SYS_CCSRBAR_PHYS_LOW    CONFIG_SYS_CCSRBAR
 
 /* DDR Setup */
-#define CONFIG_FSL_DDR2
+#define CONFIG_SYS_FSL_DDR2
 #undef CONFIG_FSL_DDR_INTERACTIVE
 #define CONFIG_SPD_EEPROM              /* Use SPD EEPROM for DDR setup*/
 #define CONFIG_DDR_SPD
index 341f6a89b4abe64d862e524c4fb4396a2d141244..df5572b3a811db4501c1077fc38f9cefb19ed715 100644 (file)
@@ -98,7 +98,7 @@ extern unsigned long get_clock_freq(void);
 #endif
 
 /* DDR Setup */
-#define CONFIG_FSL_DDR3
+#define CONFIG_SYS_FSL_DDR3
 #undef CONFIG_FSL_DDR_INTERACTIVE
 #define CONFIG_SPD_EEPROM              /* Use SPD EEPROM for DDR setup*/
 #define CONFIG_DDR_SPD
index c7511449eab7f08930e63dbf95f118b12a144d02..afb195fe4eb0604166d233db3c802f366da2d7b5 100644 (file)
 
 /* DDR Setup */
 #define CONFIG_VERY_BIG_RAM
-#define CONFIG_FSL_DDR2
+#define CONFIG_SYS_FSL_DDR2
 #undef CONFIG_FSL_DDR_INTERACTIVE
 #define CONFIG_SPD_EEPROM              /* Use SPD EEPROM for DDR setup */
 #define CONFIG_DDR_SPD
index 97f5c877e12cd68f8b50ee3f635645fd7d5e20de..41ebe31dd4a6fc13e7afc1ea9f27d4166d0ba233 100644 (file)
@@ -92,7 +92,7 @@
 #define CONFIG_SYS_CCSRBAR_PHYS                CONFIG_SYS_CCSRBAR_PHYS_LOW
 
 /* DDR Setup */
-#define CONFIG_FSL_DDR2
+#define CONFIG_SYS_FSL_DDR2
 #undef CONFIG_FSL_DDR_INTERACTIVE
 #define CONFIG_SPD_EEPROM              /* Use SPD for DDR */
 #define CONFIG_DDR_SPD
index 8ed505076676b4b6fc07953b382ca2389f9fd432..0e666bac01865338d6df32a9fe35760b23858102 100644 (file)
@@ -108,7 +108,7 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 /*
  * DDR Setup
  */
-#define CONFIG_FSL_DDR2
+#define CONFIG_SYS_FSL_DDR2
 #undef CONFIG_FSL_DDR_INTERACTIVE
 #define CONFIG_SPD_EEPROM              /* Use SPD EEPROM for DDR setup */
 #define CONFIG_DDR_SPD
index 50c365a5b18d27cf96d64d053a1aa67add3e200e..eab386add43709122bf421037e457d4fe38277ce 100644 (file)
 #define CONFIG_PANIC_HANG              /* do not reset board on panic */
 
 /* DDR Setup */
-#define CONFIG_FSL_DDR3
+#define CONFIG_SYS_FSL_DDR3
 #define CONFIG_SYS_DDR_RAW_TIMING
 #define CONFIG_DDR_SPD
 #define CONFIG_SYS_SPD_BUS_NUM         1
index 1470526d0bd3b8c92b8b3bd58437a9fba9cc278b..262c3e5f1fa624617af09dbd7b02e65044f1f60b 100644 (file)
 /* DDR Setup */
 #define CONFIG_DDR_SPD
 #define CONFIG_VERY_BIG_RAM
-#define CONFIG_FSL_DDR3
+#define CONFIG_SYS_FSL_DDR3
 
 #ifdef CONFIG_DDR_ECC
 #define CONFIG_ECC_INIT_VIA_DDRCONTROLLER
index e49523e9403902b579de877dff3c7a22b328b38d..7de6814a03bfb2ba39cb98469edc4b0e3ab29752 100644 (file)
@@ -74,7 +74,7 @@ extern unsigned long get_clock_freq(void);
 #define CONFIG_CHIP_SELECTS_PER_CTRL   1
 
 #define CONFIG_DDR_SPD
-#define CONFIG_FSL_DDR3
+#define CONFIG_SYS_FSL_DDR3
 #define CONFIG_FSL_DDR_INTERACTIVE
 #define CONFIG_SYS_SDRAM_SIZE          512u    /* DDR is 512M */
 #define CONFIG_SYS_SPD_BUS_NUM          0
index 282f5c1a122cc6de60a789d9c717a54974ed8ad4..b592c1966aac3aac1b8695dfa18cdd9f37873517 100644 (file)
@@ -141,7 +141,7 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 #endif
 
 /* DDR Setup */
-#define CONFIG_FSL_DDR2
+#define CONFIG_SYS_FSL_DDR2
 #undef CONFIG_FSL_DDR_INTERACTIVE
 #undef CONFIG_SPD_EEPROM               /* Use SPD EEPROM for DDR setup */
 
index 9cc219e5a80a3922e12af79047fd1dcc83523d03..15d2a43cd0d729dda8cc5d5bd4099032db361d25 100644 (file)
@@ -105,7 +105,7 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 #define CONFIG_SYS_CCSRBAR_PHYS_LOW    CONFIG_SYS_CCSRBAR
 
 /* DDR Setup */
-#define CONFIG_FSL_DDR3
+#define CONFIG_SYS_FSL_DDR3
 #define CONFIG_SPD_EEPROM              /* Use SPD EEPROM for DDR setup */
 #define CONFIG_DDR_SPD
 
index 8a29eaa507ee4a6c1b413a107e9b5a24be993db2..9d3d9b33e553a0a6955e36d0ab235c4fa3f190fd 100644 (file)
 /* DDR Setup */
 #define CONFIG_VERY_BIG_RAM
 #ifdef CONFIG_DDR2
-#define CONFIG_FSL_DDR2
+#define CONFIG_SYS_FSL_DDR2
 #else
-#define CONFIG_FSL_DDR3                1
+#define CONFIG_SYS_FSL_DDR3            1
 #endif
 
 /* ECC will be enabled based on perf_mode environment variable */
index 0df6f1a2d918c635037e492981ab592c2939b559..b238574b5d2de99e14f1ae547e4045d4bec58a4e 100644 (file)
@@ -175,7 +175,7 @@ unsigned long get_board_sys_clk(unsigned long dummy);
 #define CONFIG_CHIP_SELECTS_PER_CTRL   (4 * CONFIG_DIMM_SLOTS_PER_CTLR)
 
 #define CONFIG_DDR_SPD
-#define CONFIG_FSL_DDR3
+#define CONFIG_SYS_FSL_DDR3
 
 #define CONFIG_SYS_SPD_BUS_NUM 0
 #define SPD_EEPROM_ADDRESS     0x52
index 7c6bec8f769078ba7064dee76d5b8c92d7e49210..43a57780043f07231cf5acefefc9284bb0097eec 100644 (file)
@@ -170,7 +170,7 @@ unsigned long get_board_ddr_clk(void);
 #define CONFIG_CHIP_SELECTS_PER_CTRL   (4 * CONFIG_DIMM_SLOTS_PER_CTLR)
 
 #define CONFIG_DDR_SPD
-#define CONFIG_FSL_DDR3
+#define CONFIG_SYS_FSL_DDR3
 #define CONFIG_FSL_DDR_INTERACTIVE
 
 #define CONFIG_SYS_SPD_BUS_NUM 0
index 620387fcd0f064c3e5a5137cb3ac97490b290ab9..79312311d8b5a8ebbb02f2140d938bd025f43443 100644 (file)
 
 #define CONFIG_DDR_SPD
 #define CONFIG_SYS_DDR_RAW_TIMING
-#define CONFIG_FSL_DDR3
+#define CONFIG_SYS_FSL_DDR3
 
 #define CONFIG_SYS_SPD_BUS_NUM 0
 #define SPD_EEPROM_ADDRESS     0x51
index 4b023f9e8425af60c13461cddb63a23493f169e2..eff08e3804f986058ef5f37dc60d4d2d082e6bf6 100644 (file)
 
 #define CONFIG_DDR_SPD
 #define CONFIG_SYS_DDR_RAW_TIMING
-#define CONFIG_FSL_DDR3
+#define CONFIG_SYS_FSL_DDR3
 
 #define CONFIG_SYS_SPD_BUS_NUM 0
 #define SPD_EEPROM_ADDRESS     0x51
index 413f0867f41dd8013aae3b344ef83825cdadf1f8..46d4f9865f3036a0a1183792f738c74569b9a162 100644 (file)
 #define CONFIG_SYS_SDRAM_SIZE 1024
 #define CONFIG_VERY_BIG_RAM
 
-#define CONFIG_FSL_DDR3
+#define CONFIG_SYS_FSL_DDR3
 #define CONFIG_NUM_DDR_CONTROLLERS     1
 #define CONFIG_DIMM_SLOTS_PER_CTLR     1
 #define CONFIG_CHIP_SELECTS_PER_CTRL   (2 * CONFIG_DIMM_SLOTS_PER_CTLR)
index 562caa58458117b1c938c8a30654d76d8bfdd6c6..665295c1a2fe75e4458959eca392c602c3c910a1 100644 (file)
 #define CONFIG_CHIP_SELECTS_PER_CTRL   (4 * CONFIG_DIMM_SLOTS_PER_CTLR)
 
 #define CONFIG_DDR_SPD
-#define CONFIG_FSL_DDR3
+#define CONFIG_SYS_FSL_DDR3
 
 #define CONFIG_SYS_SPD_BUS_NUM 1
 #define SPD_EEPROM_ADDRESS1    0x51
index 2d5320b5cd0c385d456f8823944d881b34521119..7700b38c2de4639eebb19bd5150265be0521ec61 100644 (file)
@@ -111,7 +111,7 @@ unsigned long get_board_sys_clk(unsigned long dummy);
 #define CONFIG_CHIP_SELECTS_PER_CTRL   (4 * CONFIG_DIMM_SLOTS_PER_CTLR)
 
 #define CONFIG_DDR_SPD
-#define CONFIG_FSL_DDR3
+#define CONFIG_SYS_FSL_DDR3
 #define CONFIG_FSL_DDR_INTERACTIVE
 
 #define CONFIG_SYS_SPD_BUS_NUM 0
index 6d0d392b7784cb779af8858cb1ebfdecb823abc7..ec09e15dbf6cc1f3a1d1f7e53c139f9787079338 100644 (file)
@@ -52,7 +52,7 @@
 #define CONFIG_SYS_CCSRBAR_PHYS_LOW    CONFIG_SYS_CCSRBAR
 
 /* DDR Setup */
-#define CONFIG_FSL_DDR2
+#define CONFIG_SYS_FSL_DDR2
 
 #define CONFIG_ECC_INIT_VIA_DDRCONTROLLER /* DDR controller or DMA? */
 
index 91a678212d9de783ae32540bb768065c30e4c6f8..57ed0199523b8ba150273da2d8c81921ab5e0ce2 100644 (file)
 #endif
 
 /* DDR Setup */
-#define CONFIG_FSL_DDR3
+#define CONFIG_SYS_FSL_DDR3
 #define CONFIG_SYS_DDR_RAW_TIMING
 #define CONFIG_DDR_SPD
 #define CONFIG_SYS_SPD_BUS_NUM 1
index 76189e136f2a2e8041bfddc2d29b0d354f16b992..9837100e3187d901f934f56504122a647e13b7e8 100644 (file)
@@ -89,7 +89,7 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 #define CONFIG_SYS_CCSRBAR_PHYS_LOW    CONFIG_SYS_CCSRBAR
 
 /* DDR Setup */
-#define CONFIG_FSL_DDR3
+#define CONFIG_SYS_FSL_DDR3
 
 #define CONFIG_SYS_SDRAM_SIZE_LAW      LAW_SIZE_512M
 #define CONFIG_CHIP_SELECTS_PER_CTRL   1
index 6d970608f230d55928d2ea592602aab860c80b80..bdb8eb529d70064a366b83817e9ef1fa4e668a00 100644 (file)
 #define CONFIG_SYS_CCSRBAR_PHYS_LOW    CONFIG_SYS_CCSRBAR
 
 /* DDR Setup */
-#define CONFIG_FSL_DDR2
+#define CONFIG_SYS_FSL_DDR2
 #undef CONFIG_FSL_DDR_INTERACTIVE
 #undef CONFIG_DDR_ECC                  /* only for ECC DDR module */
 /*
index b6fbe23706f17a3b00931f229ef8018f63d1ab18..0e6b86412d125597cab3617b86cc22b7b87a21b7 100644 (file)
@@ -80,7 +80,7 @@
 #define CONFIG_SYS_CCSRBAR_PHYS_LOW    CONFIG_SYS_CCSRBAR
 
 /* DDR Setup */
-#define CONFIG_FSL_DDR2
+#define CONFIG_SYS_FSL_DDR2
 #undef CONFIG_FSL_DDR_INTERACTIVE
 #define CONFIG_SPD_EEPROM              /* Use SPD EEPROM for DDR setup */
 #define CONFIG_DDR_SPD
index 9b3f0cc69fe4edd206693641f981e836c9a64dff..ee1f1f3ed00829c04ce5ef1f2ee809fa43ecd99d 100644 (file)
@@ -98,7 +98,7 @@
 #define CONFIG_SYS_CCSRBAR_PHYS_LOW    CONFIG_SYS_CCSRBAR
 
 /* DDR Setup */
-#define CONFIG_FSL_DDR1
+#define CONFIG_SYS_FSL_DDR1
 #define CONFIG_SPD_EEPROM              /* Use SPD EEPROM for DDR setup*/
 #define CONFIG_DDR_SPD
 #undef CONFIG_FSL_DDR_INTERACTIVE
index 805814f4fb92ab986c953771cccce28b1c312ec9..63dd767047b3b97773cd675760e7c9db6d5f9d31 100644 (file)
 #define CONFIG_SYS_CCSRBAR_PHYS_LOW    CONFIG_SYS_CCSRBAR
 
 /* DDR Setup */
-#define CONFIG_FSL_DDR1
+#define CONFIG_SYS_FSL_DDR1
 #define CONFIG_SPD_EEPROM              /* Use SPD EEPROM for DDR setup*/
 #define CONFIG_DDR_SPD
 #undef CONFIG_FSL_DDR_INTERACTIVE
index 3f54f1423eed31f534e950ff50643af51bf017dd..d9b0ed07d6c9e02ed946d70153ee64f3d863b952 100644 (file)
@@ -87,7 +87,7 @@
 #define CONFIG_FSL_DDR_FIRST_SLOT_QUAD_CAPABLE
 
 #define CONFIG_DDR_SPD
-#define CONFIG_FSL_DDR3
+#define CONFIG_SYS_FSL_DDR3
 
 
 /*
index 4738c2335091aebcb57ef5a3975f8537868be17a..88d7f88cc0008f649cde0be6fb6f1acdda2dd1ee 100644 (file)
@@ -40,7 +40,7 @@
 /*
  * DDR config
  */
-#define CONFIG_FSL_DDR2
+#define CONFIG_SYS_FSL_DDR2
 #define CONFIG_SPD_EEPROM              /* Use SPD EEPROM for DDR setup */
 #define CONFIG_DDR_SPD
 #define CONFIG_MEM_INIT_VALUE          0xdeadbeef
index 33428803eb77882ee1c69d5b8952cd0618c046f4..f39d6f9105a38b8f6b777191277364d68a690c18 100644 (file)
@@ -39,7 +39,7 @@
 /*
  * DDR config
  */
-#define CONFIG_FSL_DDR2
+#define CONFIG_SYS_FSL_DDR2
 #undef CONFIG_FSL_DDR_INTERACTIVE
 #define CONFIG_SPD_EEPROM              /* Use SPD EEPROM for DDR setup */
 #define CONFIG_DDR_SPD
index 9da845d9a27570a9fac7137029dc2d7c6875b315..e1bdf90de4622aeb4fdf3fe9fb646c70465ba8b4 100644 (file)
@@ -49,7 +49,7 @@
 /*
  * DDR config
  */
-#define CONFIG_FSL_DDR2
+#define CONFIG_SYS_FSL_DDR2
 #undef CONFIG_FSL_DDR_INTERACTIVE
 #define CONFIG_SPD_EEPROM              /* Use SPD EEPROM for DDR setup */
 #define CONFIG_DDR_SPD
index 4137cc9208ed19263ad9f42f4cdb8f0099c9d6a3..2328c7a62ed620918ecab0d393fb7e3f7a438358 100644 (file)
@@ -49,7 +49,7 @@
 /*
  * DDR config
  */
-#define CONFIG_FSL_DDR3
+#define CONFIG_SYS_FSL_DDR3
 #define CONFIG_SPD_EEPROM              /* Use SPD EEPROM for DDR setup */
 #define CONFIG_DDR_SPD
 #define CONFIG_MEM_INIT_VALUE          0xdeadbeef
similarity index 97%
rename from arch/powerpc/cpu/mpc8xxx/ddr/ddr.h
rename to include/fsl_ddr.h
index e3b414e666d874bf6a2d84371fd44d0be3d0fed1..e03f9db5f2e1b10b8ff49ab0180ca11e84ddf10a 100644 (file)
@@ -9,10 +9,10 @@
 #ifndef FSL_DDR_MAIN_H
 #define FSL_DDR_MAIN_H
 
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 
-#include "common_timing_params.h"
+#include <common_timing_params.h>
 
 #if defined(CONFIG_DDR_SPD) || defined(CONFIG_SPD_EEPROM)
 /*
similarity index 98%
rename from arch/powerpc/include/asm/fsl_ddr_sdram.h
rename to include/fsl_ddr_sdram.h
index 2c3c514ba30a1853c81238f846f6f8d57b28d787..16cccc770836b91ba1b41804b27550305ab4686c 100644 (file)
 #define DDR2_RTT_150_OHM       2
 #define DDR2_RTT_50_OHM                3
 
-#if defined(CONFIG_FSL_DDR1)
+#if defined(CONFIG_SYS_FSL_DDR1)
 #define FSL_DDR_MIN_TCKE_PULSE_WIDTH_DDR       (1)
 typedef ddr1_spd_eeprom_t generic_spd_eeprom_t;
 #ifndef CONFIG_FSL_SDRAM_TYPE
 #define CONFIG_FSL_SDRAM_TYPE  SDRAM_TYPE_DDR1
 #endif
-#elif defined(CONFIG_FSL_DDR2)
+#elif defined(CONFIG_SYS_FSL_DDR2)
 #define FSL_DDR_MIN_TCKE_PULSE_WIDTH_DDR       (3)
 typedef ddr2_spd_eeprom_t generic_spd_eeprom_t;
 #ifndef CONFIG_FSL_SDRAM_TYPE
 #define CONFIG_FSL_SDRAM_TYPE  SDRAM_TYPE_DDR2
 #endif
-#elif defined(CONFIG_FSL_DDR3)
+#elif defined(CONFIG_SYS_FSL_DDR3)
 #define FSL_DDR_MIN_TCKE_PULSE_WIDTH_DDR       (3)     /* FIXME */
 typedef ddr3_spd_eeprom_t generic_spd_eeprom_t;
 #ifndef CONFIG_FSL_SDRAM_TYPE
 #define CONFIG_FSL_SDRAM_TYPE  SDRAM_TYPE_DDR3
 #endif
-#endif /* #if defined(CONFIG_FSL_DDR1) */
+#endif /* #if defined(CONFIG_SYS_FSL_DDR1) */
 
 #define FSL_DDR_ODT_NEVER              0x0
 #define FSL_DDR_ODT_CS                 0x1
index 716b737ad286e53ae375b49f2c7160c87a0b66a1..ce7f6191caa89775126a64e8e1c07afc12edf962 100644 (file)
@@ -10,7 +10,7 @@
 #include <nand.h>
 #include <asm/mmu.h>
 #include <asm/immap_85xx.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/fsl_law.h>
 
 #define SYSCLK_66       66666666
index 94680004f70a90363162308c3d5eed2925871180..58e6cbf289338b7ca0339393dce02d50731f70bb 100644 (file)
@@ -10,7 +10,7 @@
 #include <asm/io.h>
 #include <nand.h>
 #include <asm/fsl_law.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -18,7 +18,7 @@ DECLARE_GLOBAL_DATA_PTR;
 /* Fixed sdram init -- doesn't use serial presence detect. */
 void sdram_init(void)
 {
-       ccsr_ddr_t *ddr = (ccsr_ddr_t *)CONFIG_SYS_MPC8xxx_DDR_ADDR;
+       ccsr_ddr_t *ddr = (ccsr_ddr_t *)CONFIG_SYS_FSL_DDR_ADDR;
 
        set_next_law(0, LAW_SIZE_2G, LAW_TRGT_IF_DDR_1);
 
index 3244c8f6d95052a521d52dc63396c6308dd5f2f2..f7e8438438ede38fb8d996f738dfcb968199b6d9 100644 (file)
@@ -10,7 +10,7 @@
 #include <nand.h>
 #include <asm/mmu.h>
 #include <asm/immap_85xx.h>
-#include <asm/fsl_ddr_sdram.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/fsl_law.h>
 
 #define SYSCLK_MASK     0x00200000
index 29d7818df5076b21c6f6846ccc89513648b89a10..2a787afa4f92e0b699feb950e7dcb8b6bb3eed7a 100644 (file)
@@ -70,6 +70,7 @@ LIBS-$(CONFIG_SPL_LIBDISK_SUPPORT) += disk/
 LIBS-$(CONFIG_SPL_I2C_SUPPORT) += drivers/i2c/
 LIBS-$(CONFIG_SPL_GPIO_SUPPORT) += drivers/gpio/
 LIBS-$(CONFIG_SPL_MMC_SUPPORT) += drivers/mmc/
+LIBS-$(CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT) += drivers/ddr/fsl/
 LIBS-$(CONFIG_SPL_SERIAL_SUPPORT) += drivers/serial/
 LIBS-$(CONFIG_SPL_SPI_FLASH_SUPPORT) += drivers/mtd/spi/
 LIBS-$(CONFIG_SPL_SPI_SUPPORT) += drivers/spi/