On Fri, May 10, 2019 at 8:17 PM Marek Vasut <ma...@denx.de> wrote: > > On 5/10/19 7:54 AM, Ley Foon Tan wrote: > > Add SDRAM driver for Agilex SoC. > > > > Signed-off-by: Tien Fong Chee <tien.fong.c...@intel.com> > > Signed-off-by: Ley Foon Tan <ley.foon....@intel.com> > > --- > > drivers/ddr/altera/Kconfig | 6 +- > > drivers/ddr/altera/Makefile | 1 + > > drivers/ddr/altera/sdram_agilex.c | 158 ++++++++++++++++++++++++++++++ > > drivers/ddr/altera/sdram_common.c | 1 + > > drivers/ddr/altera/sdram_common.h | 1 + > > 5 files changed, 164 insertions(+), 3 deletions(-) > > create mode 100644 drivers/ddr/altera/sdram_agilex.c > > [...] > > > + /* This enables nonsecure access to DDR */ > > + /* mpuregion0addr_limit */ > > + FW_MPU_DDR_SCR_WRITEL(gd->ram_size - 1, > > + FW_MPU_DDR_SCR_MPUREGION0ADDR_LIMIT); > > + FW_MPU_DDR_SCR_WRITEL(0x1F, FW_MPU_DDR_SCR_MPUREGION0ADDR_LIMITEXT); > > Why is the function name in caps? They are macros, not function. > > > + > > + /* nonmpuregion0addr_limit */ > > + FW_MPU_DDR_SCR_WRITEL(gd->ram_size - 1, > > + FW_MPU_DDR_SCR_NONMPUREGION0ADDR_LIMIT); > > + > > + /* Enable mpuregion0enable and nonmpuregion0enable */ > > + FW_MPU_DDR_SCR_WRITEL(MPUREGION0_ENABLE | NONMPUREGION0_ENABLE, > > + FW_MPU_DDR_SCR_EN_SET); > > + > > + u32 ctrlcfg1 = hmc_readl(plat, CTRLCFG1); > Doesn't the C compiler warn about variable defined in the middle of code ? > No compiler warning.
Regards Ley Foon _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot