diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-06-22 16:42:04 +0900 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-06-25 06:06:09 +0900 |
commit | 1d21e1b97c39d7a6e40a22d3a4153231cf4296af (patch) | |
tree | b8d34671f07132e3c01da799977ff52973744584 /arch | |
parent | 431c66a3bad13e13c1d44ef4ec3638f95e72e11d (diff) | |
download | u-boot-1d21e1b97c39d7a6e40a22d3a4153231cf4296af.zip u-boot-1d21e1b97c39d7a6e40a22d3a4153231cf4296af.tar.gz u-boot-1d21e1b97c39d7a6e40a22d3a4153231cf4296af.tar.bz2 |
ARM: uniphier: fix various sparse warnings
Fix warnings reported by sparse:
- ... was not declared. Should it be static?"
- cast to restricted __be32
While fixing those, the type conflict of cci500_init() was found.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-uniphier/arm64/arm-cci500.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/arm64/smp_kick_cpus.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/board_init.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/clk/pll-pxs3.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/dram/umc-ld11.c | 14 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/dram/umc-pxs2.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/dram_init.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/init.h | 2 |
8 files changed, 17 insertions, 10 deletions
diff --git a/arch/arm/mach-uniphier/arm64/arm-cci500.c b/arch/arm/mach-uniphier/arm64/arm-cci500.c index f18595d..bf0fad4 100644 --- a/arch/arm/mach-uniphier/arm64/arm-cci500.c +++ b/arch/arm/mach-uniphier/arm64/arm-cci500.c @@ -11,6 +11,8 @@ #include <linux/io.h> #include <linux/sizes.h> +#include "../init.h" + #define CCI500_BASE 0x5FD00000 #define CCI500_SLAVE_OFFSET 0x1000 diff --git a/arch/arm/mach-uniphier/arm64/smp_kick_cpus.c b/arch/arm/mach-uniphier/arm64/smp_kick_cpus.c index 4f08963..8e5b198 100644 --- a/arch/arm/mach-uniphier/arm64/smp_kick_cpus.c +++ b/arch/arm/mach-uniphier/arm64/smp_kick_cpus.c @@ -8,6 +8,8 @@ #include <linux/io.h> #include <linux/sizes.h> +#include "../init.h" + #define UNIPHIER_SMPCTRL_ROM_RSV0 0x59801200 void uniphier_smp_setup(void); diff --git a/arch/arm/mach-uniphier/board_init.c b/arch/arm/mach-uniphier/board_init.c index e05d6bf..ca910f6 100644 --- a/arch/arm/mach-uniphier/board_init.c +++ b/arch/arm/mach-uniphier/board_init.c @@ -21,7 +21,7 @@ static void uniphier_setup_xirq(void) { const void *fdt = gd->fdt_blob; int soc_node, aidet_node; - const u32 *val; + const fdt32_t *val; unsigned long aidet_base; u32 tmp; diff --git a/arch/arm/mach-uniphier/clk/pll-pxs3.c b/arch/arm/mach-uniphier/clk/pll-pxs3.c index e29d9d0..201d351 100644 --- a/arch/arm/mach-uniphier/clk/pll-pxs3.c +++ b/arch/arm/mach-uniphier/clk/pll-pxs3.c @@ -2,6 +2,8 @@ * SPDX-License-Identifier: GPL-2.0+ */ +#include "../init.h" + void uniphier_pxs3_pll_init(void) { } diff --git a/arch/arm/mach-uniphier/dram/umc-ld11.c b/arch/arm/mach-uniphier/dram/umc-ld11.c index 69aa4f2..9e2021a 100644 --- a/arch/arm/mach-uniphier/dram/umc-ld11.c +++ b/arch/arm/mach-uniphier/dram/umc-ld11.c @@ -28,11 +28,11 @@ enum dram_size { }; /* PHY */ -const int rof_pos_shift_pre[RANK_BLOCKS_TR][2] = { {0, 0}, {0, 0} }; -const int rof_neg_shift_pre[RANK_BLOCKS_TR][2] = { {0, 0}, {0, 0} }; -const int rof_pos_shift[RANK_BLOCKS_TR][2] = { {-35, -35}, {-35, -35} }; -const int rof_neg_shift[RANK_BLOCKS_TR][2] = { {-17, -17}, {-17, -17} }; -const int tof_shift[RANK_BLOCKS_TR][2] = { {-50, -50}, {-50, -50} }; +static const int rof_pos_shift_pre[RANK_BLOCKS_TR][2] = { {0, 0}, {0, 0} }; +static const int rof_neg_shift_pre[RANK_BLOCKS_TR][2] = { {0, 0}, {0, 0} }; +static const int rof_pos_shift[RANK_BLOCKS_TR][2] = { {-35, -35}, {-35, -35} }; +static const int rof_neg_shift[RANK_BLOCKS_TR][2] = { {-17, -17}, {-17, -17} }; +static const int tof_shift[RANK_BLOCKS_TR][2] = { {-50, -50}, {-50, -50} }; /* Register address */ #define PHY_ZQ0CR1 0x00000184 @@ -65,7 +65,7 @@ const int tof_shift[RANK_BLOCKS_TR][2] = { {-50, -50}, {-50, -50} }; #define PHY_DSWBD_MASK 0x3F000000 /* bit[29:24] */ #define PHY_DSDQOE_MASK 0x00000FFF -static void ddrphy_maskwritel(u32 data, u32 mask, void *addr) +static void ddrphy_maskwritel(u32 data, u32 mask, void __iomem *addr) { u32 value; @@ -73,7 +73,7 @@ static void ddrphy_maskwritel(u32 data, u32 mask, void *addr) writel(value, addr); } -static u32 ddrphy_maskreadl(u32 mask, void *addr) +static u32 ddrphy_maskreadl(u32 mask, void __iomem *addr) { return readl(addr) & mask; } diff --git a/arch/arm/mach-uniphier/dram/umc-pxs2.c b/arch/arm/mach-uniphier/dram/umc-pxs2.c index 7fa29f1..8068ef1 100644 --- a/arch/arm/mach-uniphier/dram/umc-pxs2.c +++ b/arch/arm/mach-uniphier/dram/umc-pxs2.c @@ -436,7 +436,7 @@ static void umc_set_system_latency(void __iomem *dc_base, int phy_latency) } /* enable/disable auto refresh */ -void umc_refresh_ctrl(void __iomem *dc_base, int enable) +static void umc_refresh_ctrl(void __iomem *dc_base, int enable) { u32 tmp; diff --git a/arch/arm/mach-uniphier/dram_init.c b/arch/arm/mach-uniphier/dram_init.c index f79b7cf..6eb8d26 100644 --- a/arch/arm/mach-uniphier/dram_init.c +++ b/arch/arm/mach-uniphier/dram_init.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <fdt_support.h> #include <fdtdec.h> #include <linux/errno.h> #include <linux/sizes.h> diff --git a/arch/arm/mach-uniphier/init.h b/arch/arm/mach-uniphier/init.h index d413d00..56f514e 100644 --- a/arch/arm/mach-uniphier/init.h +++ b/arch/arm/mach-uniphier/init.h @@ -126,7 +126,7 @@ int uniphier_have_internal_stm(void); int uniphier_boot_from_backend(void); int uniphier_pin_init(const char *pinconfig_name); void uniphier_smp_kick_all_cpus(void); -void cci500_init(int nr_slaves); +void cci500_init(unsigned int nr_slaves); #undef pr_warn #define pr_warn(fmt, args...) printf(fmt, ##args) |