Skip to contentSkip to conversation

Move some ARM header files to more appropriate locations

RFC New Russell King - ARM Linux 10 participants 17 messages Sep 21, 2012 – Nov 16, 2012

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

cover Move some ARM header files to more appropriate locations

This series moves some of the misplaced ARM header files, which contain driver platform data, out of arch/arm/include/asm/mach and into include/linux/platform_data.

arch/arm/include/asm/mach is supposed to be for include files exporting generic ARM code structures and functions to ARM platforms, not for platforms to export platform data definitions to the rest of the kernel.

This patch series addresses three of the files: the SA11x0 serial driver platform data, the PXA2xx UDC driver, and the Atmel serial driver. Out of those three, I ended up deleting the Atmel serial driver header as I could not find any user of the exported function and its data structure anywhere in the kernel.

 arch/arm/include/asm/mach/serial_at91.h            |   33 --------------------
 arch/arm/mach-ixp4xx/include/mach/udc.h            |    2 +-
 arch/arm/mach-pxa/include/mach/udc.h               |    2 +-
 arch/arm/mach-sa1100/assabet.c                     |    2 +-
 arch/arm/mach-sa1100/badge4.c                      |    2 +-
 arch/arm/mach-sa1100/cerf.c                        |    2 +-
 arch/arm/mach-sa1100/collie.c                      |    2 +-
 arch/arm/mach-sa1100/h3xxx.c                       |    2 +-
 arch/arm/mach-sa1100/hackkit.c                     |    2 +-
 arch/arm/mach-sa1100/jornada720.c                  |    2 +-
 arch/arm/mach-sa1100/lart.c                        |    2 +-
 arch/arm/mach-sa1100/nanoengine.c                  |    2 +-
 arch/arm/mach-sa1100/neponset.c                    |    2 +-
 arch/arm/mach-sa1100/pleb.c                        |    2 +-
 arch/arm/mach-sa1100/shannon.c                     |    2 +-
 arch/arm/mach-sa1100/simpad.c                      |    2 +-
 arch/avr32/include/asm/mach/serial_at91.h          |   33 --------------------
 drivers/tty/serial/atmel_serial.c                  |   18 -----------
 drivers/tty/serial/sa1100.c                        |    2 +-
 drivers/usb/gadget/pxa25x_udc.c                    |    4 +--
 .../linux/platform_data/pxa2xx_udc.h               |    5 ++-
 .../linux/platform_data/sa11x0-serial.h            |    6 ++-
 22 files changed, 24 insertions(+), 107 deletions(-)
 delete mode 100644 arch/arm/include/asm/mach/serial_at91.h
 delete mode 100644 arch/avr32/include/asm/mach/serial_at91.h
 rename arch/arm/include/asm/mach/udc_pxa2xx.h => include/linux/platform_data/pxa2xx_udc.h (94%)
 rename arch/arm/include/asm/mach/serial_sa1100.h => include/linux/platform_data/sa11x0-serial.h (93%)
#1 lore raw

RFC 1/3 ARM: move serial_sa1100.h header file to linux/platform_data

This is really driver platform data, so move it to the appropriate directory.

---
 arch/arm/include/asm/mach/serial_sa1100.h   |   31 -------------------------
 arch/arm/mach-sa1100/assabet.c              |    2 +-
 arch/arm/mach-sa1100/badge4.c               |    2 +-
 arch/arm/mach-sa1100/cerf.c                 |    2 +-
 arch/arm/mach-sa1100/collie.c               |    2 +-
 arch/arm/mach-sa1100/h3xxx.c                |    2 +-
 arch/arm/mach-sa1100/hackkit.c              |    2 +-
 arch/arm/mach-sa1100/jornada720.c           |    2 +-
 arch/arm/mach-sa1100/lart.c                 |    2 +-
 arch/arm/mach-sa1100/nanoengine.c           |    2 +-
 arch/arm/mach-sa1100/neponset.c             |    2 +-
 arch/arm/mach-sa1100/pleb.c                 |    2 +-
 arch/arm/mach-sa1100/shannon.c              |    2 +-
 arch/arm/mach-sa1100/simpad.c               |    2 +-
 drivers/tty/serial/sa1100.c                 |    2 +-
 include/linux/platform_data/sa11x0-serial.h |   33 +++++++++++++++++++++++++++
 16 files changed, 47 insertions(+), 45 deletions(-)
 delete mode 100644 arch/arm/include/asm/mach/serial_sa1100.h
 create mode 100644 include/linux/platform_data/sa11x0-serial.h
arch/arm/include/asm/mach/serial_sa1100.h deleted +0 -31
deleted file mode 100644
index d09064b..0000000
@@ -1,31 +0,0 @@
-/*
- *  arch/arm/include/asm/mach/serial_sa1100.h
- *
- *  Author: Nicolas Pitre
- *
- * Moved and changed lots, Russell King
- *
- * Low level machine dependent UART functions.
- */
-
-struct uart_port;
-struct uart_info;
-
-/*
- * This is a temporary structure for registering these
- * functions; it is intended to be discarded after boot.
- */
-struct sa1100_port_fns {
-	void	(*set_mctrl)(struct uart_port *, u_int);
-	u_int	(*get_mctrl)(struct uart_port *);
-	void	(*pm)(struct uart_port *, u_int, u_int);
-	int	(*set_wake)(struct uart_port *, u_int);
-};
-
-#ifdef CONFIG_SERIAL_SA1100
-void sa1100_register_uart_fns(struct sa1100_port_fns *fns);
-void sa1100_register_uart(int idx, int port);
-#else
-#define sa1100_register_uart_fns(fns) do { } while (0)
-#define sa1100_register_uart(idx,port) do { } while (0)
-#endif
arch/arm/mach-sa1100/assabet.c +1 -1
index d673211..4a0e6b8 100644
@@ -14,6 +14,7 @@
 #include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/ioport.h>
+#include <linux/platform_data/sa11x0-serial.h>
 #include <linux/serial_core.h>
 #include <linux/mfd/ucb1x00.h>
 #include <linux/mtd/mtd.h>
@@ -35,7 +36,6 @@
 #include <asm/mach/flash.h>
 #include <asm/mach/irda.h>
 #include <asm/mach/map.h>
-#include <asm/mach/serial_sa1100.h>
 #include <mach/assabet.h>
 #include <mach/mcp.h>
 #include <mach/irqs.h>
arch/arm/mach-sa1100/badge4.c +1 -1
index b30fb99..1d60b7e 100644
@@ -16,6 +16,7 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
+#include <linux/platform_data/sa11x0-serial.h>
 #include <linux/platform_device.h>
 #include <linux/delay.h>
 #include <linux/tty.h>
