drivers/ddr/altera: Add the DDR controller driver for SoCFPGA
Subsystems (2)
v3 cover drivers/ddr/altera: Add the DDR controller driver for SoCFPGA
From: Dinh Nguyen <[email protected]>
Hi,
This is V3 of patch series that adds the DDR controller driver for Altera's SoCFPGA platform.
V3:
- Clean up to address comments from Marek for the calibration portion.
V2:
- Clean up to address comments from Pavel
Thanks,
Dinh Nguyen (3):
driver/ddr/altera: Add DDR driver for Altera's SDRAM controller driver/ddr/altera/: Add the sdram calibration portion
arm: socfpga: enable the Altera SDRAM controller driver
Makefile | 1 + arch/arm/include/asm/arch-socfpga/sdram.h | 306 ++ arch/arm/include/asm/arch-socfpga/sdram_config.h | 100 + drivers/ddr/altera/Makefile | 11 + drivers/ddr/altera/sdram.c | 799 +++++ drivers/ddr/altera/sequencer.c | 4121 ++++++++++++++++++++++ drivers/ddr/altera/sequencer.h | 322 ++ drivers/ddr/altera/sequencer_auto.h | 128 + drivers/ddr/altera/sequencer_auto_ac_init.h | 84 + drivers/ddr/altera/sequencer_auto_inst_init.h | 268 ++ drivers/ddr/altera/sequencer_defines.h | 121 + include/configs/socfpga_common.h | 5 + scripts/Makefile.spl | 1 + 13 files changed, 6267 insertions(+) create mode 100644 arch/arm/include/asm/arch-socfpga/sdram.h create mode 100644 arch/arm/include/asm/arch-socfpga/sdram_config.h create mode 100644 drivers/ddr/altera/Makefile create mode 100644 drivers/ddr/altera/sdram.c create mode 100644 drivers/ddr/altera/sequencer.c create mode 100644 drivers/ddr/altera/sequencer.h create mode 100644 drivers/ddr/altera/sequencer_auto.h create mode 100644 drivers/ddr/altera/sequencer_auto_ac_init.h create mode 100644 drivers/ddr/altera/sequencer_auto_inst_init.h create mode 100644 drivers/ddr/altera/sequencer_defines.h
Signature · 1 line
2.2.1
PATCH v3 1/3 driver/ddr/altera: Add DDR driver for Altera's SDRAM controller
From: Dinh Nguyen <[email protected]>
This patch enables the SDRAM controller that is used on Altera's SoCFPGA family. This patch configures the SDRAM controller based on a configuration file that is generated from the Quartus tool, sdram_config.h.
---
v2: clean up from comments from Pavel
--- Makefile | 1 + arch/arm/include/asm/arch-socfpga/sdram.h | 306 +++++++++ arch/arm/include/asm/arch-socfpga/sdram_config.h | 100 +++ drivers/ddr/altera/sdram.c | 799 +++++++++++++++++++++++ scripts/Makefile.spl | 1 + 5 files changed, 1207 insertions(+) create mode 100644 arch/arm/include/asm/arch-socfpga/sdram.h create mode 100644 arch/arm/include/asm/arch-socfpga/sdram_config.h create mode 100644 drivers/ddr/altera/sdram.c
Makefile +1 -0
@@ -649,6 +649,7 @@ libs-y += drivers/power/ \ libs-y += drivers/spi/ libs-$(CONFIG_FMAN_ENET) += drivers/net/fm/ libs-$(CONFIG_SYS_FSL_DDR) += drivers/ddr/fsl/ +libs-$(CONFIG_ALTERA_SDRAM) += drivers/ddr/altera/ libs-y += drivers/serial/ libs-y += drivers/usb/dwc3/ libs-y += drivers/usb/eth/
arch/arm/include/asm/arch-socfpga/sdram.h new file +306 -0
306 lines not on this page · raw message
arch/arm/include/asm/arch-socfpga/sdram_config.h new file +100 -0
100 lines not on this page · raw message
drivers/ddr/altera/sdram.c new file +799 -0
799 lines not on this page · raw message
scripts/Makefile.spl +1 -0
@@ -60,6 +60,7 @@ libs-$(CONFIG_SPL_GPIO_SUPPORT) += drivers/gpio/ libs-$(CONFIG_SPL_MMC_SUPPORT) += drivers/mmc/ libs-$(CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT) += drivers/ddr/fsl/ libs-$(CONFIG_SYS_MVEBU_DDR) += drivers/ddr/mvebu/ +libs-$(CONFIG_ALTERA_SDRAM) += drivers/ddr/altera/ libs-$(CONFIG_SPL_SERIAL_SUPPORT) += drivers/serial/ libs-$(CONFIG_SPL_SPI_FLASH_SUPPORT) += drivers/mtd/spi/ libs-$(CONFIG_SPL_SPI_SUPPORT) += drivers/spi/
Signature · 1 line
2.2.1
PATCH v3 1/3 driver/ddr/altera: Add DDR driver for Altera's SDRAM controller
Quoted 7 lines · dinguyen at opensource.altera.com
From: Dinh Nguyen <[email protected]>
This patch enables the SDRAM controller that is used on Altera's SoCFPGA family. This patch configures the SDRAM controller based on a configuration file that is generated from the Quartus tool,
sdram_config.h.Signed-off-by Dinh Nguyen <[email protected]>
Hi!
So, I am kinda tempted to pick this patch. I would like for at least one more person to skim through it before I do so and if there is no serious pushback, let's just pick this for 07 release.
Best regards,
Marek Vasut
PATCH v3 2/3 driver/ddr/altera/: Add the sdram calibration portion
In reply to dinguyen at opensource.altera.comFrom: Dinh Nguyen <[email protected]>
This patch adds the DDR calibration portion of the Altera SDRAM driver.
---
v2: more clean from Marek's comments
--- drivers/ddr/altera/Makefile | 11 + drivers/ddr/altera/sequencer.c | 4121 +++++++++++++++++++++++++ drivers/ddr/altera/sequencer.h | 322 ++ drivers/ddr/altera/sequencer_auto.h | 128 + drivers/ddr/altera/sequencer_auto_ac_init.h | 84 + drivers/ddr/altera/sequencer_auto_inst_init.h | 268 ++ drivers/ddr/altera/sequencer_defines.h | 121 + 7 files changed, 5055 insertions(+) create mode 100644 drivers/ddr/altera/Makefile create mode 100644 drivers/ddr/altera/sequencer.c create mode 100644 drivers/ddr/altera/sequencer.h create mode 100644 drivers/ddr/altera/sequencer_auto.h create mode 100644 drivers/ddr/altera/sequencer_auto_ac_init.h create mode 100644 drivers/ddr/altera/sequencer_auto_inst_init.h create mode 100644 drivers/ddr/altera/sequencer_defines.h
drivers/ddr/altera/Makefile new file +11 -0
@@ -0,0 +1,11 @@ +# +# (C) Copyright 2000-2003 +# Wolfgang Denk, DENX Software Engineering, wd at denx.de. +# +# (C) Copyright 2010, Thomas Chou <[email protected]> +# Copyright (C) 2014 Altera Corporation <www.altera.com> +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-$(CONFIG_ALTERA_SDRAM) += sdram.o sequencer.o
drivers/ddr/altera/sequencer.c new file +4121 -0
2,989 lines not on this page · raw message
drivers/ddr/altera/sequencer.h new file +322 -0
322 lines not on this page · raw message
drivers/ddr/altera/sequencer_auto.h new file +128 -0
128 lines not on this page · raw message
drivers/ddr/altera/sequencer_auto_ac_init.h new file +84 -0
84 lines not on this page · raw message
drivers/ddr/altera/sequencer_auto_inst_init.h new file +268 -0
268 lines not on this page · raw message
drivers/ddr/altera/sequencer_defines.h new file +121 -0
121 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.2.1
Part of the diff is not shown here. View the raw message.
PATCH v3 2/3 driver/ddr/altera/: Add the sdram calibration portion
Quoted 5 lines · dinguyen at opensource.altera.com
From: Dinh Nguyen <[email protected]>
This patch adds the DDR calibration portion of the Altera SDRAM driver.
Signed-off-by Dinh Nguyen <[email protected]>
Hi,
DTTO here. The code is still ugly, but I'm afraid it's not gonna get any better if we keep it out of tree. It'd bet on getting this improved in-tree and under scrutiny from users. What do you think ?
Best regards,
Marek Vasut
PATCH v3 2/3 driver/ddr/altera/: Add the sdram calibration portion
Quoted 5 lines · Marek Vasut
Quoted 4 lines · dinguyen at opensource.altera.com
From: Dinh Nguyen <[email protected]>
This patch adds the DDR calibration portion of the Altera SDRAM driver.
Quoted 8 lines
Quoted 1 line
Signed-off-by Dinh Nguyen <[email protected]>Hi,
DTTO here. The code is still ugly, but I'm afraid it's not gonna get any better if we keep it out of tree. It'd bet on getting this improved in-tree and under scrutiny from users. What do you think ?
I agree. I really have tried my best to clean it up as best as I can.
Dinh
PATCH v3 2/3 driver/ddr/altera/: Add the sdram calibration portion
Quoted 10 lines · Dinh Nguyen
Quoted 7 lines · Marek Vasut
Quoted 5 lines · dinguyen at opensource.altera.com
From: Dinh Nguyen <[email protected]>
This patch adds the DDR calibration portion of the Altera SDRAM driver.
Signed-off-by Dinh Nguyen <[email protected]>
Quoted 8 lines
Quoted 6 lines
Hi,
DTTO here. The code is still ugly, but I'm afraid it's not gonna get any better if we keep it out of tree. It'd bet on getting this improved in-tree and under scrutiny from users. What do you think ?
I agree. I really have tried my best to clean it up as best as I can.
Yes, thanks. Really appreciated. I know that especially these kind of DDR calibration code tend to be quite complex and "ugly". So I also vote for getting this applied now and perhaps improving it in-tree.
For this patch series:
Thanks,
Stefan
PATCH v3 2/3 driver/ddr/altera/: Add the sdram calibration portion
Quoted 3 lines · Stefan Roese
Quoted 2 lines · Dinh Nguyen
Quoted 1 line · Marek Vasut
On Monday, May 18, 2015 at 09:36:48 PM, dinguyen at opensource.altera.com
Quoted 12 lines · wrote:
Quoted 12 lines
Quoted 11 lines
Quoted 5 lines
From: Dinh Nguyen <[email protected]>
This patch adds the DDR calibration portion of the Altera SDRAM driver.
Signed-off-by Dinh Nguyen <[email protected]>Hi,
DTTO here. The code is still ugly, but I'm afraid it's not gonna get any better if we keep it out of tree. It'd bet on getting this improved in-tree and under scrutiny from users. What do you think ?
Quoted 5 lines
Quoted 1 line
I agree. I really have tried my best to clean it up as best as I can.
Yes, thanks. Really appreciated. I know that especially these kind of DDR calibration code tend to be quite complex and "ugly". So I also vote for getting this applied now and perhaps improving it in-tree.
I second that, I cannot say I fathom how huge the task of cleaning this up is.
Quoted 6 lines
For this patch series:
Acked-by Stefan Roese <[email protected]>Thanks,
Stefan
Best regards,
Marek Vasut
PATCH v3 2/3 driver/ddr/altera/: Add the sdram calibration portion
In reply to dinguyen at opensource.altera.comHi!
Quoted 3 lines
+/******************************************************************************
+ ******************************************************************************
+ ** NOTE: Special Rules for Globale Variables **
They are global, not globale.
Quoted 10 lines
+ ** All global variables that are explicitly initialized (including ** + ** explicitly initialized to zero), are only initialized once, during ** + ** configuration time, and not again on reset. This means that they ** + ** preserve their current contents across resets, which is needed for some ** + ** special cases involving communication with external modules. In ** + ** addition, this avoids paying the price to have the memory initialized, **+ ** even for zeroed data, provided it is explicitly set to zero in the code, **
+ ** and doesn't rely on implicit initialization. **
+ ****************************************************************************** +
Is this sane thing to do? How does it work for variables in other sources?
What penalty is there for just redoing initialization from scratch each time?
Thanks,
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
PATCH v3 2/3 driver/ddr/altera/: Add the sdram calibration portion
Dear Pavel,
Quoted 12 lines · In message <20150525123750.GD9943@amd> you wrote:
Quoted 11 lines
+ ** All global variables that are explicitly initialized (including ** + ** explicitly initialized to zero), are only initialized once, during ** + ** configuration time, and not again on reset. This means that they ** + ** preserve their current contents across resets, which is needed for some ** + ** special cases involving communication with external modules. In ** + ** addition, this avoids paying the price to have the memory initialized, **+ ** even for zeroed data, provided it is explicitly set to zero in the code, **
+ ** and doesn't rely on implicit initialization. **
+ ****************************************************************************** +
Quoted 2 lines
Is this sane thing to do? How does it work for variables in other sources?
My concern is if this is actually true (and I asked this before, in an
earlier round ov reviews). I cannot make heads or tails of this
comment, as I don't understand what "configuration time" and "reset" are supposed to mean in U-Boot context. In my understanding, after a reset the memory content is uninitialized, i. e. random, and thus MUST always be properly initialized.
Also, what are "external modules"?
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de It may be bad manners to talk with your mouth full, but it isn't too good either if you speak when your head is empty.
PATCH v3 2/3 driver/ddr/altera/: Add the sdram calibration portion
Quoted 18 lines · Wolfgang Denk
Dear Pavel,
Quoted 12 lines · In message <20150525123750.GD9943@amd> you wrote:
Quoted 11 lines
+ ** All global variables that are explicitly initialized (including ** + ** explicitly initialized to zero), are only initialized once, during ** + ** configuration time, and not again on reset. This means that they ** + ** preserve their current contents across resets, which is needed for some ** + ** special cases involving communication with external modules. In ** + ** addition, this avoids paying the price to have the memory initialized, **+ ** even for zeroed data, provided it is explicitly set to zero in the code, **
+ ** and doesn't rely on implicit initialization. **
+ ****************************************************************************** +Quoted 2 lines
Is this sane thing to do? How does it work for variables in other sources?
Quoted 6 lines
My concern is if this is actually true (and I asked this before, in an
earlier round ov reviews). I cannot make heads or tails of this
comment, as I don't understand what "configuration time" and "reset" are supposed to mean in U-Boot context. In my understanding, after a reset the memory content is uninitialized, i. e. random, and thus MUST always be properly initialized.
This comment is related to the configuration where we have the NiOS cpu doing the ddr calibration and is not applicable for the Cyclone5/Arria5. So I think I can remove the comment for the the A5/C5 configuration.
This situation will come into play for the Arria10 SoCFPGA, because that part will have a NiOS cpu that will do the DDR configuration. "configuration time" happens at power-up, and "reset" is a warm reset. From what I was told, the situation where we might want to preserve a variable after a reset is to avoid reconfiguring the NiOS in the FPGA for DDR operations.
Quoted 2 lines
Also, what are "external modules"?
I think these could be different FPGA instances that needs these variables that have survived a warm reset to the CPU.
Dinh
PATCH v3 2/3 driver/ddr/altera/: Add the sdram calibration portion
Quoted 20 lines · Dinh Nguyen
Quoted 19 lines · Wolfgang Denk
Dear Pavel,
Quoted 15 lines · In message <20150525123750.GD9943@amd> you wrote:
Quoted 9 lines
+ ** All global variables that are explicitly initialized (including ** + ** explicitly initialized to zero), are only initialized
once, during ** + ** configuration time, and not again on reset.
This means that they ** + ** preserve their current contents
across resets, which is needed for some ** + ** special cases
involving communication with external modules. In ** + **
addition, this avoids paying the price to have the memory initialized,
** + ** even for zeroed data, provided it is explicitly set to zero
in the code, ** + ** and doesn't rely on implicit initialization.Quoted 3 lines
** +**********************************************************************
******** +Is this sane thing to do? How does it work for variables in other sources?
Quoted 6 lines
Quoted 6 lines
My concern is if this is actually true (and I asked this before, in an
earlier round ov reviews). I cannot make heads or tails of this
comment, as I don't understand what "configuration time" and "reset" are supposed to mean in U-Boot context. In my understanding, after a reset the memory content is uninitialized, i. e. random, and thus MUST always be properly initialized.
Meh, since there's a pushback, I'll wait a bit with applying these until these remaining concerns settle :-/
Quoted 3 lines
This comment is related to the configuration where we have the NiOS cpu doing the ddr calibration and is not applicable for the Cyclone5/Arria5. So I think I can remove the comment for the the A5/C5 configuration.
OK, then this should be removed. A10 support should then be added in a separate patch please.
Quoted 3 lines
This situation will come into play for the Arria10 SoCFPGA, because that part will have a NiOS cpu that will do the DDR configuration. "configuration time" happens at power-up
So "configuration time" happens if the FPGA loads itself from EPCQ or does it happen also if the FPGA is not loaded at all ?
Quoted 4 lines
and "reset" is a warm reset.
From what I was told, the situation where we might want to preserve a variable after a reset is to avoid reconfiguring the NiOS in the FPGA for DDR operations.
Can't you synthesize a sticky register for this purpose in the FPGA instead? Or is it that this NIOS2 which configures the DRAM is actually a hardware, not a softcore ?
Quoted 4 lines
Quoted 1 line
Also, what are "external modules"?
I think these could be different FPGA instances that needs these variables that have survived a warm reset to the CPU.
I _think_ I understand most of the above, but I kinda wonder why don't you cook a small IP block on the avalon bus in the FPGA which would contain a sticky register to hold all those configuration sticky bits. That'd look much more sensible to me.
Best regards,
Marek Vasut
PATCH v3 2/3 driver/ddr/altera/: Add the sdram calibration portion
Quoted 28 lines · Marek Vasut
Quoted 20 lines · Dinh Nguyen
Quoted 19 lines · Wolfgang Denk
Dear Pavel,
Quoted 15 lines · In message <20150525123750.GD9943@amd> you wrote:
Quoted 9 lines
+ ** All global variables that are explicitly initialized (including ** + ** explicitly initialized to zero), are only initialized
once, during ** + ** configuration time, and not again on reset.
This means that they ** + ** preserve their current contents
across resets, which is needed for some ** + ** special cases
involving communication with external modules. In ** + **
addition, this avoids paying the price to have the memory initialized,
** + ** even for zeroed data, provided it is explicitly set to zero
in the code, ** + ** and doesn't rely on implicit initialization.Quoted 3 lines
** +**********************************************************************
******** +Is this sane thing to do? How does it work for variables in other sources?
Quoted 6 lines
Quoted 6 lines
My concern is if this is actually true (and I asked this before, in an
earlier round ov reviews). I cannot make heads or tails of this
comment, as I don't understand what "configuration time" and "reset" are supposed to mean in U-Boot context. In my understanding, after a reset the memory content is uninitialized, i. e. random, and thus MUST always be properly initialized.
Quoted 2 lines
Meh, since there's a pushback, I'll wait a bit with applying these until these remaining concerns settle :-/
That's fine. I'll send a v4 with further clean ups.
Quoted 8 lines
Quoted 4 lines
This comment is related to the configuration where we have the NiOS cpu doing the ddr calibration and is not applicable for the Cyclone5/Arria5. So I think I can remove the comment for the the A5/C5 configuration.
OK, then this should be removed. A10 support should then be added in a separate patch please.
Quoted 6 lines
Quoted 3 lines
This situation will come into play for the Arria10 SoCFPGA, because that part will have a NiOS cpu that will do the DDR configuration. "configuration time" happens at power-up
So "configuration time" happens if the FPGA loads itself from EPCQ or does it happen also if the FPGA is not loaded at all ?
I think configuration time is only applicable when FPGA is programmed.
Quoted 10 lines
Quoted 5 lines
and "reset" is a warm reset.
From what I was told, the situation where we might want to preserve a variable after a reset is to avoid reconfiguring the NiOS in the FPGA for DDR operations.Can't you synthesize a sticky register for this purpose in the FPGA instead? Or is it that this NIOS2 which configures the DRAM is actually a hardware, not a softcore ?
On the Arria10, the NIOS2 is a hardened block and not a softcore.
Quoted 10 lines
Quoted 4 lines
Quoted 1 line
Also, what are "external modules"?
I think these could be different FPGA instances that needs these variables that have survived a warm reset to the CPU.
I _think_ I understand most of the above, but I kinda wonder why don't you cook a small IP block on the avalon bus in the FPGA which would contain a sticky register to hold all those configuration sticky bits. That'd look much more sensible to me.
That does sound like a great idea. I think some of our customers are probably doing that already that.
Dinh
PATCH v3 2/3 driver/ddr/altera/: Add the sdram calibration portion
On Friday, May 29, 2015 at 05:24:19 PM, Dinh Nguyen wrote:
[...]
Quoted 11 lines
Quoted 9 lines
Quoted 6 lines
Quoted 6 lines
My concern is if this is actually true (and I asked this before, in an
earlier round ov reviews). I cannot make heads or tails of this
comment, as I don't understand what "configuration time" and "reset" are supposed to mean in U-Boot context. In my understanding, after a reset the memory content is uninitialized, i. e. random, and thus MUST always be properly initialized.Meh, since there's a pushback, I'll wait a bit with applying these until these remaining concerns settle :-/
That's fine. I'll send a v4 with further clean ups.
OK
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
This comment is related to the configuration where we have the NiOS cpu doing the ddr calibration and is not applicable for the Cyclone5/Arria5. So I think I can remove the comment for the the A5/C5 configuration.
OK, then this should be removed. A10 support should then be added in a separate patch please.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
This situation will come into play for the Arria10 SoCFPGA, because that part will have a NiOS cpu that will do the DDR configuration. "configuration time" happens at power-up
So "configuration time" happens if the FPGA loads itself from EPCQ or does it happen also if the FPGA is not loaded at all ?
I think configuration time is only applicable when FPGA is programmed.
So this is a timeframe between "FPGA has been programmed (from EPCQ or whatever)" and "before HPS is released out of reset" ?
Quoted 10 lines
Quoted 8 lines
Quoted 4 lines
and "reset" is a warm reset.
From what I was told, the situation where we might want to preserve a variable after a reset is to avoid reconfiguring the NiOS in the FPGA for DDR operations.Can't you synthesize a sticky register for this purpose in the FPGA instead? Or is it that this NIOS2 which configures the DRAM is actually a hardware, not a softcore ?
On the Arria10, the NIOS2 is a hardened block and not a softcore.
I think this is indeed a good idea.
btw. I cooked yocto 1.8 (master) support for generating NIOS2 toolchain. I might as well work on it some more, but only once I'm back from LCJ.
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Quoted 1 line
Also, what are "external modules"?
I think these could be different FPGA instances that needs these variables that have survived a warm reset to the CPU.
Quoted 7 lines
Quoted 4 lines
I _think_ I understand most of the above, but I kinda wonder why don't you cook a small IP block on the avalon bus in the FPGA which would contain a sticky register to hold all those configuration sticky bits. That'd look much more sensible to me.
That does sound like a great idea. I think some of our customers are probably doing that already that.
So uh, why aren't we doing it here ? Maybe because the sticky registers are not in the "hardware" the same way the NIOS2 core is ?
PATCH v3 2/3 driver/ddr/altera/: Add the sdram calibration portion
In reply to Wolfgang DenkQuoted 18 lines · Wolfgang Denk
Dear Pavel,
Quoted 12 lines · In message <20150525123750.GD9943@amd> you wrote:
Quoted 11 lines
+ ** All global variables that are explicitly initialized (including ** + ** explicitly initialized to zero), are only initialized once, during ** + ** configuration time, and not again on reset. This means that they ** + ** preserve their current contents across resets, which is needed for some ** + ** special cases involving communication with external modules. In ** + ** addition, this avoids paying the price to have the memory initialized, **+ ** even for zeroed data, provided it is explicitly set to zero in the code, **
+ ** and doesn't rely on implicit initialization. **
+ ****************************************************************************** +Quoted 2 lines
Is this sane thing to do? How does it work for variables in other sources?
Quoted 6 lines
My concern is if this is actually true (and I asked this before, in an
earlier round ov reviews). I cannot make heads or tails of this
comment, as I don't understand what "configuration time" and "reset" are supposed to mean in U-Boot context. In my understanding, after a reset the memory content is uninitialized, i. e. random, and thus MUST always be properly initialized.
I've been able to get some more information on this comment. As it turns out, this comment is only applicable to configurations where the DDR calibration/configuration is being done by the FGPA(NiOS processor). So for Cyclone5/Arria5, this comment is not applicable and can be removed.
"configuration time" in this comment refers to a power-up, and "reset" refers to a warm reset of the SoC, which may or may not involve reconfiguration of the FPGA(NiOS processor). This situation will come into play for the Arria10 platform, as it will have a NiOS processor that will do the DDR configuration/calibration. The reason why we may want to preserve variables from a warm reset is that we might not want to go through the FPGA configuration procedure on a warm reset.
I hope this explains this comment a bit further.
Thanks,
Dinh
PATCH v3 3/3 arm: socfpga: enable the Altera SDRAM controller driver
In reply to dinguyen at opensource.altera.comFrom: Dinh Nguyen <[email protected]>
Enable the Altera SDRAM driver for the SoCFPGA platform.
--- include/configs/socfpga_common.h | 5 +++++ 1 file changed, 5 insertions(+)
include/configs/socfpga_common.h +5 -0
@@ -77,6 +77,11 @@#define CONFIG_SYS_PL310_BASE SOCFPGA_MPUL2_ADDRESS/* +* SDRAM controller +*/ +#define CONFIG_ALTERA_SDRAM + +/* * EPCS/EPCQx1 Serial Flash Controller */ #ifdef CONFIG_ALTERA_SPI
Signature · 1 line
2.2.1
PATCH v3 3/3 arm: socfpga: enable the Altera SDRAM controller driver
Quoted 5 lines · dinguyen at opensource.altera.com
From: Dinh Nguyen <[email protected]>
Enable the Altera SDRAM driver for the SoCFPGA platform.
Signed-off-by Dinh Nguyen <[email protected]>
Best regards,
Marek Vasut