Skip to contentSkip to conversation

ARM: OMAP: SX1: remove check for CONFIG_SX1_OLD_FLASH

PATCH In review Paul Bolle 3 participants 5 messages May 15, 2014 – May 29, 2014

Subsystems (3)
lore
Share & tools
lore

Paul Bolle

author
#0 lore raw

PATCH 1/1 ARM: OMAP: SX1: remove check for CONFIG_SX1_OLD_FLASH

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.

---
Also untested.

 arch/arm/mach-omap1/board-sx1.c | 26 --------------------------
 1 file changed, 26 deletions(-)
arch/arm/mach-omap1/board-sx1.c +0 -26
index 0a8d3349149c..29e526235dc2 100644
@@ -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 -------------------------*/
 
Signature · 1 line
1.9.0
reviewer
#1 lore raw
Quoted 3 lines · Paul Bolle

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

#2 lore raw
Quoted 6 lines · Tony Lindgren
Quoted 3 lines · Paul Bolle

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

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
reviewer
#3 lore raw
Quoted 8 lines · Pavel Machek
Quoted 6 lines · Tony Lindgren
Quoted 3 lines · Paul Bolle

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.

Quoted 7 lines

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

#4 lore raw
Quoted 12 lines · Tony Lindgren
Quoted 11 lines · Pavel Machek
Quoted 6 lines · Tony Lindgren
Quoted 3 lines · Paul Bolle

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.

Quoted 6 lines
Quoted 4 lines

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

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html