Received: by 10.223.164.200 with SMTP id h8csp798499wrb; Sun, 5 Nov 2017 21:58:15 -0800 (PST) X-Google-Smtp-Source: ABhQp+TmGLYI8yDD4bfA2U7N+2PGFN1hIQVy7utRsCgSneDsZtEhuYofvgpTxNnA4SNYkdOGny4y X-Received: by 10.84.168.132 with SMTP id f4mr13557454plb.424.1509947895638; Sun, 05 Nov 2017 21:58:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509947895; cv=none; d=google.com; s=arc-20160816; b=ogftUcgjpz3QI5Uk26MGQfJHZE3Vwb5uJHjHfC1cZ5Jr5UHZLrHhRdqfREI8bNnTN6 tDQ7gg9U66HC47WjbstYqpbjAXIKrZR+0sFXlE376uuXpwAMGThyeg+RAG5eJ1Q//jXt +vCEEb0RjsiPswIpM+Go4apsJBe5sWgAN7kCy0QNAtgHSm+M5jJHOJMPnEe2gFQ/yXwR uuEGgmrMUXciYwvXD00CQ/tBqWabc5u5LFIxKhMlQ7j4bJNZQzWwCWyd7bhsSda7bwzu YrsusNHFeHn8T4rXCSxR2leFpXHGL9GDw4skZaZLOIQLVUHyT7mmh8nbPgHIdi4ZxDhu LrnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:arc-authentication-results; bh=JkrxYC2Cj01Tqm5DW1O2wMK5y981tSO8S0N6eaRtnpA=; b=Fd+8k721s3dAoyruL2czwD3pX9rHoU0qodmP5CGY0pGGbWHKU2yLMeWJPeBnmR/D4A /ZgSkY74qxWu/9IOdhsGf+6pJH4OTp6vqJkVIojEtUsAc3/cGKCsAab96crTM5NgDY53 35GgWc5/oXjaFn3F/ob0HcePacDSfkjySvfcFE3GxflevxOEFfGJJHw45mGIWqxlZRWL ask409d11RlYVzrlm7ZYf6mo2fryC8Mv6keqTbl0z1EmOsj1FJ4nl4IQeISWUtdAd1QJ OJ2VRKyBWCW0rnU5QvE0OuO6JPM4J4/ab85oj+pRdeQCui6XaI2XnjTbjboRtjAdYy/I jJ+g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3si9634259pli.734.2017.11.05.21.58.01; Sun, 05 Nov 2017 21:58:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751344AbdKFFzh (ORCPT + 99 others); Mon, 6 Nov 2017 00:55:37 -0500 Received: from mail-cys01nam02on0075.outbound.protection.outlook.com ([104.47.37.75]:27850 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751107AbdKFFzc (ORCPT ); Mon, 6 Nov 2017 00:55:32 -0500 Received: from BN3PR03CA0101.namprd03.prod.outlook.com (2603:10b6:400:4::19) by SN2PR03MB2367.namprd03.prod.outlook.com (2603:10b6:804:e::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.197.13; Mon, 6 Nov 2017 05:55:31 +0000 Received: from BN1BFFO11FD031.protection.gbl (2a01:111:f400:7c10::1:137) by BN3PR03CA0101.outlook.office365.com (2603:10b6:400:4::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.197.13 via Frontend Transport; Mon, 6 Nov 2017 05:55:30 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD031.mail.protection.outlook.com (10.58.144.94) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.178.5 via Frontend Transport; Mon, 6 Nov 2017 05:55:30 +0000 Received: from titan.ap.freescale.net ([10.192.208.233]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id vA65tKNI008409; Sun, 5 Nov 2017 22:55:28 -0700 From: Zhao Qiang To: , , CC: , Zhao Qiang Subject: [Patch v12 1/4] irqchip/qeic: move qeic driver from drivers/soc/fsl/qe Date: Mon, 6 Nov 2017 13:36:50 +0800 Message-ID: <20171106053653.23961-2-qiang.zhao@nxp.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171106053653.23961-1-qiang.zhao@nxp.com> References: <20171106053653.23961-1-qiang.zhao@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131544213310634349;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(336005)(346002)(39380400002)(376002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(48376002)(16586007)(6666003)(50466002)(2950100002)(50226002)(54906003)(110136005)(316002)(5660300001)(105606002)(77096006)(2906002)(1076002)(97736004)(76176999)(85426001)(53936002)(356003)(305945005)(8936002)(50986999)(86362001)(8656006)(2201001)(81156014)(81166006)(575784001)(8676002)(104016004)(106466001)(33646002)(5003940100001)(68736007)(36756003)(189998001)(47776003)(498600001)(4326008)(2004002);DIR:OUT;SFP:1101;SCL:1;SRVR:SN2PR03MB2367;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11FD031;1:5cxlmEGSpn7wQFnP58RBqcVcO4tMXNrq2BZ10oJv9N860SW6d8yJuIeX/xfBzR2xr0aYewUJx6qotLDFjqYq+PlOm+7vjOyfjHIirdgZBCxFVxyjrfa3Toaf1Zxlmfzj MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d6debceb-bd1e-4b53-180c-08d524dafd18 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(4534020)(4628075)(201703131517081)(2017052603249);SRVR:SN2PR03MB2367; X-Microsoft-Exchange-Diagnostics: 1;SN2PR03MB2367;3:rk0idDmqUBrA51Jw/Gxehk3UJ+MH/tv/L9eUzKidTvZ781JVxz+Y9d++x5bRJuq7zrwXF4QULqoEtR552VF3Pyloxsm4zVbU60W8GldH7Nt5lC7XYX8R+AD/0XP3oMpWUPFYAG7YZFGDKAlqazd7UW1h6XERjRdzwVLJdFFbFqqK2A4USdEU3nOOSWeVoUooU+2Xlw/2UP235H5RZYMv0ydTYh0TIkKF/uVCjVZAWRUMYWOOcKTwCYHg8JTTITAJSazcvRx5FM+rKvUx979usff5k+8mm/k5AdGM6RH4ivkY7gvkwqb/3HX85DrunRe9xGJxx4+qMJtqNq2xNISHsV4tSM1qt7bQmu3MqbKhG5g=;25:LCqPjNSO/dqaXM/Dnw2Ivxg7LcgPi7zAGvizQUPxk+SrJCEDPFrjeup3BuAQc92WRS6QxbWcWn8+zNL6+XpeKquBNPUhQZS+xdpz2QlLO/micP0hnrhIbSFc6wLOSzihb/8glr47cZgJIcfDS2kj5/Sz+X2NZeXf8EntzyFIIXhYPrRbtOYiEZpBYqTwHk1oPfNt2bbCRVI/0AuKQlmPYg5ja1f6gdzOErAyXIPlYA+5QGcQNhS1n7YEdwtpAxsKR104nasYy3GpTCMCm9KY8CvUx+KvIMxlGjDlE7c3WzZygvTtsV/eol49gA+2vY09Sv5RTUned+gDMUUhT/skHA== X-MS-TrafficTypeDiagnostic: SN2PR03MB2367: X-Microsoft-Exchange-Diagnostics: 1;SN2PR03MB2367;31:yTBbG8yUTUol8yxzctQbskEjwJb/UCUpKEL+yT4FNOsv54SW/gY2HLgS8JoUd3HIjS/Qtu+ttrO8e7rR8Bgf2zOfK1P5UkiE51Ngjem/5GpMJaiBrsepeRq3LcxclWGZQYkV7hC8aAOX5BhjIPQu4DHDm3+pZ6PkgzRlnDytX/3X4gM7b7ZFTF/ioLzU7CBSptXD+qvxdnxq5G3vRAFydtpqVAeS7ETjEquBlMxKldE=;4:HNAHQQ4P6OciFTYKlJ7KnKbUu3xpDDukO1r5vS6ezyuBB99ngy97A/zTZT1wvwOuiizUx0dTzloU0B8OpkYl3g2oqU+g7caRrcXD/+F3MnDcG8jr7jHIwRjL2JMcj1msfcvNX5FyCdUvSTDNb5tuxpLY/R+Kb3Ofh/blPxLw1mSqNlUknOqiU97w6FMiBu6zUXgNNSnAaykHqdW8Zg57V3GKrJ5HVBQPRdUeF/Hky/ko4RAp1+Ie9wCmZKyV9gg+HfyTn8UzfjVLCIS6YZ5dTM7RZfz/1blAkwkVIeiQW2pH+e3rWow5XFP/DEslAZ6JuWffClfKQ6vdqKu+PKMWCLPduK6B4qUjEPwuB1RuCCsNbD7mpLOiFRsp6eDLfuvD X-Exchange-Antispam-Report-Test: UriScan:(9452136761055)(185117386973197)(101931422205132); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(93006095)(93001095)(3231021)(10201501046)(3002001)(6055026)(6096035)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123563025)(20161123556025)(20161123561025)(20161123565025)(20161123559100)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:SN2PR03MB2367;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:SN2PR03MB2367; X-Forefront-PRVS: 048396AFA0 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;SN2PR03MB2367;23:5x4pxz64R5K34mprUob5BYv6uAK3NOlA22Mpt+lOK?= =?us-ascii?Q?rZttayJp7CHf1OYbt4bUCEiP1brjbppWWMuw3A90DaeAzxtL0oNlFKnwzMQz?= =?us-ascii?Q?BjIDGl0JGxMPsptt5RjrTL/t68vRRJIGiKRV2oaZQIfi1YN4mokjwQLDHGzG?= =?us-ascii?Q?6jwCR/ViwU9qPAQPS2dR0zM2CNuHA5zKKQlnHVSlua5ykqKCu691oCZmAWu9?= =?us-ascii?Q?W94Q6gZgGTfv68gPU0bBHxiGPnYqhGliDuAAeU7XCmqMZva+gR3YfITkGbxu?= =?us-ascii?Q?LdOZhoLMtFigXaCvWb8E/lF8xvsgStXGQyTqBYcrUUF8QlK/L7y5PNkDc4uJ?= =?us-ascii?Q?h7Zrwx8QIup4emUj04gv/BdILiUojQMjr5MDluMBsYu78HkNRT6OK/dvUwXv?= =?us-ascii?Q?11mIya/+q4EMZ91shrOotzAMYupe88u/fWGVMeM+FvekxKRFlw7ch7xegAih?= =?us-ascii?Q?Nc+T97E75w17KjUl5d3tCEW0FFrFqBNv0Ez87btptDNDa9iJkqrogVkwn3v4?= =?us-ascii?Q?byRqjHyAIe1QRnbujGu1kJm0PCqd/L7ITYQDFbv25ymJDiBIYbu1Yl8p7B+s?= =?us-ascii?Q?N3YIWX/Si+piWh+R6wFnxaIbWERwE7EebTQWV9nWpgS71+FzecQ8Q/L06wqL?= =?us-ascii?Q?trq9VzYKFWOERgMY6ZJE5xSSRQZyZx6TxJ9+QG/mQcorhVuP+EveaI1Fi4Zd?= =?us-ascii?Q?/I4n3vIPHOsaUfHfv7uBmz2io2ncK89vfdrhEOlSlJclfMeIdd6WgXUy/7Uh?= =?us-ascii?Q?Z8XkqIcovtez+GqsNWaKbZCShXnk+nrGnyLHrEl2OTtmlBVdU1spjxEErfPb?= =?us-ascii?Q?QVLd+tT/oTIboKmCay1TOdGLCtOKp5nVqrETLByXJjJCVBKUJ364LgoybPmc?= =?us-ascii?Q?Tn/pkWW9jFHS5xivohihlKvsi5uOUnZJrmKOtv8ygC+yIW0mvAQycgzp3s7Y?= =?us-ascii?Q?T2pth2CqFFaW/3mvPJyQ+pfuv68xoCh4vAxkJd1S+rL2er0ZyEaJIZnPULDp?= =?us-ascii?Q?0sssvhj++FkvOcPGLJ301nL0eEc5pvMJVbdgJdTees4QtsXJdJDvUOkhSUjo?= =?us-ascii?Q?PsoX78cuHl9RC4pT2a++guNvKodjzrdLjviUoJFQBJvgbKuICxnik54eD76T?= =?us-ascii?Q?PqDUtBcXHchYZex3bnlPKPRms97Rs+YmMkYJzz+0ylEc25k7nbRSyYlqe97r?= =?us-ascii?Q?ZDzpNVdxwFfRYWSz0ZjSuCaTmcSGQ38esPH2cKkyQtALGKYzgMsfw0ipA=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1;SN2PR03MB2367;6:TA/onSr8hUt7ddMXoLy7Biu5yo4c9K3RLjcBNFKRLpzyo3anvD1D/FmWOWDq6OpEnigLj9UWgt6ukUDvlYQBmxdr52JBDfs7aPIXeoU8OJlojawSviDRWdvJfG8cd5GIpylmS/t4GR2x+jhg07sbzIG7V3F7eHrxKtbSyT0mcnch2IJXWZQYCXHgLXrP3HzuRNSZabZovO4s9+fDlKPFP4YZAhlcQ8+Fi9Uo0w3rZ0nIr3ArARNNl8CV8ahrgFdigcYffwoBBpohzq+VrQ7es7w2ERiEwqUwAKvz/B+KXGqatn6dqQ65SQ5QtycQk/HQ1vBrEJ0SxNJtLrV3IMnzOViiVndKPB9lf6cziAKd3jQ=;5:2XFIiF/3TMIzgmBHSJE7l0eyI5ul73s4I9O4N4uIhFL2Xth3FeaOXvBmZkntUCfLS/KGfUWYOgLbxzTBR6NIyHQWnivHMUuuxUoP4Hw29M/U4DbPfa2Z1tNdLFnVF7wKqke9yF9gybdoNlofPGGpSW1YUsj6E9sM5Frdmm2Wy+0=;24:rZnWl0zIrfX4uk+9XEUtTR2RLNJChFPBGLRuyLibg0E/Qd49xhhpgLIpxcWsUlwamOF7x3YVQpN6aisPU70LN4AyYGOOG3wgOWOlIVxHtcg=;7:WJq3i7GbbgtCjjkLePrM5wUVzK+NdUDRqIhCQQqcT8uHV4x9M9fDAHG+Ectbd1vEEIPbbEfFpANaTFsdMoFLtAQbkNGdXL4qhFwW1kdPMk+27AcSI96JE3YRM8BgWT5NCYo2p79Dfsdpdw6fN7BcH2ouoaDCeyyWvZilBqQKqF8NDaZr3izBX37255Zm3h2UHnIM7da7RJMSPBAt24kgA5eqf4/7VoURnFx6it6BLvlCg0p+f/DUNT1x6uot5W+T SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Nov 2017 05:55:30.8606 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d6debceb-bd1e-4b53-180c-08d524dafd18 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR03MB2367 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org move the driver from drivers/soc/fsl/qe to drivers/irqchip, merge qe_ic.h and qe_ic.c into irq-qeic.c. Signed-off-by: Zhao Qiang --- MAINTAINERS | 6 ++ drivers/irqchip/Makefile | 1 + drivers/{soc/fsl/qe/qe_ic.c => irqchip/irq-qeic.c} | 95 ++++++++++++++++++- drivers/soc/fsl/qe/Makefile | 2 +- drivers/soc/fsl/qe/qe_ic.h | 103 --------------------- 5 files changed, 100 insertions(+), 107 deletions(-) rename drivers/{soc/fsl/qe/qe_ic.c => irqchip/irq-qeic.c} (85%) delete mode 100644 drivers/soc/fsl/qe/qe_ic.h diff --git a/MAINTAINERS b/MAINTAINERS index af0cb69f6a3e..e872c84e4e37 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5553,6 +5553,12 @@ F: drivers/soc/fsl/qe/ F: include/soc/fsl/*qe*.h F: include/soc/fsl/*ucc*.h +FREESCALE QEIC DRIVERS +M: Qiang Zhao +L: linux-kernel@vger.kernel.org +S: Maintained +F: drivers/irqchip/irq-qeic.c + FREESCALE QUICC ENGINE UCC ETHERNET DRIVER M: Li Yang L: netdev@vger.kernel.org diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile index 845abc107ad5..77aa4f55a54c 100644 --- a/drivers/irqchip/Makefile +++ b/drivers/irqchip/Makefile @@ -79,3 +79,4 @@ obj-$(CONFIG_ARCH_ASPEED) += irq-aspeed-vic.o irq-aspeed-i2c-ic.o obj-$(CONFIG_STM32_EXTI) += irq-stm32-exti.o obj-$(CONFIG_QCOM_IRQ_COMBINER) += qcom-irq-combiner.o obj-$(CONFIG_IRQ_UNIPHIER_AIDET) += irq-uniphier-aidet.o +obj-$(CONFIG_QUICC_ENGINE) += irq-qeic.o diff --git a/drivers/soc/fsl/qe/qe_ic.c b/drivers/irqchip/irq-qeic.c similarity index 85% rename from drivers/soc/fsl/qe/qe_ic.c rename to drivers/irqchip/irq-qeic.c index ec2ca864b0c5..9b4660cf9267 100644 --- a/drivers/soc/fsl/qe/qe_ic.c +++ b/drivers/irqchip/irq-qeic.c @@ -1,7 +1,7 @@ /* - * arch/powerpc/sysdev/qe_lib/qe_ic.c + * drivers/irqchip/irq-qeic.c * - * Copyright (C) 2006 Freescale Semiconductor, Inc. All rights reserved. + * Copyright (C) 2016 Freescale Semiconductor, Inc. All rights reserved. * * Author: Li Yang * Based on code from Shlomi Gridish @@ -30,7 +30,96 @@ #include #include -#include "qe_ic.h" +#define NR_QE_IC_INTS 64 + +/* QE IC registers offset */ +#define QEIC_CICR 0x00 +#define QEIC_CIVEC 0x04 +#define QEIC_CRIPNR 0x08 +#define QEIC_CIPNR 0x0c +#define QEIC_CIPXCC 0x10 +#define QEIC_CIPYCC 0x14 +#define QEIC_CIPWCC 0x18 +#define QEIC_CIPZCC 0x1c +#define QEIC_CIMR 0x20 +#define QEIC_CRIMR 0x24 +#define QEIC_CICNR 0x28 +#define QEIC_CIPRTA 0x30 +#define QEIC_CIPRTB 0x34 +#define QEIC_CRICR 0x3c +#define QEIC_CHIVEC 0x60 + +/* Interrupt priority registers */ +#define CIPCC_SHIFT_PRI0 29 +#define CIPCC_SHIFT_PRI1 26 +#define CIPCC_SHIFT_PRI2 23 +#define CIPCC_SHIFT_PRI3 20 +#define CIPCC_SHIFT_PRI4 13 +#define CIPCC_SHIFT_PRI5 10 +#define CIPCC_SHIFT_PRI6 7 +#define CIPCC_SHIFT_PRI7 4 + +/* CICR priority modes */ +#define CICR_GWCC 0x00040000 +#define CICR_GXCC 0x00020000 +#define CICR_GYCC 0x00010000 +#define CICR_GZCC 0x00080000 +#define CICR_GRTA 0x00200000 +#define CICR_GRTB 0x00400000 +#define CICR_HPIT_SHIFT 8 +#define CICR_HPIT_MASK 0x00000300 +#define CICR_HP_SHIFT 24 +#define CICR_HP_MASK 0x3f000000 + +/* CICNR */ +#define CICNR_WCC1T_SHIFT 20 +#define CICNR_ZCC1T_SHIFT 28 +#define CICNR_YCC1T_SHIFT 12 +#define CICNR_XCC1T_SHIFT 4 + +/* CRICR */ +#define CRICR_RTA1T_SHIFT 20 +#define CRICR_RTB1T_SHIFT 28 + +/* Signal indicator */ +#define SIGNAL_MASK 3 +#define SIGNAL_HIGH 2 +#define SIGNAL_LOW 0 + +struct qe_ic { + /* Control registers offset */ + u32 __iomem *regs; + + /* The remapper for this QEIC */ + struct irq_domain *irqhost; + + /* The "linux" controller struct */ + struct irq_chip hc_irq; + + /* VIRQ numbers of QE high/low irqs */ + unsigned int virq_high; + unsigned int virq_low; +}; + +/* + * QE interrupt controller internal structure + */ +struct qe_ic_info { + /* location of this source at the QIMR register. */ + u32 mask; + + /* Mask register offset */ + u32 mask_reg; + + /* + * for grouped interrupts sources - the interrupt + * code as appears at the group priority register + */ + u8 pri_code; + + /* Group priority register offset */ + u32 pri_reg; +}; static DEFINE_RAW_SPINLOCK(qe_ic_lock); diff --git a/drivers/soc/fsl/qe/Makefile b/drivers/soc/fsl/qe/Makefile index 2031d385bc7e..51e472648bad 100644 --- a/drivers/soc/fsl/qe/Makefile +++ b/drivers/soc/fsl/qe/Makefile @@ -1,7 +1,7 @@ # # Makefile for the linux ppc-specific parts of QE # -obj-$(CONFIG_QUICC_ENGINE)+= qe.o qe_common.o qe_ic.o qe_io.o +obj-$(CONFIG_QUICC_ENGINE)+= qe.o qe_common.o qe_io.o obj-$(CONFIG_CPM) += qe_common.o obj-$(CONFIG_UCC) += ucc.o obj-$(CONFIG_UCC_SLOW) += ucc_slow.o diff --git a/drivers/soc/fsl/qe/qe_ic.h b/drivers/soc/fsl/qe/qe_ic.h deleted file mode 100644 index 926a2ed42319..000000000000 --- a/drivers/soc/fsl/qe/qe_ic.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * drivers/soc/fsl/qe/qe_ic.h - * - * QUICC ENGINE Interrupt Controller Header - * - * Copyright (C) 2006 Freescale Semiconductor, Inc. All rights reserved. - * - * Author: Li Yang - * Based on code from Shlomi Gridish - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - */ -#ifndef _POWERPC_SYSDEV_QE_IC_H -#define _POWERPC_SYSDEV_QE_IC_H - -#include - -#define NR_QE_IC_INTS 64 - -/* QE IC registers offset */ -#define QEIC_CICR 0x00 -#define QEIC_CIVEC 0x04 -#define QEIC_CRIPNR 0x08 -#define QEIC_CIPNR 0x0c -#define QEIC_CIPXCC 0x10 -#define QEIC_CIPYCC 0x14 -#define QEIC_CIPWCC 0x18 -#define QEIC_CIPZCC 0x1c -#define QEIC_CIMR 0x20 -#define QEIC_CRIMR 0x24 -#define QEIC_CICNR 0x28 -#define QEIC_CIPRTA 0x30 -#define QEIC_CIPRTB 0x34 -#define QEIC_CRICR 0x3c -#define QEIC_CHIVEC 0x60 - -/* Interrupt priority registers */ -#define CIPCC_SHIFT_PRI0 29 -#define CIPCC_SHIFT_PRI1 26 -#define CIPCC_SHIFT_PRI2 23 -#define CIPCC_SHIFT_PRI3 20 -#define CIPCC_SHIFT_PRI4 13 -#define CIPCC_SHIFT_PRI5 10 -#define CIPCC_SHIFT_PRI6 7 -#define CIPCC_SHIFT_PRI7 4 - -/* CICR priority modes */ -#define CICR_GWCC 0x00040000 -#define CICR_GXCC 0x00020000 -#define CICR_GYCC 0x00010000 -#define CICR_GZCC 0x00080000 -#define CICR_GRTA 0x00200000 -#define CICR_GRTB 0x00400000 -#define CICR_HPIT_SHIFT 8 -#define CICR_HPIT_MASK 0x00000300 -#define CICR_HP_SHIFT 24 -#define CICR_HP_MASK 0x3f000000 - -/* CICNR */ -#define CICNR_WCC1T_SHIFT 20 -#define CICNR_ZCC1T_SHIFT 28 -#define CICNR_YCC1T_SHIFT 12 -#define CICNR_XCC1T_SHIFT 4 - -/* CRICR */ -#define CRICR_RTA1T_SHIFT 20 -#define CRICR_RTB1T_SHIFT 28 - -/* Signal indicator */ -#define SIGNAL_MASK 3 -#define SIGNAL_HIGH 2 -#define SIGNAL_LOW 0 - -struct qe_ic { - /* Control registers offset */ - volatile u32 __iomem *regs; - - /* The remapper for this QEIC */ - struct irq_domain *irqhost; - - /* The "linux" controller struct */ - struct irq_chip hc_irq; - - /* VIRQ numbers of QE high/low irqs */ - unsigned int virq_high; - unsigned int virq_low; -}; - -/* - * QE interrupt controller internal structure - */ -struct qe_ic_info { - u32 mask; /* location of this source at the QIMR register. */ - u32 mask_reg; /* Mask register offset */ - u8 pri_code; /* for grouped interrupts sources - the interrupt - code as appears at the group priority register */ - u32 pri_reg; /* Group priority register offset */ -}; - -#endif /* _POWERPC_SYSDEV_QE_IC_H */ -- 2.14.1 From 1592029327322463638@xxx Sat Feb 10 15:44:40 +0000 2018 X-GM-THRID: 1585629846971071357 X-Gmail-Labels: Inbox,Category Forums,Downloaded_2018-02