Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Sonic Zhang and committed by
Bob Liu
8bf7135f 5a84775e

+51 -51
+1 -1
arch/blackfin/kernel/setup.c
··· 856 856 ret *= 2; 857 857 return ret; 858 858 #elif defined(CONFIG_BF60x) 859 - u32 ddrctl = bfin_read_DDR0_CFG(); 859 + u32 ddrctl = bfin_read_DMC0_CFG(); 860 860 int ret; 861 861 switch (ddrctl & 0xf00) { 862 862 case DEVSZ_64:
+18 -18
arch/blackfin/mach-bf609/include/mach/cdefBF60x_base.h
··· 298 298 #define bfin_write_SMC_B3ETIM(val) bfin_write32(SMC_B3ETIM, val) 299 299 300 300 /* DDR2 Memory Control Registers */ 301 - #define bfin_read_DDR0_CFG() bfin_read32(DDR0_CFG) 302 - #define bfin_write_DDR0_CFG(val) bfin_write32(DDR0_CFG, val) 303 - #define bfin_read_DDR0_TR0() bfin_read32(DDR0_TR0) 304 - #define bfin_write_DDR0_TR0(val) bfin_write32(DDR0_TR0, val) 305 - #define bfin_read_DDR0_TR1() bfin_read32(DDR0_TR1) 306 - #define bfin_write_DDR0_TR1(val) bfin_write32(DDR0_TR1, val) 307 - #define bfin_read_DDR0_TR2() bfin_read32(DDR0_TR2) 308 - #define bfin_write_DDR0_TR2(val) bfin_write32(DDR0_TR2, val) 309 - #define bfin_read_DDR0_MR() bfin_read32(DDR0_MR) 310 - #define bfin_write_DDR0_MR(val) bfin_write32(DDR0_MR, val) 311 - #define bfin_read_DDR0_EMR1() bfin_read32(DDR0_EMR1) 312 - #define bfin_write_DDR0_EMR1(val) bfin_write32(DDR0_EMR1, val) 313 - #define bfin_read_DDR0_CTL() bfin_read32(DDR0_CTL) 314 - #define bfin_write_DDR0_CTL(val) bfin_write32(DDR0_CTL, val) 315 - #define bfin_read_DDR0_STAT() bfin_read32(DDR0_STAT) 316 - #define bfin_write_DDR0_STAT(val) bfin_write32(DDR0_STAT, val) 317 - #define bfin_read_DDR0_DLLCTL() bfin_read32(DDR0_DLLCTL) 318 - #define bfin_write_DDR0_DLLCTL(val) bfin_write32(DDR0_DLLCTL, val) 301 + #define bfin_read_DMC0_CFG() bfin_read32(DMC0_CFG) 302 + #define bfin_write_DMC0_CFG(val) bfin_write32(DMC0_CFG, val) 303 + #define bfin_read_DMC0_TR0() bfin_read32(DMC0_TR0) 304 + #define bfin_write_DMC0_TR0(val) bfin_write32(DMC0_TR0, val) 305 + #define bfin_read_DMC0_TR1() bfin_read32(DMC0_TR1) 306 + #define bfin_write_DMC0_TR1(val) bfin_write32(DMC0_TR1, val) 307 + #define bfin_read_DMC0_TR2() bfin_read32(DMC0_TR2) 308 + #define bfin_write_DMC0_TR2(val) bfin_write32(DMC0_TR2, val) 309 + #define bfin_read_DMC0_MR() bfin_read32(DMC0_MR) 310 + #define bfin_write_DMC0_MR(val) bfin_write32(DMC0_MR, val) 311 + #define bfin_read_DMC0_EMR1() bfin_read32(DMC0_EMR1) 312 + #define bfin_write_DMC0_EMR1(val) bfin_write32(DMC0_EMR1, val) 313 + #define bfin_read_DMC0_CTL() bfin_read32(DMC0_CTL) 314 + #define bfin_write_DMC0_CTL(val) bfin_write32(DMC0_CTL, val) 315 + #define bfin_read_DMC0_STAT() bfin_read32(DMC0_STAT) 316 + #define bfin_write_DMC0_STAT(val) bfin_write32(DMC0_STAT, val) 317 + #define bfin_read_DMC0_DLLCTL() bfin_read32(DMC0_DLLCTL) 318 + #define bfin_write_DMC0_DLLCTL(val) bfin_write32(DMC0_DLLCTL, val) 319 319 320 320 /* DDR BankRead and Write Count Registers */ 321 321
+25 -25
arch/blackfin/mach-bf609/include/mach/defBF60x_base.h
··· 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 */ 2644 - #define DDR0_CTL 0xFFC80004 /* DDR0 Control Register */ 2645 - #define DDR0_STAT 0xFFC80008 /* DDR0 Status Register */ 2646 - #define DDR0_EFFCTL 0xFFC8000C /* DDR0 Efficiency Controller */ 2647 - #define DDR0_PRIO 0xFFC80010 /* DDR0 Priority ID Register */ 2648 - #define DDR0_PRIOMSK 0xFFC80014 /* DDR0 Priority ID Mask */ 2649 - #define DDR0_CFG 0xFFC80040 /* DDR0 SDRAM Configuration */ 2650 - #define DDR0_TR0 0xFFC80044 /* DDR0 Timing Register 0 */ 2651 - #define DDR0_TR1 0xFFC80048 /* DDR0 Timing Register 1 */ 2652 - #define DDR0_TR2 0xFFC8004C /* DDR0 Timing Register 2 */ 2653 - #define DDR0_MSK 0xFFC8005C /* DDR0 Mode Register Mask */ 2654 - #define DDR0_MR 0xFFC80060 /* DDR0 Mode Shadow register */ 2655 - #define DDR0_EMR1 0xFFC80064 /* DDR0 EMR1 Shadow Register */ 2656 - #define DDR0_EMR2 0xFFC80068 /* DDR0 EMR2 Shadow Register */ 2657 - #define DDR0_EMR3 0xFFC8006C /* DDR0 EMR3 Shadow Register */ 2658 - #define DDR0_DLLCTL 0xFFC80080 /* DDR0 DLL Control Register */ 2659 - #define DDR0_PADCTL 0xFFC800C0 /* DDR0 PAD Control Register 0 */ 2643 + #define DMC0_ID 0xFFC80000 /* DMC0 Identification Register */ 2644 + #define DMC0_CTL 0xFFC80004 /* DMC0 Control Register */ 2645 + #define DMC0_STAT 0xFFC80008 /* DMC0 Status Register */ 2646 + #define DMC0_EFFCTL 0xFFC8000C /* DMC0 Efficiency Controller */ 2647 + #define DMC0_PRIO 0xFFC80010 /* DMC0 Priority ID Register */ 2648 + #define DMC0_PRIOMSK 0xFFC80014 /* DMC0 Priority ID Mask */ 2649 + #define DMC0_CFG 0xFFC80040 /* DMC0 SDRAM Configuration */ 2650 + #define DMC0_TR0 0xFFC80044 /* DMC0 Timing Register 0 */ 2651 + #define DMC0_TR1 0xFFC80048 /* DMC0 Timing Register 1 */ 2652 + #define DMC0_TR2 0xFFC8004C /* DMC0 Timing Register 2 */ 2653 + #define DMC0_MSK 0xFFC8005C /* DMC0 Mode Register Mask */ 2654 + #define DMC0_MR 0xFFC80060 /* DMC0 Mode Shadow register */ 2655 + #define DMC0_EMR1 0xFFC80064 /* DMC0 EMR1 Shadow Register */ 2656 + #define DMC0_EMR2 0xFFC80068 /* DMC0 EMR2 Shadow Register */ 2657 + #define DMC0_EMR3 0xFFC8006C /* DMC0 EMR3 Shadow Register */ 2658 + #define DMC0_DLLCTL 0xFFC80080 /* DMC0 DLL Control Register */ 2659 + #define DMC0_PADCTL 0xFFC800C0 /* DMC0 PAD Control Register 0 */ 2660 2660 2661 - #define DEVSZ_64 0x000 /* DDR External Bank Size = 64Mbit */ 2662 - #define DEVSZ_128 0x100 /* DDR External Bank Size = 128Mbit */ 2663 - #define DEVSZ_256 0x200 /* DDR External Bank Size = 256Mbit */ 2664 - #define DEVSZ_512 0x300 /* DDR External Bank Size = 512Mbit */ 2665 - #define DEVSZ_1G 0x400 /* DDR External Bank Size = 1Gbit */ 2666 - #define DEVSZ_2G 0x500 /* DDR External Bank Size = 2Gbit */ 2661 + #define DEVSZ_64 0x000 /* DMC External Bank Size = 64Mbit */ 2662 + #define DEVSZ_128 0x100 /* DMC External Bank Size = 128Mbit */ 2663 + #define DEVSZ_256 0x200 /* DMC External Bank Size = 256Mbit */ 2664 + #define DEVSZ_512 0x300 /* DMC External Bank Size = 512Mbit */ 2665 + #define DEVSZ_1G 0x400 /* DMC External Bank Size = 1Gbit */ 2666 + #define DEVSZ_2G 0x500 /* DMC External Bank Size = 2Gbit */ 2667 2667 2668 2668 2669 2669 /* =========================
+7 -7
arch/blackfin/mach-bf609/pm.c
··· 165 165 { 166 166 uint32_t reg; 167 167 168 - reg = bfin_read_DDR0_CTL(); 168 + reg = bfin_read_DMC0_CTL(); 169 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 173 continue; 174 174 } 175 175 ··· 177 177 void bf609_ddr_sr_exit(void) 178 178 { 179 179 uint32_t reg; 180 - while (!(bfin_read_DDR0_STAT() & 0x1)) 180 + while (!(bfin_read_DMC0_STAT() & 0x1)) 181 181 continue; 182 182 183 - reg = bfin_read_DDR0_CTL(); 183 + reg = bfin_read_DMC0_CTL(); 184 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 188 continue; 189 189 } 190 190