From 7bd3b61853da6d2fc579e27c7a1ac1e9fc968d1a Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Mon, 15 Oct 2012 13:53:41 -0700 Subject: [PATCH 1/4] ARM: OMAP2: Move plat/menelaus.h to linux/mfd/menelaus.h We can move menelaus.h to live with other mfd headers to get it out of plat for ARM common zImage support. Acked-by: Samuel Ortiz Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-h4.c | 2 +- arch/arm/mach-omap2/board-n8x0.c | 2 +- drivers/mfd/menelaus.c | 2 +- .../arm/plat-omap/include/plat => include/linux/mfd}/menelaus.h | 2 -- 4 files changed, 3 insertions(+), 5 deletions(-) rename {arch/arm/plat-omap/include/plat => include/linux/mfd}/menelaus.h (96%) diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c index 8d04bf851af4..3977a0276b4c 100644 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c @@ -26,12 +26,12 @@ #include #include #include +#include #include #include #include -#include #include #include #include "debug-devices.h" diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index d95f727ca39a..e3e8325054b2 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c @@ -22,13 +22,13 @@ #include #include #include +#include #include #include #include #include "common.h" -#include #include #include "mux.h" diff --git a/drivers/mfd/menelaus.c b/drivers/mfd/menelaus.c index 55d589981412..998ce8cb3065 100644 --- a/drivers/mfd/menelaus.c +++ b/drivers/mfd/menelaus.c @@ -41,11 +41,11 @@ #include #include #include +#include #include #include -#include #define DRIVER_NAME "menelaus" diff --git a/arch/arm/plat-omap/include/plat/menelaus.h b/include/linux/mfd/menelaus.h similarity index 96% rename from arch/arm/plat-omap/include/plat/menelaus.h rename to include/linux/mfd/menelaus.h index 4a970ec62dd1..f097e89134cb 100644 --- a/arch/arm/plat-omap/include/plat/menelaus.h +++ b/include/linux/mfd/menelaus.h @@ -1,6 +1,4 @@ /* - * arch/arm/plat-omap/include/mach/menelaus.h - * * Functions to access Menelaus power management chip */ From ea5d8f42a3ae7fd7a78369970772021a6d68ae15 Mon Sep 17 00:00:00 2001 From: Paul Walmsley Date: Fri, 26 Oct 2012 13:16:30 -0600 Subject: [PATCH 2/4] ARM: OMAP2+: fix build breakage introduced by commit b7754452b3e27716347a528b47b0a1083af32520 Commit b7754452b3e27716347a528b47b0a1083af32520 ("mtd: onenand: omap: use pdata info instead of cpu_is") broke an OMAP3+4 build and an N800 multi-OMAP2xxx build here: drivers/built-in.o: In function `omap2_onenand_probe': drivers/mtd/onenand/omap2.c:742: undefined reference to `omap2_onenand_read_bufferram' drivers/mtd/onenand/omap2.c:743: undefined reference to `omap2_onenand_write_bufferram' drivers/mtd/onenand/omap2.c:742: undefined reference to `omap2_onenand_read_bufferram' drivers/mtd/onenand/omap2.c:743: undefined reference to `omap2_onenand_write_bufferram' ... drivers/built-in.o: In function `omap2_onenand_probe': drivers/mtd/onenand/omap2.c:788: undefined reference to `omap3_onenand_read_bufferram' drivers/mtd/onenand/omap2.c:788: undefined reference to `omap3_onenand_write_bufferram' Fix by declaring static functions for the missing symbols, rather than just prototypes. Signed-off-by: Paul Walmsley Cc: Afzal Mohammed Cc: Tony Lindgren --- drivers/mtd/onenand/omap2.c | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c index 53069aef1f48..99f96e19ebea 100644 --- a/drivers/mtd/onenand/omap2.c +++ b/drivers/mtd/onenand/omap2.c @@ -445,13 +445,19 @@ out_copy: #else -int omap3_onenand_read_bufferram(struct mtd_info *mtd, int area, - unsigned char *buffer, int offset, - size_t count); +static int omap3_onenand_read_bufferram(struct mtd_info *mtd, int area, + unsigned char *buffer, int offset, + size_t count) +{ + return -ENOSYS; +} -int omap3_onenand_write_bufferram(struct mtd_info *mtd, int area, - const unsigned char *buffer, - int offset, size_t count); +static int omap3_onenand_write_bufferram(struct mtd_info *mtd, int area, + const unsigned char *buffer, + int offset, size_t count) +{ + return -ENOSYS; +} #endif @@ -549,13 +555,19 @@ static int omap2_onenand_write_bufferram(struct mtd_info *mtd, int area, #else -int omap2_onenand_read_bufferram(struct mtd_info *mtd, int area, - unsigned char *buffer, int offset, - size_t count); +static int omap2_onenand_read_bufferram(struct mtd_info *mtd, int area, + unsigned char *buffer, int offset, + size_t count) +{ + return -ENOSYS; +} -int omap2_onenand_write_bufferram(struct mtd_info *mtd, int area, - const unsigned char *buffer, - int offset, size_t count); +static int omap2_onenand_write_bufferram(struct mtd_info *mtd, int area, + const unsigned char *buffer, + int offset, size_t count) +{ + return -ENOSYS; +} #endif From 47ba7099efe83a7413fe3706e6ba352dd0b659be Mon Sep 17 00:00:00 2001 From: Paul Walmsley Date: Thu, 25 Oct 2012 19:01:11 -0600 Subject: [PATCH 3/4] ARM: OMAP1: fix build breakage introduced by commit 25c7d49ed48b4843da7dea56a81ae7f620211ee0 Commit 25c7d49ed48b4843da7dea56a81ae7f620211ee0 ("ARM: OMAP: Make omap_device local to mach-omap2") broke an OMAP5912-only build here: arch/arm/mach-omap1/pm_bus.c: In function 'omap1_pm_runtime_init': arch/arm/mach-omap1/pm_bus.c:69:2: error: implicit declaration of function 'cpu_class_is_omap1' make[1]: *** [arch/arm/mach-omap1/pm_bus.o] Error 1 Fix by adding a missing include. Signed-off-by: Paul Walmsley Cc: Tony Lindgren --- arch/arm/mach-omap1/pm_bus.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-omap1/pm_bus.c b/arch/arm/mach-omap1/pm_bus.c index 16bf2f95117c..3f2d39672393 100644 --- a/arch/arm/mach-omap1/pm_bus.c +++ b/arch/arm/mach-omap1/pm_bus.c @@ -19,6 +19,8 @@ #include #include +#include "soc.h" + #ifdef CONFIG_PM_RUNTIME static int omap1_pm_runtime_suspend(struct device *dev) { From 97af08b6e10e06563309728ed2fe8fdd919c5a33 Mon Sep 17 00:00:00 2001 From: Paul Walmsley Date: Fri, 26 Oct 2012 13:21:48 -0600 Subject: [PATCH 4/4] ARM: OMAP1: fix sparse warning added by commit 4c98dc6b8ef2f73bdbfa78186db9a76507ba9ea3 Commit 4c98dc6b8ef2f73bdbfa78186db9a76507ba9ea3 ("ARM: OMAP: Make plat/fpga.h local to arch/arm/plat-omap") results in a new warning from sparse: arch/arm/mach-omap1/fpga.c:147:6: warning: symbol 'omap1510_fpga_init_irq' was not declared. Should it be static? Fix by adding a missing include. Signed-off-by: Paul Walmsley Cc: Tony Lindgren --- arch/arm/mach-omap1/fpga.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-omap1/fpga.c b/arch/arm/mach-omap1/fpga.c index 4ec220d8da5c..d940fac9a9ed 100644 --- a/arch/arm/mach-omap1/fpga.c +++ b/arch/arm/mach-omap1/fpga.c @@ -32,6 +32,7 @@ #include #include "iomap.h" +#include "common.h" static void fpga_mask_irq(struct irq_data *d) {