diff --git a/arch/arm/boards/guf-vincell/lowlevel.c b/arch/arm/boards/guf-vincell/lowlevel.c index de706b6..0d2216f 100644 --- a/arch/arm/boards/guf-vincell/lowlevel.c +++ b/arch/arm/boards/guf-vincell/lowlevel.c @@ -113,7 +113,7 @@ writel(PAD_CTL_HYS, iomux + IOMUXC_SW_PAD_CTL_GRP_DDRHYS); } -void disable_watchdog(void) +static void disable_watchdog(void) { /* * configure WDOG to generate external reset on trigger diff --git a/arch/arm/boards/karo-tx6x/board.c b/arch/arm/boards/karo-tx6x/board.c index 31c1c3a..54b1e24 100644 --- a/arch/arm/boards/karo-tx6x/board.c +++ b/arch/arm/boards/karo-tx6x/board.c @@ -54,7 +54,7 @@ { 0x33, rn5t567_pmic_setup, "rn5t567" }, }; -int setup_pmic_voltages(void) +static int setup_pmic_voltages(void) { struct i2c_adapter *adapter; struct i2c_client client; diff --git a/arch/arm/boards/kindle-mx50/board.c b/arch/arm/boards/kindle-mx50/board.c index 089dd8e..fb1d4c9 100644 --- a/arch/arm/boards/kindle-mx50/board.c +++ b/arch/arm/boards/kindle-mx50/board.c @@ -80,7 +80,7 @@ /* The Kindle Kernel expects two custom ATAGs, ATAG_REVISION16 describing * the board and ATAG_SERIAL16 to identify the individual device. */ -struct tag *kindle_mx50_append_atags(struct tag *params) +static struct tag *kindle_mx50_append_atags(struct tag *params) { params = setup_16char_tag(params, ATAG_SERIAL16, get_env_16char_tag("global.board.serial16")); diff --git a/arch/arm/boards/kontron-samx6i/board.c b/arch/arm/boards/kontron-samx6i/board.c index 01826b6..b4b0eac 100644 --- a/arch/arm/boards/kontron-samx6i/board.c +++ b/arch/arm/boards/kontron-samx6i/board.c @@ -23,7 +23,7 @@ #include -resource_size_t samx6i_get_size(void); +#include "mem.h" /* * On this board the SDRAM size is always configured by pin selection. diff --git a/arch/arm/boards/kontron-samx6i/lowlevel.c b/arch/arm/boards/kontron-samx6i/lowlevel.c index 5c35007..9742469 100644 --- a/arch/arm/boards/kontron-samx6i/lowlevel.c +++ b/arch/arm/boards/kontron-samx6i/lowlevel.c @@ -20,7 +20,7 @@ #include #include -resource_size_t samx6i_get_size(void); +#include "mem.h" static inline void setup_uart(void) { diff --git a/arch/arm/boards/kontron-samx6i/mem.c b/arch/arm/boards/kontron-samx6i/mem.c index ab9969e..3b9fbd4 100644 --- a/arch/arm/boards/kontron-samx6i/mem.c +++ b/arch/arm/boards/kontron-samx6i/mem.c @@ -15,6 +15,8 @@ #include #include +#include "mem.h" + #define PCBVERSION_PIN IMX_GPIO_NR(2, 2) #define PCBID0_PIN IMX_GPIO_NR(6, 7) #define PCBID1_PIN IMX_GPIO_NR(6, 9) diff --git a/arch/arm/boards/kontron-samx6i/mem.h b/arch/arm/boards/kontron-samx6i/mem.h new file mode 100644 index 0000000..57e3c0c --- /dev/null +++ b/arch/arm/boards/kontron-samx6i/mem.h @@ -0,0 +1,6 @@ +#ifndef __BOARD_KONTRON_SAMX6I_MEM_H +#define __BOARD_KONTRON_SAMX6I_MEM_H + +resource_size_t samx6i_get_size(void); + +#endif /* __BOARD_KONTRON_SAMX6I_MEM_H */ diff --git a/arch/arm/boards/phytec-som-imx6/board.c b/arch/arm/boards/phytec-som-imx6/board.c index 34a0fe4..4079bc9 100644 --- a/arch/arm/boards/phytec-som-imx6/board.c +++ b/arch/arm/boards/phytec-som-imx6/board.c @@ -97,7 +97,7 @@ return 16 - val; } -int ksz8081_phy_fixup(struct phy_device *phydev) +static int ksz8081_phy_fixup(struct phy_device *phydev) { phy_write(phydev, 0x1f, 0x8190); phy_write(phydev, 0x16, 0x202); diff --git a/arch/arm/cpu/cache.c b/arch/arm/cpu/cache.c index f4781fe..2b6e958 100644 --- a/arch/arm/cpu/cache.c +++ b/arch/arm/cpu/cache.c @@ -4,6 +4,8 @@ #include #include +#include "mmu.h" + struct cache_fns { void (*dma_clean_range)(unsigned long start, unsigned long end); void (*dma_flush_range)(unsigned long start, unsigned long end); @@ -55,6 +57,8 @@ cache_fns->dma_inv_range(start, end); } +#ifdef CONFIG_MMU + void __mmu_cache_on(void) { if (cache_fns) @@ -75,6 +79,8 @@ outer_cache.flush_all(); } +#endif + int arm_set_cache_functions(void) { switch (cpu_architecture()) { diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c index f6c44e3..fc48376 100644 --- a/arch/arm/cpu/mmu.c +++ b/arch/arm/cpu/mmu.c @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -497,7 +498,7 @@ __mmu_cache_off(); } -static void *dma_alloc(size_t size, dma_addr_t *dma_handle, unsigned flags) +static void *dma_alloc_map(size_t size, dma_addr_t *dma_handle, unsigned flags) { void *ret; @@ -515,12 +516,12 @@ void *dma_alloc_coherent(size_t size, dma_addr_t *dma_handle) { - return dma_alloc(size, dma_handle, MAP_UNCACHED); + return dma_alloc_map(size, dma_handle, MAP_UNCACHED); } void *dma_alloc_writecombine(size_t size, dma_addr_t *dma_handle) { - return dma_alloc(size, dma_handle, ARCH_MAP_WRITECOMBINE); + return dma_alloc_map(size, dma_handle, ARCH_MAP_WRITECOMBINE); } unsigned long virt_to_phys(volatile void *virt) diff --git a/arch/arm/include/asm/barebox-arm.h b/arch/arm/include/asm/barebox-arm.h index bd355f6..c0c749a 100644 --- a/arch/arm/include/asm/barebox-arm.h +++ b/arch/arm/include/asm/barebox-arm.h @@ -166,6 +166,8 @@ } #define ENTRY_FUNCTION(name, arg0, arg1, arg2) \ + void name (uint32_t r0, uint32_t r1, uint32_t r2); \ + \ static void __##name(uint32_t, uint32_t, uint32_t); \ \ void NAKED __section(.text_head_entry_##name) name \ diff --git a/arch/arm/lib32/armlinux.c b/arch/arm/lib32/armlinux.c index 2520fe2..c970f02 100644 --- a/arch/arm/lib32/armlinux.c +++ b/arch/arm/lib32/armlinux.c @@ -57,7 +57,7 @@ armlinux_architecture = architecture; } -int armlinux_get_architecture(void) +static int armlinux_get_architecture(void) { getenv_uint("armlinux_architecture", &armlinux_architecture); @@ -70,7 +70,7 @@ armlinux_system_rev = rev; } -unsigned int armlinux_get_revision(void) +static unsigned int armlinux_get_revision(void) { getenv_uint("armlinux_system_rev", &armlinux_system_rev); @@ -83,7 +83,7 @@ armlinux_system_serial = serial; } -u64 armlinux_get_serial(void) +static u64 armlinux_get_serial(void) { getenv_ull("armlinux_system_serial", &armlinux_system_serial); diff --git a/arch/arm/lib32/unwind.c b/arch/arm/lib32/unwind.c index c3dca5b..fd4b0b2 100644 --- a/arch/arm/lib32/unwind.c +++ b/arch/arm/lib32/unwind.c @@ -4,6 +4,10 @@ #include #include +void __aeabi_unwind_cpp_pr0(void); +void __aeabi_unwind_cpp_pr1(void); +void __aeabi_unwind_cpp_pr2(void); + /* Dummy functions to avoid linker complaints */ void __aeabi_unwind_cpp_pr0(void) { @@ -54,7 +58,8 @@ return 0; } -void dump_backtrace_entry(unsigned long where, unsigned long from, unsigned long frame) +static void dump_backtrace_entry(unsigned long where, unsigned long from, + unsigned long frame) { #ifdef CONFIG_KALLSYMS printk("[<%08lx>] (%pS) from [<%08lx>] (%pS)\n", where, (void *)where, from, (void *)from); diff --git a/arch/arm/mach-imx/cpu_init.c b/arch/arm/mach-imx/cpu_init.c index dfbd5ba..f0d009d 100644 --- a/arch/arm/mach-imx/cpu_init.c +++ b/arch/arm/mach-imx/cpu_init.c @@ -15,6 +15,7 @@ #include #include #include +#include #ifdef CONFIG_CPU_32 void imx5_cpu_lowlevel_init(void) diff --git a/common/ratp/ratp.c b/common/ratp/ratp.c index fae9cec..9aea178 100644 --- a/common/ratp/ratp.c +++ b/common/ratp/ratp.c @@ -72,7 +72,7 @@ } EXPORT_SYMBOL(register_ratp_command); -struct ratp_command *find_ratp_request(uint16_t request_id) +static struct ratp_command *find_ratp_request(uint16_t request_id) { struct ratp_command *cmdtp; diff --git a/drivers/clk/imx/clk-imx5.c b/drivers/clk/imx/clk-imx5.c index edebd25..ae94e07 100644 --- a/drivers/clk/imx/clk-imx5.c +++ b/drivers/clk/imx/clk-imx5.c @@ -279,7 +279,7 @@ clks[IMX5_CLK_IPU_SEL] = imx_clk_mux("ipu_sel", regs + CCM_CBCMR, 6, 2, ipu_sel, ARRAY_SIZE(ipu_sel)); } -int __init mx50_clocks_init(struct device_d *dev, void __iomem *regs) +static int __init mx50_clocks_init(struct device_d *dev, void __iomem *regs) { clks[IMX5_CLK_PLL1_SW] = imx_clk_pllv2("pll1_sw", "osc", (void *)MX50_PLL1_BASE_ADDR); @@ -366,7 +366,7 @@ clkdev_add_physbase(clks[IMX5_CLK_IPU_DI1_SEL], MX51_IPU_BASE_ADDR, "di1"); } -int __init mx51_clocks_init(struct device_d *dev, void __iomem *regs) +static int __init mx51_clocks_init(struct device_d *dev, void __iomem *regs) { clks[IMX5_CLK_PLL1_SW] = imx_clk_pllv2("pll1_sw", "osc", (void *)MX51_PLL1_BASE_ADDR); clks[IMX5_CLK_PLL2_SW] = imx_clk_pllv2("pll2_sw", "osc", (void *)MX51_PLL2_BASE_ADDR); @@ -454,7 +454,7 @@ clkdev_add_physbase(clks[IMX5_CLK_IPU_DI1_SEL], MX53_IPU_BASE_ADDR, "di1"); } -int __init mx53_clocks_init(struct device_d *dev, void __iomem *regs) +static int __init mx53_clocks_init(struct device_d *dev, void __iomem *regs) { clks[IMX5_CLK_PLL1_SW] = imx_clk_pllv2("pll1_sw", "osc", (void *)MX53_PLL1_BASE_ADDR); clks[IMX5_CLK_PLL2_SW] = imx_clk_pllv2("pll2_sw", "osc", (void *)MX53_PLL2_BASE_ADDR); diff --git a/drivers/mtd/nand/nand_mxs.c b/drivers/mtd/nand/nand_mxs.c index 0e0f5e6..28a07d4 100644 --- a/drivers/mtd/nand/nand_mxs.c +++ b/drivers/mtd/nand/nand_mxs.c @@ -1259,7 +1259,7 @@ /* * Allocate DMA buffers */ -int mxs_nand_alloc_buffers(struct mxs_nand_info *nand_info) +static int mxs_nand_alloc_buffers(struct mxs_nand_info *nand_info) { uint8_t *buf; const int size = NAND_MAX_PAGESIZE + NAND_MAX_OOBSIZE; @@ -1293,7 +1293,7 @@ /* * Initializes the NFC hardware. */ -int mxs_nand_hw_init(struct mxs_nand_info *info) +static int mxs_nand_hw_init(struct mxs_nand_info *info) { void __iomem *gpmi_regs = info->io_base; void __iomem *bch_regs = info->bch_base; diff --git a/drivers/nvmem/ocotp.c b/drivers/nvmem/ocotp.c index c2d2982..ba35bef 100644 --- a/drivers/nvmem/ocotp.c +++ b/drivers/nvmem/ocotp.c @@ -184,7 +184,7 @@ return 0; } -int imx6_ocotp_read_one_u32(struct ocotp_priv *priv, u32 index, u32 *pdata) +static int imx6_ocotp_read_one_u32(struct ocotp_priv *priv, u32 index, u32 *pdata) { int ret; @@ -257,7 +257,7 @@ return imx6_ocotp_wait_busy(priv, OCOTP_CTRL_RELOAD_SHADOWS); } -int imx6_ocotp_blow_one_u32(struct ocotp_priv *priv, u32 index, u32 data, +static int imx6_ocotp_blow_one_u32(struct ocotp_priv *priv, u32 index, u32 data, u32 *pfused_value) { int ret; diff --git a/drivers/usb/otg/ulpi.c b/drivers/usb/otg/ulpi.c index 6fef5f2..9bc432f 100644 --- a/drivers/usb/otg/ulpi.c +++ b/drivers/usb/otg/ulpi.c @@ -164,7 +164,7 @@ return 0; } -int ulpi_probe(void __iomem *view) +static int ulpi_probe(void __iomem *view) { int i, j, vid, pid, ret; @@ -187,7 +187,7 @@ return -ENODEV; } -int ulpi_set_vbus(void __iomem *view, int on) +static int ulpi_set_vbus(void __iomem *view, int on) { int ret; diff --git a/drivers/video/imx-ipu-v3/ipufb.c b/drivers/video/imx-ipu-v3/ipufb.c index 9597eda..683f298 100644 --- a/drivers/video/imx-ipu-v3/ipufb.c +++ b/drivers/video/imx-ipu-v3/ipufb.c @@ -101,7 +101,7 @@ return 0; } -int ipu_crtc_mode_set(struct ipufb_info *fbi, +static int ipu_crtc_mode_set(struct ipufb_info *fbi, struct fb_videomode *mode, int x, int y) { diff --git a/fs/fs.c b/fs/fs.c index eed0155..45750f7 100644 --- a/fs/fs.c +++ b/fs/fs.c @@ -93,7 +93,7 @@ LIST_HEAD(fs_device_list); -struct vfsmount *mntget(struct vfsmount *mnt) +static struct vfsmount *mntget(struct vfsmount *mnt) { if (!mnt) return NULL; @@ -103,7 +103,7 @@ return mnt; } -void mntput(struct vfsmount *mnt) +static void mntput(struct vfsmount *mnt) { if (!mnt) return; @@ -111,7 +111,7 @@ mnt->ref--; } -struct vfsmount *lookup_mnt(struct path *path) +static struct vfsmount *lookup_mnt(struct path *path) { struct fs_device_d *fsdev; @@ -181,7 +181,7 @@ return 0; } -int create(struct dentry *dir, struct dentry *dentry) +static int create(struct dentry *dir, struct dentry *dentry) { struct inode *inode; @@ -609,7 +609,7 @@ return 0; } -void dentry_kill(struct dentry *dentry) +static void dentry_kill(struct dentry *dentry) { if (dentry->d_inode) iput(dentry->d_inode); @@ -622,7 +622,7 @@ free(dentry); } -int dentry_delete_subtree(struct super_block *sb, struct dentry *parent) +static int dentry_delete_subtree(struct super_block *sb, struct dentry *parent) { struct dentry *dentry, *tmp; @@ -1158,7 +1158,7 @@ * available. On a success the dentry is returned. The name passed in is * copied and the copy passed in may be reused after this call. */ -struct dentry *__d_alloc(struct super_block *sb, const struct qstr *name) +static struct dentry *__d_alloc(struct super_block *sb, const struct qstr *name) { struct dentry *dentry; @@ -1198,7 +1198,7 @@ * available. On a success the dentry is returned. The name passed in is * copied and the copy passed in may be reused after this call. */ -struct dentry *d_alloc(struct dentry *parent, const struct qstr *name) +static struct dentry *d_alloc(struct dentry *parent, const struct qstr *name) { struct dentry *dentry = __d_alloc(parent->d_sb, name); if (!dentry) @@ -1271,7 +1271,7 @@ return strncmp(dentry->d_name.name, name->name, name->len) == 0; } -struct dentry *d_lookup(const struct dentry *parent, const struct qstr *name) +static struct dentry *d_lookup(const struct dentry *parent, const struct qstr *name) { struct dentry *dentry; @@ -1287,7 +1287,7 @@ return NULL; } -void d_invalidate(struct dentry *dentry) +static void d_invalidate(struct dentry *dentry) { } @@ -1393,13 +1393,13 @@ p->total_link_count = 0; } -void path_get(const struct path *path) +static void path_get(const struct path *path) { mntget(path->mnt); dget(path->dentry); } -void path_put(const struct path *path) +static void path_put(const struct path *path) { dput(path->dentry); mntput(path->mnt); @@ -1582,7 +1582,7 @@ * Return 1 if we went up a level and 0 if we were already at the * root. */ -int follow_up(struct path *path) +static int follow_up(struct path *path) { struct vfsmount *parent, *mnt = path->mnt; struct dentry *mountpoint; @@ -1774,7 +1774,7 @@ return len; } -struct filename *getname(const char *filename) +static struct filename *getname(const char *filename) { struct filename *result; @@ -1793,7 +1793,7 @@ return result; } -void putname(struct filename *name) +static void putname(struct filename *name) { BUG_ON(name->refcnt <= 0); @@ -2140,7 +2140,7 @@ return fsdev; } -int vfs_rmdir(struct inode *dir, struct dentry *dentry) +static int vfs_rmdir(struct inode *dir, struct dentry *dentry) { int error; @@ -2164,7 +2164,7 @@ return error; } -int vfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) +static int vfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) { int error; @@ -2423,7 +2423,7 @@ } EXPORT_SYMBOL(unlink); -int vfs_symlink(struct inode *dir, struct dentry *dentry, const char *oldname) +static int vfs_symlink(struct inode *dir, struct dentry *dentry, const char *oldname) { if (!dir->i_op->symlink) return -EPERM; diff --git a/include/dma-dir.h b/include/dma-dir.h index ba107f1..970764c 100644 --- a/include/dma-dir.h +++ b/include/dma-dir.h @@ -1,6 +1,11 @@ +#ifndef __DMA_DIR_H +#define __DMA_DIR_H + enum dma_data_direction { DMA_BIDIRECTIONAL = 0, DMA_TO_DEVICE = 1, DMA_FROM_DEVICE = 2, DMA_NONE = 3, }; + +#endif /* __DMA_DIR_H */