mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
ddr: altera: sdram: Clean up set_sdr_static_cfg()
Get rid of the constant clrsetbits_le32(), instead prepare the whole content of the register once and write it at the end of the function. Signed-off-by: Marek Vasut <marex@denx.de>
This commit is contained in:
parent
0ef8830037
commit
b3bdb2204e
1 changed files with 7 additions and 8 deletions
|
@ -393,15 +393,14 @@ static void set_sdr_addr_rw(void)
|
|||
|
||||
static void set_sdr_static_cfg(void)
|
||||
{
|
||||
debug("Configuring STATICCFG\n");
|
||||
clrsetbits_le32(&sdr_ctrl->static_cfg, SDR_CTRLGRP_STATICCFG_MEMBL_MASK,
|
||||
CONFIG_HPS_SDR_CTRLCFG_STATICCFG_MEMBL <<
|
||||
SDR_CTRLGRP_STATICCFG_MEMBL_LSB);
|
||||
|
||||
clrsetbits_le32(&sdr_ctrl->static_cfg,
|
||||
SDR_CTRLGRP_STATICCFG_USEECCASDATA_MASK,
|
||||
CONFIG_HPS_SDR_CTRLCFG_STATICCFG_USEECCASDATA <<
|
||||
const u32 static_cfg =
|
||||
(CONFIG_HPS_SDR_CTRLCFG_STATICCFG_MEMBL <<
|
||||
SDR_CTRLGRP_STATICCFG_MEMBL_LSB) |
|
||||
(CONFIG_HPS_SDR_CTRLCFG_STATICCFG_USEECCASDATA <<
|
||||
SDR_CTRLGRP_STATICCFG_USEECCASDATA_LSB);
|
||||
|
||||
debug("Configuring STATICCFG\n");
|
||||
writel(static_cfg, &sdr_ctrl->static_cfg);
|
||||
}
|
||||
|
||||
static void set_sdr_fifo_cfg(void)
|
||||
|
|
Loading…
Reference in a new issue