mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-29 18:41:30 +00:00
sun6i: dram: Do not try to initialize a second dram chan on A31s
The A31s only has one dram channel, so do not bother with trying to initialize a second channel. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
This commit is contained in:
parent
10191ed098
commit
7582e39eb0
2 changed files with 15 additions and 7 deletions
|
@ -10,6 +10,7 @@
|
||||||
obj-y += timer.o
|
obj-y += timer.o
|
||||||
obj-y += board.o
|
obj-y += board.o
|
||||||
obj-y += clock.o
|
obj-y += clock.o
|
||||||
|
obj-y += cpu_info.o
|
||||||
obj-y += pinmux.o
|
obj-y += pinmux.o
|
||||||
obj-$(CONFIG_MACH_SUN6I) += prcm.o
|
obj-$(CONFIG_MACH_SUN6I) += prcm.o
|
||||||
obj-$(CONFIG_MACH_SUN8I) += prcm.o
|
obj-$(CONFIG_MACH_SUN8I) += prcm.o
|
||||||
|
@ -21,7 +22,6 @@ obj-$(CONFIG_MACH_SUN7I) += clock_sun4i.o
|
||||||
obj-$(CONFIG_MACH_SUN8I) += clock_sun6i.o
|
obj-$(CONFIG_MACH_SUN8I) += clock_sun6i.o
|
||||||
|
|
||||||
ifndef CONFIG_SPL_BUILD
|
ifndef CONFIG_SPL_BUILD
|
||||||
obj-y += cpu_info.o
|
|
||||||
ifdef CONFIG_ARMV7_PSCI
|
ifdef CONFIG_ARMV7_PSCI
|
||||||
obj-y += psci.o
|
obj-y += psci.o
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -369,18 +369,26 @@ unsigned long sunxi_dram_init(void)
|
||||||
.rows = 16,
|
.rows = 16,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* A31s only has one channel */
|
||||||
|
if (sunxi_get_ss_bonding_id() == SUNXI_SS_BOND_ID_A31S)
|
||||||
|
para.chan = 1;
|
||||||
|
|
||||||
mctl_sys_init();
|
mctl_sys_init();
|
||||||
|
|
||||||
mctl_dll_init(0, ¶);
|
mctl_dll_init(0, ¶);
|
||||||
mctl_dll_init(1, ¶);
|
setbits_le32(&mctl_com->ccr, MCTL_CCR_CH0_CLK_EN);
|
||||||
|
|
||||||
setbits_le32(&mctl_com->ccr,
|
if (para.chan == 2) {
|
||||||
MCTL_CCR_MASTER_CLK_EN |
|
mctl_dll_init(1, ¶);
|
||||||
MCTL_CCR_CH0_CLK_EN |
|
setbits_le32(&mctl_com->ccr, MCTL_CCR_CH1_CLK_EN);
|
||||||
MCTL_CCR_CH1_CLK_EN);
|
}
|
||||||
|
|
||||||
|
setbits_le32(&mctl_com->ccr, MCTL_CCR_MASTER_CLK_EN);
|
||||||
|
|
||||||
mctl_channel_init(0, ¶);
|
mctl_channel_init(0, ¶);
|
||||||
|
if (para.chan == 2)
|
||||||
mctl_channel_init(1, ¶);
|
mctl_channel_init(1, ¶);
|
||||||
|
|
||||||
mctl_com_init(¶);
|
mctl_com_init(¶);
|
||||||
mctl_port_cfg();
|
mctl_port_cfg();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue