From patchwork Sat Jun 9 14:02:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz Krzysztofik X-Patchwork-Id: 10455975 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A2807601D4 for ; Sat, 9 Jun 2018 14:28:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8DEDD223B2 for ; Sat, 9 Jun 2018 14:28:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7D71B206E2; Sat, 9 Jun 2018 14:28:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CB041206E2 for ; Sat, 9 Jun 2018 14:28:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=ETN+IKsjV2YEPsytoZSpHdk8z0+WuSLbiMAFhjoNHtQ=; b=b8d9mH1BoQlgUIn7ezfVQk1kN4 5ASp7pzbe9G/t/PpW4Ujlm03PRWeYdcoWmluX4pBaXdfPSMvl9NqceNNmAQSKWJv9TgCv41sEbscL JVI21EzlSp3ofJNOXN6NBIprJePmbhxTnLNkFTNlyNksHep/ZpXwjendpaLmDhpRsvIEy7tScCQtR Dq37MLRCa7SjlFYZ7KUNwD0K/vUS2Wz2YeXTZ6NHNePugr15EMbGnRKnrCNVf5KR5OB+DtL1plu+2 y4orFZfsbZDjMQBSY7a4dG53v72o58SEDvg5jY6fAXJxh/edF4ebk4gTX6oZ+tE1HUC9/iPCWqTf0 pmLOc3UQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fReqp-00064l-KV; Sat, 09 Jun 2018 14:28:19 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fReia-0001Hw-FC for linux-arm-kernel@bombadil.infradead.org; Sat, 09 Jun 2018 14:19:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=DIwkmllE5OHi+wZIxuaETUTsL/3AgjHsyvkIR+Slbw4=; b=i+7VmxKGkCn8wFV57Ap3cvn5f tJaaIAiQ61r//38TFq0zPfGgKi8l16QeuKEdwZ91YXrteIs/wMpekYcul5vbWmGhDoWTMcjbh6epl QXRD0JwaWIdWkDWXy8yFJt5rwkf885zKCyX2YjfipSz4d44jF8/Y/lSXJYKXKlvdJQYqevyQSMmaY yTdnJ4MVqVSupxWdm6vXOt78WM0u9dxqbKJLhOUu5e26lzb/mXB6U8ye/wrEWrS31Z0yJdDi5rxtV 2Dcldo8maY8/yN41S25uvl5QbMt9pzwX9NMjfhNuTdL0IX+M9/9YXuhl1DVDhvskEyNXl7urF2/tZ gW6aFtMrw==; Received: from mail-lf0-x243.google.com ([2a00:1450:4010:c07::243]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fReSf-0007VU-Cr for linux-arm-kernel@lists.infradead.org; Sat, 09 Jun 2018 14:03:24 +0000 Received: by mail-lf0-x243.google.com with SMTP id n3-v6so24169075lfe.12 for ; Sat, 09 Jun 2018 07:03:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=DIwkmllE5OHi+wZIxuaETUTsL/3AgjHsyvkIR+Slbw4=; b=Hwn3EpAAkTsxP0lgqX727eQ0EM3ivKfltLVeosDZmRQR0IZ7loGZF9zRDBi5YxqHVv orZCsItRrsiyN9YX5UDL7E6QPP6ooeFCMBdgFg2dMoib+0uJ0nGlmYk5jkMF5gvI8Ddz ITbXh3eMrmtQcetN5f05NAf9GKeAeesziw4gGyxUtpHpRghPmOxpM5l1zcWjyAQfVdb1 YpNwRuHecIoU5UmWtc3uGnVQtIb8PokkYEpq4zKGgYonCI2t7THj0K8/TgSpBMlrFfro p2kplV2U3iy8GJp7OFn3zHmQhUtsAfZKY4YQCNjPNH4IZPw1I+fV3c4KTumYFdmdLI9j niQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=DIwkmllE5OHi+wZIxuaETUTsL/3AgjHsyvkIR+Slbw4=; b=bVL96igbRkkJ9N1S5Lfz0QL/UK7Ll3r+l7RLZSmTfKQT+We0yyCXxJrw1nGkJUgBIM zIFjncprd3LYg6TuXnq9gQ0KE6DzTuFIxnVblD0CfdEUvVubUOV5OIpBpWUMFomrIvTR QFc7KaLjly9GhCJMzOUrvujUPX3oZRmrO0dx9C1jxKiCA4k47DG203l4x6ktmHZX/RTW 8gH5X/Pkd+SjsJmDsnzwq0x/TUZZ3rSzecxV/lGMqna8m6snW/3F/YQEWwQo1LNJJnEH HLoJLdooKvCX54tOYZnI1S6Ndliv0vKc0hjdRWyknjrUxic37js0KS6uDyNLs36qQ85o Mtuw== X-Gm-Message-State: APt69E1IOgk0JJq28jGvTgUdZBuip6FAr+D4cAFlbPP1iX9lB/3jRCjX WGR4WW80rx6nCi8VKjWk4tY= X-Google-Smtp-Source: ADUXVKIe4dDaHGGme7N1vNWwyxYTzojkwejOQLgjd8EfYOShOD/tU8ho6HKVv3fyRNWqKqQs47pbWQ== X-Received: by 2002:a19:c608:: with SMTP id w8-v6mr5647173lff.64.1528552995558; Sat, 09 Jun 2018 07:03:15 -0700 (PDT) Received: from localhost.localdomain (apn-31-0-40-98.dynamic.gprs.plus.pl. [31.0.40.98]) by smtp.gmail.com with ESMTPSA id n84-v6sm4477727lfi.19.2018.06.09.07.03.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 Jun 2018 07:03:14 -0700 (PDT) From: Janusz Krzysztofik To: Dmitry Torokhov , Tony Lindgren , Aaro Koskinen Subject: [PATCH 08/10] ARM: OMAP1: Get rid of Date: Sat, 9 Jun 2018 16:02:22 +0200 Message-Id: <20180609140224.32606-8-jmkrzyszt@gmail.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180609140224.32606-1-jmkrzyszt@gmail.com> References: <20180609140224.32606-1-jmkrzyszt@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180609_150321_647694_86AF7BCD X-CRM114-Status: GOOD ( 27.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Greg Kroah-Hartman , Linus Walleij , Randy Dunlap , Janusz Krzysztofik , Liam Girdwood , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Mark Brown , linux-input@vger.kernel.org, Mauro Carvalho Chehab , Andrew Morton , linux-omap@vger.kernel.org, "David S . Miller" , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 , to be used by ams-delta-serio driver. 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 --- MAINTAINERS | 1 + arch/arm/mach-omap1/ams-delta-fiq-handler.S | 5 +-- arch/arm/mach-omap1/ams-delta-fiq.c | 7 ++-- arch/arm/mach-omap1/ams-delta-fiq.h | 41 ++++++++++++++++++++++ arch/arm/mach-omap1/board-ams-delta.c | 2 +- drivers/input/serio/ams_delta_serio.c | 3 +- .../linux/platform_data}/ams-delta-fiq.h | 27 +++----------- 7 files changed, 56 insertions(+), 30 deletions(-) create mode 100644 arch/arm/mach-omap1/ams-delta-fiq.h rename {arch/arm/mach-omap1/include/mach => include/linux/platform_data}/ams-delta-fiq.h (71%) diff --git a/MAINTAINERS b/MAINTAINERS index 14fbc6e94774..c487348da38c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -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 diff --git a/arch/arm/mach-omap1/ams-delta-fiq-handler.S b/arch/arm/mach-omap1/ams-delta-fiq-handler.S index bf608441b357..ddc27638ba2a 100644 --- a/arch/arm/mach-omap1/ams-delta-fiq-handler.S +++ b/arch/arm/mach-omap1/ams-delta-fiq-handler.S @@ -14,11 +14,12 @@ */ #include -#include +#include +#include #include -#include +#include "ams-delta-fiq.h" #include "iomap.h" #include "soc.h" diff --git a/arch/arm/mach-omap1/ams-delta-fiq.c b/arch/arm/mach-omap1/ams-delta-fiq.c index 5a6c59ac9b5f..e72935034d42 100644 --- a/arch/arm/mach-omap1/ams-delta-fiq.c +++ b/arch/arm/mach-omap1/ams-delta-fiq.c @@ -19,12 +19,13 @@ #include #include #include +#include #include #include -#include +#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 + * 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 index 000000000000..3f691d68aa62 --- /dev/null +++ b/arch/arm/mach-omap1/ams-delta-fiq.h @@ -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 + +/* + * 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 diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index f15c0793c34b..fe9a3e7cbfeb 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c @@ -41,10 +41,10 @@ #include #include -#include #include "camera.h" #include +#include "ams-delta-fiq.h" #include "iomap.h" #include "common.h" diff --git a/drivers/input/serio/ams_delta_serio.c b/drivers/input/serio/ams_delta_serio.c index a83d8b3cd838..5d0bd2005648 100644 --- a/drivers/input/serio/ams_delta_serio.c +++ b/drivers/input/serio/ams_delta_serio.c @@ -22,6 +22,7 @@ */ #include #include +#include #include #include #include @@ -30,8 +31,6 @@ #include -#include - #define DRIVER_NAME "ams-delta-serio" MODULE_AUTHOR("Matt Callow"); diff --git a/arch/arm/mach-omap1/include/mach/ams-delta-fiq.h b/include/linux/platform_data/ams-delta-fiq.h similarity index 71% rename from arch/arm/mach-omap1/include/mach/ams-delta-fiq.h rename to include/linux/platform_data/ams-delta-fiq.h index a9769ff396bc..dc0f835ea918 100644 --- a/arch/arm/mach-omap1/include/mach/ams-delta-fiq.h +++ b/include/linux/platform_data/ams-delta-fiq.h @@ -1,5 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + /* - * arch/arm/mach-omap1/include/ams-delta-fiq.h + * include/linux/platform_data/ams-delta-fiq.h * * Taken from the original Amstrad modifications to fiq.h * @@ -11,24 +13,8 @@ * 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 - -/* - * 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 __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 @@ -71,9 +57,6 @@ #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