* [RFC 0/3] Move some ARM header files to more appropriate locations
@ 2012-09-21 9:35 Russell King - ARM Linux
2012-09-21 9:36 ` [RFC 1/3] ARM: move serial_sa1100.h header file to linux/platform_data Russell King
` (2 more replies)
0 siblings, 3 replies; 17+ messages in thread
From: Russell King - ARM Linux @ 2012-09-21 9:35 UTC (permalink / raw)
To: linux-arm-kernel
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%)
^ permalink raw reply [flat|nested] 17+ messages in thread
* [RFC 1/3] ARM: move serial_sa1100.h header file to linux/platform_data
2012-09-21 9:35 [RFC 0/3] Move some ARM header files to more appropriate locations Russell King - ARM Linux
@ 2012-09-21 9:36 ` Russell King
2012-09-21 23:05 ` Greg Kroah-Hartman
2012-09-21 9:36 ` [RFC 2/3] ARM: move udc_pxa2xx.h " Russell King
2012-09-21 9:36 ` [RFC 3/3] ARM/AVR32: get rid of serial_at91.h Russell King
2 siblings, 1 reply; 17+ messages in thread
From: Russell King @ 2012-09-21 9:36 UTC (permalink / raw)
To: linux-arm-kernel
This is really driver platform data, so move it to the appropriate
directory.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
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
diff --git a/arch/arm/include/asm/mach/serial_sa1100.h b/arch/arm/include/asm/mach/serial_sa1100.h
deleted file mode 100644
index d09064b..0000000
--- a/arch/arm/include/asm/mach/serial_sa1100.h
+++ /dev/null
@@ -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
diff --git a/arch/arm/mach-sa1100/assabet.c b/arch/arm/mach-sa1100/assabet.c
index d673211..4a0e6b8 100644
--- a/arch/arm/mach-sa1100/assabet.c
+++ b/arch/arm/mach-sa1100/assabet.c
@@ -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>
diff --git a/arch/arm/mach-sa1100/badge4.c b/arch/arm/mach-sa1100/badge4.c
index b30fb99..1d60b7e 100644
--- a/arch/arm/mach-sa1100/badge4.c
+++ b/arch/arm/mach-sa1100/badge4.c
@@ -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>
diff --git a/arch/arm/mach-sa1100/cerf.c b/arch/arm/mach-sa1100/cerf.c
index 09d7f4b..1e03937 100644
--- a/arch/arm/mach-sa1100/cerf.c
+++ b/arch/arm/mach-sa1100/cerf.c
@@ -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>
diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c
index ea5cff3..5d1e10c 100644
--- a/arch/arm/mach-sa1100/collie.c
+++ b/arch/arm/mach-sa1100/collie.c
@@ -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>
diff --git a/arch/arm/mach-sa1100/h3xxx.c b/arch/arm/mach-sa1100/h3xxx.c
index 63150e1..f17e738 100644
--- a/arch/arm/mach-sa1100/h3xxx.c
+++ b/arch/arm/mach-sa1100/h3xxx.c
@@ -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>
diff --git a/arch/arm/mach-sa1100/hackkit.c b/arch/arm/mach-sa1100/hackkit.c
index 7f86bd9..2da6d08 100644
--- a/arch/arm/mach-sa1100/hackkit.c
+++ b/arch/arm/mach-sa1100/hackkit.c
@@ -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>
diff --git a/arch/arm/mach-sa1100/jornada720.c b/arch/arm/mach-sa1100/jornada720.c
index e3084f4..35cfc42 100644
--- a/arch/arm/mach-sa1100/jornada720.c
+++ b/arch/arm/mach-sa1100/jornada720.c
@@ -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>
diff --git a/arch/arm/mach-sa1100/lart.c b/arch/arm/mach-sa1100/lart.c
index b775a0a..39aed9b 100644
--- a/arch/arm/mach-sa1100/lart.c
+++ b/arch/arm/mach-sa1100/lart.c
@@ -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>
diff --git a/arch/arm/mach-sa1100/nanoengine.c b/arch/arm/mach-sa1100/nanoengine.c
index 41f69d9..102e08f 100644
--- a/arch/arm/mach-sa1100/nanoengine.c
+++ b/arch/arm/mach-sa1100/nanoengine.c
@@ -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>
diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c
index 266db87..88be047 100644
--- a/arch/arm/mach-sa1100/neponset.c
+++ b/arch/arm/mach-sa1100/neponset.c
@@ -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>
diff --git a/arch/arm/mach-sa1100/pleb.c b/arch/arm/mach-sa1100/pleb.c
index 37fe0a0..c51bb63 100644
--- a/arch/arm/mach-sa1100/pleb.c
+++ b/arch/arm/mach-sa1100/pleb.c
@@ -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"
diff --git a/arch/arm/mach-sa1100/shannon.c b/arch/arm/mach-sa1100/shannon.c
index 5d33fc3..3dd4416 100644
--- a/arch/arm/mach-sa1100/shannon.c
+++ b/arch/arm/mach-sa1100/shannon.c
@@ -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>
diff --git a/arch/arm/mach-sa1100/simpad.c b/arch/arm/mach-sa1100/simpad.c
index fbd5359..c76038e 100644
--- a/arch/arm/mach-sa1100/simpad.c
+++ b/arch/arm/mach-sa1100/simpad.c
@@ -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>
diff --git a/drivers/tty/serial/sa1100.c b/drivers/tty/serial/sa1100.c
index 2ca5959..ecc1e16 100644
--- a/drivers/tty/serial/sa1100.c
+++ b/drivers/tty/serial/sa1100.c
@@ -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
diff --git a/include/linux/platform_data/sa11x0-serial.h b/include/linux/platform_data/sa11x0-serial.h
new file mode 100644
index 0000000..4504d5d
--- /dev/null
+++ b/include/linux/platform_data/sa11x0-serial.h
@@ -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
--
1.7.4.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [RFC 2/3] ARM: move udc_pxa2xx.h to linux/platform_data
2012-09-21 9:35 [RFC 0/3] Move some ARM header files to more appropriate locations Russell King - ARM Linux
2012-09-21 9:36 ` [RFC 1/3] ARM: move serial_sa1100.h header file to linux/platform_data Russell King
@ 2012-09-21 9:36 ` Russell King
2012-09-21 9:39 ` Felipe Balbi
` (2 more replies)
2012-09-21 9:36 ` [RFC 3/3] ARM/AVR32: get rid of serial_at91.h Russell King
2 siblings, 3 replies; 17+ messages in thread
From: Russell King @ 2012-09-21 9:36 UTC (permalink / raw)
To: linux-arm-kernel
Move the PXA2xx/IXP4xx UDC header file into linux/platform_data as it
only contains a driver platform data structure.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
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
diff --git a/arch/arm/include/asm/mach/udc_pxa2xx.h b/arch/arm/include/asm/mach/udc_pxa2xx.h
deleted file mode 100644
index ea297ac..0000000
--- a/arch/arm/include/asm/mach/udc_pxa2xx.h
+++ /dev/null
@@ -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 */
-};
-
diff --git a/arch/arm/mach-ixp4xx/include/mach/udc.h b/arch/arm/mach-ixp4xx/include/mach/udc.h
index 80d6da2..b47cc0d 100644
--- a/arch/arm/mach-ixp4xx/include/mach/udc.h
+++ b/arch/arm/mach-ixp4xx/include/mach/udc.h
@@ -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);
diff --git a/arch/arm/mach-pxa/include/mach/udc.h b/arch/arm/mach-pxa/include/mach/udc.h
index 2f82332..9a827e3 100644
--- a/arch/arm/mach-pxa/include/mach/udc.h
+++ b/arch/arm/mach-pxa/include/mach/udc.h
@@ -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);
diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c
index 907ad3e..06e498d 100644
--- a/drivers/usb/gadget/pxa25x_udc.c
+++ b/drivers/usb/gadget/pxa25x_udc.c
@@ -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.
diff --git a/include/linux/platform_data/pxa2xx_udc.h b/include/linux/platform_data/pxa2xx_udc.h
new file mode 100644
index 0000000..c6c5e98
--- /dev/null
+++ b/include/linux/platform_data/pxa2xx_udc.h
@@ -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
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [RFC 3/3] ARM/AVR32: get rid of serial_at91.h
2012-09-21 9:35 [RFC 0/3] Move some ARM header files to more appropriate locations Russell King - ARM Linux
2012-09-21 9:36 ` [RFC 1/3] ARM: move serial_sa1100.h header file to linux/platform_data Russell King
2012-09-21 9:36 ` [RFC 2/3] ARM: move udc_pxa2xx.h " Russell King
@ 2012-09-21 9:36 ` Russell King
2012-09-21 23:05 ` Greg Kroah-Hartman
` (2 more replies)
2 siblings, 3 replies; 17+ messages in thread
From: Russell King @ 2012-09-21 9:36 UTC (permalink / raw)
To: linux-arm-kernel
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.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
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
diff --git a/arch/arm/include/asm/mach/serial_at91.h b/arch/arm/include/asm/mach/serial_at91.h
deleted file mode 100644
index ea6d063..0000000
--- a/arch/arm/include/asm/mach/serial_at91.h
+++ /dev/null
@@ -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
-
-
diff --git a/arch/avr32/include/asm/mach/serial_at91.h b/arch/avr32/include/asm/mach/serial_at91.h
deleted file mode 100644
index 55b317a..0000000
--- a/arch/avr32/include/asm/mach/serial_at91.h
+++ /dev/null
@@ -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
-
-
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index 3d7e1ee..a6134c9 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -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
--
1.7.4.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [RFC 2/3] ARM: move udc_pxa2xx.h to linux/platform_data
2012-09-21 9:36 ` [RFC 2/3] ARM: move udc_pxa2xx.h " Russell King
@ 2012-09-21 9:39 ` Felipe Balbi
2012-09-21 9:40 ` Eric Miao
2012-09-21 23:05 ` Greg Kroah-Hartman
2 siblings, 0 replies; 17+ messages in thread
From: Felipe Balbi @ 2012-09-21 9:39 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Sep 21, 2012 at 10:36:27AM +0100, Russell King wrote:
> Move the PXA2xx/IXP4xx UDC header file into linux/platform_data as it
> only contains a driver platform data structure.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
after fixing Eric's comment:
Acked-by: Felipe Balbi <balbi@ti.com>
> ---
> 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
>
> diff --git a/arch/arm/include/asm/mach/udc_pxa2xx.h b/arch/arm/include/asm/mach/udc_pxa2xx.h
> deleted file mode 100644
> index ea297ac..0000000
> --- a/arch/arm/include/asm/mach/udc_pxa2xx.h
> +++ /dev/null
> @@ -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 */
> -};
> -
> diff --git a/arch/arm/mach-ixp4xx/include/mach/udc.h b/arch/arm/mach-ixp4xx/include/mach/udc.h
> index 80d6da2..b47cc0d 100644
> --- a/arch/arm/mach-ixp4xx/include/mach/udc.h
> +++ b/arch/arm/mach-ixp4xx/include/mach/udc.h
> @@ -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);
>
> diff --git a/arch/arm/mach-pxa/include/mach/udc.h b/arch/arm/mach-pxa/include/mach/udc.h
> index 2f82332..9a827e3 100644
> --- a/arch/arm/mach-pxa/include/mach/udc.h
> +++ b/arch/arm/mach-pxa/include/mach/udc.h
> @@ -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);
>
> diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c
> index 907ad3e..06e498d 100644
> --- a/drivers/usb/gadget/pxa25x_udc.c
> +++ b/drivers/usb/gadget/pxa25x_udc.c
> @@ -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.
> diff --git a/include/linux/platform_data/pxa2xx_udc.h b/include/linux/platform_data/pxa2xx_udc.h
> new file mode 100644
> index 0000000..c6c5e98
> --- /dev/null
> +++ b/include/linux/platform_data/pxa2xx_udc.h
> @@ -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
>
--
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>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [RFC 2/3] ARM: move udc_pxa2xx.h to linux/platform_data
2012-09-21 9:36 ` [RFC 2/3] ARM: move udc_pxa2xx.h " Russell King
2012-09-21 9:39 ` Felipe Balbi
@ 2012-09-21 9:40 ` Eric Miao
2012-09-21 9:48 ` Russell King - ARM Linux
2012-09-21 23:05 ` Greg Kroah-Hartman
2 siblings, 1 reply; 17+ messages in thread
From: Eric Miao @ 2012-09-21 9:40 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Sep 21, 2012 at 5:36 PM, Russell King
<rmk+kernel@arm.linux.org.uk> wrote:
> Move the PXA2xx/IXP4xx UDC header file into linux/platform_data as it
> only contains a driver platform data structure.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
> 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
>
> diff --git a/arch/arm/include/asm/mach/udc_pxa2xx.h b/arch/arm/include/asm/mach/udc_pxa2xx.h
> deleted file mode 100644
> index ea297ac..0000000
> --- a/arch/arm/include/asm/mach/udc_pxa2xx.h
> +++ /dev/null
> @@ -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 */
> -};
> -
> diff --git a/arch/arm/mach-ixp4xx/include/mach/udc.h b/arch/arm/mach-ixp4xx/include/mach/udc.h
> index 80d6da2..b47cc0d 100644
> --- a/arch/arm/mach-ixp4xx/include/mach/udc.h
> +++ b/arch/arm/mach-ixp4xx/include/mach/udc.h
> @@ -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
>
> extern void ixp4xx_set_udc_info(struct pxa2xx_udc_mach_info *info);
>
> diff --git a/arch/arm/mach-pxa/include/mach/udc.h b/arch/arm/mach-pxa/include/mach/udc.h
> index 2f82332..9a827e3 100644
> --- a/arch/arm/mach-pxa/include/mach/udc.h
> +++ b/arch/arm/mach-pxa/include/mach/udc.h
> @@ -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);
>
> diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c
> index 907ad3e..06e498d 100644
> --- a/drivers/usb/gadget/pxa25x_udc.c
> +++ b/drivers/usb/gadget/pxa25x_udc.c
> @@ -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.
> diff --git a/include/linux/platform_data/pxa2xx_udc.h b/include/linux/platform_data/pxa2xx_udc.h
> new file mode 100644
> index 0000000..c6c5e98
> --- /dev/null
> +++ b/include/linux/platform_data/pxa2xx_udc.h
> @@ -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
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [RFC 2/3] ARM: move udc_pxa2xx.h to linux/platform_data
2012-09-21 9:40 ` Eric Miao
@ 2012-09-21 9:48 ` Russell King - ARM Linux
2012-09-22 11:41 ` Krzysztof Halasa
0 siblings, 1 reply; 17+ messages in thread
From: Russell King - ARM Linux @ 2012-09-21 9:48 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Sep 21, 2012 at 05:40:07PM +0800, Eric Miao wrote:
> On Fri, Sep 21, 2012 at 5:36 PM, Russell King
> <rmk+kernel@arm.linux.org.uk> wrote:
> > diff --git a/arch/arm/mach-ixp4xx/include/mach/udc.h b/arch/arm/mach-ixp4xx/include/mach/udc.h
> > index 80d6da2..b47cc0d 100644
> > --- a/arch/arm/mach-ixp4xx/include/mach/udc.h
> > +++ b/arch/arm/mach-ixp4xx/include/mach/udc.h
> > @@ -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.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [RFC 1/3] ARM: move serial_sa1100.h header file to linux/platform_data
2012-09-21 9:36 ` [RFC 1/3] ARM: move serial_sa1100.h header file to linux/platform_data Russell King
@ 2012-09-21 23:05 ` Greg Kroah-Hartman
0 siblings, 0 replies; 17+ messages in thread
From: Greg Kroah-Hartman @ 2012-09-21 23:05 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Sep 21, 2012 at 10:36:07AM +0100, Russell King wrote:
> This is really driver platform data, so move it to the appropriate
> directory.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [RFC 2/3] ARM: move udc_pxa2xx.h to linux/platform_data
2012-09-21 9:36 ` [RFC 2/3] ARM: move udc_pxa2xx.h " Russell King
2012-09-21 9:39 ` Felipe Balbi
2012-09-21 9:40 ` Eric Miao
@ 2012-09-21 23:05 ` Greg Kroah-Hartman
2 siblings, 0 replies; 17+ messages in thread
From: Greg Kroah-Hartman @ 2012-09-21 23:05 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Sep 21, 2012 at 10:36:27AM +0100, Russell King wrote:
> Move the PXA2xx/IXP4xx UDC header file into linux/platform_data as it
> only contains a driver platform data structure.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [RFC 3/3] ARM/AVR32: get rid of serial_at91.h
2012-09-21 9:36 ` [RFC 3/3] ARM/AVR32: get rid of serial_at91.h Russell King
@ 2012-09-21 23:05 ` Greg Kroah-Hartman
2012-11-16 9:53 ` Jean-Christophe PLAGNIOL-VILLARD
2012-11-16 22:08 ` Joachim Eastwood
2 siblings, 0 replies; 17+ messages in thread
From: Greg Kroah-Hartman @ 2012-09-21 23:05 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Sep 21, 2012 at 10:36:48AM +0100, Russell King wrote:
> 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.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [RFC 2/3] ARM: move udc_pxa2xx.h to linux/platform_data
2012-09-21 9:48 ` Russell King - ARM Linux
@ 2012-09-22 11:41 ` Krzysztof Halasa
0 siblings, 0 replies; 17+ messages in thread
From: Krzysztof Halasa @ 2012-09-22 11:41 UTC (permalink / raw)
To: linux-arm-kernel
Russell King - ARM Linux <linux@arm.linux.org.uk> writes:
>> > --- a/arch/arm/mach-ixp4xx/include/mach/udc.h
>> > +++ b/arch/arm/mach-ixp4xx/include/mach/udc.h
>> > @@ -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.
The ixp4xx part looks good to me too.
Acked-by: Krzysztof Halasa <khc@pm.waw.pl>
--
Krzysztof Ha?asa
^ permalink raw reply [flat|nested] 17+ messages in thread
* [RFC 3/3] ARM/AVR32: get rid of serial_at91.h
2012-09-21 9:36 ` [RFC 3/3] ARM/AVR32: get rid of serial_at91.h Russell King
2012-09-21 23:05 ` Greg Kroah-Hartman
@ 2012-11-16 9:53 ` Jean-Christophe PLAGNIOL-VILLARD
2012-11-16 10:12 ` Nicolas Ferre
2012-11-16 22:08 ` Joachim Eastwood
2 siblings, 1 reply; 17+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-11-16 9:53 UTC (permalink / raw)
To: linux-arm-kernel
On 10:36 Fri 21 Sep , Russell King wrote:
> 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.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
personnaly I'm ok with it too
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
but Andrew seems use it so let him reply
Best Regards,
J.
> ---
> 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
>
> diff --git a/arch/arm/include/asm/mach/serial_at91.h b/arch/arm/include/asm/mach/serial_at91.h
> deleted file mode 100644
> index ea6d063..0000000
> --- a/arch/arm/include/asm/mach/serial_at91.h
> +++ /dev/null
> @@ -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
> -
> -
> diff --git a/arch/avr32/include/asm/mach/serial_at91.h b/arch/avr32/include/asm/mach/serial_at91.h
> deleted file mode 100644
> index 55b317a..0000000
> --- a/arch/avr32/include/asm/mach/serial_at91.h
> +++ /dev/null
> @@ -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
> -
> -
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index 3d7e1ee..a6134c9 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -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
> --
> 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
^ permalink raw reply [flat|nested] 17+ messages in thread
* [RFC 3/3] ARM/AVR32: get rid of serial_at91.h
2012-11-16 9:53 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2012-11-16 10:12 ` Nicolas Ferre
2012-11-16 11:38 ` Russell King - ARM Linux
2012-11-16 20:46 ` Andrew Victor
0 siblings, 2 replies; 17+ messages in thread
From: Nicolas Ferre @ 2012-11-16 10:12 UTC (permalink / raw)
To: linux-arm-kernel
On 11/16/2012 10:53 AM, Jean-Christophe PLAGNIOL-VILLARD :
> On 10:36 Fri 21 Sep , Russell King wrote:
>> 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.
>>
>> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> personnaly I'm ok with it too
> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
>
> 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:
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
>> ---
>> 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
>>
>> diff --git a/arch/arm/include/asm/mach/serial_at91.h b/arch/arm/include/asm/mach/serial_at91.h
>> deleted file mode 100644
>> index ea6d063..0000000
>> --- a/arch/arm/include/asm/mach/serial_at91.h
>> +++ /dev/null
>> @@ -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
>> -
>> -
>> diff --git a/arch/avr32/include/asm/mach/serial_at91.h b/arch/avr32/include/asm/mach/serial_at91.h
>> deleted file mode 100644
>> index 55b317a..0000000
>> --- a/arch/avr32/include/asm/mach/serial_at91.h
>> +++ /dev/null
>> @@ -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
>> -
>> -
>> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
>> index 3d7e1ee..a6134c9 100644
>> --- a/drivers/tty/serial/atmel_serial.c
>> +++ b/drivers/tty/serial/atmel_serial.c
>> @@ -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
>> --
>> 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
>
>
--
Nicolas Ferre
^ permalink raw reply [flat|nested] 17+ messages in thread
* [RFC 3/3] ARM/AVR32: get rid of serial_at91.h
2012-11-16 10:12 ` Nicolas Ferre
@ 2012-11-16 11:38 ` Russell King - ARM Linux
2012-11-16 20:46 ` Andrew Victor
1 sibling, 0 replies; 17+ messages in thread
From: Russell King - ARM Linux @ 2012-11-16 11:38 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Nov 16, 2012 at 11:12:46AM +0100, Nicolas Ferre wrote:
> On 11/16/2012 10:53 AM, Jean-Christophe PLAGNIOL-VILLARD :
> > On 10:36 Fri 21 Sep , Russell King wrote:
> >> 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.
> >>
> >> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> > personnaly I'm ok with it too
> > Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> >
> > 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:
>
> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Thanks for reminding me about this series, I'd completely forgotten about
it. It'll be in the next linux-next tree now.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [RFC 3/3] ARM/AVR32: get rid of serial_at91.h
2012-11-16 10:12 ` Nicolas Ferre
2012-11-16 11:38 ` Russell King - ARM Linux
@ 2012-11-16 20:46 ` Andrew Victor
1 sibling, 0 replies; 17+ messages in thread
From: Andrew Victor @ 2012-11-16 20:46 UTC (permalink / raw)
To: linux-arm-kernel
hi,
> 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.
Acked-By: Andrew Victor <avictor.za@gmail.com>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [RFC 3/3] ARM/AVR32: get rid of serial_at91.h
2012-09-21 9:36 ` [RFC 3/3] ARM/AVR32: get rid of serial_at91.h Russell King
2012-09-21 23:05 ` Greg Kroah-Hartman
2012-11-16 9:53 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2012-11-16 22:08 ` Joachim Eastwood
2012-11-16 23:08 ` Russell King - ARM Linux
2 siblings, 1 reply; 17+ messages in thread
From: Joachim Eastwood @ 2012-11-16 22:08 UTC (permalink / raw)
To: linux-arm-kernel
Hi Russell,
I made a similar patch a while ago. One note below.
(http://marc.info/?l=linux-arm-kernel&m=133372829203680)
On 21 September 2012 11:36, Russell King <rmk+kernel@arm.linux.org.uk> wrote:
> 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.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
> 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>
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index 3d7e1ee..a6134c9 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -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;
> -}
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
^ permalink raw reply [flat|nested] 17+ messages in thread
* [RFC 3/3] ARM/AVR32: get rid of serial_at91.h
2012-11-16 22:08 ` Joachim Eastwood
@ 2012-11-16 23:08 ` Russell King - ARM Linux
0 siblings, 0 replies; 17+ messages in thread
From: Russell King - ARM Linux @ 2012-11-16 23:08 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Nov 16, 2012 at 11:08:47PM +0100, Joachim Eastwood wrote:
> 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.
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2012-11-16 23:08 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-21 9:35 [RFC 0/3] Move some ARM header files to more appropriate locations Russell King - ARM Linux
2012-09-21 9:36 ` [RFC 1/3] ARM: move serial_sa1100.h header file to linux/platform_data Russell King
2012-09-21 23:05 ` Greg Kroah-Hartman
2012-09-21 9:36 ` [RFC 2/3] ARM: move udc_pxa2xx.h " Russell King
2012-09-21 9:39 ` Felipe Balbi
2012-09-21 9:40 ` Eric Miao
2012-09-21 9:48 ` Russell King - ARM Linux
2012-09-22 11:41 ` Krzysztof Halasa
2012-09-21 23:05 ` Greg Kroah-Hartman
2012-09-21 9:36 ` [RFC 3/3] ARM/AVR32: get rid of serial_at91.h Russell King
2012-09-21 23:05 ` Greg Kroah-Hartman
2012-11-16 9:53 ` Jean-Christophe PLAGNIOL-VILLARD
2012-11-16 10:12 ` Nicolas Ferre
2012-11-16 11:38 ` Russell King - ARM Linux
2012-11-16 20:46 ` Andrew Victor
2012-11-16 22:08 ` Joachim Eastwood
2012-11-16 23:08 ` Russell King - ARM Linux
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).