]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Merge git://git.denx.de/u-boot-dm
authorTom Rini <trini@ti.com>
Sun, 26 Oct 2014 18:03:08 +0000 (14:03 -0400)
committerTom Rini <trini@ti.com>
Sun, 26 Oct 2014 18:03:08 +0000 (14:03 -0400)
Fix a trivial conflict over adding <dm.h>

Conflicts:
arch/arm/cpu/armv7/omap3/board.c

Signed-off-by: Tom Rini <trini@ti.com>
67 files changed:
arch/arm/cpu/arm926ejs/at91/led.c
arch/arm/cpu/armv7/mx6/soc.c
arch/arm/cpu/armv7/omap3/board.c
arch/arm/cpu/armv7/omap3/emif4.c
arch/arm/cpu/armv7/omap3/sys_info.c
arch/arm/cpu/armv7/tegra20/display.c
arch/arm/cpu/tegra-common/sys_info.c
arch/arm/imx-common/cpu.c
arch/arm/imx-common/misc.c
arch/arm/include/asm/arch-mxs/sys_proto.h
arch/arm/include/asm/arch-omap3/sys_proto.h
arch/arm/include/asm/arch-tegra/board.h
arch/arm/include/asm/u-boot-arm.h
arch/arm/lib/board.c
arch/arm/lib/bootm.c
arch/arm/lib/interrupts.c
board/atmel/at91rm9200ek/led.c
board/atmel/at91sam9260ek/led.c
board/nvidia/common/board.c
board/nvidia/common/emc.c
board/nvidia/seaboard/seaboard.c
board/samsung/common/board.c
board/technexion/twister/twister.c
board/w7o/fsboot.c
common/board_f.c
common/board_r.c
common/cmd_elf.c
common/cmd_gpio.c
common/console.c
common/env_nand.c
common/image-fit.c
common/menu.c
common/modem.c
common/stdio.c
disk/part.c
drivers/gpio/kw_gpio.c
drivers/i2c/designware_i2c.c
drivers/i2c/tegra_i2c.c
drivers/input/tegra-kbc.c
drivers/mmc/bcm2835_sdhci.c
drivers/mmc/sdhci.c
drivers/mmc/tegra_mmc.c
drivers/mtd/cfi_flash.c
drivers/mtd/nand/omap_gpmc.c
drivers/net/davinci_emac.c
drivers/net/fec_mxc.c
drivers/net/phy/phy.c
drivers/pci/pci.c
drivers/serial/serial.c
drivers/serial/serial_sh.c
drivers/usb/host/ehci-hcd.c
drivers/video/cfb_console.c
drivers/video/exynos_fb.c
drivers/video/ipu_common.c
drivers/video/ipu_disp.c
drivers/video/mxc_ipuv3_fb.c
include/asm-generic/gpio.h
include/bootm.h
include/elf.h
include/fdt_support.h
include/ide.h
include/linux/string.h
include/mmc.h
include/spl.h
lib/lmb.c
net/eth.c
post/post.c

index 46ed055023978aee455ccfdb74155c31705ebb41..b8d5c785df4d36557168e3f178738fdc9f717006 100644 (file)
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <asm/gpio.h>
 #include <asm/arch/gpio.h>
+#include <status_led.h>
 
 #ifdef CONFIG_RED_LED
 void red_led_on(void)
index 63524222539134df5c69c6b2179a334850199ec4..a202b0318e0659e02551027c6de9e6fa9e56b095 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <asm/armv7.h>
+#include <asm/bootm.h>
 #include <asm/pl310.h>
 #include <asm/errno.h>
 #include <asm/io.h>
index e6996b50f6b91e3bc5561bb7e3b1cab7a57e252e..c942fe67eeb2148c0dcce6abbaea21d3193653c2 100644 (file)
@@ -18,6 +18,7 @@
  */
 #include <common.h>
 #include <dm.h>
+#include <mmc.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
@@ -290,7 +291,7 @@ int __weak misc_init_r(void)
  * Routine: wait_for_command_complete
  * Description: Wait for posting to finish on watchdog
  *****************************************************************************/