@@ -32,7 +33,6 @@
 #include <asm/mach/flash.h>
 #include <asm/mach/map.h>
 #include <asm/hardware/sa1111.h>
-#include <asm/mach/serial_sa1100.h>
 
 #include <mach/badge4.h>
 
arch/arm/mach-sa1100/cerf.c +1 -1
index 09d7f4b..1e03937 100644
@@ -13,6 +13,7 @@
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/tty.h>
+#include <linux/platform_data/sa11x0-serial.h>
 #include <linux/platform_device.h>
 #include <linux/irq.h>
 #include <linux/mtd/mtd.h>
@@ -25,7 +26,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
 #include <asm/mach/map.h>
-#include <asm/mach/serial_sa1100.h>
 
 #include <mach/cerf.h>
 #include <mach/mcp.h>
arch/arm/mach-sa1100/collie.c +1 -1
index ea5cff3..5d1e10c 100644
@@ -21,6 +21,7 @@
 #include <linux/kernel.h>
 #include <linux/tty.h>
 #include <linux/delay.h>
+#include <linux/platform_data/sa11x0-serial.h>
 #include <linux/platform_device.h>
 #include <linux/mfd/ucb1x00.h>
 #include <linux/mtd/mtd.h>
@@ -40,7 +41,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
 #include <asm/mach/map.h>
-#include <asm/mach/serial_sa1100.h>
 
 #include <asm/hardware/scoop.h>
 #include <asm/mach/sharpsl_param.h>
arch/arm/mach-sa1100/h3xxx.c +1 -1
index 63150e1..f17e738 100644
@@ -17,12 +17,12 @@
 #include <linux/mfd/htc-egpio.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
+#include <linux/platform_data/sa11x0-serial.h>
 #include <linux/platform_device.h>
 #include <linux/serial_core.h>
 
 #include <asm/mach/flash.h>
 #include <asm/mach/map.h>
-#include <asm/mach/serial_sa1100.h>
 
 #include <mach/h3xxx.h>
 
arch/arm/mach-sa1100/hackkit.c +1 -1
index 7f86bd9..2da6d08 100644
@@ -18,6 +18,7 @@
 #include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/cpufreq.h>
+#include <linux/platform_data/sa11x0-serial.h>
 #include <linux/serial_core.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
@@ -31,7 +32,6 @@
 #include <asm/mach/flash.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
-#include <asm/mach/serial_sa1100.h>
 
 #include <mach/hardware.h>
 #include <mach/irqs.h>
arch/arm/mach-sa1100/jornada720.c +1 -1
index e3084f4..35cfc42 100644
@@ -17,6 +17,7 @@
 #include <linux/kernel.h>
 #include <linux/tty.h>
 #include <linux/delay.h>
+#include <linux/platform_data/sa11x0-serial.h>
 #include <linux/platform_device.h>
 #include <linux/ioport.h>
 #include <linux/mtd/mtd.h>
@@ -30,7 +31,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
 #include <asm/mach/map.h>
-#include <asm/mach/serial_sa1100.h>
 
 #include <mach/hardware.h>
 #include <mach/irqs.h>
arch/arm/mach-sa1100/lart.c +1 -1
index b775a0a..39aed9b 100644
@@ -4,6 +4,7 @@
 
 #include <linux/init.h>
 #include <linux/kernel.h>
+#include <linux/platform_data/sa11x0-serial.h>
 #include <linux/tty.h>
 
 #include <video/sa1100fb.h>
@@ -15,7 +16,6 @@
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
-#include <asm/mach/serial_sa1100.h>
 #include <mach/mcp.h>
 #include <mach/irqs.h>
 
arch/arm/mach-sa1100/nanoengine.c +1 -1
index 41f69d9..102e08f 100644
@@ -13,6 +13,7 @@
 
 #include <linux/init.h>
 #include <linux/kernel.h>
+#include <linux/platform_data/sa11x0-serial.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 #include <linux/root_dev.h>
@@ -24,7 +25,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
 #include <asm/mach/map.h>
-#include <asm/mach/serial_sa1100.h>
 
 #include <mach/hardware.h>
 #include <mach/nanoengine.h>
arch/arm/mach-sa1100/neponset.c +1 -1
index 266db87..88be047 100644
@@ -7,6 +7,7 @@
 #include <linux/irq.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
+#include <linux/platform_data/sa11x0-serial.h>
 #include <linux/platform_device.h>
 #include <linux/pm.h>
 #include <linux/serial_core.h>
@@ -14,7 +15,6 @@
 
 #include <asm/mach-types.h>
 #include <asm/mach/map.h>
-#include <asm/mach/serial_sa1100.h>
 #include <asm/hardware/sa1111.h>
 #include <asm/sizes.h>
 
arch/arm/mach-sa1100/pleb.c +1 -1
index 37fe0a0..c51bb63 100644
@@ -6,6 +6,7 @@
 #include <linux/kernel.h>
 #include <linux/tty.h>
 #include <linux/ioport.h>
+#include <linux/platform_data/sa11x0-serial.h>
 #include <linux/platform_device.h>
 #include <linux/irq.h>
 #include <linux/io.h>
@@ -18,7 +19,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/flash.h>
-#include <asm/mach/serial_sa1100.h>
 #include <mach/irqs.h>
 
 #include "generic.h"
arch/arm/mach-sa1100/shannon.c +1 -1
index 5d33fc3..3dd4416 100644
@@ -5,6 +5,7 @@
 #include <linux/init.h>
 #include <linux/device.h>
 #include <linux/kernel.h>
+#include <linux/platform_data/sa11x0-serial.h>
 #include <linux/tty.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
@@ -18,7 +19,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
 #include <asm/mach/map.h>
-#include <asm/mach/serial_sa1100.h>
 #include <mach/mcp.h>
 #include <mach/shannon.h>
 #include <mach/irqs.h>
arch/arm/mach-sa1100/simpad.c +1 -1
index fbd5359..c76038e 100644
@@ -9,6 +9,7 @@
 #include <linux/proc_fs.h>
 #include <linux/string.h>
 #include <linux/pm.h>
+#include <linux/platform_data/sa11x0-serial.h>
 #include <linux/platform_device.h>
 #include <linux/mfd/ucb1x00.h>
 #include <linux/mtd/mtd.h>
@@ -23,7 +24,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
 #include <asm/mach/map.h>
-#include <asm/mach/serial_sa1100.h>
 #include <mach/mcp.h>
 #include <mach/simpad.h>
 #include <mach/irqs.h>
