Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752748AbdGEHQD (ORCPT ); Wed, 5 Jul 2017 03:16:03 -0400 Received: from mail-dm3nam03on0066.outbound.protection.outlook.com ([104.47.41.66]:12379 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752370AbdGEHPy (ORCPT ); Wed, 5 Jul 2017 03:15:54 -0400 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; From: Zhiqiang Hou To: , , , , , , , , , , CC: Hou Zhiqiang Subject: [PATCHv4 7/9] irqchip/ls-scfg-msi: add LS1046a MSI support Date: Wed, 5 Jul 2017 14:59:01 +0800 Message-ID: <1499237943-24203-7-git-send-email-Zhiqiang.Hou@nxp.com> X-Mailer: git-send-email 2.1.0.27.g96db324 In-Reply-To: <1499237943-24203-1-git-send-email-Zhiqiang.Hou@nxp.com> References: <1499237943-24203-1-git-send-email-Zhiqiang.Hou@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131437125517026859;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(979002)(6009001)(336005)(39850400002)(39380400002)(39410400002)(39860400002)(39400400002)(39450400003)(39840400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(9170700003)(50986999)(6666003)(189998001)(7416002)(8656002)(356003)(76176999)(86362001)(230783001)(81166006)(104016004)(53936002)(50226002)(2906002)(8676002)(2201001)(50466002)(5660300001)(36756003)(305945005)(48376002)(498600001)(4326008)(5003940100001)(47776003)(72206003)(38730400002)(626005)(6636002)(2950100002)(77096006)(8936002)(105606002)(106466001)(85426001)(921003)(1121003)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR0301MB0602;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;MLV:ovrnspm;MX:1;A:1;PTR:InfoDomainNonexistent;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN1BFFO11FD028;1:8qXvew3f/4nk0HsZA+mGHcAnPGcA+J7yjHXwiZGW0?= =?us-ascii?Q?Q0uZ/mlllOGqq0GEtcby2kzkEtA+qM+SCM9+C/a2b4cgjudufnn2bJuQGqYF?= =?us-ascii?Q?JbDX3BrJ1ZLK2HyXRTcA4/bvJCvr7Xyq+ns0ltUgHtQrl1iBLKZkixWtN+S0?= =?us-ascii?Q?k4XrbRAzfmujZ3BdkqerpPV1wPo7L04sUMxZSLZzOesYf1kszOvE3HbL7G9a?= =?us-ascii?Q?C1mJVvQLjSDQVLn91idVnBlqWEP02RP6jFu8C80RNe3ZtsVd2woOQ5a8DNtO?= =?us-ascii?Q?oAwVkFPWMm6hLHvG0LCX3ZDRScimPHi6pCK2hjBmFDy/EYbrOjaXNi+Tv9hk?= =?us-ascii?Q?Sq5N1xYneliWRob4kUBT5yuocpyYwX5TRhu3Tsn4kXI/NiQnkdOwejQBoaeb?= =?us-ascii?Q?F23U/SLVtKg9Go2glA4fWYgdiAsu+QaBzbg0PCmSDexBhh+X0SGBePPSwS+K?= =?us-ascii?Q?zMJP4fOzw2KX3yPxaK/FBB8TZFPydgwzFWNQVETT47rxQpqfnCNFXVZqM89C?= =?us-ascii?Q?Ww+HbRJHrX91q9PIJhjqtI2b/aJi/nhNSmKlyfJfk768ogNgBC/eyRO4M8WE?= =?us-ascii?Q?6ScdIYTsA4t8LXHMvwCWbyX5MdcwtvKZc3Y8Tiyv1ff3nE19z/NuOf2x+r/2?= =?us-ascii?Q?vrF/CHF0YvFuG9fFgJgM9EobvVacQaK/KYqQ/s/b1XM6VsEjRZX84//SSEmb?= =?us-ascii?Q?B7HVH0ATkdS/Fbo9q3tiFq47iIm+1bt5hLuWLak4L/XfGwgznGDCVtFz04HR?= =?us-ascii?Q?ZOO0lGPItGFvAPvIp9eMVyZim67pHWrVrDKLVHRwCkH6eeEvVjLuyXI1a5cK?= =?us-ascii?Q?krUr3Olo8J0H7KFRecc3Kk2V4PnHyiXVJ36YiekJCVNu9Gv8fvXE4j9QEJdC?= =?us-ascii?Q?QmlUTh/dbS2mpfJUiHurtpRdUYUMRd7Y1oyD19aNFzS1K6Nrg70Xk3suOa3W?= =?us-ascii?Q?mGUsJl8mtxkQxjbFOuzFgpmTuDtJPdVeo0Jnx1YnP4AntVJ6Y67y/xh8WqDs?= =?us-ascii?Q?YUS1CYwdPAfcb5rSovaSK8GmNYHsNvT5AfFkoUyWRBsYExTX/g/EutKT7mGv?= =?us-ascii?Q?2Y9TG4=3D?= MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 96579b48-3fe6-4bec-39cb-08d4c375ab1f X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603031)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CY1PR0301MB0602; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB0602;3:4IZi/R2wFfKZIWIAsJgc96k+47JtT3oX2XW7qiu70MxiSBwhK3+LoTWDp0qAY1XtUKm1yEelSFuAkBbPjfjH5McyMvvfukbnyd4tHpzBcmNlD6kMeHiNkaKZ3cQvTAHHKcWB1fPWlN2J/8/ZF1oFyf9O+xGTCmINT9oVx9lC68emFPXjyeEvdy0EDtYfXZ06S3aZLF664IQMySl9b89X7KayJZ7DF8E1dGFfRS4O0TWSkRusgPcK+M3OynQm8bHP4tYPZ31Mazijv50xiIXtF3modaaQG/CJ+rjWTDV7U+ulO7Vvdd41wsVspcjjZcK/3542Okc8bjx46p19F6eW3usadCO9vUVJEJ3tAkFjBb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uJo4g52f5/LI28Bx1Cci3AoUBwXWPX81m6S4dhdv/vqFRJrXVXf56EOugEh981oatAoW54b+kR5HSp2R7yHb97udwSkiHbVrSG7WdV9eprzeETB X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(133145235818549)(236129657087228)(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(5005006)(13016025)(13018025)(8121501046)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6096035)(20161123559100)(20161123561025)(20161123563025)(20161123556025)(20161123565025)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY1PR0301MB0602;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY1PR0301MB0602; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR0301MB0602;4:3l+rYTOeGdw57aKyf6Z+PVX+cyGjdmAT9ELp8p1s?= =?us-ascii?Q?fo3Ku90oLZYRyyvxPs3sKI0eKp0x5jzfZn0SjgiM92xLWgENgPcr9zmzwFpe?= =?us-ascii?Q?Wd5dE55gof9MLx85I6j7VidtFuyVQJUgM7FIo4YAAEU6FeFM2ofWdvYLqw56?= =?us-ascii?Q?T/bBaS8XJnudXgPI1lt6jlei5RKq5LeqZumOCOPMyl+eo7Cjl4T9LUxcbQ0p?= =?us-ascii?Q?9QKaG9RWUH0Ykb20ukCDvAIlVxk8NKuuEI3ZTYuY9Tb8zTum9p5oL4CFR+yC?= =?us-ascii?Q?p58QpuV8oR5TfHPsdC6JvRGDyMHRtmLKkx31j94/evHyM0Sakj3vLzpCO5Ib?= =?us-ascii?Q?qX6U860Js3DcE3Rg2hFy3C4JOhrm2uSoG1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ucCfQsHqc57L3qiCv54N4214I8PjGFFENWJBX7fLRw0+MDi9uraSp/O8xh4rZDzqZtE/gPZXyqya6C/HRaD30YMzhGB+ec+SBsy8VQktiRGkF6rTR3tp1j0cWh0wT0JxkbkT8rf7q83u7u86oFM449TTsiqyT6YJ9kw1+SvvBuOdceMPra+ftpjWnSfS3KKvtrghwhTSEIvv4meCnw2iaj9nnIruh0davqKdeCY20cakQj3lbfhq9NfnfrpLDUxLEEMdhaQc6pJ+7wQwSiTEHEXkPfKAcXrMtVLRt9LCOQcymebaq7IwAf+9WJkUI7kbz14FQeFGs/btRtcqDiMFYehc8tZdkQ0qVnAlbafl+MI3LMY696GqdLlcsmbJs5jROGAPiNhUFhFW6NYEvZdXq+R+K7Iu/MJ1WGcKba5SNqZ9pbQCeWQ79qxp4DI= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2017 07:15:51.3126 (UTC) 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: CY1PR0301MB0602 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 8771 Lines: 296 From: Minghuan Lian LS1046a includes 4 MSIRs, each MSIR is assigned a dedicate GIC SPI interrupt and provides 32 MSI interrupts. Compared to previous MSI, LS1046a's IBS(interrupt bit select) shift is changed to 2 and total MSI interrupt number is changed to 128. The patch adds structure 'ls_scfg_msir' to describe MSIR setting and 'ibs_shift' to store the different value between the SoCs. Signed-off-by: Minghuan Lian Signed-off-by: Hou Zhiqiang --- v4: - None v3-v2: - keep the old misspelled compatible strings v2-v1: - MSI dts node change has been merged into the patch 6/9 drivers/irqchip/irq-ls-scfg-msi.c | 165 ++++++++++++++++++++++++++++++-------- 1 file changed, 130 insertions(+), 35 deletions(-) diff --git a/drivers/irqchip/irq-ls-scfg-msi.c b/drivers/irqchip/irq-ls-scfg-msi.c index cef67cc..0b1f34d 100644 --- a/drivers/irqchip/irq-ls-scfg-msi.c +++ b/drivers/irqchip/irq-ls-scfg-msi.c @@ -17,13 +17,24 @@ #include #include #include +#include #include #include #include -#define MSI_MAX_IRQS 32 -#define MSI_IBS_SHIFT 3 -#define MSIR 4 +#define MSI_IRQS_PER_MSIR 32 +#define MSI_MSIR_OFFSET 4 + +struct ls_scfg_msi_cfg { + u32 ibs_shift; /* Shift of interrupt bit select */ +}; + +struct ls_scfg_msir { + struct ls_scfg_msi *msi_data; + unsigned int index; + unsigned int gic_irq; + void __iomem *reg; +}; struct ls_scfg_msi { spinlock_t lock; @@ -32,8 +43,11 @@ struct ls_scfg_msi { struct irq_domain *msi_domain; void __iomem *regs; phys_addr_t msiir_addr; - int irq; - DECLARE_BITMAP(used, MSI_MAX_IRQS); + struct ls_scfg_msi_cfg *cfg; + u32 msir_num; + struct ls_scfg_msir *msir; + u32 irqs_num; + unsigned long *used; }; static struct irq_chip ls_scfg_msi_irq_chip = { @@ -55,7 +69,7 @@ static void ls_scfg_msi_compose_msg(struct irq_data *data, struct msi_msg *msg) msg->address_hi = upper_32_bits(msi_data->msiir_addr); msg->address_lo = lower_32_bits(msi_data->msiir_addr); - msg->data = data->hwirq << MSI_IBS_SHIFT; + msg->data = data->hwirq; } static int ls_scfg_msi_set_affinity(struct irq_data *irq_data, @@ -81,8 +95,8 @@ static int ls_scfg_msi_domain_irq_alloc(struct irq_domain *domain, WARN_ON(nr_irqs != 1); spin_lock(&msi_data->lock); - pos = find_first_zero_bit(msi_data->used, MSI_MAX_IRQS); - if (pos < MSI_MAX_IRQS) + pos = find_first_zero_bit(msi_data->used, msi_data->irqs_num); + if (pos < msi_data->irqs_num) __set_bit(pos, msi_data->used); else err = -ENOSPC; @@ -106,7 +120,7 @@ static void ls_scfg_msi_domain_irq_free(struct irq_domain *domain, int pos; pos = d->hwirq; - if (pos < 0 || pos >= MSI_MAX_IRQS) { + if (pos < 0 || pos >= msi_data->irqs_num) { pr_err("failed to teardown msi. Invalid hwirq %d\n", pos); return; } @@ -123,15 +137,17 @@ static const struct irq_domain_ops ls_scfg_msi_domain_ops = { static void ls_scfg_msi_irq_handler(struct irq_desc *desc) { - struct ls_scfg_msi *msi_data = irq_desc_get_handler_data(desc); + struct ls_scfg_msir *msir = irq_desc_get_handler_data(desc); + struct ls_scfg_msi *msi_data = msir->msi_data; unsigned long val; - int pos, virq; + int pos, virq, hwirq; chained_irq_enter(irq_desc_get_chip(desc), desc); - val = ioread32be(msi_data->regs + MSIR); - for_each_set_bit(pos, &val, MSI_MAX_IRQS) { - virq = irq_find_mapping(msi_data->parent, (31 - pos)); + val = ioread32be(msir->reg); + for_each_set_bit(pos, &val, MSI_IRQS_PER_MSIR) { + hwirq = ((31 - pos) << msi_data->cfg->ibs_shift) | msir->index; + virq = irq_find_mapping(msi_data->parent, hwirq); if (virq) generic_handle_irq(virq); } @@ -143,7 +159,7 @@ static int ls_scfg_msi_domains_init(struct ls_scfg_msi *msi_data) { /* Initialize MSI domain parent */ msi_data->parent = irq_domain_add_linear(NULL, - MSI_MAX_IRQS, + msi_data->irqs_num, &ls_scfg_msi_domain_ops, msi_data); if (!msi_data->parent) { @@ -164,16 +180,87 @@ static int ls_scfg_msi_domains_init(struct ls_scfg_msi *msi_data) return 0; } +static int ls_scfg_msi_setup_hwirq(struct ls_scfg_msi *msi_data, int index) +{ + struct ls_scfg_msir *msir; + int virq, i, hwirq; + + virq = platform_get_irq(msi_data->pdev, index); + if (virq <= 0) + return -ENODEV; + + msir = &msi_data->msir[index]; + msir->index = index; + msir->msi_data = msi_data; + msir->gic_irq = virq; + msir->reg = msi_data->regs + MSI_MSIR_OFFSET + 4 * index; + + irq_set_chained_handler_and_data(msir->gic_irq, + ls_scfg_msi_irq_handler, + msir); + + /* Release the hwirqs corresponding to this MSIR */ + for (i = 0; i < MSI_IRQS_PER_MSIR; i++) { + hwirq = i << msi_data->cfg->ibs_shift | msir->index; + bitmap_clear(msi_data->used, hwirq, 1); + } + + return 0; +} + +static int ls_scfg_msi_teardown_hwirq(struct ls_scfg_msir *msir) +{ + struct ls_scfg_msi *msi_data = msir->msi_data; + int i, hwirq; + + if (msir->gic_irq > 0) + irq_set_chained_handler_and_data(msir->gic_irq, NULL, NULL); + + for (i = 0; i < MSI_IRQS_PER_MSIR; i++) { + hwirq = i << msi_data->cfg->ibs_shift | msir->index; + bitmap_set(msi_data->used, hwirq, 1); + } + + return 0; +} + +static struct ls_scfg_msi_cfg ls1021_msi_cfg = { + .ibs_shift = 3, +}; + +static struct ls_scfg_msi_cfg ls1046_msi_cfg = { + .ibs_shift = 2, +}; + +static const struct of_device_id ls_scfg_msi_id[] = { + /* The following two misspelled compatibles are obsolete */ + { .compatible = "fsl,1s1021a-msi", .data = &ls1021_msi_cfg}, + { .compatible = "fsl,1s1043a-msi", .data = &ls1021_msi_cfg}, + + { .compatible = "fsl,ls1021a-msi", .data = &ls1021_msi_cfg }, + { .compatible = "fsl,ls1043a-msi", .data = &ls1021_msi_cfg }, + { .compatible = "fsl,ls1046a-msi", .data = &ls1046_msi_cfg }, + {}, +}; +MODULE_DEVICE_TABLE(of, ls_scfg_msi_id); + static int ls_scfg_msi_probe(struct platform_device *pdev) { + const struct of_device_id *match; struct ls_scfg_msi *msi_data; struct resource *res; - int ret; + int i, ret; + + match = of_match_device(ls_scfg_msi_id, &pdev->dev); + if (!match) + return -ENODEV; msi_data = devm_kzalloc(&pdev->dev, sizeof(*msi_data), GFP_KERNEL); if (!msi_data) return -ENOMEM; + msi_data->cfg = (struct ls_scfg_msi_cfg *) match->data; + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); msi_data->regs = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(msi_data->regs)) { @@ -182,23 +269,37 @@ static int ls_scfg_msi_probe(struct platform_device *pdev) } msi_data->msiir_addr = res->start; - msi_data->irq = platform_get_irq(pdev, 0); - if (msi_data->irq <= 0) { - dev_err(&pdev->dev, "failed to get MSI irq\n"); - return -ENODEV; - } - msi_data->pdev = pdev; spin_lock_init(&msi_data->lock); + msi_data->irqs_num = MSI_IRQS_PER_MSIR * + (1 << msi_data->cfg->ibs_shift); + msi_data->used = devm_kcalloc(&pdev->dev, + BITS_TO_LONGS(msi_data->irqs_num), + sizeof(*msi_data->used), + GFP_KERNEL); + if (!msi_data->used) + return -ENOMEM; + /* + * Reserve all the hwirqs + * The available hwirqs will be released in ls1_msi_setup_hwirq() + */ + bitmap_set(msi_data->used, 0, msi_data->irqs_num); + + msi_data->msir_num = of_irq_count(pdev->dev.of_node); + msi_data->msir = devm_kcalloc(&pdev->dev, msi_data->msir_num, + sizeof(*msi_data->msir), + GFP_KERNEL); + if (!msi_data->msir) + return -ENOMEM; + + for (i = 0; i < msi_data->msir_num; i++) + ls_scfg_msi_setup_hwirq(msi_data, i); + ret = ls_scfg_msi_domains_init(msi_data); if (ret) return ret; - irq_set_chained_handler_and_data(msi_data->irq, - ls_scfg_msi_irq_handler, - msi_data); - platform_set_drvdata(pdev, msi_data); return 0; @@ -207,8 +308,10 @@ static int ls_scfg_msi_probe(struct platform_device *pdev) static int ls_scfg_msi_remove(struct platform_device *pdev) { struct ls_scfg_msi *msi_data = platform_get_drvdata(pdev); + int i; - irq_set_chained_handler_and_data(msi_data->irq, NULL, NULL); + for (i = 0; i < msi_data->msir_num; i++) + ls_scfg_msi_teardown_hwirq(&msi_data->msir[i]); irq_domain_remove(msi_data->msi_domain); irq_domain_remove(msi_data->parent); @@ -218,14 +321,6 @@ static int ls_scfg_msi_remove(struct platform_device *pdev) return 0; } -static const struct of_device_id ls_scfg_msi_id[] = { - { .compatible = "fsl,1s1021a-msi", }, /* a typo */ - { .compatible = "fsl,1s1043a-msi", }, /* a typo */ - { .compatible = "fsl,ls1021a-msi", }, - { .compatible = "fsl,ls1043a-msi", }, - {}, -}; - static struct platform_driver ls_scfg_msi_driver = { .driver = { .name = "ls-scfg-msi", -- 2.1.0.27.g96db324