]> git.sur5r.net Git - u-boot/commitdiff
powerpc/mpc8xxx: Allow board file to override DDR address assignment
authorYork Sun <yorksun@freescale.com>
Mon, 25 Mar 2013 07:39:35 +0000 (07:39 +0000)
committerAndy Fleming <afleming@freescale.com>
Tue, 14 May 2013 21:13:25 +0000 (16:13 -0500)
This gives boards flexibility to assign other than default addresses to each
DDR controller. For example, DDR controler 2 can have 0 as the base and DDR
controller 1 has higher memory.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
arch/powerpc/cpu/mpc8xxx/ddr/main.c

index 1a8d5933ae0987ea5f0ca83c2053a453573a015d..7a8636de166ac4ca6e2c69eda2faa7fc2a65d6f2 100644 (file)
@@ -186,7 +186,7 @@ const char * step_to_string(unsigned int step) {
        return step_string_tbl[s];
 }
 
-unsigned long long step_assign_addresses(fsl_ddr_info_t *pinfo,
+static unsigned long long __step_assign_addresses(fsl_ddr_info_t *pinfo,
                          unsigned int dbw_cap_adj[])
 {
        int i, j;
@@ -354,6 +354,11 @@ unsigned long long step_assign_addresses(fsl_ddr_info_t *pinfo,
        return total_mem;
 }
 
+/* Use weak function to allow board file to override the address assignment */
+__attribute__((weak, alias("__step_assign_addresses")))
+unsigned long long step_assign_addresses(fsl_ddr_info_t *pinfo,
+                         unsigned int dbw_cap_adj[]);
+
 unsigned long long
 fsl_ddr_compute(fsl_ddr_info_t *pinfo, unsigned int start_step,
                                       unsigned int size_only)