drivers/tty/serial/sa1100.c +1 -1
index 2ca5959..ecc1e16 100644
@@ -29,6 +29,7 @@
 #include <linux/init.h>
 #include <linux/console.h>
 #include <linux/sysrq.h>
+#include <linux/platform_data/sa11x0-serial.h>
 #include <linux/platform_device.h>
 #include <linux/tty.h>
 #include <linux/tty_flip.h>
@@ -39,7 +40,6 @@
 #include <asm/irq.h>
 #include <mach/hardware.h>
 #include <mach/irqs.h>
-#include <asm/mach/serial_sa1100.h>
 
 /* We've been assigned a range on the "Low-density serial ports" major */
 #define SERIAL_SA1100_MAJOR	204
include/linux/platform_data/sa11x0-serial.h new file +33 -0
new file mode 100644
index 0000000..4504d5d
@@ -0,0 +1,33 @@
+/*
+ *  Author: Nicolas Pitre
+ *
+ * Moved and changed lots, Russell King
+ *
+ * Low level machine dependent UART functions.
+ */
+#ifndef SA11X0_SERIAL_H
+#define SA11X0_SERIAL_H
+
+struct uart_port;
+struct uart_info;
+
+/*
+ * This is a temporary structure for registering these
+ * functions; it is intended to be discarded after boot.
+ */
+struct sa1100_port_fns {
+	void	(*set_mctrl)(struct uart_port *, u_int);
+	u_int	(*get_mctrl)(struct uart_port *);
+	void	(*pm)(struct uart_port *, u_int, u_int);
+	int	(*set_wake)(struct uart_port *, u_int);
+};
+
+#ifdef CONFIG_SERIAL_SA1100
+void sa1100_register_uart_fns(struct sa1100_port_fns *fns);
+void sa1100_register_uart(int idx, int port);
+#else
+#define sa1100_register_uart_fns(fns) do { } while (0)
+#define sa1100_register_uart(idx,port) do { } while (0)
+#endif
+
+#endif
Signature · 1 line
1.7.4.4
#3 lore raw

RFC 2/3 ARM: move udc_pxa2xx.h to linux/platform_data

In reply to Russell King - ARM Linux

Move the PXA2xx/IXP4xx UDC header file into linux/platform_data as it only contains a driver platform data structure.

---
 arch/arm/include/asm/mach/udc_pxa2xx.h   |   26 --------------------------
 arch/arm/mach-ixp4xx/include/mach/udc.h  |    2 +-
 arch/arm/mach-pxa/include/mach/udc.h     |    2 +-
 drivers/usb/gadget/pxa25x_udc.c          |    4 +---
 include/linux/platform_data/pxa2xx_udc.h |   27 +++++++++++++++++++++++++++
 5 files changed, 30 insertions(+), 31 deletions(-)
 delete mode 100644 arch/arm/include/asm/mach/udc_pxa2xx.h
 create mode 100644 include/linux/platform_data/pxa2xx_udc.h
arch/arm/include/asm/mach/udc_pxa2xx.h deleted +0 -26
deleted file mode 100644
index ea297ac..0000000
@@ -1,26 +0,0 @@
-/*
- * arch/arm/include/asm/mach/udc_pxa2xx.h
- *
- * This supports machine-specific differences in how the PXA2xx
- * USB Device Controller (UDC) is wired.
- *
- * It is set in linux/arch/arm/mach-pxa/<machine>.c or in
- * linux/arch/mach-ixp4xx/<machine>.c and used in
- * the probe routine of linux/drivers/usb/gadget/pxa2xx_udc.c
- */
-
-struct pxa2xx_udc_mach_info {
-        int  (*udc_is_connected)(void);		/* do we see host? */
-        void (*udc_command)(int cmd);
-#define	PXA2XX_UDC_CMD_CONNECT		0	/* let host see us */
-#define	PXA2XX_UDC_CMD_DISCONNECT	1	/* so host won't see us */
-
-	/* Boards following the design guidelines in the developer's manual,
-	 * with on-chip GPIOs not Lubbock's weird hardware, can have a sane
-	 * VBUS IRQ and omit the methods above.  Store the GPIO number
-	 * here.  Note that sometimes the signals go through inverters...
-	 */
-	bool	gpio_pullup_inverted;
-	int	gpio_pullup;			/* high == pullup activated */
-};
-
arch/arm/mach-ixp4xx/include/mach/udc.h +1 -1
index 80d6da2..b47cc0d 100644
@@ -2,7 +2,7 @@
  * arch/arm/mach-ixp4xx/include/mach/udc.h
  *
  */
-#include <asm/mach/udc_pxa2xx.h>
+#include <linux/platform_data_pxa2xx_udc.h>
 
 extern void ixp4xx_set_udc_info(struct pxa2xx_udc_mach_info *info);
 
arch/arm/mach-pxa/include/mach/udc.h +1 -1
index 2f82332..9a827e3 100644
@@ -2,7 +2,7 @@
  * arch/arm/mach-pxa/include/mach/udc.h
  *
  */
-#include <asm/mach/udc_pxa2xx.h>
+#include <linux/platform_data/pxa2xx_udc.h>
 
 extern void pxa_set_udc_info(struct pxa2xx_udc_mach_info *info);
 
drivers/usb/gadget/pxa25x_udc.c +1 -3
index 907ad3e..06e498d 100644
@@ -29,6 +29,7 @@
 #include <linux/list.h>
 #include <linux/interrupt.h>
 #include <linux/mm.h>
+#include <linux/platform_data/pxa2xx_udc.h>
 #include <linux/platform_device.h>
 #include <linux/dma-mapping.h>
 #include <linux/irq.h>
@@ -60,9 +61,6 @@
 #include <mach/lubbock.h>
 #endif
 
