Эх сурвалжийг харах

ddr: altera: Wrap SOCFPGA_SDR_ADDRESS into SDR_PHYGRP.*ADDRESS

Just trim down the constant SOCFPGA_SDR_ADDRESS + SDR_PHYGRP.*ADDRESS
in the code.

Signed-off-by: Marek Vasut <marex@denx.de>
Marek Vasut 9 жил өмнө
parent
commit
17fdc9167f

+ 1 - 1
arch/arm/mach-socfpga/include/mach/sdram.h

@@ -14,7 +14,7 @@ int sdram_calibration_full(void);
 
 extern int sdram_calibration(void);
 
-#define SDR_CTRLGRP_ADDRESS 0x5000
+#define SDR_CTRLGRP_ADDRESS	(SOCFPGA_SDR_ADDRESS | 0x5000)
 
 struct socfpga_sdr_ctrl {
 	u32	ctrl_cfg;

+ 1 - 1
drivers/ddr/altera/sdram.c

@@ -38,7 +38,7 @@ struct sdram_prot_rule {
 static struct socfpga_system_manager *sysmgr_regs =
 	(struct socfpga_system_manager *)SOCFPGA_SYSMGR_ADDRESS;
 static struct socfpga_sdr_ctrl *sdr_ctrl =
-	(struct socfpga_sdr_ctrl *)(SOCFPGA_SDR_ADDRESS + SDR_CTRLGRP_ADDRESS);
+	(struct socfpga_sdr_ctrl *)SDR_CTRLGRP_ADDRESS;
 
 static int compute_errata_rows(unsigned long long memsize, int cs, int width,
 			       int rows, int banks, int cols)

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 162 - 162
drivers/ddr/altera/sequencer.c


+ 5 - 5
drivers/ddr/altera/sequencer.h

@@ -93,11 +93,11 @@
 #define SCC_MGR_HHP_RFILE_OFFSET		0x0B00
 #define SCC_MGR_AFI_CAL_INIT_OFFSET		0x0D00
 
-#define SDR_PHYGRP_SCCGRP_ADDRESS		0x0
-#define SDR_PHYGRP_PHYMGRGRP_ADDRESS		0x1000
-#define SDR_PHYGRP_RWMGRGRP_ADDRESS		0x2000
-#define SDR_PHYGRP_DATAMGRGRP_ADDRESS		0x4000
-#define SDR_PHYGRP_REGFILEGRP_ADDRESS		0x4800
+#define SDR_PHYGRP_SCCGRP_ADDRESS		(SOCFPGA_SDR_ADDRESS | 0x0)
+#define SDR_PHYGRP_PHYMGRGRP_ADDRESS		(SOCFPGA_SDR_ADDRESS | 0x1000)
+#define SDR_PHYGRP_RWMGRGRP_ADDRESS		(SOCFPGA_SDR_ADDRESS | 0x2000)
+#define SDR_PHYGRP_DATAMGRGRP_ADDRESS		(SOCFPGA_SDR_ADDRESS | 0x4000)
+#define SDR_PHYGRP_REGFILEGRP_ADDRESS		(SOCFPGA_SDR_ADDRESS | 0x4800)
 
 #define SDR_CTRLGRP_PHYCTRL_PHYCTRL_0_OFFSET 0x150
 #define SDR_CTRLGRP_PHYCTRL_PHYCTRL_1_OFFSET 0x154

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно