mirror of
https://github.com/u-boot/u-boot.git
synced 2024-12-23 19:53:26 +08:00
ARM: mx6: ddr: Configure all SDQS pullups using loop
Instead of explicitly setting up each SDQS register, use a loop. No functional change. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Eric Nelson <eric@nelint.com> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Reviewed-by: Eric Nelson <eric@nelint.com>
This commit is contained in:
parent
7ec0e39ec4
commit
b314003fda
@ -249,25 +249,14 @@ static void mmdc_set_sdqs(bool set)
|
||||
{
|
||||
struct mx6dq_iomux_ddr_regs *mx6_ddr_iomux =
|
||||
(struct mx6dq_iomux_ddr_regs *)MX6DQ_IOM_DDR_BASE;
|
||||
u32 sdqs = (u32)(&mx6_ddr_iomux->dram_sdqs0);
|
||||
int i;
|
||||
|
||||
if (set) {
|
||||
setbits_le32(&mx6_ddr_iomux->dram_sdqs0, 0x7000);
|
||||
setbits_le32(&mx6_ddr_iomux->dram_sdqs1, 0x7000);
|
||||
setbits_le32(&mx6_ddr_iomux->dram_sdqs2, 0x7000);
|
||||
setbits_le32(&mx6_ddr_iomux->dram_sdqs3, 0x7000);
|
||||
setbits_le32(&mx6_ddr_iomux->dram_sdqs4, 0x7000);
|
||||
setbits_le32(&mx6_ddr_iomux->dram_sdqs5, 0x7000);
|
||||
setbits_le32(&mx6_ddr_iomux->dram_sdqs6, 0x7000);
|
||||
setbits_le32(&mx6_ddr_iomux->dram_sdqs7, 0x7000);
|
||||
} else {
|
||||
clrbits_le32(&mx6_ddr_iomux->dram_sdqs0, 0x7000);
|
||||
clrbits_le32(&mx6_ddr_iomux->dram_sdqs1, 0x7000);
|
||||
clrbits_le32(&mx6_ddr_iomux->dram_sdqs2, 0x7000);
|
||||
clrbits_le32(&mx6_ddr_iomux->dram_sdqs3, 0x7000);
|
||||
clrbits_le32(&mx6_ddr_iomux->dram_sdqs4, 0x7000);
|
||||
clrbits_le32(&mx6_ddr_iomux->dram_sdqs5, 0x7000);
|
||||
clrbits_le32(&mx6_ddr_iomux->dram_sdqs6, 0x7000);
|
||||
clrbits_le32(&mx6_ddr_iomux->dram_sdqs7, 0x7000);
|
||||
for (i = 0; i < 8; i++) {
|
||||
if (set)
|
||||
setbits_le32(sdqs + (4 * i), 0x7000);
|
||||
else
|
||||
clrbits_le32(sdqs + (4 * i), 0x7000);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user