-#include <asm/mach/udc_pxa2xx.h>
-
-
 /*
  * This driver handles the USB Device Controller (UDC) in Intel's PXA 25x
  * series processors.  The UDC for the IXP 4xx series is very similar.
include/linux/platform_data/pxa2xx_udc.h new file +27 -0
new file mode 100644
index 0000000..c6c5e98
@@ -0,0 +1,27 @@
+/*
+ * This supports machine-specific differences in how the PXA2xx
+ * USB Device Controller (UDC) is wired.
+ *
+ * It is set in linux/arch/arm/mach-pxa/<machine>.c or in
+ * linux/arch/mach-ixp4xx/<machine>.c and used in
+ * the probe routine of linux/drivers/usb/gadget/pxa2xx_udc.c
+ */
+#ifndef PXA2XX_UDC_H
+#define PXA2XX_UDC_H
+
+struct pxa2xx_udc_mach_info {
+        int  (*udc_is_connected)(void);		/* do we see host? */
+        void (*udc_command)(int cmd);
+#define	PXA2XX_UDC_CMD_CONNECT		0	/* let host see us */
+#define	PXA2XX_UDC_CMD_DISCONNECT	1	/* so host won't see us */
+
+	/* Boards following the design guidelines in the developer's manual,
+	 * with on-chip GPIOs not Lubbock's weird hardware, can have a sane
+	 * VBUS IRQ and omit the methods above.  Store the GPIO number
+	 * here.  Note that sometimes the signals go through inverters...
+	 */
+	bool	gpio_pullup_inverted;
+	int	gpio_pullup;			/* high == pullup activated */
+};
+
+#endif
Signature · 1 line
1.7.4.4
#4 lore raw

RFC 2/3 ARM: move udc_pxa2xx.h to linux/platform_data

Quoted 4 lines · Russell King

Move the PXA2xx/IXP4xx UDC header file into linux/platform_data as it only contains a driver platform data structure.

after fixing Eric's comment:

Quoted 126 lines
---
 arch/arm/include/asm/mach/udc_pxa2xx.h   |   26 --------------------------
 arch/arm/mach-ixp4xx/include/mach/udc.h  |    2 +-
 arch/arm/mach-pxa/include/mach/udc.h     |    2 +-
 drivers/usb/gadget/pxa25x_udc.c          |    4 +---
 include/linux/platform_data/pxa2xx_udc.h |   27 +++++++++++++++++++++++++++
 5 files changed, 30 insertions(+), 31 deletions(-)
 delete mode 100644 arch/arm/include/asm/mach/udc_pxa2xx.h
 create mode 100644 include/linux/platform_data/pxa2xx_udc.h
arch/arm/include/asm/mach/udc_pxa2xx.h deleted +0 -26
deleted file mode 100644
index ea297ac..0000000
@@ -1,26 +0,0 @@
-/*
- * arch/arm/include/asm/mach/udc_pxa2xx.h
- *
- * This supports machine-specific differences in how the PXA2xx
- * USB Device Controller (UDC) is wired.
- *
- * It is set in linux/arch/arm/mach-pxa/<machine>.c or in
- * linux/arch/mach-ixp4xx/<machine>.c and used in
- * the probe routine of linux/drivers/usb/gadget/pxa2xx_udc.c
- */
-
-struct pxa2xx_udc_mach_info {
-        int  (*udc_is_connected)(void);		/* do we see host? */
-        void (*udc_command)(int cmd);
-#define	PXA2XX_UDC_CMD_CONNECT		0	/* let host see us */
-#define	PXA2XX_UDC_CMD_DISCONNECT	1	/* so host won't see us */
-
-	/* Boards following the design guidelines in the developer's manual,
-	 * with on-chip GPIOs not Lubbock's weird hardware, can have a sane
-	 * VBUS IRQ and omit the methods above.  Store the GPIO number
-	 * here.  Note that sometimes the signals go through inverters...
-	 */
-	bool	gpio_pullup_inverted;
-	int	gpio_pullup;			/* high == pullup activated */
-};
-
arch/arm/mach-ixp4xx/include/mach/udc.h +1 -1
index 80d6da2..b47cc0d 100644
@@ -2,7 +2,7 @@
  * arch/arm/mach-ixp4xx/include/mach/udc.h
  *
  */
-#include <asm/mach/udc_pxa2xx.h>
+#include <linux/platform_data_pxa2xx_udc.h>
 
 extern void ixp4xx_set_udc_info(struct pxa2xx_udc_mach_info *info);
 
arch/arm/mach-pxa/include/mach/udc.h +1 -1
index 2f82332..9a827e3 100644
@@ -2,7 +2,7 @@
  * arch/arm/mach-pxa/include/mach/udc.h
  *
  */
-#include <asm/mach/udc_pxa2xx.h>
+#include <linux/platform_data/pxa2xx_udc.h>
 
 extern void pxa_set_udc_info(struct pxa2xx_udc_mach_info *info);
 
drivers/usb/gadget/pxa25x_udc.c +1 -3
index 907ad3e..06e498d 100644
@@ -29,6 +29,7 @@
 #include <linux/list.h>
 #include <linux/interrupt.h>
 #include <linux/mm.h>
+#include <linux/platform_data/pxa2xx_udc.h>
 #include <linux/platform_device.h>
 #include <linux/dma-mapping.h>
 #include <linux/irq.h>
@@ -60,9 +61,6 @@
 #include <mach/lubbock.h>
 #endif
 
-#include <asm/mach/udc_pxa2xx.h>
-
-
 /*
  * This driver handles the USB Device Controller (UDC) in Intel's PXA 25x
  * series processors.  The UDC for the IXP 4xx series is very similar.
include/linux/platform_data/pxa2xx_udc.h new file +27 -0
new file mode 100644
index 0000000..c6c5e98
@@ -0,0 +1,27 @@
+/*
+ * This supports machine-specific differences in how the PXA2xx
+ * USB Device Controller (UDC) is wired.
+ *
+ * It is set in linux/arch/arm/mach-pxa/<machine>.c or in
+ * linux/arch/mach-ixp4xx/<machine>.c and used in
+ * the probe routine of linux/drivers/usb/gadget/pxa2xx_udc.c
+ */
+#ifndef PXA2XX_UDC_H
+#define PXA2XX_UDC_H
+
+struct pxa2xx_udc_mach_info {
+        int  (*udc_is_connected)(void);		/* do we see host? */
+        void (*udc_command)(int cmd);
+#define	PXA2XX_UDC_CMD_CONNECT		0	/* let host see us */
+#define	PXA2XX_UDC_CMD_DISCONNECT	1	/* so host won't see us */
+
+	/* Boards following the design guidelines in the developer's manual,
+	 * with on-chip GPIOs not Lubbock's weird hardware, can have a sane
+	 * VBUS IRQ and omit the methods above.  Store the GPIO number
+	 * here.  Note that sometimes the signals go through inverters...
+	 */
+	bool	gpio_pullup_inverted;
+	int	gpio_pullup;			/* high == pullup activated */
+};
+
+#endif
Signature · 1 line
1.7.4.4
Signature · 8 lines
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120921/3b22e7c9/attachment.sig>
#5 lore raw

RFC 2/3 ARM: move udc_pxa2xx.h to linux/platform_data

In reply to Russell King
Quoted 51 lines · Russell King

