Skip to contentSkip to conversation

ARM: OMAP2+: Remove remaining unused legacy code

PATCH RESEND New Javier Martinez Canillas 2 participants 7 messages Mar 19, 2014 – Nov 6, 2014

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

cover ARM: OMAP2+: Remove remaining unused legacy code

Once OMAP2+ board files are removed, there is unused code that was only used by legacy platform code and can be removed.

This patch-set depends on the series:

[PATCH 00/12] Drop omap3 board files and make mach-omap2 boot in DT only mode [0]

and is composed of the following patches:

[RESEND PATCH 1/3] ARM: OMAP2+: Remove legacy smsc911x and smc91x [RESEND PATCH 2/3] ARM: OMAP2+: Remove unnecesary include in GPMC [RESEND PATCH 3/3] ARM: OMAP2+: Remove legacy board-flash.c

Tony,

I don't know what is your new schedule for board files removal but in case it is 3.16, I forward ported this patch-set on top of 3.14-rc7 and fixed some conflicts.

Best regards,
Javier

[0]: http://marc.info/?t=138542504600001&r=1&w=2

#1 lore raw

PATCH RESEND 1/3 ARM: OMAP2+: Remove legacy smsc911x and smc91x GPMC support

When connecting an ethernet chip to the GPMC, such as smc91x or smsc911x, a GPIO has to be requested to be used as an IRQ and also the IO memory for a GPMC chip-select.

When booting with DT the chip-select allocation is handled in a generic manner in the GPMC driver and the GPIO to IRQ mapping is made by the DT core so this code is not needed anymore now that mach-omap2 related boards are DT-only.

---
 arch/arm/mach-omap2/Makefile        |   5 -
 arch/arm/mach-omap2/gpmc-smc91x.c   | 186 ------------------------------------
 arch/arm/mach-omap2/gpmc-smc91x.h   |  42 --------
 arch/arm/mach-omap2/gpmc-smsc911x.c | 100 -------------------
 arch/arm/mach-omap2/gpmc-smsc911x.h |  35 -------
 5 files changed, 368 deletions(-)
 delete mode 100644 arch/arm/mach-omap2/gpmc-smc91x.c
 delete mode 100644 arch/arm/mach-omap2/gpmc-smc91x.h
 delete mode 100644 arch/arm/mach-omap2/gpmc-smsc911x.c
 delete mode 100644 arch/arm/mach-omap2/gpmc-smsc911x.h
arch/arm/mach-omap2/Makefile +0 -5
index e6eec6f..103f1e8 100644
@@ -283,11 +283,6 @@ obj-y					+= $(onenand-m) $(onenand-y)
 nand-$(CONFIG_MTD_NAND_OMAP2)		:= gpmc-nand.o
 obj-y					+= $(nand-m) $(nand-y)
 
-smc91x-$(CONFIG_SMC91X)			:= gpmc-smc91x.o
-obj-y					+= $(smc91x-m) $(smc91x-y)
-
-smsc911x-$(CONFIG_SMSC911X)		:= gpmc-smsc911x.o
-obj-y					+= $(smsc911x-m) $(smsc911x-y)
 ifneq ($(CONFIG_HWSPINLOCK_OMAP),)
 obj-y					+= hwspinlock.o
 endif
arch/arm/mach-omap2/gpmc-smc91x.c deleted +0 -186

186 lines not on this page · raw message

arch/arm/mach-omap2/gpmc-smc91x.h deleted +0 -42

42 lines not on this page · raw message

arch/arm/mach-omap2/gpmc-smsc911x.c deleted +0 -100

100 lines not on this page · raw message

