diff options
author | Sonic Zhang <sonic.zhang@analog.com> | 2012-05-15 01:04:24 -0400 |
---|---|---|
committer | Bob Liu <lliubbo@gmail.com> | 2012-05-21 02:54:57 -0400 |
commit | 8bf7135fff46f6ac28baf28a8e4144f685b456a0 (patch) | |
tree | f769648ea45a40a73775baad38c2756ca2176e73 /arch | |
parent | 5a84775e999a5579e10f7297776c71b0be2ebd74 (diff) |
blackfin: bf60x: Rename the DDR controller macro
Rename the DDR controller macro from DDR0 to DMC0 to avoid confustion for
bf60x.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/blackfin/kernel/setup.c | 2 | ||||
-rw-r--r-- | arch/blackfin/mach-bf609/include/mach/cdefBF60x_base.h | 36 | ||||
-rw-r--r-- | arch/blackfin/mach-bf609/include/mach/defBF60x_base.h | 60 | ||||
-rw-r--r-- | arch/blackfin/mach-bf609/pm.c | 14 |
4 files changed, 56 insertions, 56 deletions
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index d0246de347cf..0053e1bc0c6a 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c | |||
@@ -856,7 +856,7 @@ static inline int __init get_mem_size(void) | |||
856 | ret *= 2; | 856 | ret *= 2; |
857 | return ret; | 857 | return ret; |
858 | #elif defined(CONFIG_BF60x) | 858 | #elif defined(CONFIG_BF60x) |
859 | u32 ddrctl = bfin_read_DDR0_CFG(); | 859 | u32 ddrctl = bfin_read_DMC0_CFG(); |
860 | int ret; | 860 | int ret; |
861 | switch (ddrctl & 0xf00) { | 861 | switch (ddrctl & 0xf00) { |
862 | case DEVSZ_64: | 862 | case DEVSZ_64: |
diff --git a/arch/blackfin/mach-bf609/include/mach/cdefBF60x_base.h b/arch/blackfin/mach-bf609/include/mach/cdefBF60x_base.h index 88a05264ebda..4954cf3f7e16 100644 --- a/arch/blackfin/mach-bf609/include/mach/cdefBF60x_base.h +++ b/arch/blackfin/mach-bf609/include/mach/cdefBF60x_base.h | |||
@@ -298,24 +298,24 @@ | |||
298 | #define bfin_write_SMC_B3ETIM(val) bfin_write32(SMC_B3ETIM, val) | 298 | #define bfin_write_SMC_B3ETIM(val) bfin_write32(SMC_B3ETIM, val) |
299 | 299 | ||
300 | /* DDR2 Memory Control Registers */ | 300 | /* DDR2 Memory Control Registers */ |
301 | #define bfin_read_DDR0_CFG() bfin_read32(DDR0_CFG) | 301 | #define bfin_read_DMC0_CFG() bfin_read32(DMC0_CFG) |
302 | #define bfin_write_DDR0_CFG(val) bfin_write32(DDR0_CFG, val) | 302 | #define bfin_write_DMC0_CFG(val) bfin_write32(DMC0_CFG, val) |
303 | #define bfin_read_DDR0_TR0() bfin_read32(DDR0_TR0) | 303 | #define bfin_read_DMC0_TR0() bfin_read32(DMC0_TR0) |
304 | #define bfin_write_DDR0_TR0(val) bfin_write32(DDR0_TR0, val) | 304 | #define bfin_write_DMC0_TR0(val) bfin_write32(DMC0_TR0, val) |
305 | #define bfin_read_DDR0_TR1() bfin_read32(DDR0_TR1) | 305 | #define bfin_read_DMC0_TR1() bfin_read32(DMC0_TR1) |
306 | #define bfin_write_DDR0_TR1(val) bfin_write32(DDR0_TR1, val) | 306 | #define bfin_write_DMC0_TR1(val) bfin_write32(DMC0_TR1, val) |
307 | #define bfin_read_DDR0_TR2() bfin_read32(DDR0_TR2) | 307 | #define bfin_read_DMC0_TR2() bfin_read32(DMC0_TR2) |
308 | #define bfin_write_DDR0_TR2(val) bfin_write32(DDR0_TR2, val) | 308 | #define bfin_write_DMC0_TR2(val) bfin_write32(DMC0_TR2, val) |
309 | #define bfin_read_DDR0_MR() bfin_read32(DDR0_MR) | 309 | #define bfin_read_DMC0_MR() bfin_read32(DMC0_MR) |
310 | #define bfin_write_DDR0_MR(val) bfin_write32(DDR0_MR, val) | 310 | #define bfin_write_DMC0_MR(val) bfin_write32(DMC0_MR, val) |
311 | #define bfin_read_DDR0_EMR1() bfin_read32(DDR0_EMR1) | 311 | #define bfin_read_DMC0_EMR1() bfin_read32(DMC0_EMR1) |
312 | #define bfin_write_DDR0_EMR1(val) bfin_write32(DDR0_EMR1, val) | 312 | #define bfin_write_DMC0_EMR1(val) bfin_write32(DMC0_EMR1, val) |
313 | #define bfin_read_DDR0_CTL() bfin_read32(DDR0_CTL) | 313 | #define bfin_read_DMC0_CTL() bfin_read32(DMC0_CTL) |
314 | #define bfin_write_DDR0_CTL(val) bfin_write32(DDR0_CTL, val) | 314 | #define bfin_write_DMC0_CTL(val) bfin_write32(DMC0_CTL, val) |
315 | #define bfin_read_DDR0_STAT() bfin_read32(DDR0_STAT) | 315 | #define bfin_read_DMC0_STAT() bfin_read32(DMC0_STAT) |
316 | #define bfin_write_DDR0_STAT(val) bfin_write32(DDR0_STAT, val) | 316 | #define bfin_write_DMC0_STAT(val) bfin_write32(DMC0_STAT, val) |
317 | #define bfin_read_DDR0_DLLCTL() bfin_read32(DDR0_DLLCTL) | 317 | #define bfin_read_DMC0_DLLCTL() bfin_read32(DMC0_DLLCTL) |
318 | #define bfin_write_DDR0_DLLCTL(val) bfin_write32(DDR0_DLLCTL, val) | 318 | #define bfin_write_DMC0_DLLCTL(val) bfin_write32(DMC0_DLLCTL, val) |
319 | 319 | ||
320 | /* DDR BankRead and Write Count Registers */ | 320 | /* DDR BankRead and Write Count Registers */ |
321 | 321 | ||
diff --git a/arch/blackfin/mach-bf609/include/mach/defBF60x_base.h b/arch/blackfin/mach-bf609/include/mach/defBF60x_base.h index 43132007d11e..6aac38544cc9 100644 --- a/arch/blackfin/mach-bf609/include/mach/defBF60x_base.h +++ b/arch/blackfin/mach-bf609/include/mach/defBF60x_base.h | |||
@@ -2634,36 +2634,36 @@ | |||
2634 | 2634 | ||
2635 | 2635 | ||
2636 | /* ========================= | 2636 | /* ========================= |
2637 | DDR Registers | 2637 | DMC Registers |
2638 | ========================= */ | 2638 | ========================= */ |
2639 | 2639 | ||
2640 | /* ========================= | 2640 | /* ========================= |
2641 | DDR0 | 2641 | DMC0 |
2642 | ========================= */ | 2642 | ========================= */ |
2643 | #define DDR0_ID 0xFFC80000 /* DDR0 Identification Register */ | 2643 | #define DMC0_ID 0xFFC80000 /* DMC0 Identification Register */ |
2644 | #define DDR0_CTL 0xFFC80004 /* DDR0 Control Register */ | 2644 | #define DMC0_CTL 0xFFC80004 /* DMC0 Control Register */ |
2645 | #define DDR0_STAT 0xFFC80008 /* DDR0 Status Register */ | 2645 | #define DMC0_STAT 0xFFC80008 /* DMC0 Status Register */ |
2646 | #define DDR0_EFFCTL 0xFFC8000C /* DDR0 Efficiency Controller */ | 2646 | #define DMC0_EFFCTL 0xFFC8000C /* DMC0 Efficiency Controller */ |
2647 | #define DDR0_PRIO 0xFFC80010 /* DDR0 Priority ID Register */ | 2647 | #define DMC0_PRIO 0xFFC80010 /* DMC0 Priority ID Register */ |
2648 | #define DDR0_PRIOMSK 0xFFC80014 /* DDR0 Priority ID Mask */ | 2648 | #define DMC0_PRIOMSK 0xFFC80014 /* DMC0 Priority ID Mask */ |
2649 | #define DDR0_CFG 0xFFC80040 /* DDR0 SDRAM Configuration */ | 2649 | #define DMC0_CFG 0xFFC80040 /* DMC0 SDRAM Configuration */ |
2650 | #define DDR0_TR0 0xFFC80044 /* DDR0 Timing Register 0 */ | 2650 | #define DMC0_TR0 0xFFC80044 /* DMC0 Timing Register 0 */ |
2651 | #define DDR0_TR1 0xFFC80048 /* DDR0 Timing Register 1 */ | 2651 | #define DMC0_TR1 0xFFC80048 /* DMC0 Timing Register 1 */ |
2652 | #define DDR0_TR2 0xFFC8004C /* DDR0 Timing Register 2 */ | 2652 | #define DMC0_TR2 0xFFC8004C /* DMC0 Timing Register 2 */ |
2653 | #define DDR0_MSK 0xFFC8005C /* DDR0 Mode Register Mask */ | 2653 | #define DMC0_MSK 0xFFC8005C /* DMC0 Mode Register Mask */ |
2654 | #define DDR0_MR 0xFFC80060 /* DDR0 Mode Shadow register */ | 2654 | #define DMC0_MR 0xFFC80060 /* DMC0 Mode Shadow register */ |
2655 | #define DDR0_EMR1 0xFFC80064 /* DDR0 EMR1 Shadow Register */ | 2655 | #define DMC0_EMR1 0xFFC80064 /* DMC0 EMR1 Shadow Register */ |
2656 | #define DDR0_EMR2 0xFFC80068 /* DDR0 EMR2 Shadow Register */ | 2656 | #define DMC0_EMR2 0xFFC80068 /* DMC0 EMR2 Shadow Register */ |
2657 | #define DDR0_EMR3 0xFFC8006C /* DDR0 EMR3 Shadow Register */ | 2657 | #define DMC0_EMR3 0xFFC8006C /* DMC0 EMR3 Shadow Register */ |
2658 | #define DDR0_DLLCTL 0xFFC80080 /* DDR0 DLL Control Register */ | 2658 | #define DMC0_DLLCTL 0xFFC80080 /* DMC0 DLL Control Register */ |
2659 | #define DDR0_PADCTL 0xFFC800C0 /* DDR0 PAD Control Register 0 */ | 2659 | #define DMC0_PADCTL 0xFFC800C0 /* DMC0 PAD Control Register 0 */ |
2660 | 2660 | ||
2661 | #define DEVSZ_64 0x000 /* DDR External Bank Size = 64Mbit */ | 2661 | #define DEVSZ_64 0x000 /* DMC External Bank Size = 64Mbit */ |
2662 | #define DEVSZ_128 0x100 /* DDR External Bank Size = 128Mbit */ | 2662 | #define DEVSZ_128 0x100 /* DMC External Bank Size = 128Mbit */ |
2663 | #define DEVSZ_256 0x200 /* DDR External Bank Size = 256Mbit */ | 2663 | #define DEVSZ_256 0x200 /* DMC External Bank Size = 256Mbit */ |
2664 | #define DEVSZ_512 0x300 /* DDR External Bank Size = 512Mbit */ | 2664 | #define DEVSZ_512 0x300 /* DMC External Bank Size = 512Mbit */ |
2665 | #define DEVSZ_1G 0x400 /* DDR External Bank Size = 1Gbit */ | 2665 | #define DEVSZ_1G 0x400 /* DMC External Bank Size = 1Gbit */ |
2666 | #define DEVSZ_2G 0x500 /* DDR External Bank Size = 2Gbit */ | 2666 | #define DEVSZ_2G 0x500 /* DMC External Bank Size = 2Gbit */ |
2667 | 2667 | ||
2668 | 2668 | ||
2669 | /* ========================= | 2669 | /* ========================= |
diff --git a/arch/blackfin/mach-bf609/pm.c b/arch/blackfin/mach-bf609/pm.c index df3b9b973f62..b76966eb16ad 100644 --- a/arch/blackfin/mach-bf609/pm.c +++ b/arch/blackfin/mach-bf609/pm.c | |||
@@ -165,11 +165,11 @@ void bf609_ddr_sr(void) | |||
165 | { | 165 | { |
166 | uint32_t reg; | 166 | uint32_t reg; |
167 | 167 | ||
168 | reg = bfin_read_DDR0_CTL(); | 168 | reg = bfin_read_DMC0_CTL(); |
169 | reg |= 0x8; | 169 | reg |= 0x8; |
170 | bfin_write_DDR0_CTL(reg); | 170 | bfin_write_DMC0_CTL(reg); |
171 | 171 | ||
172 | while (!(bfin_read_DDR0_STAT() & 0x8)) | 172 | while (!(bfin_read_DMC0_STAT() & 0x8)) |
173 | continue; | 173 | continue; |
174 | } | 174 | } |
175 | 175 | ||
@@ -177,14 +177,14 @@ __attribute__((l1_text)) | |||
177 | void bf609_ddr_sr_exit(void) | 177 | void bf609_ddr_sr_exit(void) |
178 | { | 178 | { |
179 | uint32_t reg; | 179 | uint32_t reg; |
180 | while (!(bfin_read_DDR0_STAT() & 0x1)) | 180 | while (!(bfin_read_DMC0_STAT() & 0x1)) |
181 | continue; | 181 | continue; |
182 | 182 | ||
183 | reg = bfin_read_DDR0_CTL(); | 183 | reg = bfin_read_DMC0_CTL(); |
184 | reg &= ~0x8; | 184 | reg &= ~0x8; |
185 | bfin_write_DDR0_CTL(reg); | 185 | bfin_write_DMC0_CTL(reg); |
186 | 186 | ||
187 | while ((bfin_read_DDR0_STAT() & 0x8)) | 187 | while ((bfin_read_DMC0_STAT() & 0x8)) |
188 | continue; | 188 | continue; |
189 | } | 189 | } |
190 | 190 | ||