Move the PXA2xx/IXP4xx UDC header file into linux/platform_data as it only contains a driver platform data structure.

---
 arch/arm/include/asm/mach/udc_pxa2xx.h   |   26 --------------------------
 arch/arm/mach-ixp4xx/include/mach/udc.h  |    2 +-
 arch/arm/mach-pxa/include/mach/udc.h     |    2 +-
 drivers/usb/gadget/pxa25x_udc.c          |    4 +---
 include/linux/platform_data/pxa2xx_udc.h |   27 +++++++++++++++++++++++++++
 5 files changed, 30 insertions(+), 31 deletions(-)
 delete mode 100644 arch/arm/include/asm/mach/udc_pxa2xx.h
 create mode 100644 include/linux/platform_data/pxa2xx_udc.h
arch/arm/include/asm/mach/udc_pxa2xx.h deleted +0 -26
deleted file mode 100644
index ea297ac..0000000
@@ -1,26 +0,0 @@
-/*
- * arch/arm/include/asm/mach/udc_pxa2xx.h
- *
- * This supports machine-specific differences in how the PXA2xx
- * USB Device Controller (UDC) is wired.
- *
- * It is set in linux/arch/arm/mach-pxa/<machine>.c or in
- * linux/arch/mach-ixp4xx/<machine>.c and used in
- * the probe routine of linux/drivers/usb/gadget/pxa2xx_udc.c
- */
-
-struct pxa2xx_udc_mach_info {
-        int  (*udc_is_connected)(void);                /* do we see host? */
-        void (*udc_command)(int cmd);
-#define        PXA2XX_UDC_CMD_CONNECT          0       /* let host see us */
-#define        PXA2XX_UDC_CMD_DISCONNECT       1       /* so host won't see us */
-
-       /* Boards following the design guidelines in the developer's manual,
-        * with on-chip GPIOs not Lubbock's weird hardware, can have a sane
-        * VBUS IRQ and omit the methods above.  Store the GPIO number
-        * here.  Note that sometimes the signals go through inverters...
-        */
-       bool    gpio_pullup_inverted;
-       int     gpio_pullup;                    /* high == pullup activated */
-};
-
arch/arm/mach-ixp4xx/include/mach/udc.h +0 -0
index 80d6da2..b47cc0d 100644

arch/arm/mach-ixp4xx/include/mach/udc.h line 5

Quoted 5 lines
arch/arm/mach-ixp4xx/include/mach/udc.h +1 -1
@@ -2,7 +2,7 @@
  * arch/arm/mach-ixp4xx/include/mach/udc.h
  *
  */
-#include <asm/mach/udc_pxa2xx.h>
+#include <linux/platform_data_pxa2xx_udc.h>

Guess a typo here, "/" instead of "_"? Otherwise looks good to me

Quoted 74 lines
arch/arm/mach-ixp4xx/include/mach/udc.h +0 -0
 extern void ixp4xx_set_udc_info(struct pxa2xx_udc_mach_info *info);
 
arch/arm/mach-pxa/include/mach/udc.h +1 -1
index 2f82332..9a827e3 100644
@@ -2,7 +2,7 @@
  * arch/arm/mach-pxa/include/mach/udc.h
  *
  */
-#include <asm/mach/udc_pxa2xx.h>
+#include <linux/platform_data/pxa2xx_udc.h>
 
 extern void pxa_set_udc_info(struct pxa2xx_udc_mach_info *info);
 
drivers/usb/gadget/pxa25x_udc.c +1 -3
index 907ad3e..06e498d 100644
@@ -29,6 +29,7 @@
 #include <linux/list.h>
 #include <linux/interrupt.h>
 #include <linux/mm.h>
+#include <linux/platform_data/pxa2xx_udc.h>
 #include <linux/platform_device.h>
 #include <linux/dma-mapping.h>
 #include <linux/irq.h>
@@ -60,9 +61,6 @@
 #include <mach/lubbock.h>
 #endif
 
-#include <asm/mach/udc_pxa2xx.h>
-
-
 /*
  * This driver handles the USB Device Controller (UDC) in Intel's PXA 25x
  * series processors.  The UDC for the IXP 4xx series is very similar.
include/linux/platform_data/pxa2xx_udc.h new file +27 -1
new file mode 100644
index 0000000..c6c5e98
@@ -0,0 +1,27 @@
+/*
+ * This supports machine-specific differences in how the PXA2xx
+ * USB Device Controller (UDC) is wired.
+ *
+ * It is set in linux/arch/arm/mach-pxa/<machine>.c or in
+ * linux/arch/mach-ixp4xx/<machine>.c and used in
+ * the probe routine of linux/drivers/usb/gadget/pxa2xx_udc.c
+ */
+#ifndef PXA2XX_UDC_H
+#define PXA2XX_UDC_H
+
+struct pxa2xx_udc_mach_info {
+        int  (*udc_is_connected)(void);                /* do we see host? */
+        void (*udc_command)(int cmd);
+#define        PXA2XX_UDC_CMD_CONNECT          0       /* let host see us */
+#define        PXA2XX_UDC_CMD_DISCONNECT       1       /* so host won't see us */
+
+       /* Boards following the design guidelines in the developer's manual,
+        * with on-chip GPIOs not Lubbock's weird hardware, can have a sane
+        * VBUS IRQ and omit the methods above.  Store the GPIO number
+        * here.  Note that sometimes the signals go through inverters...
+        */
+       bool    gpio_pullup_inverted;
+       int     gpio_pullup;                    /* high == pullup activated */
+};
+
+#endif
--

1.7.4.4

#6 lore raw

RFC 2/3 ARM: move udc_pxa2xx.h to linux/platform_data

Quoted 14 lines · Eric Miao

arch/arm/mach-ixp4xx/include/mach/udc.h line 5

Quoted 10 lines · Russell King
arch/arm/mach-ixp4xx/include/mach/udc.h +1 -1
index 80d6da2..b47cc0d 100644
@@ -2,7 +2,7 @@
  * arch/arm/mach-ixp4xx/include/mach/udc.h
  *
  */
-#include <asm/mach/udc_pxa2xx.h>
+#include <linux/platform_data_pxa2xx_udc.h>

Guess a typo here, "/" instead of "_"? Otherwise looks good to me

Yea, fixed.

#7 lore raw

RFC 2/3 ARM: move udc_pxa2xx.h to linux/platform_data

Quoted 11 lines · Russell King - ARM Linux
Quoted 10 lines

arch/arm/mach-ixp4xx/include/mach/udc.h line 5

