]> git.sur5r.net Git - u-boot/commitdiff
mxs: Use __weak annotation to simplify code
authorFabio Estevam <fabio.estevam@freescale.com>
Tue, 8 Jan 2013 05:21:45 +0000 (05:21 +0000)
committerStefano Babic <sbabic@denx.de>
Mon, 28 Jan 2013 05:54:19 +0000 (06:54 +0100)
Using the __weak annotation can make the code cleaner.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
arch/arm/cpu/arm926ejs/mxs/mxs.c
arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c

index a7486230f6ce87ddfd3db7590d7c8bb6864f4c1c..e2b41965db5d8b3c98b12ef984962fd06106b9b4 100644 (file)
@@ -35,6 +35,7 @@
 #include <asm/arch/iomux.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
+#include <linux/compiler.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -293,7 +294,7 @@ int cpu_eth_init(bd_t *bis)
 }
 #endif
 
-static void __mx28_adjust_mac(int dev_id, unsigned char *mac)
+__weak void mx28_adjust_mac(int dev_id, unsigned char *mac)
 {
        mac[0] = 0x00;
        mac[1] = 0x04; /* Use FSL vendor MAC address by default */
@@ -302,9 +303,6 @@ static void __mx28_adjust_mac(int dev_id, unsigned char *mac)
                mac[5] += 1;
 }
 
-void mx28_adjust_mac(int dev_id, unsigned char *mac)
-       __attribute__((weak, alias("__mx28_adjust_mac")));
-
 #ifdef CONFIG_MX28_FEC_MAC_IN_OCOTP
 
 #define        MXS_OCOTP_MAX_TIMEOUT   1000000
index 836e6361f2cfd0a0509e3a9b43c9d22ae9136c30..f8392f6398a20d48379efca2041fdcb349cb5197 100644 (file)
@@ -27,6 +27,7 @@
 #include <config.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
+#include <linux/compiler.h>
 
 #include "mxs_init.h"
 
@@ -104,11 +105,9 @@ static uint32_t dram_vals[] = {
 #endif
 };
 
-void __mxs_adjust_memory_params(uint32_t *dram_vals)
+__weak void mxs_adjust_memory_params(uint32_t *dram_vals)
 {
 }
-void mxs_adjust_memory_params(uint32_t *dram_vals)
-       __attribute__((weak, alias("__mxs_adjust_memory_params")));
 
 static void initialize_dram_values(void)
 {