* [PATCH 0/7] omap1 sparse warning fixes
@ 2011-01-18 7:52 ` Aaro Koskinen
0 siblings, 0 replies; 24+ messages in thread
From: Aaro Koskinen @ 2011-01-18 7:52 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel
Here's some trivial omap1 sparse warning fixes.
Aaro Koskinen (7):
arm: plat-omap: dma: make omap_dma_in_1510_mode() static
arm: mach-omap1: board-h2: make h2_nand_platdata static
arm: mach-omap1: board-innovator: make innovator_mmc_init() static
arm: mach-omap1: board-htcherald: make htcpld_chips and htcpld_pfdata static
arm: mach-omap1: board-h3: make nand_platdata static
arm: plat-omap: system.h: move voiceblue definitions into the board header
arm: mach-omap1: board-voiceblue: add missing include
arch/arm/mach-omap1/board-h2.c | 2 +-
arch/arm/mach-omap1/board-h3.c | 2 +-
arch/arm/mach-omap1/board-htcherald.c | 4 ++--
arch/arm/mach-omap1/board-innovator.c | 2 +-
arch/arm/mach-omap1/board-voiceblue.c | 1 +
arch/arm/plat-omap/dma.c | 2 +-
arch/arm/plat-omap/include/plat/board-voiceblue.h | 6 ++++++
arch/arm/plat-omap/include/plat/system.h | 7 +------
8 files changed, 14 insertions(+), 12 deletions(-)
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 0/7] omap1 sparse warning fixes
@ 2011-01-18 7:52 ` Aaro Koskinen
0 siblings, 0 replies; 24+ messages in thread
From: Aaro Koskinen @ 2011-01-18 7:52 UTC (permalink / raw)
To: linux-arm-kernel
Here's some trivial omap1 sparse warning fixes.
Aaro Koskinen (7):
arm: plat-omap: dma: make omap_dma_in_1510_mode() static
arm: mach-omap1: board-h2: make h2_nand_platdata static
arm: mach-omap1: board-innovator: make innovator_mmc_init() static
arm: mach-omap1: board-htcherald: make htcpld_chips and htcpld_pfdata static
arm: mach-omap1: board-h3: make nand_platdata static
arm: plat-omap: system.h: move voiceblue definitions into the board header
arm: mach-omap1: board-voiceblue: add missing include
arch/arm/mach-omap1/board-h2.c | 2 +-
arch/arm/mach-omap1/board-h3.c | 2 +-
arch/arm/mach-omap1/board-htcherald.c | 4 ++--
arch/arm/mach-omap1/board-innovator.c | 2 +-
arch/arm/mach-omap1/board-voiceblue.c | 1 +
arch/arm/plat-omap/dma.c | 2 +-
arch/arm/plat-omap/include/plat/board-voiceblue.h | 6 ++++++
arch/arm/plat-omap/include/plat/system.h | 7 +------
8 files changed, 14 insertions(+), 12 deletions(-)
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 1/7] arm: plat-omap: dma: make omap_dma_in_1510_mode() static
2011-01-18 7:52 ` Aaro Koskinen
@ 2011-01-18 7:52 ` Aaro Koskinen
-1 siblings, 0 replies; 24+ messages in thread
From: Aaro Koskinen @ 2011-01-18 7:52 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel
Eliminates the following sparse warning:
arch/arm/plat-omap/dma.c:137:5: warning: symbol 'omap_dma_in_1510_mode' was not declared. Should it be static?
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
arch/arm/plat-omap/dma.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index c4b2b47..28cdac2 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -134,7 +134,7 @@ static inline void omap_enable_channel_irq(int lch);
#ifdef CONFIG_ARCH_OMAP15XX
/* Returns 1 if the DMA module is in OMAP1510-compatible mode, 0 otherwise */
-int omap_dma_in_1510_mode(void)
+static int omap_dma_in_1510_mode(void)
{
return enable_1510_mode;
}
--
1.5.6.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 1/7] arm: plat-omap: dma: make omap_dma_in_1510_mode() static
@ 2011-01-18 7:52 ` Aaro Koskinen
0 siblings, 0 replies; 24+ messages in thread
From: Aaro Koskinen @ 2011-01-18 7:52 UTC (permalink / raw)
To: linux-arm-kernel
Eliminates the following sparse warning:
arch/arm/plat-omap/dma.c:137:5: warning: symbol 'omap_dma_in_1510_mode' was not declared. Should it be static?
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
arch/arm/plat-omap/dma.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index c4b2b47..28cdac2 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -134,7 +134,7 @@ static inline void omap_enable_channel_irq(int lch);
#ifdef CONFIG_ARCH_OMAP15XX
/* Returns 1 if the DMA module is in OMAP1510-compatible mode, 0 otherwise */
-int omap_dma_in_1510_mode(void)
+static int omap_dma_in_1510_mode(void)
{
return enable_1510_mode;
}
--
1.5.6.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 2/7] arm: mach-omap1: board-h2: make h2_nand_platdata static
2011-01-18 7:52 ` Aaro Koskinen
@ 2011-01-18 7:52 ` Aaro Koskinen
-1 siblings, 0 replies; 24+ messages in thread
From: Aaro Koskinen @ 2011-01-18 7:52 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel
Eliminates the following sparse warning:
arch/arm/mach-omap1/board-h2.c:205:27: warning: symbol 'h2_nand_platdata' was not declared. Should it be static?
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
arch/arm/mach-omap1/board-h2.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index 28b84aa..ba3bd09 100644
--- a/arch/arm/mach-omap1/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -202,7 +202,7 @@ static int h2_nand_dev_ready(struct mtd_info *mtd)
static const char *h2_part_probes[] = { "cmdlinepart", NULL };
-struct platform_nand_data h2_nand_platdata = {
+static struct platform_nand_data h2_nand_platdata = {
.chip = {
.nr_chips = 1,
.chip_offset = 0,
--
1.5.6.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 2/7] arm: mach-omap1: board-h2: make h2_nand_platdata static
@ 2011-01-18 7:52 ` Aaro Koskinen
0 siblings, 0 replies; 24+ messages in thread
From: Aaro Koskinen @ 2011-01-18 7:52 UTC (permalink / raw)
To: linux-arm-kernel
Eliminates the following sparse warning:
arch/arm/mach-omap1/board-h2.c:205:27: warning: symbol 'h2_nand_platdata' was not declared. Should it be static?
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
arch/arm/mach-omap1/board-h2.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index 28b84aa..ba3bd09 100644
--- a/arch/arm/mach-omap1/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -202,7 +202,7 @@ static int h2_nand_dev_ready(struct mtd_info *mtd)
static const char *h2_part_probes[] = { "cmdlinepart", NULL };
-struct platform_nand_data h2_nand_platdata = {
+static struct platform_nand_data h2_nand_platdata = {
.chip = {
.nr_chips = 1,
.chip_offset = 0,
--
1.5.6.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 3/7] arm: mach-omap1: board-innovator: make innovator_mmc_init() static
2011-01-18 7:52 ` Aaro Koskinen
@ 2011-01-18 7:52 ` Aaro Koskinen
-1 siblings, 0 replies; 24+ messages in thread
From: Aaro Koskinen @ 2011-01-18 7:52 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel
Eliminates the following sparse warning:
arch/arm/mach-omap1/board-innovator.c:368:13: warning: symbol 'innovator_mmc_init' was not declared. Should it be static?
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
arch/arm/mach-omap1/board-innovator.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c
index a36e674..2d9b8cb 100644
--- a/arch/arm/mach-omap1/board-innovator.c
+++ b/arch/arm/mach-omap1/board-innovator.c
@@ -365,7 +365,7 @@ static struct omap_mmc_platform_data mmc1_data = {
static struct omap_mmc_platform_data *mmc_data[OMAP16XX_NR_MMC];
-void __init innovator_mmc_init(void)
+static void __init innovator_mmc_init(void)
{
mmc_data[0] = &mmc1_data;
omap1_init_mmc(mmc_data, OMAP15XX_NR_MMC);
--
1.5.6.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 3/7] arm: mach-omap1: board-innovator: make innovator_mmc_init() static
@ 2011-01-18 7:52 ` Aaro Koskinen
0 siblings, 0 replies; 24+ messages in thread
From: Aaro Koskinen @ 2011-01-18 7:52 UTC (permalink / raw)
To: linux-arm-kernel
Eliminates the following sparse warning:
arch/arm/mach-omap1/board-innovator.c:368:13: warning: symbol 'innovator_mmc_init' was not declared. Should it be static?
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
arch/arm/mach-omap1/board-innovator.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c
index a36e674..2d9b8cb 100644
--- a/arch/arm/mach-omap1/board-innovator.c
+++ b/arch/arm/mach-omap1/board-innovator.c
@@ -365,7 +365,7 @@ static struct omap_mmc_platform_data mmc1_data = {
static struct omap_mmc_platform_data *mmc_data[OMAP16XX_NR_MMC];
-void __init innovator_mmc_init(void)
+static void __init innovator_mmc_init(void)
{
mmc_data[0] = &mmc1_data;
omap1_init_mmc(mmc_data, OMAP15XX_NR_MMC);
--
1.5.6.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 4/7] arm: mach-omap1: board-htcherald: make htcpld_chips and htcpld_pfdata static
2011-01-18 7:52 ` Aaro Koskinen
@ 2011-01-18 7:52 ` Aaro Koskinen
-1 siblings, 0 replies; 24+ messages in thread
From: Aaro Koskinen @ 2011-01-18 7:52 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel
Eliminates the following sparse warnings:
arch/arm/mach-omap1/board-htcherald.c:334:34: warning: symbol 'htcpld_chips' was not declared. Should it be static?
arch/arm/mach-omap1/board-htcherald.c:369:34: warning: symbol 'htcpld_pfdata' was not declared. Should it be static?
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
arch/arm/mach-omap1/board-htcherald.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap1/board-htcherald.c b/arch/arm/mach-omap1/board-htcherald.c
index f2c5c58..ba05a51 100644
--- a/arch/arm/mach-omap1/board-htcherald.c
+++ b/arch/arm/mach-omap1/board-htcherald.c
@@ -331,7 +331,7 @@ static struct resource htcpld_resources[] = {
},
};
-struct htcpld_chip_platform_data htcpld_chips[] = {
+static struct htcpld_chip_platform_data htcpld_chips[] = {
[0] = {
.addr = 0x03,
.reset = 0x04,
@@ -366,7 +366,7 @@ struct htcpld_chip_platform_data htcpld_chips[] = {
},
};
-struct htcpld_core_platform_data htcpld_pfdata = {
+static struct htcpld_core_platform_data htcpld_pfdata = {
.int_reset_gpio_hi = HTCPLD_GPIO_INT_RESET_HI,
.int_reset_gpio_lo = HTCPLD_GPIO_INT_RESET_LO,
.i2c_adapter_id = 1,
--
1.5.6.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 4/7] arm: mach-omap1: board-htcherald: make htcpld_chips and htcpld_pfdata static
@ 2011-01-18 7:52 ` Aaro Koskinen
0 siblings, 0 replies; 24+ messages in thread
From: Aaro Koskinen @ 2011-01-18 7:52 UTC (permalink / raw)
To: linux-arm-kernel
Eliminates the following sparse warnings:
arch/arm/mach-omap1/board-htcherald.c:334:34: warning: symbol 'htcpld_chips' was not declared. Should it be static?
arch/arm/mach-omap1/board-htcherald.c:369:34: warning: symbol 'htcpld_pfdata' was not declared. Should it be static?
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
arch/arm/mach-omap1/board-htcherald.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap1/board-htcherald.c b/arch/arm/mach-omap1/board-htcherald.c
index f2c5c58..ba05a51 100644
--- a/arch/arm/mach-omap1/board-htcherald.c
+++ b/arch/arm/mach-omap1/board-htcherald.c
@@ -331,7 +331,7 @@ static struct resource htcpld_resources[] = {
},
};
-struct htcpld_chip_platform_data htcpld_chips[] = {
+static struct htcpld_chip_platform_data htcpld_chips[] = {
[0] = {
.addr = 0x03,
.reset = 0x04,
@@ -366,7 +366,7 @@ struct htcpld_chip_platform_data htcpld_chips[] = {
},
};
-struct htcpld_core_platform_data htcpld_pfdata = {
+static struct htcpld_core_platform_data htcpld_pfdata = {
.int_reset_gpio_hi = HTCPLD_GPIO_INT_RESET_HI,
.int_reset_gpio_lo = HTCPLD_GPIO_INT_RESET_LO,
.i2c_adapter_id = 1,
--
1.5.6.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 5/7] arm: mach-omap1: board-h3: make nand_platdata static
2011-01-18 7:52 ` Aaro Koskinen
@ 2011-01-18 7:52 ` Aaro Koskinen
-1 siblings, 0 replies; 24+ messages in thread
From: Aaro Koskinen @ 2011-01-18 7:52 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel
Eliminates the following sparse warning:
arch/arm/mach-omap1/board-h3.c:207:27: warning: symbol 'nand_platdata' was not declared. Should it be static?
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
arch/arm/mach-omap1/board-h3.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
index dbc8b8d..ac48677 100644
--- a/arch/arm/mach-omap1/board-h3.c
+++ b/arch/arm/mach-omap1/board-h3.c
@@ -204,7 +204,7 @@ static int nand_dev_ready(struct mtd_info *mtd)
static const char *part_probes[] = { "cmdlinepart", NULL };
-struct platform_nand_data nand_platdata = {
+static struct platform_nand_data nand_platdata = {
.chip = {
.nr_chips = 1,
.chip_offset = 0,
--
1.5.6.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 5/7] arm: mach-omap1: board-h3: make nand_platdata static
@ 2011-01-18 7:52 ` Aaro Koskinen
0 siblings, 0 replies; 24+ messages in thread
From: Aaro Koskinen @ 2011-01-18 7:52 UTC (permalink / raw)
To: linux-arm-kernel
Eliminates the following sparse warning:
arch/arm/mach-omap1/board-h3.c:207:27: warning: symbol 'nand_platdata' was not declared. Should it be static?
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
arch/arm/mach-omap1/board-h3.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
index dbc8b8d..ac48677 100644
--- a/arch/arm/mach-omap1/board-h3.c
+++ b/arch/arm/mach-omap1/board-h3.c
@@ -204,7 +204,7 @@ static int nand_dev_ready(struct mtd_info *mtd)
static const char *part_probes[] = { "cmdlinepart", NULL };
-struct platform_nand_data nand_platdata = {
+static struct platform_nand_data nand_platdata = {
.chip = {
.nr_chips = 1,
.chip_offset = 0,
--
1.5.6.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 6/7] arm: plat-omap: system.h: move voiceblue definitions into the board header
2011-01-18 7:52 ` Aaro Koskinen
@ 2011-01-18 7:52 ` Aaro Koskinen
-1 siblings, 0 replies; 24+ messages in thread
From: Aaro Koskinen @ 2011-01-18 7:52 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel
Move voiceblue definitions into the board-specific header.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
arch/arm/plat-omap/include/plat/board-voiceblue.h | 6 ++++++
arch/arm/plat-omap/include/plat/system.h | 7 +------
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/arch/arm/plat-omap/include/plat/board-voiceblue.h b/arch/arm/plat-omap/include/plat/board-voiceblue.h
index 27916b2..431d70e 100644
--- a/arch/arm/plat-omap/include/plat/board-voiceblue.h
+++ b/arch/arm/plat-omap/include/plat/board-voiceblue.h
@@ -15,5 +15,11 @@ extern void voiceblue_wdt_enable(void);
extern void voiceblue_wdt_disable(void);
extern void voiceblue_wdt_ping(void);
+#ifndef CONFIG_MACH_VOICEBLUE
+#define voiceblue_reset() do {} while (0)
+#else
+extern void voiceblue_reset(void);
+#endif
+
#endif /* __ASM_ARCH_VOICEBLUE_H */
diff --git a/arch/arm/plat-omap/include/plat/system.h b/arch/arm/plat-omap/include/plat/system.h
index d0a119f..24bb5ae 100644
--- a/arch/arm/plat-omap/include/plat/system.h
+++ b/arch/arm/plat-omap/include/plat/system.h
@@ -9,14 +9,9 @@
#include <asm/mach-types.h>
#include <mach/hardware.h>
+#include <plat/board-voiceblue.h>
#include <plat/prcm.h>
-#ifndef CONFIG_MACH_VOICEBLUE
-#define voiceblue_reset() do {} while (0)
-#else
-extern void voiceblue_reset(void);
-#endif
-
static inline void arch_idle(void)
{
cpu_do_idle();
--
1.5.6.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 6/7] arm: plat-omap: system.h: move voiceblue definitions into the board header
@ 2011-01-18 7:52 ` Aaro Koskinen
0 siblings, 0 replies; 24+ messages in thread
From: Aaro Koskinen @ 2011-01-18 7:52 UTC (permalink / raw)
To: linux-arm-kernel
Move voiceblue definitions into the board-specific header.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
arch/arm/plat-omap/include/plat/board-voiceblue.h | 6 ++++++
arch/arm/plat-omap/include/plat/system.h | 7 +------
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/arch/arm/plat-omap/include/plat/board-voiceblue.h b/arch/arm/plat-omap/include/plat/board-voiceblue.h
index 27916b2..431d70e 100644
--- a/arch/arm/plat-omap/include/plat/board-voiceblue.h
+++ b/arch/arm/plat-omap/include/plat/board-voiceblue.h
@@ -15,5 +15,11 @@ extern void voiceblue_wdt_enable(void);
extern void voiceblue_wdt_disable(void);
extern void voiceblue_wdt_ping(void);
+#ifndef CONFIG_MACH_VOICEBLUE
+#define voiceblue_reset() do {} while (0)
+#else
+extern void voiceblue_reset(void);
+#endif
+
#endif /* __ASM_ARCH_VOICEBLUE_H */
diff --git a/arch/arm/plat-omap/include/plat/system.h b/arch/arm/plat-omap/include/plat/system.h
index d0a119f..24bb5ae 100644
--- a/arch/arm/plat-omap/include/plat/system.h
+++ b/arch/arm/plat-omap/include/plat/system.h
@@ -9,14 +9,9 @@
#include <asm/mach-types.h>
#include <mach/hardware.h>
+#include <plat/board-voiceblue.h>
#include <plat/prcm.h>
-#ifndef CONFIG_MACH_VOICEBLUE
-#define voiceblue_reset() do {} while (0)
-#else
-extern void voiceblue_reset(void);
-#endif
-
static inline void arch_idle(void)
{
cpu_do_idle();
--
1.5.6.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 7/7] arm: mach-omap1: board-voiceblue: add missing include
2011-01-18 7:52 ` Aaro Koskinen
@ 2011-01-18 7:52 ` Aaro Koskinen
-1 siblings, 0 replies; 24+ messages in thread
From: Aaro Koskinen @ 2011-01-18 7:52 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel
Eliminates the following sparse warnings:
arch/arm/mach-omap1/board-voiceblue.c:253:6: warning: symbol 'voiceblue_wdt_enable' was not declared. Should it be static?
arch/arm/mach-omap1/board-voiceblue.c:261:6: warning: symbol 'voiceblue_wdt_disable' was not declared. Should it be static?
arch/arm/mach-omap1/board-voiceblue.c:269:6: warning: symbol 'voiceblue_wdt_ping' was not declared. Should it be static?
arch/arm/mach-omap1/board-voiceblue.c:278:6: warning: symbol 'voiceblue_reset' was not declared. Should it be static?
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
arch/arm/mach-omap1/board-voiceblue.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c
index 815a69c..9c1af41 100644
--- a/arch/arm/mach-omap1/board-voiceblue.c
+++ b/arch/arm/mach-omap1/board-voiceblue.c
@@ -30,6 +30,7 @@
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
+#include <plat/board-voiceblue.h>
#include <plat/common.h>
#include <mach/gpio.h>
#include <plat/flash.h>
--
1.5.6.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 7/7] arm: mach-omap1: board-voiceblue: add missing include
@ 2011-01-18 7:52 ` Aaro Koskinen
0 siblings, 0 replies; 24+ messages in thread
From: Aaro Koskinen @ 2011-01-18 7:52 UTC (permalink / raw)
To: linux-arm-kernel
Eliminates the following sparse warnings:
arch/arm/mach-omap1/board-voiceblue.c:253:6: warning: symbol 'voiceblue_wdt_enable' was not declared. Should it be static?
arch/arm/mach-omap1/board-voiceblue.c:261:6: warning: symbol 'voiceblue_wdt_disable' was not declared. Should it be static?
arch/arm/mach-omap1/board-voiceblue.c:269:6: warning: symbol 'voiceblue_wdt_ping' was not declared. Should it be static?
arch/arm/mach-omap1/board-voiceblue.c:278:6: warning: symbol 'voiceblue_reset' was not declared. Should it be static?
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
arch/arm/mach-omap1/board-voiceblue.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c
index 815a69c..9c1af41 100644
--- a/arch/arm/mach-omap1/board-voiceblue.c
+++ b/arch/arm/mach-omap1/board-voiceblue.c
@@ -30,6 +30,7 @@
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
+#include <plat/board-voiceblue.h>
#include <plat/common.h>
#include <mach/gpio.h>
#include <plat/flash.h>
--
1.5.6.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [PATCH 7/7] arm: mach-omap1: board-voiceblue: add missing include
2011-01-18 7:52 ` Aaro Koskinen
@ 2011-01-18 8:11 ` Felipe Balbi
-1 siblings, 0 replies; 24+ messages in thread
From: Felipe Balbi @ 2011-01-18 8:11 UTC (permalink / raw)
To: Aaro Koskinen; +Cc: linux-omap, linux-arm-kernel
On Tue, Jan 18, 2011 at 09:52:45AM +0200, Aaro Koskinen wrote:
> Eliminates the following sparse warnings:
>
> arch/arm/mach-omap1/board-voiceblue.c:253:6: warning: symbol 'voiceblue_wdt_enable' was not declared. Should it be static?
> arch/arm/mach-omap1/board-voiceblue.c:261:6: warning: symbol 'voiceblue_wdt_disable' was not declared. Should it be static?
> arch/arm/mach-omap1/board-voiceblue.c:269:6: warning: symbol 'voiceblue_wdt_ping' was not declared. Should it be static?
> arch/arm/mach-omap1/board-voiceblue.c:278:6: warning: symbol 'voiceblue_reset' was not declared. Should it be static?
wasn't this caused by previous patch ?
--
balbi
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 7/7] arm: mach-omap1: board-voiceblue: add missing include
@ 2011-01-18 8:11 ` Felipe Balbi
0 siblings, 0 replies; 24+ messages in thread
From: Felipe Balbi @ 2011-01-18 8:11 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jan 18, 2011 at 09:52:45AM +0200, Aaro Koskinen wrote:
> Eliminates the following sparse warnings:
>
> arch/arm/mach-omap1/board-voiceblue.c:253:6: warning: symbol 'voiceblue_wdt_enable' was not declared. Should it be static?
> arch/arm/mach-omap1/board-voiceblue.c:261:6: warning: symbol 'voiceblue_wdt_disable' was not declared. Should it be static?
> arch/arm/mach-omap1/board-voiceblue.c:269:6: warning: symbol 'voiceblue_wdt_ping' was not declared. Should it be static?
> arch/arm/mach-omap1/board-voiceblue.c:278:6: warning: symbol 'voiceblue_reset' was not declared. Should it be static?
wasn't this caused by previous patch ?
--
balbi
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 7/7] arm: mach-omap1: board-voiceblue: add missing include
2011-01-18 8:11 ` Felipe Balbi
@ 2011-01-18 8:21 ` Felipe Balbi
-1 siblings, 0 replies; 24+ messages in thread
From: Felipe Balbi @ 2011-01-18 8:21 UTC (permalink / raw)
To: Felipe Balbi; +Cc: Aaro Koskinen, linux-omap, linux-arm-kernel
On Tue, Jan 18, 2011 at 10:11:56AM +0200, Felipe Balbi wrote:
> On Tue, Jan 18, 2011 at 09:52:45AM +0200, Aaro Koskinen wrote:
> > Eliminates the following sparse warnings:
> >
> > arch/arm/mach-omap1/board-voiceblue.c:253:6: warning: symbol 'voiceblue_wdt_enable' was not declared. Should it be static?
> > arch/arm/mach-omap1/board-voiceblue.c:261:6: warning: symbol 'voiceblue_wdt_disable' was not declared. Should it be static?
> > arch/arm/mach-omap1/board-voiceblue.c:269:6: warning: symbol 'voiceblue_wdt_ping' was not declared. Should it be static?
> > arch/arm/mach-omap1/board-voiceblue.c:278:6: warning: symbol 'voiceblue_reset' was not declared. Should it be static?
>
> wasn't this caused by previous patch ?
no, it wasn't. Different symbols :-p
--
balbi
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 7/7] arm: mach-omap1: board-voiceblue: add missing include
@ 2011-01-18 8:21 ` Felipe Balbi
0 siblings, 0 replies; 24+ messages in thread
From: Felipe Balbi @ 2011-01-18 8:21 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jan 18, 2011 at 10:11:56AM +0200, Felipe Balbi wrote:
> On Tue, Jan 18, 2011 at 09:52:45AM +0200, Aaro Koskinen wrote:
> > Eliminates the following sparse warnings:
> >
> > arch/arm/mach-omap1/board-voiceblue.c:253:6: warning: symbol 'voiceblue_wdt_enable' was not declared. Should it be static?
> > arch/arm/mach-omap1/board-voiceblue.c:261:6: warning: symbol 'voiceblue_wdt_disable' was not declared. Should it be static?
> > arch/arm/mach-omap1/board-voiceblue.c:269:6: warning: symbol 'voiceblue_wdt_ping' was not declared. Should it be static?
> > arch/arm/mach-omap1/board-voiceblue.c:278:6: warning: symbol 'voiceblue_reset' was not declared. Should it be static?
>
> wasn't this caused by previous patch ?
no, it wasn't. Different symbols :-p
--
balbi
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 6/7] arm: plat-omap: system.h: move voiceblue definitions into the board header
2011-01-18 7:52 ` Aaro Koskinen
@ 2011-01-18 9:22 ` Russell King - ARM Linux
-1 siblings, 0 replies; 24+ messages in thread
From: Russell King - ARM Linux @ 2011-01-18 9:22 UTC (permalink / raw)
To: Aaro Koskinen; +Cc: linux-omap, linux-arm-kernel
On Tue, Jan 18, 2011 at 09:52:44AM +0200, Aaro Koskinen wrote:
> Move voiceblue definitions into the board-specific header.
>
> Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Let's instead simplify this, and allow other platforms to hook into the
reset handler if they choose. This has only been build-tested on my
omap1 (which includes voiceblue) and omap4 configurations.
8<------
Subject: ARM: OMAP: Allow platforms to hook reset cleanly
This adds a clean method to allow platforms to hook into the reset
code if they require to.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/mach-omap1/Makefile | 2
arch/arm/mach-omap1/board-voiceblue.c | 106 +++++++++++++++++--------------
arch/arm/mach-omap1/reset.c | 25 +++++++
arch/arm/mach-omap2/prcm.c | 5 +
arch/arm/plat-omap/include/plat/prcm.h | 1
arch/arm/plat-omap/include/plat/system.h | 38 -----------
6 files changed, 91 insertions(+), 86 deletions(-)
diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile
index 6ee1950..148dc6b 100644
--- a/arch/arm/mach-omap1/Makefile
+++ b/arch/arm/mach-omap1/Makefile
@@ -4,7 +4,7 @@
# Common support
obj-y := io.o id.o sram.o irq.o mux.o flash.o serial.o devices.o dma.o
-obj-y += clock.o clock_data.o opp_data.o
+obj-y += clock.o clock_data.o opp_data.o reset.o
obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c
index 815a69c..6712817 100644
--- a/arch/arm/mach-omap1/board-voiceblue.c
+++ b/arch/arm/mach-omap1/board-voiceblue.c
@@ -26,6 +26,7 @@
#include <linux/smc91x.h>
#include <mach/hardware.h>
+#include <mach/system.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
@@ -163,52 +164,6 @@ static void __init voiceblue_init_irq(void)
omap_init_irq();
}
-static void __init voiceblue_init(void)
-{
- /* mux pins for uarts */
- omap_cfg_reg(UART1_TX);
- omap_cfg_reg(UART1_RTS);
- omap_cfg_reg(UART2_TX);
- omap_cfg_reg(UART2_RTS);
- omap_cfg_reg(UART3_TX);
- omap_cfg_reg(UART3_RX);
-
- /* Watchdog */
- gpio_request(0, "Watchdog");
- /* smc91x reset */
- gpio_request(7, "SMC91x reset");
- gpio_direction_output(7, 1);
- udelay(2); /* wait at least 100ns */
- gpio_set_value(7, 0);
- mdelay(50); /* 50ms until PHY ready */
- /* smc91x interrupt pin */
- gpio_request(8, "SMC91x irq");
- /* 16C554 reset*/
- gpio_request(6, "16C554 reset");
- gpio_direction_output(6, 0);
- /* 16C554 interrupt pins */
- gpio_request(12, "16C554 irq");
- gpio_request(13, "16C554 irq");
- gpio_request(14, "16C554 irq");
- gpio_request(15, "16C554 irq");
- set_irq_type(gpio_to_irq(12), IRQ_TYPE_EDGE_RISING);
- set_irq_type(gpio_to_irq(13), IRQ_TYPE_EDGE_RISING);
- set_irq_type(gpio_to_irq(14), IRQ_TYPE_EDGE_RISING);
- set_irq_type(gpio_to_irq(15), IRQ_TYPE_EDGE_RISING);
-
- platform_add_devices(voiceblue_devices, ARRAY_SIZE(voiceblue_devices));
- omap_board_config = voiceblue_config;
- omap_board_config_size = ARRAY_SIZE(voiceblue_config);
- omap_serial_init();
- omap1_usb_init(&voiceblue_usb_config);
- omap_register_i2c_bus(1, 100, NULL, 0);
-
- /* There is a good chance board is going up, so enable power LED
- * (it is connected through invertor) */
- omap_writeb(0x00, OMAP_LPG1_LCR);
- omap_writeb(0x00, OMAP_LPG1_PMR); /* Disable clock */
-}
-
static void __init voiceblue_map_io(void)
{
omap1_map_common_io();
@@ -275,8 +230,17 @@ void voiceblue_wdt_ping(void)
gpio_set_value(0, wdt_gpio_state);
}
-void voiceblue_reset(void)
+static void voiceblue_reset(char mode, const char *cmd)
{
+ /*
+ * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
+ * "Global Software Reset Affects Traffic Controller Frequency".
+ */
+ if (cpu_is_omap5912()) {
+ omap_writew(omap_readw(DPLL_CTL) & ~(1 << 4), DPLL_CTL);
+ omap_writew(0x8, ARM_RSTCT1);
+ }
+
set_bit(MACHINE_REBOOT, &machine_state);
voiceblue_wdt_enable();
while (1) ;
@@ -286,6 +250,54 @@ EXPORT_SYMBOL(voiceblue_wdt_enable);
EXPORT_SYMBOL(voiceblue_wdt_disable);
EXPORT_SYMBOL(voiceblue_wdt_ping);
+static void __init voiceblue_init(void)
+{
+ /* mux pins for uarts */
+ omap_cfg_reg(UART1_TX);
+ omap_cfg_reg(UART1_RTS);
+ omap_cfg_reg(UART2_TX);
+ omap_cfg_reg(UART2_RTS);
+ omap_cfg_reg(UART3_TX);
+ omap_cfg_reg(UART3_RX);
+
+ /* Watchdog */
+ gpio_request(0, "Watchdog");
+ /* smc91x reset */
+ gpio_request(7, "SMC91x reset");
+ gpio_direction_output(7, 1);
+ udelay(2); /* wait at least 100ns */
+ gpio_set_value(7, 0);
+ mdelay(50); /* 50ms until PHY ready */
+ /* smc91x interrupt pin */
+ gpio_request(8, "SMC91x irq");
+ /* 16C554 reset*/
+ gpio_request(6, "16C554 reset");
+ gpio_direction_output(6, 0);
+ /* 16C554 interrupt pins */
+ gpio_request(12, "16C554 irq");
+ gpio_request(13, "16C554 irq");
+ gpio_request(14, "16C554 irq");
+ gpio_request(15, "16C554 irq");
+ set_irq_type(gpio_to_irq(12), IRQ_TYPE_EDGE_RISING);
+ set_irq_type(gpio_to_irq(13), IRQ_TYPE_EDGE_RISING);
+ set_irq_type(gpio_to_irq(14), IRQ_TYPE_EDGE_RISING);
+ set_irq_type(gpio_to_irq(15), IRQ_TYPE_EDGE_RISING);
+
+ platform_add_devices(voiceblue_devices, ARRAY_SIZE(voiceblue_devices));
+ omap_board_config = voiceblue_config;
+ omap_board_config_size = ARRAY_SIZE(voiceblue_config);
+ omap_serial_init();
+ omap1_usb_init(&voiceblue_usb_config);
+ omap_register_i2c_bus(1, 100, NULL, 0);
+
+ /* There is a good chance board is going up, so enable power LED
+ * (it is connected through invertor) */
+ omap_writeb(0x00, OMAP_LPG1_LCR);
+ omap_writeb(0x00, OMAP_LPG1_PMR); /* Disable clock */
+
+ arch_reset = voiceblue_reset;
+}
+
MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910")
/* Maintainer: Ladislav Michl <michl@2n.cz> */
.boot_params = 0x10000100,
diff --git a/arch/arm/mach-omap1/reset.c b/arch/arm/mach-omap1/reset.c
index e69de29..ad951ee 100644
--- a/arch/arm/mach-omap1/reset.c
+++ b/arch/arm/mach-omap1/reset.c
@@ -0,0 +1,25 @@
+/*
+ * OMAP1 reset support
+ */
+#include <linux/kernel.h>
+#include <linux/io.h>
+
+#include <mach/hardware.h>
+#include <mach/system.h>
+#include <plat/prcm.h>
+
+void omap1_arch_reset(char mode, const char *cmd)
+{
+ /*
+ * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
+ * "Global Software Reset Affects Traffic Controller Frequency".
+ */
+ if (cpu_is_omap5912()) {
+ omap_writew(omap_readw(DPLL_CTL) & ~(1 << 4), DPLL_CTL);
+ omap_writew(0x8, ARM_RSTCT1);
+ }
+
+ omap_writew(1, ARM_RSTCT1);
+}
+
+void (*arch_reset)(char, const char *) = omap1_arch_reset;
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c
index 679bcd2..6be1438 100644
--- a/arch/arm/mach-omap2/prcm.c
+++ b/arch/arm/mach-omap2/prcm.c
@@ -24,6 +24,7 @@
#include <linux/io.h>
#include <linux/delay.h>
+#include <mach/system.h>
#include <plat/common.h>
#include <plat/prcm.h>
#include <plat/irqs.h>
@@ -57,7 +58,7 @@ u32 omap_prcm_get_reset_sources(void)
EXPORT_SYMBOL(omap_prcm_get_reset_sources);
/* Resets clock rates and reboots the system. Only called from system.h */
-void omap_prcm_arch_reset(char mode, const char *cmd)
+static void omap_prcm_arch_reset(char mode, const char *cmd)
{
s16 prcm_offs = 0;
@@ -108,6 +109,8 @@ void omap_prcm_arch_reset(char mode, const char *cmd)
omap2_prm_read_mod_reg(prcm_offs, OMAP2_RM_RSTCTRL); /* OCP barrier */
}
+void (*arch_reset)(char, const char *) = omap_prcm_arch_reset;
+
/**
* omap2_cm_wait_idlest - wait for IDLEST bit to indicate module readiness
* @reg: physical address of module IDLEST register
diff --git a/arch/arm/plat-omap/include/plat/prcm.h b/arch/arm/plat-omap/include/plat/prcm.h
index 2fdf8c8..267f43b 100644
--- a/arch/arm/plat-omap/include/plat/prcm.h
+++ b/arch/arm/plat-omap/include/plat/prcm.h
@@ -28,7 +28,6 @@
#define __ASM_ARM_ARCH_OMAP_PRCM_H
u32 omap_prcm_get_reset_sources(void);
-void omap_prcm_arch_reset(char mode, const char *cmd);
int omap2_cm_wait_idlest(void __iomem *reg, u32 mask, u8 idlest,
const char *name);
diff --git a/arch/arm/plat-omap/include/plat/system.h b/arch/arm/plat-omap/include/plat/system.h
index d0a119f..c5fa9e9 100644
--- a/arch/arm/plat-omap/include/plat/system.h
+++ b/arch/arm/plat-omap/include/plat/system.h
@@ -4,48 +4,14 @@
*/
#ifndef __ASM_ARCH_SYSTEM_H
#define __ASM_ARCH_SYSTEM_H
-#include <linux/clk.h>
-#include <asm/mach-types.h>
-#include <mach/hardware.h>
-
-#include <plat/prcm.h>
-
-#ifndef CONFIG_MACH_VOICEBLUE
-#define voiceblue_reset() do {} while (0)
-#else
-extern void voiceblue_reset(void);
-#endif
+#include <asm/proc-fns.h>
static inline void arch_idle(void)
{
cpu_do_idle();
}
-static inline void omap1_arch_reset(char mode, const char *cmd)
-{
- /*
- * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
- * "Global Software Reset Affects Traffic Controller Frequency".
- */
- if (cpu_is_omap5912()) {
- omap_writew(omap_readw(DPLL_CTL) & ~(1 << 4),
- DPLL_CTL);
- omap_writew(0x8, ARM_RSTCT1);
- }
-
- if (machine_is_voiceblue())
- voiceblue_reset();
- else
- omap_writew(1, ARM_RSTCT1);
-}
-
-static inline void arch_reset(char mode, const char *cmd)
-{
- if (!cpu_class_is_omap2())
- omap1_arch_reset(mode, cmd);
- else
- omap_prcm_arch_reset(mode, cmd);
-}
+extern void (*arch_reset)(char, const char *);
#endif
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 6/7] arm: plat-omap: system.h: move voiceblue definitions into the board header
@ 2011-01-18 9:22 ` Russell King - ARM Linux
0 siblings, 0 replies; 24+ messages in thread
From: Russell King - ARM Linux @ 2011-01-18 9:22 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jan 18, 2011 at 09:52:44AM +0200, Aaro Koskinen wrote:
> Move voiceblue definitions into the board-specific header.
>
> Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Let's instead simplify this, and allow other platforms to hook into the
reset handler if they choose. This has only been build-tested on my
omap1 (which includes voiceblue) and omap4 configurations.
8<------
Subject: ARM: OMAP: Allow platforms to hook reset cleanly
This adds a clean method to allow platforms to hook into the reset
code if they require to.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/mach-omap1/Makefile | 2
arch/arm/mach-omap1/board-voiceblue.c | 106 +++++++++++++++++--------------
arch/arm/mach-omap1/reset.c | 25 +++++++
arch/arm/mach-omap2/prcm.c | 5 +
arch/arm/plat-omap/include/plat/prcm.h | 1
arch/arm/plat-omap/include/plat/system.h | 38 -----------
6 files changed, 91 insertions(+), 86 deletions(-)
diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile
index 6ee1950..148dc6b 100644
--- a/arch/arm/mach-omap1/Makefile
+++ b/arch/arm/mach-omap1/Makefile
@@ -4,7 +4,7 @@
# Common support
obj-y := io.o id.o sram.o irq.o mux.o flash.o serial.o devices.o dma.o
-obj-y += clock.o clock_data.o opp_data.o
+obj-y += clock.o clock_data.o opp_data.o reset.o
obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c
index 815a69c..6712817 100644
--- a/arch/arm/mach-omap1/board-voiceblue.c
+++ b/arch/arm/mach-omap1/board-voiceblue.c
@@ -26,6 +26,7 @@
#include <linux/smc91x.h>
#include <mach/hardware.h>
+#include <mach/system.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
@@ -163,52 +164,6 @@ static void __init voiceblue_init_irq(void)
omap_init_irq();
}
-static void __init voiceblue_init(void)
-{
- /* mux pins for uarts */
- omap_cfg_reg(UART1_TX);
- omap_cfg_reg(UART1_RTS);
- omap_cfg_reg(UART2_TX);
- omap_cfg_reg(UART2_RTS);
- omap_cfg_reg(UART3_TX);
- omap_cfg_reg(UART3_RX);
-
- /* Watchdog */
- gpio_request(0, "Watchdog");
- /* smc91x reset */
- gpio_request(7, "SMC91x reset");
- gpio_direction_output(7, 1);
- udelay(2); /* wait at least 100ns */
- gpio_set_value(7, 0);
- mdelay(50); /* 50ms until PHY ready */
- /* smc91x interrupt pin */
- gpio_request(8, "SMC91x irq");
- /* 16C554 reset*/
- gpio_request(6, "16C554 reset");
- gpio_direction_output(6, 0);
- /* 16C554 interrupt pins */
- gpio_request(12, "16C554 irq");
- gpio_request(13, "16C554 irq");
- gpio_request(14, "16C554 irq");
- gpio_request(15, "16C554 irq");
- set_irq_type(gpio_to_irq(12), IRQ_TYPE_EDGE_RISING);
- set_irq_type(gpio_to_irq(13), IRQ_TYPE_EDGE_RISING);
- set_irq_type(gpio_to_irq(14), IRQ_TYPE_EDGE_RISING);
- set_irq_type(gpio_to_irq(15), IRQ_TYPE_EDGE_RISING);
-
- platform_add_devices(voiceblue_devices, ARRAY_SIZE(voiceblue_devices));
- omap_board_config = voiceblue_config;
- omap_board_config_size = ARRAY_SIZE(voiceblue_config);
- omap_serial_init();
- omap1_usb_init(&voiceblue_usb_config);
- omap_register_i2c_bus(1, 100, NULL, 0);
-
- /* There is a good chance board is going up, so enable power LED
- * (it is connected through invertor) */
- omap_writeb(0x00, OMAP_LPG1_LCR);
- omap_writeb(0x00, OMAP_LPG1_PMR); /* Disable clock */
-}
-
static void __init voiceblue_map_io(void)
{
omap1_map_common_io();
@@ -275,8 +230,17 @@ void voiceblue_wdt_ping(void)
gpio_set_value(0, wdt_gpio_state);
}
-void voiceblue_reset(void)
+static void voiceblue_reset(char mode, const char *cmd)
{
+ /*
+ * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
+ * "Global Software Reset Affects Traffic Controller Frequency".
+ */
+ if (cpu_is_omap5912()) {
+ omap_writew(omap_readw(DPLL_CTL) & ~(1 << 4), DPLL_CTL);
+ omap_writew(0x8, ARM_RSTCT1);
+ }
+
set_bit(MACHINE_REBOOT, &machine_state);
voiceblue_wdt_enable();
while (1) ;
@@ -286,6 +250,54 @@ EXPORT_SYMBOL(voiceblue_wdt_enable);
EXPORT_SYMBOL(voiceblue_wdt_disable);
EXPORT_SYMBOL(voiceblue_wdt_ping);
+static void __init voiceblue_init(void)
+{
+ /* mux pins for uarts */
+ omap_cfg_reg(UART1_TX);
+ omap_cfg_reg(UART1_RTS);
+ omap_cfg_reg(UART2_TX);
+ omap_cfg_reg(UART2_RTS);
+ omap_cfg_reg(UART3_TX);
+ omap_cfg_reg(UART3_RX);
+
+ /* Watchdog */
+ gpio_request(0, "Watchdog");
+ /* smc91x reset */
+ gpio_request(7, "SMC91x reset");
+ gpio_direction_output(7, 1);
+ udelay(2); /* wait at least 100ns */
+ gpio_set_value(7, 0);
+ mdelay(50); /* 50ms until PHY ready */
+ /* smc91x interrupt pin */
+ gpio_request(8, "SMC91x irq");
+ /* 16C554 reset*/
+ gpio_request(6, "16C554 reset");
+ gpio_direction_output(6, 0);
+ /* 16C554 interrupt pins */
+ gpio_request(12, "16C554 irq");
+ gpio_request(13, "16C554 irq");
+ gpio_request(14, "16C554 irq");
+ gpio_request(15, "16C554 irq");
+ set_irq_type(gpio_to_irq(12), IRQ_TYPE_EDGE_RISING);
+ set_irq_type(gpio_to_irq(13), IRQ_TYPE_EDGE_RISING);
+ set_irq_type(gpio_to_irq(14), IRQ_TYPE_EDGE_RISING);
+ set_irq_type(gpio_to_irq(15), IRQ_TYPE_EDGE_RISING);
+
+ platform_add_devices(voiceblue_devices, ARRAY_SIZE(voiceblue_devices));
+ omap_board_config = voiceblue_config;
+ omap_board_config_size = ARRAY_SIZE(voiceblue_config);
+ omap_serial_init();
+ omap1_usb_init(&voiceblue_usb_config);
+ omap_register_i2c_bus(1, 100, NULL, 0);
+
+ /* There is a good chance board is going up, so enable power LED
+ * (it is connected through invertor) */
+ omap_writeb(0x00, OMAP_LPG1_LCR);
+ omap_writeb(0x00, OMAP_LPG1_PMR); /* Disable clock */
+
+ arch_reset = voiceblue_reset;
+}
+
MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910")
/* Maintainer: Ladislav Michl <michl@2n.cz> */
.boot_params = 0x10000100,
diff --git a/arch/arm/mach-omap1/reset.c b/arch/arm/mach-omap1/reset.c
index e69de29..ad951ee 100644
--- a/arch/arm/mach-omap1/reset.c
+++ b/arch/arm/mach-omap1/reset.c
@@ -0,0 +1,25 @@
+/*
+ * OMAP1 reset support
+ */
+#include <linux/kernel.h>
+#include <linux/io.h>
+
+#include <mach/hardware.h>
+#include <mach/system.h>
+#include <plat/prcm.h>
+
+void omap1_arch_reset(char mode, const char *cmd)
+{
+ /*
+ * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
+ * "Global Software Reset Affects Traffic Controller Frequency".
+ */
+ if (cpu_is_omap5912()) {
+ omap_writew(omap_readw(DPLL_CTL) & ~(1 << 4), DPLL_CTL);
+ omap_writew(0x8, ARM_RSTCT1);
+ }
+
+ omap_writew(1, ARM_RSTCT1);
+}
+
+void (*arch_reset)(char, const char *) = omap1_arch_reset;
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c
index 679bcd2..6be1438 100644
--- a/arch/arm/mach-omap2/prcm.c
+++ b/arch/arm/mach-omap2/prcm.c
@@ -24,6 +24,7 @@
#include <linux/io.h>
#include <linux/delay.h>
+#include <mach/system.h>
#include <plat/common.h>
#include <plat/prcm.h>
#include <plat/irqs.h>
@@ -57,7 +58,7 @@ u32 omap_prcm_get_reset_sources(void)
EXPORT_SYMBOL(omap_prcm_get_reset_sources);
/* Resets clock rates and reboots the system. Only called from system.h */
-void omap_prcm_arch_reset(char mode, const char *cmd)
+static void omap_prcm_arch_reset(char mode, const char *cmd)
{
s16 prcm_offs = 0;
@@ -108,6 +109,8 @@ void omap_prcm_arch_reset(char mode, const char *cmd)
omap2_prm_read_mod_reg(prcm_offs, OMAP2_RM_RSTCTRL); /* OCP barrier */
}
+void (*arch_reset)(char, const char *) = omap_prcm_arch_reset;
+
/**
* omap2_cm_wait_idlest - wait for IDLEST bit to indicate module readiness
* @reg: physical address of module IDLEST register
diff --git a/arch/arm/plat-omap/include/plat/prcm.h b/arch/arm/plat-omap/include/plat/prcm.h
index 2fdf8c8..267f43b 100644
--- a/arch/arm/plat-omap/include/plat/prcm.h
+++ b/arch/arm/plat-omap/include/plat/prcm.h
@@ -28,7 +28,6 @@
#define __ASM_ARM_ARCH_OMAP_PRCM_H
u32 omap_prcm_get_reset_sources(void);
-void omap_prcm_arch_reset(char mode, const char *cmd);
int omap2_cm_wait_idlest(void __iomem *reg, u32 mask, u8 idlest,
const char *name);
diff --git a/arch/arm/plat-omap/include/plat/system.h b/arch/arm/plat-omap/include/plat/system.h
index d0a119f..c5fa9e9 100644
--- a/arch/arm/plat-omap/include/plat/system.h
+++ b/arch/arm/plat-omap/include/plat/system.h
@@ -4,48 +4,14 @@
*/
#ifndef __ASM_ARCH_SYSTEM_H
#define __ASM_ARCH_SYSTEM_H
-#include <linux/clk.h>
-#include <asm/mach-types.h>
-#include <mach/hardware.h>
-
-#include <plat/prcm.h>
-
-#ifndef CONFIG_MACH_VOICEBLUE
-#define voiceblue_reset() do {} while (0)
-#else
-extern void voiceblue_reset(void);
-#endif
+#include <asm/proc-fns.h>
static inline void arch_idle(void)
{
cpu_do_idle();
}
-static inline void omap1_arch_reset(char mode, const char *cmd)
-{
- /*
- * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
- * "Global Software Reset Affects Traffic Controller Frequency".
- */
- if (cpu_is_omap5912()) {
- omap_writew(omap_readw(DPLL_CTL) & ~(1 << 4),
- DPLL_CTL);
- omap_writew(0x8, ARM_RSTCT1);
- }
-
- if (machine_is_voiceblue())
- voiceblue_reset();
- else
- omap_writew(1, ARM_RSTCT1);
-}
-
-static inline void arch_reset(char mode, const char *cmd)
-{
- if (!cpu_class_is_omap2())
- omap1_arch_reset(mode, cmd);
- else
- omap_prcm_arch_reset(mode, cmd);
-}
+extern void (*arch_reset)(char, const char *);
#endif
^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [PATCH 6/7] arm: plat-omap: system.h: move voiceblue definitions into the board header
2011-01-18 9:22 ` Russell King - ARM Linux
@ 2011-01-20 1:26 ` Tony Lindgren
-1 siblings, 0 replies; 24+ messages in thread
From: Tony Lindgren @ 2011-01-20 1:26 UTC (permalink / raw)
To: Russell King - ARM Linux; +Cc: Aaro Koskinen, linux-omap, linux-arm-kernel
* Russell King - ARM Linux <linux@arm.linux.org.uk> [110118 01:23]:
> On Tue, Jan 18, 2011 at 09:52:44AM +0200, Aaro Koskinen wrote:
> > Move voiceblue definitions into the board-specific header.
> >
> > Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
>
> Let's instead simplify this, and allow other platforms to hook into the
> reset handler if they choose. This has only been build-tested on my
> omap1 (which includes voiceblue) and omap4 configurations.
>
> 8<------
> Subject: ARM: OMAP: Allow platforms to hook reset cleanly
>
> This adds a clean method to allow platforms to hook into the reset
> code if they require to.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
> arch/arm/mach-omap1/Makefile | 2
> arch/arm/mach-omap1/board-voiceblue.c | 106 +++++++++++++++++--------------
> arch/arm/mach-omap1/reset.c | 25 +++++++
> arch/arm/mach-omap2/prcm.c | 5 +
> arch/arm/plat-omap/include/plat/prcm.h | 1
> arch/arm/plat-omap/include/plat/system.h | 38 -----------
> 6 files changed, 91 insertions(+), 86 deletions(-)
Looks good to me. I'll queue all these into devel-cleanup
branch for the next merge window.
Regards,
Tony
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 6/7] arm: plat-omap: system.h: move voiceblue definitions into the board header
@ 2011-01-20 1:26 ` Tony Lindgren
0 siblings, 0 replies; 24+ messages in thread
From: Tony Lindgren @ 2011-01-20 1:26 UTC (permalink / raw)
To: linux-arm-kernel
* Russell King - ARM Linux <linux@arm.linux.org.uk> [110118 01:23]:
> On Tue, Jan 18, 2011 at 09:52:44AM +0200, Aaro Koskinen wrote:
> > Move voiceblue definitions into the board-specific header.
> >
> > Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
>
> Let's instead simplify this, and allow other platforms to hook into the
> reset handler if they choose. This has only been build-tested on my
> omap1 (which includes voiceblue) and omap4 configurations.
>
> 8<------
> Subject: ARM: OMAP: Allow platforms to hook reset cleanly
>
> This adds a clean method to allow platforms to hook into the reset
> code if they require to.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
> arch/arm/mach-omap1/Makefile | 2
> arch/arm/mach-omap1/board-voiceblue.c | 106 +++++++++++++++++--------------
> arch/arm/mach-omap1/reset.c | 25 +++++++
> arch/arm/mach-omap2/prcm.c | 5 +
> arch/arm/plat-omap/include/plat/prcm.h | 1
> arch/arm/plat-omap/include/plat/system.h | 38 -----------
> 6 files changed, 91 insertions(+), 86 deletions(-)
Looks good to me. I'll queue all these into devel-cleanup
branch for the next merge window.
Regards,
Tony
^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2011-01-20 1:27 UTC | newest]
Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-18 7:52 [PATCH 0/7] omap1 sparse warning fixes Aaro Koskinen
2011-01-18 7:52 ` Aaro Koskinen
2011-01-18 7:52 ` [PATCH 1/7] arm: plat-omap: dma: make omap_dma_in_1510_mode() static Aaro Koskinen
2011-01-18 7:52 ` Aaro Koskinen
2011-01-18 7:52 ` [PATCH 2/7] arm: mach-omap1: board-h2: make h2_nand_platdata static Aaro Koskinen
2011-01-18 7:52 ` Aaro Koskinen
2011-01-18 7:52 ` [PATCH 3/7] arm: mach-omap1: board-innovator: make innovator_mmc_init() static Aaro Koskinen
2011-01-18 7:52 ` Aaro Koskinen
2011-01-18 7:52 ` [PATCH 4/7] arm: mach-omap1: board-htcherald: make htcpld_chips and htcpld_pfdata static Aaro Koskinen
2011-01-18 7:52 ` Aaro Koskinen
2011-01-18 7:52 ` [PATCH 5/7] arm: mach-omap1: board-h3: make nand_platdata static Aaro Koskinen
2011-01-18 7:52 ` Aaro Koskinen
2011-01-18 7:52 ` [PATCH 6/7] arm: plat-omap: system.h: move voiceblue definitions into the board header Aaro Koskinen
2011-01-18 7:52 ` Aaro Koskinen
2011-01-18 9:22 ` Russell King - ARM Linux
2011-01-18 9:22 ` Russell King - ARM Linux
2011-01-20 1:26 ` Tony Lindgren
2011-01-20 1:26 ` Tony Lindgren
2011-01-18 7:52 ` [PATCH 7/7] arm: mach-omap1: board-voiceblue: add missing include Aaro Koskinen
2011-01-18 7:52 ` Aaro Koskinen
2011-01-18 8:11 ` Felipe Balbi
2011-01-18 8:11 ` Felipe Balbi
2011-01-18 8:21 ` Felipe Balbi
2011-01-18 8:21 ` Felipe Balbi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.