Quoted 8 lines
arch/arm/mach-ixp4xx/include/mach/udc.h +1 -1
@@ -2,7 +2,7 @@
  * arch/arm/mach-ixp4xx/include/mach/udc.h
  *
  */
-#include <asm/mach/udc_pxa2xx.h>
+#include <linux/platform_data_pxa2xx_udc.h>

Guess a typo here, "/" instead of "_"? Otherwise looks good to me

Quoted 1 line

Yea, fixed.

The ixp4xx part looks good to me too.

Signature · 1 line
Krzysztof Ha?asa
#9 lore raw

RFC 3/3 ARM/AVR32: get rid of serial_at91.h

In reply to Russell King - ARM Linux

The definitions provided by serial_at91.h are only used by the atmel_serial driver, and the function that uses it is never called from anywhere in the kernel. Therefore, these definitions are unused and/or obsolete, and can be removed.

---
 arch/arm/include/asm/mach/serial_at91.h   |   33 -----------------------------
 arch/avr32/include/asm/mach/serial_at91.h |   33 -----------------------------
 drivers/tty/serial/atmel_serial.c         |   18 ---------------
 3 files changed, 0 insertions(+), 84 deletions(-)
 delete mode 100644 arch/arm/include/asm/mach/serial_at91.h
 delete mode 100644 arch/avr32/include/asm/mach/serial_at91.h
arch/arm/include/asm/mach/serial_at91.h deleted +0 -33
deleted file mode 100644
index ea6d063..0000000
@@ -1,33 +0,0 @@
-/*
- *  arch/arm/include/asm/mach/serial_at91.h
- *
- *  Based on serial_sa1100.h  by Nicolas Pitre
- *
- *  Copyright (C) 2002 ATMEL Rousset
- *
- *  Low level machine dependent UART functions.
- */
-
-struct uart_port;
-
-/*
- * This is a temporary structure for registering these
- * functions; it is intended to be discarded after boot.
- */
-struct atmel_port_fns {
-	void	(*set_mctrl)(struct uart_port *, u_int);
-	u_int	(*get_mctrl)(struct uart_port *);
-	void	(*enable_ms)(struct uart_port *);
-	void	(*pm)(struct uart_port *, u_int, u_int);
-	int	(*set_wake)(struct uart_port *, u_int);
-	int	(*open)(struct uart_port *);
-	void	(*close)(struct uart_port *);
-};
-
-#if defined(CONFIG_SERIAL_ATMEL)
-void atmel_register_uart_fns(struct atmel_port_fns *fns);
-#else
-#define atmel_register_uart_fns(fns) do { } while (0)
-#endif
-
-
arch/avr32/include/asm/mach/serial_at91.h deleted +0 -33
deleted file mode 100644
index 55b317a..0000000
@@ -1,33 +0,0 @@
-/*
- *  linux/include/asm-arm/mach/serial_at91.h
- *
- *  Based on serial_sa1100.h  by Nicolas Pitre
- *
- *  Copyright (C) 2002 ATMEL Rousset
- *
- *  Low level machine dependent UART functions.
- */
-
-struct uart_port;
-
-/*
- * This is a temporary structure for registering these
- * functions; it is intended to be discarded after boot.
- */
-struct atmel_port_fns {
-	void	(*set_mctrl)(struct uart_port *, u_int);
-	u_int	(*get_mctrl)(struct uart_port *);
-	void	(*enable_ms)(struct uart_port *);
-	void	(*pm)(struct uart_port *, u_int, u_int);
-	int	(*set_wake)(struct uart_port *, u_int);
-	int	(*open)(struct uart_port *);
-	void	(*close)(struct uart_port *);
-};
-
-#if defined(CONFIG_SERIAL_ATMEL)
-void atmel_register_uart_fns(struct atmel_port_fns *fns);
-#else
-#define atmel_register_uart_fns(fns) do { } while (0)
-#endif
-
-
drivers/tty/serial/atmel_serial.c +0 -18
index 3d7e1ee..a6134c9 100644
@@ -43,7 +43,6 @@
 #include <asm/io.h>
 #include <asm/ioctls.h>
 
-#include <asm/mach/serial_at91.h>
 #include <mach/board.h>
 
 #ifdef CONFIG_ARM
@@ -1513,23 +1512,6 @@ static void __devinit atmel_init_port(struct atmel_uart_port *atmel_port,
 	}
 }
 
-/*
- * Register board-specific modem-control line handlers.
- */
-void __init atmel_register_uart_fns(struct atmel_port_fns *fns)
-{
-	if (fns->enable_ms)
-		atmel_pops.enable_ms = fns->enable_ms;
-	if (fns->get_mctrl)
-		atmel_pops.get_mctrl = fns->get_mctrl;
-	if (fns->set_mctrl)
-		atmel_pops.set_mctrl = fns->set_mctrl;
-	atmel_open_hook		= fns->open;
-	atmel_close_hook	= fns->close;
-	atmel_pops.pm		= fns->pm;
-	atmel_pops.set_wake	= fns->set_wake;
-}
-
 struct platform_device *atmel_default_console_device;	/* the serial console device */
 
 #ifdef CONFIG_SERIAL_ATMEL_CONSOLE
Signature · 1 line
1.7.4.4
#11 lore raw

RFC 3/3 ARM/AVR32: get rid of serial_at91.h

In reply to Russell King
Quoted 6 lines · Russell King

The definitions provided by serial_at91.h are only used by the atmel_serial driver, and the function that uses it is never called from anywhere in the kernel. Therefore, these definitions are unused and/or obsolete, and can be removed.

personnaly I'm ok with it too

but Andrew seems use it so let him reply

Best Regards,
J.

Quoted 130 lines
---
 arch/arm/include/asm/mach/serial_at91.h   |   33 -----------------------------
 arch/avr32/include/asm/mach/serial_at91.h |   33 -----------------------------
 drivers/tty/serial/atmel_serial.c         |   18 ---------------
 3 files changed, 0 insertions(+), 84 deletions(-)
 delete mode 100644 arch/arm/include/asm/mach/serial_at91.h
 delete mode 100644 arch/avr32/include/asm/mach/serial_at91.h