arch/arm/mach-omap2/gpmc-smsc911x.h deleted +0 -35
deleted file mode 100644
index ea6c9c8..0000000
@@ -1,35 +0,0 @@
-/*
- * arch/arm/plat-omap/include/plat/gpmc-smsc911x.h
- *
- * Copyright (C) 2009 Li-Pro.Net
- * Stephan Linz <[email protected]>
- *
- * Modified from arch/arm/plat-omap/include/plat/gpmc-smc91x.h
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#ifndef __ASM_ARCH_OMAP_GPMC_SMSC911X_H__
-
-struct omap_smsc911x_platform_data {
-	int	id;
-	int	cs;
-	int	gpio_irq;
-	int	gpio_reset;
-	u32	flags;
-};
-
-#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
-
-extern void gpmc_smsc911x_init(struct omap_smsc911x_platform_data *d);
-
-#else
-
-static inline void gpmc_smsc911x_init(struct omap_smsc911x_platform_data *d)
-{
-}
-
-#endif
-#endif
Signature · 1 line
1.9.0
#2 lore raw

PATCH RESEND 2/3 ARM: OMAP2+: Remove unnecesary include in GPMC driver

In reply to Javier Martinez Canillas

The GPMC driver includes arch/arm/mach-omap2/common.h but does not use anything on that header so it can be removed.

---
 arch/arm/mach-omap2/gpmc.c | 1 -
 1 file changed, 1 deletion(-)
arch/arm/mach-omap2/gpmc.c +0 -1
index ab43755..b637c96 100644
@@ -37,7 +37,6 @@
 #include <asm/mach-types.h>
 
 #include "soc.h"
-#include "common.h"
 #include "omap_device.h"
 #include "gpmc.h"
 #include "gpmc-nand.h"
Signature · 1 line
1.9.0
maintainer
#3 lore raw

PATCH RESEND 2/3 ARM: OMAP2+: Remove unnecesary include in GPMC driver

Quoted 5 lines · Javier Martinez Canillas

The GPMC driver includes arch/arm/mach-omap2/common.h but does not use anything on that header so it can be removed.

Probably meant Cc here? :) I'll apply this into omap-for-v3.19/gpmc, the rest will need to wait until omap3 is DT only.

Regards,

Tony

Quoted 19 lines
---
 arch/arm/mach-omap2/gpmc.c | 1 -
 1 file changed, 1 deletion(-)
arch/arm/mach-omap2/gpmc.c +0 -1
index ab43755..b637c96 100644
@@ -37,7 +37,6 @@
 #include <asm/mach-types.h>
 
 #include "soc.h"
-#include "common.h"
 #include "omap_device.h"
 #include "gpmc.h"
 #include "gpmc-nand.h"
Signature · 1 line
1.9.0
#4 lore raw

PATCH RESEND 2/3 ARM: OMAP2+: Remove unnecesary include in GPMC driver

Hello Tony,

Quoted 10 lines · Tony Lindgren
Quoted 5 lines · Javier Martinez Canillas

The GPMC driver includes arch/arm/mach-omap2/common.h but does not use anything on that header so it can be removed.

Probably meant Cc here? :) I'll apply this into omap-for-v3.19/gpmc, the rest will need to wait until omap3 is DT only.

Ups, I don't know how your s-o-b ended there :)

Thanks a lot for picking such an old patch.

Best regards,
Javier

#5 lore raw

PATCH RESEND 3/3 ARM: OMAP2+: Remove legacy board-flash.c

In reply to Javier Martinez Canillas

Legacy board files in mach-omap2 used the helper functions board_{nor,nand,onenand}_init() to initialize the flash devices attached to the GPMC.

With Device Tree booting the initialization is handled by the GPMC driver gpmc_probe_*_child() functions so this code is not needed anymore now that OMAP2+ is DT-only.

---
 arch/arm/mach-omap2/Makefile      |   4 -
 arch/arm/mach-omap2/board-flash.c | 245 --------------------------------------
 arch/arm/mach-omap2/board-flash.h |  62 ----------
 3 files changed, 311 deletions(-)
 delete mode 100644 arch/arm/mach-omap2/board-flash.c
 delete mode 100644 arch/arm/mach-omap2/board-flash.h
arch/arm/mach-omap2/Makefile +0 -4
index 103f1e8..aa75e9b 100644
@@ -264,10 +264,6 @@ obj-$(CONFIG_MACH_TI8148EVM)		+= board-ti8168evm.o
 
 # Platform specific device init code
 
-omap-flash-$(CONFIG_MTD_NAND_OMAP2)	:= board-flash.o
-omap-flash-$(CONFIG_MTD_ONENAND_OMAP2)	:= board-flash.o
-obj-y					+= $(omap-flash-y) $(omap-flash-m)
-
 omap-hsmmc-$(CONFIG_MMC_OMAP_HS)	:= hsmmc.o
 obj-y					+= $(omap-hsmmc-m) $(omap-hsmmc-y)
 
arch/arm/mach-omap2/board-flash.c deleted +0 -245

245 lines not on this page · raw message

arch/arm/mach-omap2/board-flash.h deleted +0 -62

62 lines not on this page · raw message

Signature · 1 line
1.9.0
maintainer
#6 lore raw

cover ARM: OMAP2+: Remove remaining unused legacy code

In reply to Javier Martinez Canillas
Quoted 9 lines · Javier Martinez Canillas

Once OMAP2+ board files are removed, there is unused code that was only used by legacy platform code and can be removed.

This patch-set depends on the series:

[PATCH 00/12] Drop omap3 board files and make mach-omap2 boot in DT only mode [0]

and is composed of the following patches:

Quoted 8 lines

[RESEND PATCH 1/3] ARM: OMAP2+: Remove legacy smsc911x and smc91x [RESEND PATCH 2/3] ARM: OMAP2+: Remove unnecesary include in GPMC [RESEND PATCH 3/3] ARM: OMAP2+: Remove legacy board-flash.c

Tony,

I don't know what is your new schedule for board files removal but in case it is 3.16, I forward ported this patch-set on top of 3.14-rc7 and fixed some conflicts.

Thanks, I'll also rebase my changes in omap-for-v3.14/omap3-board-removal at some point. Probably a good target is v3.16 if the DSS changes go in. Then we just need displays enabled for omap3 and pandora supported to drop the legacy data AFAIK.

Regards,

Tony

Quoted 2 lines

[0]: http://marc.info/?t=138542504600001&r=1&w=2