-void wait_for_command_complete(struct watchdog *wd_base)
+static void wait_for_command_complete(struct watchdog *wd_base)
 {
        int pending = 1;
        do {
index 6c7330a0cabdec269698bad41aa2cf0e3a733fdb..a2aadc9816975e7ec00da1a8874ce4ebf414a188 100644 (file)
@@ -61,7 +61,7 @@ u32 get_sdr_cs_offset(u32 cs)
  *  - Init the emif4 module for DDR access
  *  - Early init routines, called from flash or SRAM.
  */
-void do_emif4_init(void)
+static void do_emif4_init(void)
 {
        unsigned int regval;
        /* Set the DDR PHY parameters in PHY ctrl registers */
index bef5f05eaa71e36e0323f12e82c2377435c2421e..bbb65bbe7263674c2b47b97ee05a9f588ed1c58f 100644 (file)
@@ -16,6 +16,8 @@
 #include <asm/io.h>
 #include <asm/arch/mem.h>      /* get mem tables */
 #include <asm/arch/sys_proto.h>
+#include <asm/bootm.h>
+
 #include <i2c.h>
 #include <linux/compiler.h>
 
@@ -202,7 +204,7 @@ u32 __weak get_board_rev(void)
 /********************************************************
  *  get_base(); get upper addr of current execution
  *******************************************************/
-u32 get_base(void)
+static u32 get_base(void)
 {
        u32 val;
 
index fd77f3f0eff368e5a0a83762390826b79f3eada3..d98cec90180f5d133432d57c68bf6759649c0c0c 100644 (file)
@@ -194,7 +194,8 @@ static void rgb_enable(struct dc_com_reg *com)
                writel(rgb_sel_tab[i], &com->pin_output_sel[i]);
 }
 
-int setup_window(struct disp_ctl_win *win, struct fdt_disp_config *config)
+static int setup_window(struct disp_ctl_win *win,
+                       struct fdt_disp_config *config)
 {
        win->x = 0;
        win->y = 0;
index de20325ecf3239666e5da6e5d23cbcba5811108c..5933c35ddd43e9b4242f33fc3d9952404d82088a 100644 (file)
@@ -8,7 +8,7 @@
 #include <common.h>
 #include <linux/ctype.h>
 
-void upstring(char *s)
+static void upstring(char *s)
 {
        while (*s) {
                *s = toupper(*s);
index ed826a0e19c99b8cd76337aa46440a831e2b477a..09fc22760d0c6e973359f121f92c63feed26793d 100644 (file)
@@ -7,7 +7,9 @@
  * SPDX-License-Identifier:    GPL-2.0+
  */
 
+#include <bootm.h>
 #include <common.h>
+#include <netdev.h>
 #include <asm/errno.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
index dbecf4e4348e776d4f62ee77b4dc581d7629b656..12256a38eb97a5803071ff526f4fd2ad3b81fb9b 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <asm/arch/sys_proto.h>
 #include <asm/errno.h>
 #include <asm/io.h>
 #include <asm/imx-common/regs-common.h>
index 09dfc90a9b0391c7c092285886b1c3fe164daab6..062f3de1d05bfd4de1011762b55fbb6311c84fc9 100644 (file)
@@ -10,6 +10,8 @@
 #ifndef __SYS_PROTO_H__
 #define __SYS_PROTO_H__
 
+#include <asm/imx-common/regs-common.h>
+
 int mxs_reset_block(struct mxs_register_32 *reg);
 int mxs_wait_mask_set(struct mxs_register_32 *reg,
                       uint32_t mask,
index 5866bf23e8d2a003515cf0e1637c1c27e2e66a40..34bd8c509aac924b6886b4a34fe0fe36cba38427 100644 (file)
@@ -64,6 +64,7 @@ void try_unlock_memory(void);
 u32 get_boot_type(void);
 void invalidate_dcache(u32);
 u32 wait_on_value(u32, u32, void *, u32);
+void cancel_out(u32 *num, u32 *den, u32 den_limit);
 void sdelay(unsigned long);
 void make_cs1_contiguous(void);
 void omap_nand_switch_ecc(uint32_t, uint32_t);
index ff773646cbec669607d5e03a624d1207b4c65b8b..783bb3c0fa12265901fdd3b99c9f2cc008486a83 100644 (file)
@@ -24,10 +24,11 @@ void gpio_early_init(void);  /* overrideable GPIO config        */
  * an empty stub function will be called.
  */
 
-void pinmux_init(void);      /* overrideable general pinmux setup */
-void pin_mux_usb(void);      /* overrideable USB pinmux setup     */
-void pin_mux_spi(void);      /* overrideable SPI pinmux setup     */
-void pin_mux_nand(void);     /* overrideable NAND pinmux setup    */
-void pin_mux_display(void);  /* overrideable DISPLAY pinmux setup */
+void pinmux_init(void);      /* overridable general pinmux setup */
+void pin_mux_usb(void);      /* overridable USB pinmux setup     */
+void pin_mux_spi(void);      /* overridable SPI pinmux setup     */
+void pin_mux_nand(void);     /* overridable NAND pinmux setup    */
+void pin_mux_mmc(void);      /* overridable mmc pinmux setup     */
+void pin_mux_display(void);  /* overridable DISPLAY pinmux setup */
 
 #endif
index b16694c72f8d6b6f06b2a6efd47cc612c4430ba6..f97f3dd1496aa54f7ca0667d0ebea299c95d50e7 100644 (file)
@@ -45,4 +45,19 @@ void reset_timer_masked      (void);
 ulong  get_timer_masked        (void);
 void   udelay_masked           (unsigned long usec);
 
+/* calls to c from vectors.S */
+void bad_mode(void);
+void do_undefined_instruction(struct pt_regs *pt_regs);
+void do_software_interrupt(struct pt_regs *pt_regs);
+void do_prefetch_abort(struct pt_regs *pt_regs);
+void do_data_abort(struct pt_regs *pt_regs);
+void do_not_used(struct pt_regs *pt_regs);
+#ifdef CONFIG_ARM64
+void do_fiq(struct pt_regs *pt_regs, unsigned int esr);
+void do_irq(struct pt_regs *pt_regs, unsigned int esr);
+#else
+void do_fiq(struct pt_regs *pt_regs);
+void do_irq(struct pt_regs *pt_regswq);
+#endif
+
 #endif /* _U_BOOT_ARM_H_ */
index 76adaf3aa4abf69916155cadd9f1e9e1a5effdb7..f6062557e6677fe0636520f9d7f76a9eedfc8d50 100644 (file)
@@ -34,6 +34,7 @@
 #include <onenand_uboot.h>
 #include <mmc.h>
 #include <scsi.h>
+#include <status_led.h>
 #include <libfdt.h>
 #include <fdtdec.h>
 #include <post.h>
@@ -63,25 +64,15 @@ extern void dataflash_print_info(void);
  ************************************************************************
  * May be supplied by boards if desired
  */
-inline void __coloured_LED_init(void) {}
-void coloured_LED_init(void)
-       __attribute__((weak, alias("__coloured_LED_init")));
-inline void __red_led_on(void) {}
-void red_led_on(void) __attribute__((weak, alias("__red_led_on")));
-inline void __red_led_off(void) {}
-void red_led_off(void) __attribute__((weak, alias("__red_led_off")));
-inline void __green_led_on(void) {}
-void green_led_on(void) __attribute__((weak, alias("__green_led_on")));
-inline void __green_led_off(void) {}
-void green_led_off(void) __attribute__((weak, alias("__green_led_off")));
-inline void __yellow_led_on(void) {}
-void yellow_led_on(void) __attribute__((weak, alias("__yellow_led_on")));
-inline void __yellow_led_off(void) {}
-void yellow_led_off(void) __attribute__((weak, alias("__yellow_led_off")));
-inline void __blue_led_on(void) {}
-void blue_led_on(void) __attribute__((weak, alias("__blue_led_on")));
-inline void __blue_led_off(void) {}
-void blue_led_off(void) __attribute__((weak, alias("__blue_led_off")));
+__weak void coloured_LED_init(void) {}
+__weak void red_led_on(void) {}
+__weak void red_led_off(void) {}
+__weak void green_led_on(void) {}
+__weak void green_led_off(void) {}
+__weak void yellow_led_on(void) {}
+__weak void yellow_led_off(void) {}
+__weak void blue_led_on(void) {}
+__weak void blue_led_off(void) {}
 
 /*
  ************************************************************************
@@ -198,27 +189,21 @@ static int arm_pci_init(void)
  */
 typedef int (init_fnc_t) (void);
 
-void __dram_init_banksize(void)
+__weak void dram_init_banksize(void)
 {
        gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
        gd->bd->bi_dram[0].size =  gd->ram_size;
 }
-void dram_init_banksize(void)
-       __attribute__((weak, alias("__dram_init_banksize")));
 
-int __arch_cpu_init(void)
+__weak int arch_cpu_init(void)
 {
        return 0;
 }
-int arch_cpu_init(void)
-       __attribute__((weak, alias("__arch_cpu_init")));
 
-int __power_init_board(void)
+__weak int power_init_board(void)
 {
        return 0;
 }
-int power_init_board(void)
-       __attribute__((weak, alias("__power_init_board")));
 
        /* Record the board_init_f() bootstage (after arch_cpu_init()) */
 static int mark_bootstage(void)
index 39fe7a17fcff439f672331a90138454498755a45..0d19c8ae2366caee800920d36dce8d79f984b6c2 100644 (file)
@@ -15,6 +15,7 @@
 #include <common.h>
 #include <command.h>
 #include <image.h>
+#include <vxworks.h>
 #include <u-boot/zlib.h>
 #include <asm/byteorder.h>
 #include <libfdt.h>
index f6b7c03578b80e24a9a275bc7fe65f64ebe47666..9019736d2c74bec4da3fa4f97752954666a91ec1 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <common.h>
 #include <asm/proc-armv/ptrace.h>
+#include <asm/u-boot-arm.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
index 2298e3619c4ee0d4e2ff9b9aebc4ed7f785ecac5..6761b141fb82fd42a51f5e47896d1b9bfaed1b7d 100644 (file)
@@ -14,6 +14,7 @@
 #include <asm/arch/hardware.h>
 #include <asm/arch/at91_pmc.h>
 #include <asm/arch/at91_pio.h>
+#include <status_led.h>
 
 /* bit mask in PIO port B */
 #define        GREEN_LED       (1<<0)
index 56d811ca42566e8e3409c461c6dffd7ed3a568bb..fbe15afd281b34d59317d3c40d40f35299253df7 100644 (file)
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/arch/gpio.h>
+#include <status_led.h>
 
 void coloured_LED_init(void)
 {
index 03f055dad2aa4d2ff72b26f36b5a23e01849d6a6..51125df34f018b79a511b44dc49e73a817944a43 100644 (file)
@@ -47,46 +47,19 @@ const struct tegra_sysinfo sysinfo = {
        CONFIG_TEGRA_BOARD_STRING
 };
 
-void __pinmux_init(void)
-{
-}
-
-void pinmux_init(void) __attribute__((weak, alias("__pinmux_init")));
-
-void __pin_mux_usb(void)
-{
-}
-
-void pin_mux_usb(void) __attribute__((weak, alias("__pin_mux_usb")));
-
-void __pin_mux_spi(void)
-{
-}
-
-void pin_mux_spi(void) __attribute__((weak, alias("__pin_mux_spi")));
-
-void __gpio_early_init_uart(void)
-{
-}
-
-void gpio_early_init_uart(void)
-__attribute__((weak, alias("__gpio_early_init_uart")));
+__weak void pinmux_init(void) {}
+__weak void pin_mux_usb(void) {}
+__weak void pin_mux_spi(void) {}
+__weak void gpio_early_init_uart(void) {}
+__weak void pin_mux_display(void) {}
 
 #if defined(CONFIG_TEGRA_NAND)
-void __pin_mux_nand(void)
+__weak void pin_mux_nand(void)
 {
        funcmux_select(PERIPH_ID_NDFLASH, FUNCMUX_DEFAULT);
 }
-
-void pin_mux_nand(void) __attribute__((weak, alias("__pin_mux_nand")));
 #endif
 
-void __pin_mux_display(void)
-{
-}
-
-void pin_mux_display(void) __attribute__((weak, alias("__pin_mux_display")));
-
 /*
  * Routine: power_det_init
  * Description: turn off power detects
@@ -204,12 +177,10 @@ int board_late_init(void)
 }
 
 #if defined(CONFIG_TEGRA_MMC)
-void __pin_mux_mmc(void)
+__weak void pin_mux_mmc(void)
 {
 }
 
-void pin_mux_mmc(void) __attribute__((weak, alias("__pin_mux_mmc")));
-
 /* this is a weak define that we are overriding */
 int board_mmc_init(bd_t *bd)
 {
index 8124f8aafde0671e48d0abe770cedcd6bf868c25..8c62f36a7b04a00b8d05f68405567f9d3e1fd687 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include "emc.h"
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/emc.h>
index 6a243f0aea98cb42b5fd969b16ecd9a361f2aa54..11472ebaf20d1eb385457cf8745322460e7b94bc 100644 (file)
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/arch/tegra.h>
+#include <asm/arch-tegra/board.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/funcmux.h>
 #include <asm/arch/gpio.h>
index e1fc123fcc4ea154cd4e189460a8afb3e1713399..8b4c8e9a9db90f882a1349e1b5c6e1258fc77ce3 100644 (file)
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int __exynos_early_init_f(void)
+__weak int exynos_early_init_f(void)
 {
        return 0;
 }
-int exynos_early_init_f(void)
-       __attribute__((weak, alias("__exynos_early_init_f")));
 
-int __exynos_power_init(void)
+__weak int exynos_power_init(void)
 {
        return 0;
 }
-int exynos_power_init(void)
-       __attribute__((weak, alias("__exynos_power_init")));
 
 #if defined CONFIG_EXYNOS_TMU
 /* Boot Time Thermal Analysis for SoC temperature threshold breach */
index 054e7ccdedf9bf4f222b22ecaab0fa2805b4d68f..a4aed3ba8baf2d3ce742f7c6967f273e61cc5afb 100644 (file)
@@ -16,6 +16,8 @@
 #include <asm/omap_gpio.h>
 #include <asm/arch/mmc_host_def.h>
 #include <i2c.h>
+#include <spl.h>
+#include <mmc.h>
 #include <asm/gpio.h>
 #ifdef CONFIG_USB_EHCI
 #include <usb.h>
index 25fbb55c8e6c126c0ebc0f433f584ccf934aa40b..8f4fe310d7d2b23bef6dd5da1bd2e50c50615d6f 100644 (file)
@@ -8,12 +8,11 @@
 #include <common.h>
 #include <config.h>
 #include <command.h>
+#include <elf.h>
 
 /*
  * FIXME: Add code to test image and it's header.
  */
-extern int valid_elf_image (unsigned long addr);
-
 static int
 image_check(ulong addr)
 {
index e6aa298d5a4e8bc5255f7bcacf2022bc7dbf0f8f..b5bebc9dc862727b7aa2386f64691ace23475cc0 100644 (file)
@@ -128,14 +128,11 @@ int init_func_watchdog_reset(void)
 }
 #endif /* CONFIG_WATCHDOG */
 
-void __board_add_ram_info(int use_default)
+__weak void board_add_ram_info(int use_default)
 {
        /* please define platform specific board_add_ram_info() */
 }
 
-void board_add_ram_info(int)
-       __attribute__ ((weak, alias("__board_add_ram_info")));
-
 static int init_baud_rate(void)
 {
        gd->baudrate = getenv_ulong("baudrate", 10, CONFIG_BAUDRATE);
@@ -221,7 +218,7 @@ static int show_dram_config(void)
        return 0;
 }
 
-void __dram_init_banksize(void)
+__weak void dram_init_banksize(void)
 {
 #if defined(CONFIG_NR_DRAM_BANKS) && defined(CONFIG_SYS_SDRAM_BASE)
        gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
@@ -229,9 +226,6 @@ void __dram_init_banksize(void)
 #endif
 }
 
-void dram_init_banksize(void)
-       __attribute__((weak, alias("__dram_init_banksize")));
-
 #if defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C)
 static int init_func_i2c(void)
 {
index 3affb6362f4531ebd3f313248df1fbd7c588e7bf..7c339008ed2a46b91677d4c4c9e5e97fd58f4a1f 100644 (file)
@@ -60,7 +60,7 @@ DECLARE_GLOBAL_DATA_PTR;
 
 ulong monitor_flash_len;
 
-int __board_flash_wp_on(void)
+__weak int board_flash_wp_on(void)
 {
        /*
         * Most flashes can't be detected when write protection is enabled,
@@ -70,16 +70,10 @@ int __board_flash_wp_on(void)
        return 0;
 }
 
-int board_flash_wp_on(void)
-       __attribute__ ((weak, alias("__board_flash_wp_on")));
-
-void __cpu_secondary_init_r(void)
+__weak void cpu_secondary_init_r(void)
 {
 }
 
-void cpu_secondary_init_r(void)
-       __attribute__ ((weak, alias("__cpu_secondary_init_r")));
-
 static int initr_secondary_cpu(void)
 {
        /*
@@ -370,7 +364,7 @@ static int initr_spi(void)
 
 #ifdef CONFIG_CMD_NAND
 /* go init the NAND */
-int initr_nand(void)
+static int initr_nand(void)
 {
        puts("NAND:  ");
        nand_init();
@@ -380,7 +374,7 @@ int initr_nand(void)
 
 #if defined(CONFIG_CMD_ONENAND)
 /* go init the NAND */
-int initr_onenand(void)
+static int initr_onenand(void)
 {
        puts("NAND:  ");
        onenand_init();
@@ -389,7 +383,7 @@ int initr_onenand(void)
 #endif
 
 #ifdef CONFIG_GENERIC_MMC
-int initr_mmc(void)
+static int initr_mmc(void)
 {
        puts("MMC:   ");
        mmc_initialize(gd->bd);
@@ -398,7 +392,7 @@ int initr_mmc(void)
 #endif
 
 #ifdef CONFIG_HAS_DATAFLASH
-int initr_dataflash(void)
+static int initr_dataflash(void)
 {
        AT91F_DataflashInit();
        dataflash_print_info();
index ab9c7e332d97b200109e09e464b0fb786ac967c6..42a52965c2722282c36e6ebeaa0049c8c21b4c9f 100644 (file)
@@ -14,6 +14,7 @@
  */
 
 #include <common.h>
+#include <bootm.h>
 #include <command.h>
 #include <linux/ctype.h>
 #include <net.h>
@@ -28,8 +29,7 @@ static unsigned long load_elf_image_phdr(unsigned long addr);
 static unsigned long load_elf_image_shdr(unsigned long addr);
 
 /* Allow ports to override the default behavior */
-__attribute__((weak))
-unsigned long do_bootelf_exec(ulong (*entry)(int, char * const[]),
+static unsigned long do_bootelf_exec(ulong (*entry)(int, char * const[]),
                               int argc, char * const argv[])
 {
        unsigned long ret;
index c0cdc5f6fdfd7669d0151c07367f0e974a05f26b..65d6df451c6d4f4c5dc9c26a94a02a536b42386e 100644 (file)
@@ -12,7 +12,7 @@
 #include <dm.h>
 #include <asm/gpio.h>
 
-int __weak name_to_gpio(const char *name)
+__weak int name_to_gpio(const char *name)
 {
        return simple_strtoul(name, NULL, 10);
 }
index 5a2f411600280acd5ba435762083f8394da61377..4695386a332ab867c12df32e938d4976ce7f0115 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <stdarg.h>
+#include <iomux.h>
 #include <malloc.h>
 #include <os.h>
 #include <serial.h>
@@ -621,7 +622,7 @@ inline void dbg(const char *fmt, ...)
 
 }
 #else
-inline void dbg(const char *fmt, ...)
+static inline void dbg(const char *fmt, ...)
 {
 }
 #endif
index 5a734a9321a9400a73ee8024f29bcdb17d546ee6..749605fe3fa89ab798a0ebde92f1f90e4a40fb2b 100644 (file)
@@ -124,7 +124,7 @@ int env_init(void)
  * The legacy NAND code saved the environment in the first NAND device i.e.,
  * nand_dev_desc + 0. This is also the behaviour using the new NAND code.
  */
-int writeenv(size_t offset, u_char *buf)
+static int writeenv(size_t offset, u_char *buf)
 {
        size_t end = offset + CONFIG_ENV_RANGE;
        size_t amount_saved = 0;
@@ -233,7 +233,7 @@ int saveenv(void)
 }
 #endif /* CMD_SAVEENV */
 
-int readenv(size_t offset, u_char *buf)
+static int readenv(size_t offset, u_char *buf)
 {
        size_t end = offset + CONFIG_ENV_RANGE;
        size_t amount_loaded = 0;
index 2016d1e7dda85a34c5d1c787015bd309ed6061da..a272ea2e83456d9a50018ffb1752b0e2016ddcf7 100644 (file)
@@ -1434,7 +1434,7 @@ void fit_conf_print(const void *fit, int noffset, const char *p)
                printf("%s  FDT:          %s\n", p, uname);
 }
 
-int fit_image_select(const void *fit, int rd_noffset, int verify)
+static int fit_image_select(const void *fit, int rd_noffset, int verify)
 {
        fit_image_print(fit, rd_noffset, "   ");
 
index 94afeb290098dc4b1356496ade659d1985fcd143..e81c074f36c60a92e8223eed055e5b022c697ad8 100644 (file)
@@ -105,12 +105,9 @@ static inline void *menu_item_destroy(struct menu *m,
        return NULL;
 }
 
-void __menu_display_statusline(struct menu *m)
+__weak void menu_display_statusline(struct menu *m)
 {
-       return;
 }
-void menu_display_statusline(struct menu *m)
-       __attribute__ ((weak, alias("__menu_display_statusline")));
 
 /*
  * Display a menu so the user can make a choice of an item. First display its
index be54b1011018192327fdc0bcfd368d7285e0fd44..96b10648d869620ddb3e15a819528de0d29ab2e0 100644 (file)
@@ -19,7 +19,7 @@ static inline void mdm_readline(char *buf, int bufsiz)
        for(;;) {
                c = serial_getc();
 
-               /*              dbg("(%c)", c); */
+               debug("(%c)", c);
 
                switch(c) {
                case '\r':
@@ -40,7 +40,6 @@ static inline void mdm_readline(char *buf, int bufsiz)
        }
 }
 
-extern void  dbg(const char *fmt, ...);
 int mdm_init (void)
 {
        char env_str[16];
@@ -66,15 +65,15 @@ int mdm_init (void)
                        serial_puts("\n");
                        for(;;) {
                                mdm_readline(console_buffer, CONFIG_SYS_CBSIZE);
-                               dbg("ini%d: [%s]", i, console_buffer);
+                               debug("ini%d: [%s]", i, console_buffer);
 
                                if ((strcmp(console_buffer, "OK") == 0) ||
                                        (strcmp(console_buffer, "ERROR") == 0)) {
-                                       dbg("ini%d: cmd done", i);
+                                       debug("ini%d: cmd done", i);
                                        break;
                                } else /* in case we are originating call ... */
                                        if (strncmp(console_buffer, "CONNECT", 7) == 0) {
-                                               dbg("ini%d: connect", i);
+                                               debug("ini%d: connect", i);
                                                return 0;
                                        }
                        }
@@ -90,9 +89,9 @@ int mdm_init (void)
        for(;i > 1;) { /* if 'i' > 1 - wait for connection
                                  message from modem */
                mdm_readline(console_buffer, CONFIG_SYS_CBSIZE);
-               dbg("ini_f: [%s]", console_buffer);
+               debug("ini_f: [%s]", console_buffer);
                if (strncmp(console_buffer, "CONNECT", 7) == 0) {
-                       dbg("ini_f: connected");
+                       debug("ini_f: connected");
                        return 0;
                }
        }
index 82328150cba17ceb382c1ee111595c41b8fbde00..68c595d2d79c292e3ac9b93ae55b0b22bf0e27f0 100644 (file)
@@ -39,39 +39,39 @@ char *stdio_names[MAX_FILES] = { "stdin", "stdout", "stderr" };
 #endif
 
 #ifdef CONFIG_SYS_DEVICE_NULLDEV
-void nulldev_putc(struct stdio_dev *dev, const char c)
+static void nulldev_putc(struct stdio_dev *dev, const char c)
 {
        /* nulldev is empty! */
 }
 
-void nulldev_puts(struct stdio_dev *dev, const char *s)
+static void nulldev_puts(struct stdio_dev *dev, const char *s)
 {
        /* nulldev is empty! */
 }
 
-int nulldev_input(struct stdio_dev *dev)
+static int nulldev_input(struct stdio_dev *dev)
 {
        /* nulldev is empty! */
        return 0;
 }
 #endif
 
-void stdio_serial_putc(struct stdio_dev *dev, const char c)
+static void stdio_serial_putc(struct stdio_dev *dev, const char c)
 {
        serial_putc(c);
 }
 
-void stdio_serial_puts(struct stdio_dev *dev, const char *s)
+static void stdio_serial_puts(struct stdio_dev *dev, const char *s)
 {
        serial_puts(s);
 }
 
-int stdio_serial_getc(struct stdio_dev *dev)
+static int stdio_serial_getc(struct stdio_dev *dev)
 {
        return serial_getc();
 }
 
-int stdio_serial_tstc(struct stdio_dev *dev)
+static int stdio_serial_tstc(struct stdio_dev *dev)
 {
        return serial_tstc();
 }
index cfd77b0ff567cbacd4f5a3e6223e2edeb28fbd69..43485c9148b0f404e91cb0f45f9a3c76b2267578 100644 (file)
@@ -57,7 +57,7 @@ static const struct block_drvr block_drvr[] = {
 DECLARE_GLOBAL_DATA_PTR;
 
 #ifdef HAVE_BLOCK_DEVICE
-block_dev_desc_t *get_dev_hwpart(const char *ifname, int dev, int hwpart)
+static block_dev_desc_t *get_dev_hwpart(const char *ifname, int dev, int hwpart)
 {
        const struct block_drvr *drvr = block_drvr;
        block_dev_desc_t* (*reloc_get_dev)(int dev);
index 4fca0894e67f3ca0a088dcb214b17df3d9d97c0b..43b27e3fea1bc86f5fbef46f969a7f8ff0322286 100644 (file)
@@ -36,7 +36,7 @@ void __set_direction(unsigned pin, int input)
        u = readl(GPIO_IO_CONF(pin));
 }
 
-void __set_level(unsigned pin, int high)
+static void __set_level(unsigned pin, int high)
 {
        u32 u;
 
@@ -48,7 +48,7 @@ void __set_level(unsigned pin, int high)
        writel(u, GPIO_OUT(pin));
 }
 
-void __set_blinking(unsigned pin, int blink)
+static void __set_blinking(unsigned pin, int blink)
 {
        u32 u;
 
index c891ebd39e243ebc5540e7db6291ed88f7e84678..e085a7095eaf55ef62bc9c47283bcfe20636740a 100644 (file)
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include "designware_i2c.h"
+#include <i2c.h>
 
 #ifdef CONFIG_I2C_MULTI_BUS
 static unsigned int bus_initialized[CONFIG_SYS_I2C_BUS_MAX];
@@ -76,16 +77,20 @@ static void set_speed(int i2c_spd)
  *
  * Set the i2c speed.
  */
-int i2c_set_bus_speed(int speed)
+int i2c_set_bus_speed(unsigned int speed)
 {
+       int i2c_spd;
+
        if (speed >= I2C_MAX_SPEED)
-               set_speed(IC_SPEED_MODE_MAX);
+               i2c_spd = IC_SPEED_MODE_MAX;
        else if (speed >= I2C_FAST_SPEED)
-               set_speed(IC_SPEED_MODE_FAST);
+               i2c_spd = IC_SPEED_MODE_FAST;
        else
-               set_speed(IC_SPEED_MODE_STANDARD);
+               i2c_spd = IC_SPEED_MODE_STANDARD;
 
-       return 0;
+       set_speed(i2c_spd);
+
+       return i2c_spd;
 }
 
 /*
@@ -93,7 +98,7 @@ int i2c_set_bus_speed(int speed)
  *
  * Gets the i2c speed.
  */
-int i2c_get_bus_speed(void)
+unsigned int i2c_get_bus_speed(void)
 {
        u32 cntl;
 
@@ -429,7 +434,7 @@ int i2c_set_bus_num(unsigned int bus)
        return 0;
 }
 
-int i2c_get_bus_num(void)
+unsigned int i2c_get_bus_num(void)
 {
        return current_bus;
 }
index 257b72f0f7cdf71b40afc10a2d18a9d48fdf700d..562211e7deb6504b65a0a3a088ea7572e5cc93b0 100644 (file)
@@ -471,8 +471,8 @@ static void tegra_i2c_init(struct i2c_adapter *adap, int speed, int slaveaddr)
 }
 
 /* i2c write version without the register address */
-int i2c_write_data(struct i2c_bus *bus, uchar chip, uchar *buffer, int len,
-                  bool end_with_repeated_start)
+static int i2c_write_data(struct i2c_bus *bus, uchar chip, uchar *buffer,
+                         int len, bool end_with_repeated_start)
 {
        int rc;
 
@@ -493,7 +493,8 @@ int i2c_write_data(struct i2c_bus *bus, uchar chip, uchar *buffer, int len,
 }
 
 /* i2c read version without the register address */
-int i2c_read_data(struct i2c_bus *bus, uchar chip, uchar *buffer, int len)
+static int i2c_read_data(struct i2c_bus *bus, uchar chip, uchar *buffer,
+                               int len)
 {
        int rc;
 
index 7e36db0a71a0b74ffbf2ff4b3fedd1ac99718241..0ef94f7a00bb26c72bfb2d07b60f63dc9030d77b 100644 (file)
@@ -181,7 +181,7 @@ static void kbd_wait_for_fifo_init(struct keyb *config)
  * @param input                Input configuration
  * @return 1, to indicate that we have something to look at
  */
-int tegra_kbc_check(struct input_config *input)
+static int tegra_kbc_check(struct input_config *input)
 {
        kbd_wait_for_fifo_init(&config);
        check_for_keys(&config);
index 82079d67cd8fc07565e5b8c57cc7e7c8234793b7..92f7d8942f02d1420e397664afcb99b938a3dafc 100644 (file)
@@ -40,6 +40,7 @@
 #include <malloc.h>
 #include <sdhci.h>
 #include <asm/arch/timer.h>
+#include <asm/arch-bcm2835/sdhci.h>
 
 /* 400KHz is max freq for card ID etc. Use that as min */
 #define MIN_FREQ 400000
index 3125d13ba3ce8e8e2552248e41c059bd31e5fb3c..de88e19609f37aaba48665e9bff60f6a7b63f31b 100644 (file)
@@ -124,7 +124,7 @@ static int sdhci_transfer_data(struct sdhci_host *host, struct mmc_data *data,
 #endif
 #define CONFIG_SDHCI_CMD_DEFAULT_TIMEOUT       100
 
-int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd,
+static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd,
                       struct mmc_data *data)
 {
        struct sdhci_host *host = mmc->priv;
@@ -355,7 +355,7 @@ static void sdhci_set_power(struct sdhci_host *host, unsigned short power)
        sdhci_writeb(host, pwr, SDHCI_POWER_CONTROL);
 }
 
-void sdhci_set_ios(struct mmc *mmc)
+static void sdhci_set_ios(struct mmc *mmc)
 {
        u32 ctrl;
        struct sdhci_host *host = mmc->priv;
@@ -393,7 +393,7 @@ void sdhci_set_ios(struct mmc *mmc)
        sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL);
 }
 
-int sdhci_init(struct mmc *mmc)
+static int sdhci_init(struct mmc *mmc)
 {
        struct sdhci_host *host = mmc->priv;
 
index 2642fe2065a16b1e27856b5fe86ee51b686772ec..2bd36b0ee704a86308bfa0d3c7faa68cc506249a 100644 (file)
@@ -13,6 +13,7 @@
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch-tegra/clk_rst.h>
+#include <asm/arch-tegra/mmc.h>
 #include <asm/arch-tegra/tegra_mmc.h>
 #include <mmc.h>
 
@@ -508,7 +509,7 @@ static int tegra_mmc_core_init(struct mmc *mmc)
        return 0;
 }
 
-int tegra_mmc_getcd(struct mmc *mmc)
+static int tegra_mmc_getcd(struct mmc *mmc)
 {
        struct mmc_host *host = mmc->priv;
 
index 9b3175d87fbdabff14d922ce4c64d620b9aa60f4..50983b837b2238b781477f13b559502047b1ad6e 100644 (file)
@@ -63,6 +63,12 @@ flash_info_t flash_info[CFI_MAX_FLASH_BANKS];        /* FLASH chips info */
 #define CONFIG_SYS_FLASH_CFI_WIDTH     FLASH_CFI_8BIT
 #endif
 
+#ifdef CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS
+#define __maybe_weak __weak
+#else
+#define __maybe_weak static
+#endif
+
 /*
  * 0xffff is an undefined value for the configuration register. When
  * this value is returned, the configuration register shall not be
@@ -81,14 +87,12 @@ static u16 cfi_flash_config_reg(int i)
 int cfi_flash_num_flash_banks = CONFIG_SYS_MAX_FLASH_BANKS_DETECT;
 #endif
 
-static phys_addr_t __cfi_flash_bank_addr(int i)
+__weak phys_addr_t cfi_flash_bank_addr(int i)
 {
        return ((phys_addr_t [])CONFIG_SYS_FLASH_BANKS_LIST)[i];
 }
-phys_addr_t cfi_flash_bank_addr(int i)
-       __attribute__((weak, alias("__cfi_flash_bank_addr")));
 
-static unsigned long __cfi_flash_bank_size(int i)
+__weak unsigned long cfi_flash_bank_size(int i)
 {
 #ifdef CONFIG_SYS_FLASH_BANKS_SIZES
        return ((unsigned long [])CONFIG_SYS_FLASH_BANKS_SIZES)[i];
@@ -96,71 +100,49 @@ static unsigned long __cfi_flash_bank_size(int i)
        return 0;
 #endif
 }
-unsigned long cfi_flash_bank_size(int i)
-       __attribute__((weak, alias("__cfi_flash_bank_size")));
 
-static void __flash_write8(u8 value, void *addr)
+__maybe_weak void flash_write8(u8 value, void *addr)
 {
        __raw_writeb(value, addr);
 }
 
-static void __flash_write16(u16 value, void *addr)
+__maybe_weak void flash_write16(u16 value, void *addr)
 {
        __raw_writew(value, addr);
 }
 
-static void __flash_write32(u32 value, void *addr)
+__maybe_weak void flash_write32(u32 value, void *addr)
 {
        __raw_writel(value, addr);
 }
 
-static void __flash_write64(u64 value, void *addr)
+__maybe_weak void flash_write64(u64 value, void *addr)
 {
        /* No architectures currently implement __raw_writeq() */
        *(volatile u64 *)addr = value;
 }
 
-static u8 __flash_read8(void *addr)
+__maybe_weak u8 flash_read8(void *addr)
 {
        return __raw_readb(addr);
 }
 
-static u16 __flash_read16(void *addr)
+__maybe_weak u16 flash_read16(void *addr)
 {
        return __raw_readw(addr);
 }
 
-static u32 __flash_read32(void *addr)
+__maybe_weak u32 flash_read32(void *addr)
 {
        return __raw_readl(addr);
 }
 
-static u64 __flash_read64(void *addr)
+__maybe_weak u64 flash_read64(void *addr)
 {
        /* No architectures currently implement __raw_readq() */
        return *(volatile u64 *)addr;
 }
 
-#ifdef CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS
-void flash_write8(u8 value, void *addr)__attribute__((weak, alias("__flash_write8")));
-void flash_write16(u16 value, void *addr)__attribute__((weak, alias("__flash_write16")));
-void flash_write32(u32 value, void *addr)__attribute__((weak, alias("__flash_write32")));
-void flash_write64(u64 value, void *addr)__attribute__((weak, alias("__flash_write64")));
-u8 flash_read8(void *addr)__attribute__((weak, alias("__flash_read8")));
-u16 flash_read16(void *addr)__attribute__((weak, alias("__flash_read16")));
-u32 flash_read32(void *addr)__attribute__((weak, alias("__flash_read32")));
-u64 flash_read64(void *addr)__attribute__((weak, alias("__flash_read64")));
-#else
-#define flash_write8   __flash_write8
-#define flash_write16  __flash_write16
-#define flash_write32  __flash_write32
-#define flash_write64  __flash_write64
-#define flash_read8    __flash_read8
-#define flash_read16   __flash_read16
-#define flash_read32   __flash_read32
-#define flash_read64   __flash_read64
-#endif
-
 /*-----------------------------------------------------------------------
  */
 #if defined(CONFIG_ENV_IS_IN_FLASH) || defined(CONFIG_ENV_ADDR_REDUND) || (CONFIG_SYS_MONITOR_BASE >= CONFIG_SYS_FLASH_BASE)
index db1599e9a641402e811c9e6172e35909098a0769..40d670563c1e447c172f075eabda3d304433f693 100644 (file)
@@ -75,7 +75,7 @@ static void omap_nand_hwcontrol(struct mtd_info *mtd, int32_t cmd,
 
 #ifdef CONFIG_SPL_BUILD
 /* Check wait pin as dev ready indicator */
-int omap_spl_dev_ready(struct mtd_info *mtd)
+static int omap_spl_dev_ready(struct mtd_info *mtd)
 {
        return gpmc_cfg->status & (1 << 8);
 }
@@ -161,23 +161,6 @@ static int __maybe_unused omap_correct_data(struct mtd_info *mtd, uint8_t *dat,
        return 0;
 }
 
-/*
- * omap_reverse_list - re-orders list elements in reverse order [internal]
- * @list:      pointer to start of list
- * @length:    length of list
-*/
-void omap_reverse_list(u8 *list, unsigned int length)
-{
-       unsigned int i, j;
-       unsigned int half_length = length / 2;
-       u8 tmp;
-       for (i = 0, j = length - 1; i < half_length; i++, j--) {
-               tmp = list[i];
-               list[i] = list[j];
-               list[j] = tmp;
-       }
-}
-
 /*
  * omap_enable_hwecc - configures GPMC as per ECC scheme before read/write
  * @mtd:       MTD device structure
@@ -350,6 +333,23 @@ static int omap_calculate_ecc(struct mtd_info *mtd, const uint8_t *dat,
 }
 
 #ifdef CONFIG_NAND_OMAP_ELM
+/*
+ * omap_reverse_list - re-orders list elements in reverse order [internal]
+ * @list:      pointer to start of list
+ * @length:    length of list
+*/
+static void omap_reverse_list(u8 *list, unsigned int length)
+{
+       unsigned int i, j;
+       unsigned int half_length = length / 2;
+       u8 tmp;
+       for (i = 0, j = length - 1; i < half_length; i++, j--) {
+               tmp = list[i];
+               list[i] = list[j];
+               list[j] = tmp;
+       }
+}
+
 /*
  * omap_correct_data_bch - Compares the ecc read from nand spare area
  * with ECC registers values and corrects one bit error if it has occured
index 439f8ae99e364f2082ceaa2ad5f0630c21e0fe9f..08bc1afcf638be1dbde9e1c23662a829c2bfa298 100644 (file)
@@ -27,6 +27,7 @@
 #include <net.h>
 #include <miiphy.h>
 #include <malloc.h>
+#include <netdev.h>
 #include <linux/compiler.h>
 #include <asm/arch/emac_defs.h>
 #include <asm/io.h>
index 549d6486136204ed644a2c2ecba101d25db303ef..b57247032fa85aaa65ec47c9fcf7668a4cd567df 100644 (file)
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <malloc.h>
 #include <net.h>
+#include <netdev.h>
 #include <miiphy.h>
 #include "fec_mxc.h"
 
@@ -179,13 +180,14 @@ static int fec_mdio_write(struct ethernet_regs *eth, uint8_t phyAddr,
        return 0;
 }
 
-int fec_phy_read(struct mii_dev *bus, int phyAddr, int dev_addr, int regAddr)
+static int fec_phy_read(struct mii_dev *bus, int phyAddr, int dev_addr,
+                       int regAddr)
 {
        return fec_mdio_read(bus->priv, phyAddr, regAddr);
 }
 
-int fec_phy_write(struct mii_dev *bus, int phyAddr, int dev_addr, int regAddr,
-               u16 data)
+static int fec_phy_write(struct mii_dev *bus, int phyAddr, int dev_addr,
+                        int regAddr, u16 data)
 {
        return fec_mdio_write(bus->priv, phyAddr, regAddr, data);
 }
index 1d6c14f2ade7497bc7b2ded23bffce21f250a821..f1ace3c8421004d6ba0b7f2d61051a215c25372b 100644 (file)
@@ -575,7 +575,7 @@ static struct phy_device *phy_device_create(struct mii_dev *bus, int addr,
  * Description: Reads the ID registers of the PHY at @addr on the
  *   @bus, stores it in @phy_id and returns zero on success.
  */
-int __weak get_phy_id(struct mii_dev *bus, int addr, int devad, u32 *phy_id)
+static int get_phy_id(struct mii_dev *bus, int addr, int devad, u32 *phy_id)
 {
        int phy_reg;
 
@@ -785,16 +785,13 @@ int phy_startup(struct phy_device *phydev)
        return 0;
 }
 
-static int __board_phy_config(struct phy_device *phydev)
+__weak int board_phy_config(struct phy_device *phydev)
 {
        if (phydev->drv->config)
                return phydev->drv->config(phydev);
        return 0;
 }
 
-int board_phy_config(struct phy_device *phydev)
-       __attribute__((weak, alias("__board_phy_config")));
-
 int phy_config(struct phy_device *phydev)
 {
        /* Invoke an optional board-specific helper */
index 28859f31612527ccff49ee3fbc69dbbc1caaaa54..60c333e2c0191d5ef8753075669a7edc3af95532 100644 (file)
@@ -572,7 +572,7 @@ const char * pci_class_str(u8 class)
 }
 #endif /* CONFIG_CMD_PCI || CONFIG_PCI_SCAN_SHOW */
 
-int __pci_skip_dev(struct pci_controller *hose, pci_dev_t dev)
+__weak int pci_skip_dev(struct pci_controller *hose, pci_dev_t dev)
 {
        /*
         * Check if pci device should be skipped in configuration
@@ -591,19 +591,15 @@ int __pci_skip_dev(struct pci_controller *hose, pci_dev_t dev)
 
        return 0;
 }
-int pci_skip_dev(struct pci_controller *hose, pci_dev_t dev)
-       __attribute__((weak, alias("__pci_skip_dev")));
 
 #ifdef CONFIG_PCI_SCAN_SHOW
-int __pci_print_dev(struct pci_controller *hose, pci_dev_t dev)
+__weak int pci_print_dev(struct pci_controller *hose, pci_dev_t dev)
 {
        if (dev == PCI_BDF(hose->first_busno, 0, 0))
                return 0;
 
        return 1;
 }
-int pci_print_dev(struct pci_controller *hose, pci_dev_t dev)
-       __attribute__((weak, alias("__pci_print_dev")));
 #endif /* CONFIG_PCI_SCAN_SHOW */
 
 int pci_hose_scan_bus(struct pci_controller *hose, int bus)
index bbe60af627e4c452eb7a76fb6c7552819439dcff..18e41b2302a2181ba6f38c53ecc71c682fb5cad0 100644 (file)
@@ -254,28 +254,28 @@ void serial_initialize(void)
        serial_assign(default_serial_console()->name);
 }
 
-int serial_stub_start(struct stdio_dev *sdev)
+static int serial_stub_start(struct stdio_dev *sdev)
 {
        struct serial_device *dev = sdev->priv;
 
        return dev->start();
 }
 
-int serial_stub_stop(struct stdio_dev *sdev)
+static int serial_stub_stop(struct stdio_dev *sdev)
 {
        struct serial_device *dev = sdev->priv;
 
        return dev->stop();
 }
 
-void serial_stub_putc(struct stdio_dev *sdev, const char ch)
+static void serial_stub_putc(struct stdio_dev *sdev, const char ch)
 {
        struct serial_device *dev = sdev->priv;
 
        dev->putc(ch);
 }
 
-void serial_stub_puts(struct stdio_dev *sdev, const char *str)
+static void serial_stub_puts(struct stdio_dev *sdev, const char *str)
 {
        struct serial_device *dev = sdev->priv;
 
index 144a925394513d38b1677030cb97fcc5f96d84cb..7c1f27137615faa4a56f0b40f567c49a0ff73378 100644 (file)
@@ -122,7 +122,7 @@ static void handle_error(void)
        sci_out(&sh_sci, SCLSR, 0x00);
 }
 
-void serial_raw_putc(const char c)
+static void serial_raw_putc(const char c)
 {
        while (1) {
                /* Tx fifo is empty */
@@ -152,7 +152,7 @@ static int sh_serial_tstc(void)
 }
 
 
-int serial_getc_check(void)
+static int serial_getc_check(void)
 {
        unsigned short status;
 
index 6323c508375af8ce3b98009a85bfbc2f5e8a5564..936d006ba414ca2bfea76ac5ab0b0d5dccc944ab 100644 (file)
@@ -119,15 +119,12 @@ static struct descriptor {
 #define ehci_is_TDI()  (0)
 #endif
 
-int __ehci_get_port_speed(struct ehci_hcor *hcor, uint32_t reg)
+__weak int ehci_get_port_speed(struct ehci_hcor *hcor, uint32_t reg)
 {
        return PORTSC_PSPD(reg);
 }
 
-int ehci_get_port_speed(struct ehci_hcor *hcor, uint32_t reg)
-       __attribute__((weak, alias("__ehci_get_port_speed")));
-
-void __ehci_set_usbmode(int index)
+__weak void ehci_set_usbmode(int index)
 {
        uint32_t tmp;
        uint32_t *reg_ptr;
@@ -141,17 +138,11 @@ void __ehci_set_usbmode(int index)
        ehci_writel(reg_ptr, tmp);
 }
 
-void ehci_set_usbmode(int index)
-       __attribute__((weak, alias("__ehci_set_usbmode")));
-
-void __ehci_powerup_fixup(uint32_t *status_reg, uint32_t *reg)
+__weak void ehci_powerup_fixup(uint32_t *status_reg, uint32_t *reg)
 {
        mdelay(50);
 }
 
-void ehci_powerup_fixup(uint32_t *status_reg, uint32_t *reg)
-       __attribute__((weak, alias("__ehci_powerup_fixup")));
-
 static int handshake(uint32_t *ptr, uint32_t mask, uint32_t done, int usec)
 {
        uint32_t result;
@@ -1323,7 +1314,7 @@ void *poll_int_queue(struct usb_device *dev, struct int_queue *queue)
 }
 
 /* Do not free buffers associated with QHs, they're owned by someone else */
-int
+static int
 destroy_int_queue(struct usb_device *dev, struct int_queue *queue)
 {
        struct ehci_ctrl *ctrl = dev->controller;
index 923192787996f70942b766c1c9086f787ee04e3a..6aa50cb4f966c70d3495ea5588db8b42bb40bcd7 100644 (file)
@@ -944,7 +944,7 @@ static void parse_putc(const char c)
                CURSOR_SET;
 }
 
-void video_putc(struct stdio_dev *dev, const char c)
+static void video_putc(struct stdio_dev *dev, const char c)
 {
 #ifdef CONFIG_CFB_CONSOLE_ANSI
        int i;
@@ -1158,7 +1158,7 @@ void video_putc(struct stdio_dev *dev, const char c)
                flush_cache(VIDEO_FB_ADRS, VIDEO_SIZE);
 }
 
-void video_puts(struct stdio_dev *dev, const char *s)
+static void video_puts(struct stdio_dev *dev, const char *s)
 {
        int count = strlen(s);
 
@@ -1171,14 +1171,11 @@ void video_puts(struct stdio_dev *dev, const char *s)
  * video_set_lut() if they do not support 8 bpp format.
  * Implement weak default function instead.
  */
-void __video_set_lut(unsigned int index, unsigned char r,
+__weak void video_set_lut(unsigned int index, unsigned char r,
                     unsigned char g, unsigned char b)
 {
 }
 
-void video_set_lut(unsigned int, unsigned char, unsigned char, unsigned char)
-       __attribute__ ((weak, alias("__video_set_lut")));
-
 #if defined(CONFIG_CMD_BMP) || defined(CONFIG_SPLASH_SCREEN)
 
 #define FILL_8BIT_332RGB(r,g,b)        {                       \
@@ -2240,15 +2237,12 @@ static int video_init(void)
  * Implement a weak default function for boards that optionally
  * need to skip the video initialization.
  */
-int __board_video_skip(void)
+__weak int board_video_skip(void)
 {
        /* As default, don't skip test */
        return 0;
 }
 
-int board_video_skip(void)
-       __attribute__ ((weak, alias("__board_video_skip")));
-
 int drv_video_init(void)
 {
        int skip_dev_init;
index 180a3b41499dba25c9815adb57345678772482fa..be35b982acd12f6019281248145a06124a483720 100644 (file)
@@ -58,54 +58,38 @@ static void exynos_lcd_init(vidinfo_t *vid)
        lcd_set_flush_dcache(1);
 }
 
-void __exynos_cfg_lcd_gpio(void)
+__weak void exynos_cfg_lcd_gpio(void)
 {
 }
-void exynos_cfg_lcd_gpio(void)
-       __attribute__((weak, alias("__exynos_cfg_lcd_gpio")));
 
-void __exynos_backlight_on(unsigned int onoff)
+__weak void exynos_backlight_on(unsigned int onoff)
 {
 }
-void exynos_backlight_on(unsigned int onoff)
-       __attribute__((weak, alias("__exynos_cfg_lcd_gpio")));
 
-void __exynos_reset_lcd(void)
+__weak void exynos_reset_lcd(void)
 {
 }
-void exynos_reset_lcd(void)
-       __attribute__((weak, alias("__exynos_reset_lcd")));
 
-void __exynos_lcd_power_on(void)
+__weak void exynos_lcd_power_on(void)
 {
 }
-void exynos_lcd_power_on(void)
-       __attribute__((weak, alias("__exynos_lcd_power_on")));
 
-void __exynos_cfg_ldo(void)
+__weak void exynos_cfg_ldo(void)
 {
 }
-void exynos_cfg_ldo(void)
-       __attribute__((weak, alias("__exynos_cfg_ldo")));
 
-void __exynos_enable_ldo(unsigned int onoff)
+__weak void exynos_enable_ldo(unsigned int onoff)
 {
 }
-void exynos_enable_ldo(unsigned int onoff)
-       __attribute__((weak, alias("__exynos_enable_ldo")));
 
-void __exynos_backlight_reset(void)
+__weak void exynos_backlight_reset(void)
 {
 }
-void exynos_backlight_reset(void)
-       __attribute__((weak, alias("__exynos_backlight_reset")));
 
-int __exynos_lcd_misc_init(vidinfo_t *vid)
+__weak int exynos_lcd_misc_init(vidinfo_t *vid)
 {
        return 0;
 }
-int exynos_lcd_misc_init(vidinfo_t *vid)
-       __attribute__((weak, alias("__exynos_lcd_misc_init")));
 
 static void lcd_panel_on(vidinfo_t *vid)
 {
index 8d4e9254784d8d89050f3b20bbf6ac75486fe66e..5873531953316a25799c020206328bd84280b97d 100644 (file)
@@ -379,7 +379,7 @@ static struct clk pixel_clk[] = {
 /*
  * This function resets IPU
  */
-void ipu_reset(void)
+static void ipu_reset(void)
 {
        u32 *reg;
        u32 value;
index 48fee992a180029b4adbe30e53b9f39491acde79..4faeafb6351d4d3e75376e704b479ebad4a3c6b3 100644 (file)
@@ -377,7 +377,7 @@ static struct dp_csc_param_t dp_csc_array[CSC_NUM][CSC_NUM] = {
 static enum csc_type_t fg_csc_type = CSC_NONE, bg_csc_type = CSC_NONE;
 static int color_key_4rgb = 1;
 
-void ipu_dp_csc_setup(int dp, struct dp_csc_param_t dp_csc_param,
+static void ipu_dp_csc_setup(int dp, struct dp_csc_param_t dp_csc_param,
                        unsigned char srm_mode_update)
 {
        u32 reg;
@@ -605,17 +605,6 @@ void ipu_dc_uninit(int dc_chan)
        }
 }
 
-int ipu_chan_is_interlaced(ipu_channel_t channel)
-{
-       if (channel == MEM_DC_SYNC)
-               return !!(__raw_readl(DC_WR_CH_CONF_1) &
-                         DC_WR_CH_CONF_FIELD_MODE);
-       else if ((channel == MEM_BG_SYNC) || (channel == MEM_FG_SYNC))
-               return !!(__raw_readl(DC_WR_CH_CONF_5) &
-                         DC_WR_CH_CONF_FIELD_MODE);
-       return 0;
-}
-
 void ipu_dp_dc_enable(ipu_channel_t channel)
 {
        int di;
@@ -782,7 +771,7 @@ void ipu_init_dc_mappings(void)
        ipu_dc_map_config(4, 2, 21, 0xFC);
 }
 
-int ipu_pixfmt_to_map(uint32_t fmt)
+static int ipu_pixfmt_to_map(uint32_t fmt)
 {
        switch (fmt) {
        case IPU_PIX_FMT_GENERIC:
index b20c19c426d5cb0e1baaea409cc7c361bac0979c..1fa95314fc4621857114bcef2e98e50a60f163b7 100644 (file)
@@ -36,7 +36,7 @@ static struct fb_videomode const *gmode;
 static uint8_t gdisp;
 static uint32_t gpixfmt;
 
-void fb_videomode_to_var(struct fb_var_screeninfo *var,
+static void fb_videomode_to_var(struct fb_var_screeninfo *var,
                         const struct fb_videomode *mode)
 {
        var->xres = mode->xres;
index 4ec411b37285355e5e289aa560b442e4c7fb9743..f81b51aa301feec3f13dc787c95626c2f84012a8 100644 (file)
@@ -257,4 +257,6 @@ const char *gpio_get_bank_info(struct udevice *dev, int *offset_count);
 int gpio_lookup_name(const char *name, struct udevice **devp,
                     unsigned int *offsetp, unsigned int *gpiop);
 
+int name_to_gpio(const char *name);
+
 #endif /* _ASM_GENERIC_GPIO_H_ */
index 694d6fc080fcc5c1b6759f6e74bdf7ba9a328755..b3d1a620daeaf0041679e5caef49adbb0be4e2e8 100644 (file)
@@ -54,4 +54,6 @@ int bootm_find_ramdisk_fdt(int flag, int argc, char * const argv[]);
 int do_bootm_states(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
                    int states, bootm_headers_t *images, int boot_progress);
 
+void arch_preboot_os(void);
+
 #endif
index b8ecc41063b3e5b366f1688d60a32dd4f8e914fa..63d93416a3e1246975bd390b8990b6067c350f97 100644 (file)
@@ -570,4 +570,6 @@ unsigned long elf_hash(const unsigned char *name);
    that may still be in object files.  */
 #define R_PPC_TOC16             255
 
+int valid_elf_image(unsigned long addr);
+
 #endif /* _ELF_H */
index c3d1fbcf3566451419bff1a325a870a945743475..55cef94358bcd9ed1db349493941addc901d1ff4 100644 (file)
@@ -144,6 +144,8 @@ static inline u64 of_read_number(const fdt32_t *cell, int size)
 
 void of_bus_default_count_cells(void *blob, int parentoffset,
                                        int *addrc, int *sizec);
+int ft_verify_fdt(void *fdt);
+int arch_fixup_memory_node(void *blob);
 
 #endif /* ifdef CONFIG_OF_LIBFDT */
 
index c2a48e0b37853bedfcf36ed9640bf4d850778084..d5e05e97cb2fb12dc68794a2f1032eb366c79f18 100644 (file)
@@ -23,6 +23,7 @@ extern ulong ide_bus_offset[];
 #define LED_IDE2       0x02
 #define        DEVICE_LED(d)   ((d & 2) | ((d & 2) == 0)) /* depends on bit positions! */
 
+void ide_led(uchar led, uchar status);
 #endif /* CONFIG_IDE_LED */
 
 #ifdef CONFIG_SYS_64BIT_LBA
index 8e44855712c33be990b02ff0db8f70f67110d08d..96348d617fca34c4abfbf00759a84b8178d8aae9 100644 (file)
@@ -20,6 +20,10 @@ extern __kernel_size_t strspn(const char *,const char *);
  */
 #include <asm/string.h>
 
+#ifndef __HAVE_ARCH_BCOPY
+char *bcopy(const char *src, char *dest, int count);
+#endif
+
 #ifndef __HAVE_ARCH_STRCPY
 extern char * strcpy(char *,const char *);
 #endif
@@ -89,6 +93,9 @@ extern void * memchr(const void *,int,__kernel_size_t);
 void *memchr_inv(const void *, int, size_t);
 #endif
 
+unsigned long ustrtoul(const char *cp, char **endp, unsigned int base);
+unsigned long long ustrtoull(const char *cp, char **endp, unsigned int base);
+
 #ifdef __cplusplus
 }
 #endif
index 7f5f9bc8ca86eb92614c24f951991f05d9dd64e5..d74a190eea066684a072e477a9fe52fb6640b20d 100644 (file)
@@ -387,6 +387,7 @@ int mmc_legacy_init(int verbose);
 
 int board_mmc_init(bd_t *bis);
 int cpu_mmc_init(bd_t *bis);
+int mmc_get_env_addr(struct mmc *mmc, int copy, u32 *env_addr);
 
 /* Set block count limit because of 16 bit register limit on some hardware*/
 #ifndef CONFIG_SYS_MMC_MAX_BLK_COUNT
index a7e41da7fd4980ef2362816a63d8680cc26ef1b9..cee251faf7dcec67794b0d24f3e2b4a9fea514fb 100644 (file)
@@ -72,6 +72,8 @@ void spl_sata_load_image(void);
 int spl_load_image_fat(block_dev_desc_t *block_dev, int partition, const char *filename);
 int spl_load_image_fat_os(block_dev_desc_t *block_dev, int partition);
 
+void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image);
+
 #ifdef CONFIG_SPL_BOARD_INIT
 void spl_board_init(void);
 #endif
index 41a2be463565c6b519841902cba45b43839ef69a..031f0e1ac895289f772fb4bf538626ff065d1106 100644 (file)
--- a/lib/lmb.c
+++ b/lib/lmb.c
@@ -236,7 +236,7 @@ long lmb_reserve(struct lmb *lmb, phys_addr_t base, phys_size_t size)
        return lmb_add_region(_rgn, base, size);
 }
 
-long lmb_overlaps_region(struct lmb_region *rgn, phys_addr_t base,
+static long lmb_overlaps_region(struct lmb_region *rgn, phys_addr_t base,
                                phys_size_t size)
 {
        unsigned long i;
index 76ffa05608adcaffb9bf3f888b4983a6a17cfcd4..eac4f7b3d0ed602c852d0f47dd9580670f8292da 100644 (file)
--- a/net/eth.c
+++ b/net/eth.c
@@ -153,7 +153,7 @@ static void eth_current_changed(void)
                setenv("ethact", NULL);
 }
 
-int eth_address_set(unsigned char *addr)
+static int eth_address_set(unsigned char *addr)
 {
        return memcmp(addr, "\0\0\0\0\0\0", 6);
 }
index 4af5355fa5a20f9c2e763f37b269bea38d43e8ea..4194edb89e86fe2db008767dd33bd7faf4e32b79 100644 (file)
@@ -52,7 +52,7 @@ int post_init_f(void)
  * Boards with hotkey support can override this weak default function
  * by defining one in their board specific code.
  */
-int __post_hotkeys_pressed(void)
+__weak int post_hotkeys_pressed(void)
 {
 #ifdef CONFIG_SYS_POST_HOTKEYS_GPIO
        int ret;
@@ -73,9 +73,6 @@ int __post_hotkeys_pressed(void)
 
        return 0;       /* No hotkeys supported */
 }
-int post_hotkeys_pressed(void)
-       __attribute__((weak, alias("__post_hotkeys_pressed")));
-
 
 void post_bootmode_init(void)
 {
@@ -236,11 +233,9 @@ static void post_get_flags(int *test_flags)
                        test_flags[j] |= POST_SLOWTEST;
 }
 
-void __show_post_progress(unsigned int test_num, int before, int result)
+__weak void show_post_progress(unsigned int test_num, int before, int result)
 {
 }
-void show_post_progress(unsigned int, int, int)
-                       __attribute__((weak, alias("__show_post_progress")));
 
 static int post_run_single(struct post_test *test,
                                int test_flags, int flags, unsigned int i)