arch/arm/include/asm/mach/serial_at91.h deleted +0 -33
deleted file mode 100644
index ea6d063..0000000
@@ -1,33 +0,0 @@
-/*
- *  arch/arm/include/asm/mach/serial_at91.h
- *
- *  Based on serial_sa1100.h  by Nicolas Pitre
- *
- *  Copyright (C) 2002 ATMEL Rousset
- *
- *  Low level machine dependent UART functions.
- */
-
-struct uart_port;
-
-/*
- * This is a temporary structure for registering these
- * functions; it is intended to be discarded after boot.
- */
-struct atmel_port_fns {
-	void	(*set_mctrl)(struct uart_port *, u_int);
-	u_int	(*get_mctrl)(struct uart_port *);
-	void	(*enable_ms)(struct uart_port *);
-	void	(*pm)(struct uart_port *, u_int, u_int);
-	int	(*set_wake)(struct uart_port *, u_int);
-	int	(*open)(struct uart_port *);
-	void	(*close)(struct uart_port *);
-};
-
-#if defined(CONFIG_SERIAL_ATMEL)
-void atmel_register_uart_fns(struct atmel_port_fns *fns);
-#else
-#define atmel_register_uart_fns(fns) do { } while (0)
-#endif
-
-
arch/avr32/include/asm/mach/serial_at91.h deleted +0 -33
deleted file mode 100644
index 55b317a..0000000
@@ -1,33 +0,0 @@
-/*
- *  linux/include/asm-arm/mach/serial_at91.h
- *
- *  Based on serial_sa1100.h  by Nicolas Pitre
- *
- *  Copyright (C) 2002 ATMEL Rousset
- *
- *  Low level machine dependent UART functions.
- */
-
-struct uart_port;
-
-/*
- * This is a temporary structure for registering these
- * functions; it is intended to be discarded after boot.
- */
-struct atmel_port_fns {
-	void	(*set_mctrl)(struct uart_port *, u_int);
-	u_int	(*get_mctrl)(struct uart_port *);
-	void	(*enable_ms)(struct uart_port *);
-	void	(*pm)(struct uart_port *, u_int, u_int);
-	int	(*set_wake)(struct uart_port *, u_int);
-	int	(*open)(struct uart_port *);
-	void	(*close)(struct uart_port *);
-};
-
-#if defined(CONFIG_SERIAL_ATMEL)
-void atmel_register_uart_fns(struct atmel_port_fns *fns);
-#else
-#define atmel_register_uart_fns(fns) do { } while (0)
-#endif
-
-
drivers/tty/serial/atmel_serial.c +0 -18
index 3d7e1ee..a6134c9 100644
@@ -43,7 +43,6 @@
 #include <asm/io.h>
 #include <asm/ioctls.h>
 
-#include <asm/mach/serial_at91.h>
 #include <mach/board.h>
 
 #ifdef CONFIG_ARM
@@ -1513,23 +1512,6 @@ static void __devinit atmel_init_port(struct atmel_uart_port *atmel_port,
 	}
 }
 
-/*
- * Register board-specific modem-control line handlers.
- */
-void __init atmel_register_uart_fns(struct atmel_port_fns *fns)
-{
-	if (fns->enable_ms)
-		atmel_pops.enable_ms = fns->enable_ms;
-	if (fns->get_mctrl)
-		atmel_pops.get_mctrl = fns->get_mctrl;
-	if (fns->set_mctrl)
-		atmel_pops.set_mctrl = fns->set_mctrl;
-	atmel_open_hook		= fns->open;
-	atmel_close_hook	= fns->close;
-	atmel_pops.pm		= fns->pm;
-	atmel_pops.set_wake	= fns->set_wake;
-}
-
 struct platform_device *atmel_default_console_device;	/* the serial console device */
 
 #ifdef CONFIG_SERIAL_ATMEL_CONSOLE
Signature · 7 lines
1.7.4.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#12 lore raw

RFC 3/3 ARM/AVR32: get rid of serial_at91.h

On 11/16/2012 10:53 AM, Jean-Christophe PLAGNIOL-VILLARD :

Quoted 11 lines · Russell King
Quoted 6 lines

The definitions provided by serial_at91.h are only used by the atmel_serial driver, and the function that uses it is never called from anywhere in the kernel. Therefore, these definitions are unused and/or obsolete, and can be removed.

personnaly I'm ok with it too

but Andrew seems use it so let him reply

Yes, during previous attempt to remove the files, Andrew said that it was used internally in his former company. I had no serious reason to remove it, so we kept it back then.
But now it seems the situation has evolved and we must consider the move to a single kernel image and the will to clean the include/asm/mach directory.

So, now, on my side:

Quoted 132 lines
Quoted 130 lines
---
 arch/arm/include/asm/mach/serial_at91.h   |   33 -----------------------------
 arch/avr32/include/asm/mach/serial_at91.h |   33 -----------------------------
 drivers/tty/serial/atmel_serial.c         |   18 ---------------
 3 files changed, 0 insertions(+), 84 deletions(-)
 delete mode 100644 arch/arm/include/asm/mach/serial_at91.h
 delete mode 100644 arch/avr32/include/asm/mach/serial_at91.h
arch/arm/include/asm/mach/serial_at91.h deleted +0 -33
deleted file mode 100644
index ea6d063..0000000
@@ -1,33 +0,0 @@
-/*
- *  arch/arm/include/asm/mach/serial_at91.h
- *
- *  Based on serial_sa1100.h  by Nicolas Pitre
- *
- *  Copyright (C) 2002 ATMEL Rousset
- *
- *  Low level machine dependent UART functions.
- */
-
-struct uart_port;
-
-/*
- * This is a temporary structure for registering these
- * functions; it is intended to be discarded after boot.
- */
-struct atmel_port_fns {
-	void	(*set_mctrl)(struct uart_port *, u_int);
-	u_int	(*get_mctrl)(struct uart_port *);
-	void	(*enable_ms)(struct uart_port *);
-	void	(*pm)(struct uart_port *, u_int, u_int);
-	int	(*set_wake)(struct uart_port *, u_int);
-	int	(*open)(struct uart_port *);
-	void	(*close)(struct uart_port *);
-};
-
-#if defined(CONFIG_SERIAL_ATMEL)
-void atmel_register_uart_fns(struct atmel_port_fns *fns);
-#else
-#define atmel_register_uart_fns(fns) do { } while (0)
-#endif
-
-
arch/avr32/include/asm/mach/serial_at91.h deleted +0 -33
deleted file mode 100644
index 55b317a..0000000
@@ -1,33 +0,0 @@
-/*
- *  linux/include/asm-arm/mach/serial_at91.h
- *
- *  Based on serial_sa1100.h  by Nicolas Pitre
- *
- *  Copyright (C) 2002 ATMEL Rousset
- *
- *  Low level machine dependent UART functions.
- */
-
-struct uart_port;
-
-/*
- * This is a temporary structure for registering these
- * functions; it is intended to be discarded after boot.
- */
-struct atmel_port_fns {
-	void	(*set_mctrl)(struct uart_port *, u_int);
-	u_int	(*get_mctrl)(struct uart_port *);
-	void	(*enable_ms)(struct uart_port *);
-	void	(*pm)(struct uart_port *, u_int, u_int);
-	int	(*set_wake)(struct uart_port *, u_int);
-	int	(*open)(struct uart_port *);
-	void	(*close)(struct uart_port *);
-};
-
-#if defined(CONFIG_SERIAL_ATMEL)
-void atmel_register_uart_fns(struct atmel_port_fns *fns);
-#else
-#define atmel_register_uart_fns(fns) do { } while (0)
-#endif
-
-
drivers/tty/serial/atmel_serial.c +0 -18
index 3d7e1ee..a6134c9 100644
@@ -43,7 +43,6 @@
 #include <asm/io.h>
 #include <asm/ioctls.h>
 
