diff mbox

ARM: OMAP: SX1: remove check for CONFIG_SX1_OLD_FLASH

Message ID 1400182902.11786.21.camel@x220 (mailing list archive)
State New, archived
Headers show

Commit Message

Paul Bolle May 15, 2014, 7:41 p.m. UTC
A check for CONFIG_SX1_OLD_FLASH was added in v2.6.24. But the related
Kconfig symbol was never part of the tree. So we can remove some dead
code.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
---
Also untested.

 arch/arm/mach-omap1/board-sx1.c | 26 --------------------------
 1 file changed, 26 deletions(-)

Comments

Tony Lindgren May 16, 2014, 9:12 p.m. UTC | #1
* Paul Bolle <pebolle@tiscali.nl> [140515 12:42]:
> A check for CONFIG_SX1_OLD_FLASH was added in v2.6.24. But the related
> Kconfig symbol was never part of the tree. So we can remove some dead
> code.

Thanks applying into omap-for-v3.16/board.

Tony
Pavel Machek May 29, 2014, 7:02 p.m. UTC | #2
On Fri 2014-05-16 14:12:31, Tony Lindgren wrote:
> * Paul Bolle <pebolle@tiscali.nl> [140515 12:42]:
> > A check for CONFIG_SX1_OLD_FLASH was added in v2.6.24. But the related
> > Kconfig symbol was never part of the tree. So we can remove some dead
> > code.
> 
> Thanks applying into omap-for-v3.16/board.

Actually... It seems there are two variant of SX1, and this is very
useful piece of documentation how the _other_ variant looks.

And if someone is hacking linux on sx1, he can probably figure out
#ifdef in .c file...

IOW adding the config option might be better solution.
									Pavel
Tony Lindgren May 29, 2014, 7:17 p.m. UTC | #3
* Pavel Machek <pavel@ucw.cz> [140529 12:03]:
> On Fri 2014-05-16 14:12:31, Tony Lindgren wrote:
> > * Paul Bolle <pebolle@tiscali.nl> [140515 12:42]:
> > > A check for CONFIG_SX1_OLD_FLASH was added in v2.6.24. But the related
> > > Kconfig symbol was never part of the tree. So we can remove some dead
> > > code.
> > 
> > Thanks applying into omap-for-v3.16/board.
> 
> Actually... It seems there are two variant of SX1, and this is very
> useful piece of documentation how the _other_ variant looks.
> 
> And if someone is hacking linux on sx1, he can probably figure out
> #ifdef in .c file...
> 
> IOW adding the config option might be better solution.

Or just a comment saying the same?

Regards,

Tony
Pavel Machek May 29, 2014, 7:42 p.m. UTC | #4
On Thu 2014-05-29 12:17:39, Tony Lindgren wrote:
> * Pavel Machek <pavel@ucw.cz> [140529 12:03]:
> > On Fri 2014-05-16 14:12:31, Tony Lindgren wrote:
> > > * Paul Bolle <pebolle@tiscali.nl> [140515 12:42]:
> > > > A check for CONFIG_SX1_OLD_FLASH was added in v2.6.24. But the related
> > > > Kconfig symbol was never part of the tree. So we can remove some dead
> > > > code.
> > > 
> > > Thanks applying into omap-for-v3.16/board.
> > 
> > Actually... It seems there are two variant of SX1, and this is very
> > useful piece of documentation how the _other_ variant looks.
> > 
> > And if someone is hacking linux on sx1, he can probably figure out
> > #ifdef in .c file...
> > 
> > IOW adding the config option might be better solution.
> 
> Or just a comment saying the same?

Yes, #if 0 with a comment would do the same trick.
									Pavel
diff mbox

Patch

diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c
index 0a8d3349149c..29e526235dc2 100644
--- a/arch/arm/mach-omap1/board-sx1.c
+++ b/arch/arm/mach-omap1/board-sx1.c
@@ -266,31 +266,6 @@  static struct physmap_flash_data sx1_flash_data = {
 	.nr_parts	= ARRAY_SIZE(sx1_partitions),
 };
 
-#ifdef CONFIG_SX1_OLD_FLASH
-/* MTD Intel StrataFlash - old flashes */
-static struct resource sx1_old_flash_resource[] = {
-	[0] = {
-		.start	= OMAP_CS0_PHYS,	/* Physical */
-		.end	= OMAP_CS0_PHYS + SZ_16M - 1,,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= OMAP_CS1_PHYS,
-		.end	= OMAP_CS1_PHYS + SZ_8M - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-};
-
-static struct platform_device sx1_flash_device = {
-	.name		= "physmap-flash",
-	.id		= 0,
-	.dev		= {
-		.platform_data	= &sx1_flash_data,
-	},
-	.num_resources	= 2,
-	.resource	= &sx1_old_flash_resource,
-};
-#else
 /* MTD Intel 4000 flash - new flashes */
 static struct resource sx1_new_flash_resource = {
 	.start		= OMAP_CS0_PHYS,
@@ -307,7 +282,6 @@  static struct platform_device sx1_flash_device = {
 	.num_resources	= 1,
 	.resource	= &sx1_new_flash_resource,
 };
-#endif
 
 /*----------- USB -------------------------*/