* [PATCHv2 0/3] Various code improvements for IGEP v2 board.
@ 2010-10-23 16:48 ` Enric Balletbo i Serra
0 siblings, 0 replies; 10+ messages in thread
From: Enric Balletbo i Serra @ 2010-10-23 16:48 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel, balbi
Hello,
The comments of this post also apply to IGEP v2 board (thanks Laurent)
http://www.mail-archive.com/linux-omap@vger.kernel.org/msg36402.html
Changes since v1:
- Split patch in a serie.
- [1/3] onenand_setup = NULL, is a static variable, removed from code.
This patch apply on top of tmlind/omap-for-linux branch.
$ git diff --stat tmlind/omap-for-linus
arch/arm/mach-omap2/board-igep0020.c | 35 ++++++++++-----------------------
1 files changed, 11 insertions(+), 24 deletions(-)
Cheers,
Enric
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCHv2 0/3] Various code improvements for IGEP v2 board.
@ 2010-10-23 16:48 ` Enric Balletbo i Serra
0 siblings, 0 replies; 10+ messages in thread
From: Enric Balletbo i Serra @ 2010-10-23 16:48 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
The comments of this post also apply to IGEP v2 board (thanks Laurent)
http://www.mail-archive.com/linux-omap at vger.kernel.org/msg36402.html
Changes since v1:
- Split patch in a serie.
- [1/3] onenand_setup = NULL, is a static variable, removed from code.
This patch apply on top of tmlind/omap-for-linux branch.
$ git diff --stat tmlind/omap-for-linus
arch/arm/mach-omap2/board-igep0020.c | 35 ++++++++++-----------------------
1 files changed, 11 insertions(+), 24 deletions(-)
Cheers,
Enric
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCHv2 1/3] omap3: IGEP v2: Remove onenand_setup no-op function.
2010-10-23 16:48 ` Enric Balletbo i Serra
@ 2010-10-23 16:48 ` Enric Balletbo i Serra
-1 siblings, 0 replies; 10+ messages in thread
From: Enric Balletbo i Serra @ 2010-10-23 16:48 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel, balbi; +Cc: Enric Balletbo i Serra
Set onenand_setup to NULL instead of adding a no-op function.
Signed-off-by: Enric Balletbo i Serra <eballetbo@gmail.com>
---
arch/arm/mach-omap2/board-igep0020.c | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 5e035a5..20b199f 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -136,16 +136,9 @@ static struct mtd_partition igep2_onenand_partitions[] = {
},
};
-static int igep2_onenand_setup(void __iomem *onenand_base, int freq)
-{
- /* nothing is required to be setup for onenand as of now */
- return 0;
-}
-
static struct omap_onenand_platform_data igep2_onenand_data = {
.parts = igep2_onenand_partitions,
.nr_parts = ARRAY_SIZE(igep2_onenand_partitions),
- .onenand_setup = igep2_onenand_setup,
.dma_channel = -1, /* disable DMA in OMAP OneNAND driver */
};
--
1.7.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCHv2 1/3] omap3: IGEP v2: Remove onenand_setup no-op function.
@ 2010-10-23 16:48 ` Enric Balletbo i Serra
0 siblings, 0 replies; 10+ messages in thread
From: Enric Balletbo i Serra @ 2010-10-23 16:48 UTC (permalink / raw)
To: linux-arm-kernel
Set onenand_setup to NULL instead of adding a no-op function.
Signed-off-by: Enric Balletbo i Serra <eballetbo@gmail.com>
---
arch/arm/mach-omap2/board-igep0020.c | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 5e035a5..20b199f 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -136,16 +136,9 @@ static struct mtd_partition igep2_onenand_partitions[] = {
},
};
-static int igep2_onenand_setup(void __iomem *onenand_base, int freq)
-{
- /* nothing is required to be setup for onenand as of now */
- return 0;
-}
-
static struct omap_onenand_platform_data igep2_onenand_data = {
.parts = igep2_onenand_partitions,
.nr_parts = ARRAY_SIZE(igep2_onenand_partitions),
- .onenand_setup = igep2_onenand_setup,
.dma_channel = -1, /* disable DMA in OMAP OneNAND driver */
};
--
1.7.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCHv2 2/3] omap3: IGEP v2: Remove igep2_config array.
2010-10-23 16:48 ` Enric Balletbo i Serra
@ 2010-10-23 16:48 ` Enric Balletbo i Serra
-1 siblings, 0 replies; 10+ messages in thread
From: Enric Balletbo i Serra @ 2010-10-23 16:48 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel, balbi; +Cc: Enric Balletbo i Serra
omap_board_config_size is implicitly initialized to 0 in
plat-omap/common.c, get_config() won't dereference omap_board_config,
so we can remove the empty igep2_config array.
Signed-off-by: Enric Balletbo i Serra <eballetbo@gmail.com>
---
arch/arm/mach-omap2/board-igep0020.c | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 20b199f..42dcbf4 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -247,9 +247,6 @@ static inline void __init igep2_init_smsc911x(void)
static inline void __init igep2_init_smsc911x(void) { }
#endif
-static struct omap_board_config_kernel igep2_config[] __initdata = {
-};
-
static struct regulator_consumer_supply igep2_vmmc1_supply = {
.supply = "vmmc",
};
@@ -486,8 +483,6 @@ static struct platform_device *igep2_devices[] __initdata = {
static void __init igep2_init_irq(void)
{
- omap_board_config = igep2_config;
- omap_board_config_size = ARRAY_SIZE(igep2_config);
omap2_init_common_hw(m65kxxxxam_sdrc_params, m65kxxxxam_sdrc_params);
omap_init_irq();
omap_gpio_init();
--
1.7.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCHv2 2/3] omap3: IGEP v2: Remove igep2_config array.
@ 2010-10-23 16:48 ` Enric Balletbo i Serra
0 siblings, 0 replies; 10+ messages in thread
From: Enric Balletbo i Serra @ 2010-10-23 16:48 UTC (permalink / raw)
To: linux-arm-kernel
omap_board_config_size is implicitly initialized to 0 in
plat-omap/common.c, get_config() won't dereference omap_board_config,
so we can remove the empty igep2_config array.
Signed-off-by: Enric Balletbo i Serra <eballetbo@gmail.com>
---
arch/arm/mach-omap2/board-igep0020.c | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 20b199f..42dcbf4 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -247,9 +247,6 @@ static inline void __init igep2_init_smsc911x(void)
static inline void __init igep2_init_smsc911x(void) { }
#endif
-static struct omap_board_config_kernel igep2_config[] __initdata = {
-};
-
static struct regulator_consumer_supply igep2_vmmc1_supply = {
.supply = "vmmc",
};
@@ -486,8 +483,6 @@ static struct platform_device *igep2_devices[] __initdata = {
static void __init igep2_init_irq(void)
{
- omap_board_config = igep2_config;
- omap_board_config_size = ARRAY_SIZE(igep2_config);
omap2_init_common_hw(m65kxxxxam_sdrc_params, m65kxxxxam_sdrc_params);
omap_init_irq();
omap_gpio_init();
--
1.7.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCHv3 3/3] omap3: IGEP v2: Improve igep2_flash_init() function.
2010-10-23 16:48 ` Enric Balletbo i Serra
@ 2010-10-23 16:49 ` Enric Balletbo i Serra
-1 siblings, 0 replies; 10+ messages in thread
From: Enric Balletbo i Serra @ 2010-10-23 16:49 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel, balbi; +Cc: Enric Balletbo i Serra
The changes are:
- Use 'for' loop instead 'while' loop.
- No need to initialize ret to 0, we're assigning it right after.
- No need to check for onenandcs < GPMC_CS_NUM here, it will always be true.
Signed-off-by: Enric Balletbo i Serra <eballetbo@gmail.com>
---
arch/arm/mach-omap2/board-igep0020.c | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 42dcbf4..fe76b59 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -152,35 +152,34 @@ static struct platform_device igep2_onenand_device = {
static void __init igep2_flash_init(void)
{
- u8 cs = 0;
- u8 onenandcs = GPMC_CS_NUM + 1;
+ u8 cs = 0;
+ u8 onenandcs = GPMC_CS_NUM + 1;
- while (cs < GPMC_CS_NUM) {
- u32 ret = 0;
+ for (cs = 0; cs < GPMC_CS_NUM; cs++) {
+ u32 ret;
ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG1);
/* Check if NAND/oneNAND is configured */
if ((ret & 0xC00) == 0x800)
/* NAND found */
- pr_err("IGEP v2: Unsupported NAND found\n");
+ pr_err("IGEP2: Unsupported NAND found\n");
else {
ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG7);
if ((ret & 0x3F) == (ONENAND_MAP >> 24))
/* ONENAND found */
onenandcs = cs;
}
- cs++;
}
+
if (onenandcs > GPMC_CS_NUM) {
- pr_err("IGEP v2: Unable to find configuration in GPMC\n");
+ pr_err("IGEP2: Unable to find configuration in GPMC\n");
return;
}
- if (onenandcs < GPMC_CS_NUM) {
- igep2_onenand_data.cs = onenandcs;
- if (platform_device_register(&igep2_onenand_device) < 0)
- pr_err("IGEP v2: Unable to register OneNAND device\n");
- }
+ igep2_onenand_data.cs = onenandcs;
+
+ if (platform_device_register(&igep2_onenand_device) < 0)
+ pr_err("IGEP2: Unable to register OneNAND device\n");
}
#else
--
1.7.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCHv3 3/3] omap3: IGEP v2: Improve igep2_flash_init() function.
@ 2010-10-23 16:49 ` Enric Balletbo i Serra
0 siblings, 0 replies; 10+ messages in thread
From: Enric Balletbo i Serra @ 2010-10-23 16:49 UTC (permalink / raw)
To: linux-arm-kernel
The changes are:
- Use 'for' loop instead 'while' loop.
- No need to initialize ret to 0, we're assigning it right after.
- No need to check for onenandcs < GPMC_CS_NUM here, it will always be true.
Signed-off-by: Enric Balletbo i Serra <eballetbo@gmail.com>
---
arch/arm/mach-omap2/board-igep0020.c | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 42dcbf4..fe76b59 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -152,35 +152,34 @@ static struct platform_device igep2_onenand_device = {
static void __init igep2_flash_init(void)
{
- u8 cs = 0;
- u8 onenandcs = GPMC_CS_NUM + 1;
+ u8 cs = 0;
+ u8 onenandcs = GPMC_CS_NUM + 1;
- while (cs < GPMC_CS_NUM) {
- u32 ret = 0;
+ for (cs = 0; cs < GPMC_CS_NUM; cs++) {
+ u32 ret;
ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG1);
/* Check if NAND/oneNAND is configured */
if ((ret & 0xC00) == 0x800)
/* NAND found */
- pr_err("IGEP v2: Unsupported NAND found\n");
+ pr_err("IGEP2: Unsupported NAND found\n");
else {
ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG7);
if ((ret & 0x3F) == (ONENAND_MAP >> 24))
/* ONENAND found */
onenandcs = cs;
}
- cs++;
}
+
if (onenandcs > GPMC_CS_NUM) {
- pr_err("IGEP v2: Unable to find configuration in GPMC\n");
+ pr_err("IGEP2: Unable to find configuration in GPMC\n");
return;
}
- if (onenandcs < GPMC_CS_NUM) {
- igep2_onenand_data.cs = onenandcs;
- if (platform_device_register(&igep2_onenand_device) < 0)
- pr_err("IGEP v2: Unable to register OneNAND device\n");
- }
+ igep2_onenand_data.cs = onenandcs;
+
+ if (platform_device_register(&igep2_onenand_device) < 0)
+ pr_err("IGEP2: Unable to register OneNAND device\n");
}
#else
--
1.7.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCHv2 0/3] Various code improvements for IGEP v2 board.
2010-10-23 16:48 ` Enric Balletbo i Serra
@ 2010-11-05 21:49 ` Tony Lindgren
-1 siblings, 0 replies; 10+ messages in thread
From: Tony Lindgren @ 2010-11-05 21:49 UTC (permalink / raw)
To: Enric Balletbo i Serra; +Cc: linux-omap, linux-arm-kernel, balbi
* Enric Balletbo i Serra <eballetbo@gmail.com> [101023 09:40]:
>
> Hello,
>
> The comments of this post also apply to IGEP v2 board (thanks Laurent)
>
> http://www.mail-archive.com/linux-omap@vger.kernel.org/msg36402.html
>
> Changes since v1:
> - Split patch in a serie.
> - [1/3] onenand_setup = NULL, is a static variable, removed from code.
>
> This patch apply on top of tmlind/omap-for-linux branch.
>
> $ git diff --stat tmlind/omap-for-linus
> arch/arm/mach-omap2/board-igep0020.c | 35 ++++++++++-----------------------
> 1 files changed, 11 insertions(+), 24 deletions(-)
Thanks, I'll queue these for 2.6.38 merge window.
Regards,
Tony
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCHv2 0/3] Various code improvements for IGEP v2 board.
@ 2010-11-05 21:49 ` Tony Lindgren
0 siblings, 0 replies; 10+ messages in thread
From: Tony Lindgren @ 2010-11-05 21:49 UTC (permalink / raw)
To: linux-arm-kernel
* Enric Balletbo i Serra <eballetbo@gmail.com> [101023 09:40]:
>
> Hello,
>
> The comments of this post also apply to IGEP v2 board (thanks Laurent)
>
> http://www.mail-archive.com/linux-omap at vger.kernel.org/msg36402.html
>
> Changes since v1:
> - Split patch in a serie.
> - [1/3] onenand_setup = NULL, is a static variable, removed from code.
>
> This patch apply on top of tmlind/omap-for-linux branch.
>
> $ git diff --stat tmlind/omap-for-linus
> arch/arm/mach-omap2/board-igep0020.c | 35 ++++++++++-----------------------
> 1 files changed, 11 insertions(+), 24 deletions(-)
Thanks, I'll queue these for 2.6.38 merge window.
Regards,
Tony
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2010-11-05 21:49 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-23 16:48 [PATCHv2 0/3] Various code improvements for IGEP v2 board Enric Balletbo i Serra
2010-10-23 16:48 ` Enric Balletbo i Serra
2010-10-23 16:48 ` [PATCHv2 1/3] omap3: IGEP v2: Remove onenand_setup no-op function Enric Balletbo i Serra
2010-10-23 16:48 ` Enric Balletbo i Serra
2010-10-23 16:48 ` [PATCHv2 2/3] omap3: IGEP v2: Remove igep2_config array Enric Balletbo i Serra
2010-10-23 16:48 ` Enric Balletbo i Serra
2010-10-23 16:49 ` [PATCHv3 3/3] omap3: IGEP v2: Improve igep2_flash_init() function Enric Balletbo i Serra
2010-10-23 16:49 ` Enric Balletbo i Serra
2010-11-05 21:49 ` [PATCHv2 0/3] Various code improvements for IGEP v2 board Tony Lindgren
2010-11-05 21:49 ` Tony Lindgren
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.