ARM: OMAP1: Get rid of <mach/ams-delta-fiq.h>
authorJanusz Krzysztofik <jmkrzyszt@gmail.com>
Thu, 21 Jun 2018 22:41:26 +0000 (00:41 +0200)
committerTony Lindgren <tony@atomide.com>
Tue, 3 Jul 2018 06:05:14 +0000 (23:05 -0700)
Split the header file into two parts and move them to directories where
they belong.

Information on internal structure of FIQ buffer is moved to
<linux/platform_data/ams-delta-fiq.h> for ams-delta-serio driver use.

Other information used by ams-delta board init file and FIQ code is
made local to mach-omap1 root directory.

Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
MAINTAINERS
arch/arm/mach-omap1/ams-delta-fiq-handler.S
arch/arm/mach-omap1/ams-delta-fiq.c
arch/arm/mach-omap1/ams-delta-fiq.h [new file with mode: 0644]
arch/arm/mach-omap1/board-ams-delta.c
arch/arm/mach-omap1/include/mach/ams-delta-fiq.h [deleted file]
drivers/input/serio/ams_delta_serio.c
include/linux/platform_data/ams-delta-fiq.h [new file with mode: 0644]

index 9d5eeff..c78b7dc 100644 (file)
@@ -10391,6 +10391,7 @@ F:      arch/arm/plat-omap/
 F:     arch/arm/configs/omap1_defconfig
 F:     drivers/i2c/busses/i2c-omap.c
 F:     include/linux/platform_data/i2c-omap.h
+F:     include/linux/platform_data/ams-delta-fiq.h
 
 OMAP2+ SUPPORT
 M:     Tony Lindgren <tony@atomide.com>
index bf60844..ddc2763 100644 (file)
  */
 
 #include <linux/linkage.h>
-#include <asm/assembler.h>
+#include <linux/platform_data/ams-delta-fiq.h>
 
+#include <asm/assembler.h>
 #include <mach/board-ams-delta.h>
-#include <mach/ams-delta-fiq.h>
 
+#include "ams-delta-fiq.h"
 #include "iomap.h"
 #include "soc.h"
 
index 5a6c59a..e729350 100644 (file)
 #include <linux/irq.h>
 #include <linux/module.h>
 #include <linux/io.h>
+#include <linux/platform_data/ams-delta-fiq.h>
 
 #include <mach/board-ams-delta.h>
 
 #include <asm/fiq.h>
 