-#include <asm/mach/serial_at91.h>
 #include <mach/board.h>
 
 #ifdef CONFIG_ARM
@@ -1513,23 +1512,6 @@ static void __devinit atmel_init_port(struct atmel_uart_port *atmel_port,
 	}
 }
 
-/*
- * Register board-specific modem-control line handlers.
- */
-void __init atmel_register_uart_fns(struct atmel_port_fns *fns)
-{
-	if (fns->enable_ms)
-		atmel_pops.enable_ms = fns->enable_ms;
-	if (fns->get_mctrl)
-		atmel_pops.get_mctrl = fns->get_mctrl;
-	if (fns->set_mctrl)
-		atmel_pops.set_mctrl = fns->set_mctrl;
-	atmel_open_hook		= fns->open;
-	atmel_close_hook	= fns->close;
-	atmel_pops.pm		= fns->pm;
-	atmel_pops.set_wake	= fns->set_wake;
-}
-
 struct platform_device *atmel_default_console_device;	/* the serial console device */
 
 #ifdef CONFIG_SERIAL_ATMEL_CONSOLE
Signature · 7 lines
1.7.4.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Signature · 1 line
Nicolas Ferre
#13 lore raw

RFC 3/3 ARM/AVR32: get rid of serial_at91.h

Quoted 20 lines · Nicolas Ferre

On 11/16/2012 10:53 AM, Jean-Christophe PLAGNIOL-VILLARD :

Quoted 11 lines · Russell King
Quoted 6 lines

The definitions provided by serial_at91.h are only used by the atmel_serial driver, and the function that uses it is never called from anywhere in the kernel. Therefore, these definitions are unused and/or obsolete, and can be removed.

personnaly I'm ok with it too

but Andrew seems use it so let him reply

Yes, during previous attempt to remove the files, Andrew said that it was used internally in his former company. I had no serious reason to remove it, so we kept it back then.
But now it seems the situation has evolved and we must consider the move to a single kernel image and the will to clean the include/asm/mach directory.

Quoted 3 lines

So, now, on my side:

Thanks for reminding me about this series, I'd completely forgotten about it. It'll be in the next linux-next tree now.

#14 lore raw

RFC 3/3 ARM/AVR32: get rid of serial_at91.h

In reply to Nicolas Ferre

hi,

Quoted 6 lines

Yes, during previous attempt to remove the files, Andrew said that it was used internally in his former company. I had no serious reason to remove it, so we kept it back then.
But now it seems the situation has evolved and we must consider the move to a single kernel image and the will to clean the include/asm/mach directory.

SAN People will just need to maintain a custom patch / driver for this. No reason to delay the progress of mainline.

#15 lore raw

RFC 3/3 ARM/AVR32: get rid of serial_at91.h

In reply to Russell King

Hi Russell,

I made a similar patch a while ago. One note below.
(http://marc.info/?l=linux-arm-kernel&m=133372829203680)

Quoted 13 lines · Russell King

The definitions provided by serial_at91.h are only used by the atmel_serial driver, and the function that uses it is never called from anywhere in the kernel. Therefore, these definitions are unused and/or obsolete, and can be removed.

---
 arch/arm/include/asm/mach/serial_at91.h   |   33 -----------------------------
 arch/avr32/include/asm/mach/serial_at91.h |   33 -----------------------------
 drivers/tty/serial/atmel_serial.c         |   18 ---------------
 3 files changed, 0 insertions(+), 84 deletions(-)
 delete mode 100644 arch/arm/include/asm/mach/serial_at91.h
 delete mode 100644 arch/avr32/include/asm/mach/serial_at91.h

<snip>

Quoted 22 lines
drivers/tty/serial/atmel_serial.c +0 -7
index 3d7e1ee..a6134c9 100644
@@ -43,7 +43,6 @@
 #include <asm/io.h>
 #include <asm/ioctls.h>
 
-#include <asm/mach/serial_at91.h>
 #include <mach/board.h>
 
 #ifdef CONFIG_ARM
@@ -1513,23 +1512,6 @@ static void __devinit atmel_init_port(struct atmel_uart_port *atmel_port,
        }
 }
 
-/*
- * Register board-specific modem-control line handlers.
- */
-void __init atmel_register_uart_fns(struct atmel_port_fns *fns)
-{
-       if (fns->enable_ms)

drivers/tty/serial/atmel_serial.c static void __devinit atmel_init_port(struct atmel_uart_port *atmel_port, · line 1531

Quoted 10 lines
drivers/tty/serial/atmel_serial.c +0 -10
-               atmel_pops.enable_ms = fns->enable_ms;
-       if (fns->get_mctrl)
-               atmel_pops.get_mctrl = fns->get_mctrl;
-       if (fns->set_mctrl)
-               atmel_pops.set_mctrl = fns->set_mctrl;
-       atmel_open_hook         = fns->open;
-       atmel_close_hook        = fns->close;
-       atmel_pops.pm           = fns->pm;
-       atmel_pops.set_wake     = fns->set_wake;
-}

When the atmel_open_hook/atmel_open_close assignment is dropped, these global variables will be useless so we should remove them as well. There are also some other code that uses the variables that can be dropped. Should shave another 22 lines of code off atmel_serial.c

I can send out a patch on top of yours if you prefer that.

regards
Joachim Eastwood

#16 lore raw

RFC 3/3 ARM/AVR32: get rid of serial_at91.h

Quoted 6 lines · Joachim Eastwood

When the atmel_open_hook/atmel_open_close assignment is dropped, these global variables will be useless so we should remove them as well. There are also some other code that uses the variables that can be dropped. Should shave another 22 lines of code off atmel_serial.c

I can send out a patch on top of yours if you prefer that.

Yes please.

Thanks.