-#include <mach/ams-delta-fiq.h>
+#include "ams-delta-fiq.h"
 
 static struct fiq_handler fh = {
        .name   = "ams-delta-fiq"
@@ -35,8 +36,8 @@ static struct fiq_handler fh = {
  * The FIQ and IRQ isrs can both read and write it.
  * It is structured as a header section several 32bit slots,
  * followed by the circular buffer where the FIQ isr stores
- * keystrokes received from the qwerty keyboard.
- * See ams-delta-fiq.h for details of offsets.
+ * keystrokes received from the qwerty keyboard.  See
+ * <linux/platform_data/ams-delta-fiq.h> for details of offsets.
  */
 unsigned int fiq_buffer[1024];
 EXPORT_SYMBOL(fiq_buffer);
diff --git a/arch/arm/mach-omap1/ams-delta-fiq.h b/arch/arm/mach-omap1/ams-delta-fiq.h
new file mode 100644 (file)
index 0000000..3f691d6
--- /dev/null
@@ -0,0 +1,41 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+/*
+ * arch/arm/mach-omap1/ams-delta-fiq.h
+ *
+ * Taken from the original Amstrad modifications to fiq.h
+ *
+ * Copyright (c) 2004 Amstrad Plc
+ * Copyright (c) 2006 Matt Callow
+ * Copyright (c) 2010 Janusz Krzysztofik
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef __AMS_DELTA_FIQ_H
+#define __AMS_DELTA_FIQ_H
+
+#include <mach/irqs.h>
+
+/*
+ * Interrupt number used for passing control from FIQ to IRQ.
+ * IRQ12, described as reserved, has been selected.
+ */
+#define INT_DEFERRED_FIQ       INT_1510_RES12
+/*
+ * Base address of an interrupt handler that the INT_DEFERRED_FIQ belongs to.
+ */
+#if (INT_DEFERRED_FIQ < IH2_BASE)
+#define DEFERRED_FIQ_IH_BASE   OMAP_IH1_BASE
+#else
+#define DEFERRED_FIQ_IH_BASE   OMAP_IH2_BASE
+#endif
+
+#ifndef __ASSEMBLER__
+extern unsigned char qwerty_fiqin_start, qwerty_fiqin_end;
+
+extern void __init ams_delta_init_fiq(struct gpio_chip *chip);
+#endif
+
+#endif
index e937372..902c24c 100644 (file)
 #include <mach/mux.h>
 
 #include <mach/hardware.h>
-#include <mach/ams-delta-fiq.h>
 #include "camera.h"
 #include <mach/usb.h>
 
+#include "ams-delta-fiq.h"
 #include "iomap.h"
 #include "common.h"
 
diff --git a/arch/arm/mach-omap1/include/mach/ams-delta-fiq.h b/arch/arm/mach-omap1/include/mach/ams-delta-fiq.h
deleted file mode 100644 (file)
index a9769ff..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * arch/arm/mach-omap1/include/ams-delta-fiq.h
- *
- * Taken from the original Amstrad modifications to fiq.h
- *
- * Copyright (c) 2004 Amstrad Plc
- * Copyright (c) 2006 Matt Callow
- * Copyright (c) 2010 Janusz Krzysztofik
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#ifndef __AMS_DELTA_FIQ_H
-#define __AMS_DELTA_FIQ_H
-
-#include <mach/irqs.h>
-
-/*
- * Interrupt number used for passing control from FIQ to IRQ.
- * IRQ12, described as reserved, has been selected.
- */
-#define INT_DEFERRED_FIQ       INT_1510_RES12
-/*
- * Base address of an interrupt handler that the INT_DEFERRED_FIQ belongs to.
- */
-#if (INT_DEFERRED_FIQ < IH2_BASE)
-#define DEFERRED_FIQ_IH_BASE   OMAP_IH1_BASE
-#else
-#define DEFERRED_FIQ_IH_BASE   OMAP_IH2_BASE
-#endif
-
-/*
- * These are the offsets from the beginning of the fiq_buffer. They are put here
- * since the buffer and header need to be accessed by drivers servicing devices
- * which generate GPIO interrupts - e.g. keyboard, modem, hook switch.
- */
-#define FIQ_MASK                0
-#define FIQ_STATE               1
-#define FIQ_KEYS_CNT            2
-#define FIQ_TAIL_OFFSET                 3
-#define FIQ_HEAD_OFFSET                 4
-#define FIQ_BUF_LEN             5
-#define FIQ_KEY                         6
-#define FIQ_MISSED_KEYS                 7
-#define FIQ_BUFFER_START        8
-#define FIQ_GPIO_INT_MASK       9
-#define FIQ_KEYS_HICNT         10
-#define FIQ_IRQ_PEND           11
-#define FIQ_SIR_CODE_L1                12
-#define IRQ_SIR_CODE_L2                13
-
-#define FIQ_CNT_INT_00         14
-#define FIQ_CNT_INT_KEY                15
-#define FIQ_CNT_INT_MDM                16
-#define FIQ_CNT_INT_03         17
-#define FIQ_CNT_INT_HSW                18
-#define FIQ_CNT_INT_05         19
-#define FIQ_CNT_INT_06         20
-#define FIQ_CNT_INT_07         21
-#define FIQ_CNT_INT_08         22
-#define FIQ_CNT_INT_09         23
-#define FIQ_CNT_INT_10         24
-#define FIQ_CNT_INT_11         25
-#define FIQ_CNT_INT_12         26
-#define FIQ_CNT_INT_13         27
-#define FIQ_CNT_INT_14         28
-#define FIQ_CNT_INT_15         29
-
-#define FIQ_CIRC_BUFF          30      /*Start of circular buffer */
-
-#ifndef __ASSEMBLER__
-extern unsigned int fiq_buffer[];
-extern unsigned char qwerty_fiqin_start, qwerty_fiqin_end;
-
-extern void __init ams_delta_init_fiq(struct gpio_chip *chip);
-#endif
-
-#endif
index 7952a29..2602f7c 100644 (file)
@@ -22,6 +22,7 @@
  */
 #include <linux/gpio.h>
 #include <linux/irq.h>
+#include <linux/platform_data/ams-delta-fiq.h>
 #include <linux/platform_device.h>
 #include <linux/regulator/consumer.h>
 #include <linux/serio.h>
@@ -30,8 +31,6 @@
 
 #include <mach/board-ams-delta.h>
 
-#include <mach/ams-delta-fiq.h>
-
 #define DRIVER_NAME    "ams-delta-serio"
 
 MODULE_AUTHOR("Matt Callow");
diff --git a/include/linux/platform_data/ams-delta-fiq.h b/include/linux/platform_data/ams-delta-fiq.h
new file mode 100644 (file)
index 0000000..dc0f835
--- /dev/null
@@ -0,0 +1,62 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+/*
+ * include/linux/platform_data/ams-delta-fiq.h
+ *
+ * Taken from the original Amstrad modifications to fiq.h
+ *
+ * Copyright (c) 2004 Amstrad Plc
+ * Copyright (c) 2006 Matt Callow
+ * Copyright (c) 2010 Janusz Krzysztofik
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef __LINUX_PLATFORM_DATA_AMS_DELTA_FIQ_H
+#define __LINUX_PLATFORM_DATA_AMS_DELTA_FIQ_H
+
+/*
+ * These are the offsets from the beginning of the fiq_buffer. They are put here
+ * since the buffer and header need to be accessed by drivers servicing devices
+ * which generate GPIO interrupts - e.g. keyboard, modem, hook switch.
+ */
+#define FIQ_MASK                0
+#define FIQ_STATE               1
+#define FIQ_KEYS_CNT            2
+#define FIQ_TAIL_OFFSET                 3
+#define FIQ_HEAD_OFFSET                 4
+#define FIQ_BUF_LEN             5
+#define FIQ_KEY                         6
+#define FIQ_MISSED_KEYS                 7
+#define FIQ_BUFFER_START        8
+#define FIQ_GPIO_INT_MASK       9
+#define FIQ_KEYS_HICNT         10
+#define FIQ_IRQ_PEND           11
+#define FIQ_SIR_CODE_L1                12
+#define IRQ_SIR_CODE_L2                13
+
+#define FIQ_CNT_INT_00         14
+#define FIQ_CNT_INT_KEY                15
+#define FIQ_CNT_INT_MDM                16
+#define FIQ_CNT_INT_03         17
+#define FIQ_CNT_INT_HSW                18
+#define FIQ_CNT_INT_05         19
+#define FIQ_CNT_INT_06         20
+#define FIQ_CNT_INT_07         21
+#define FIQ_CNT_INT_08         22
+#define FIQ_CNT_INT_09         23
+#define FIQ_CNT_INT_10         24
+#define FIQ_CNT_INT_11         25
+#define FIQ_CNT_INT_12         26
+#define FIQ_CNT_INT_13         27
+#define FIQ_CNT_INT_14         28
+#define FIQ_CNT_INT_15         29
+
+#define FIQ_CIRC_BUFF          30      /*Start of circular buffer */
+
+#ifndef __ASSEMBLER__
+extern unsigned int fiq_buffer[];
+#endif
+
+#endif