Message ID | 20230215-immutable-chips-v1-14-51a8f224a5d0@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp203872wrn; Thu, 16 Feb 2023 01:42:01 -0800 (PST) X-Google-Smtp-Source: AK7set+yAq0T0XNOcOlk8S9NtXINDyvoZnKsfX6q7uTHui4J/p7nLgPaLBwrhfn4KHHQ9xLNkTZZ X-Received: by 2002:a17:906:2c4c:b0:8b1:16b3:303b with SMTP id f12-20020a1709062c4c00b008b116b3303bmr4988365ejh.43.1676540521685; Thu, 16 Feb 2023 01:42:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676540521; cv=none; d=google.com; s=arc-20160816; b=bQz8cvNvAqdd3KhAbYzTjDF5XVHYnxshtRBy/izWjdvl9mtb8m5sJWMCFkSN/O6f4f 6ar1cmhwASOnWNLNbiYnt/Ix5MPBj3VoRai9HvuallFO2dzwhgRX0xVOfqEwxNyyij4E OTlT3M1LvEML5yarIoXH/Rq7BWswc3bUy3wu96oZ6qG1RLiUc0lVZm75Xj+6dUNyLwnv 71RqKf9g2Ng8cw8BQjt4PraLxVLiFSMfpwsnKkUQyPYSsc8+RbqwOjHd+H8J69u0mE/H M5xEojfHQQD2uk1K9oR0jMpBvzS+xPC5zvvRydV6JuZrnQHzeEtAJ17JtQ2QQzRYQIt2 PJ+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=w5NV/DiggKvJS6hijrypI8dvD8vGEXvscfdW3OAZ7gw=; b=OHRl2gTSAtjrnhb5jeSz3wqFKliHJBZObjgXCzMVyQNBRMbpq0i7menWPcyi/Lvyyb mnYcbQEMAQqorrdFNaHPTUwC3oKLGfthkWUTzpK6OFxq6ZCrTu+372qFD6jn+mQ9+Qo5 sXXeDHx0PowTu5j79zR7g/rgPcGA2PyTqh5+JG7A3cZ09MWNXUn4FZp4yvw++TSsj3ou 3sqfjBtMNpRlr6qUkBM7SEXXidZ7NdNl35cJ1oQhskyio5FZ+8b2s/Uf6FDDUBV0wDvR TTXuCE+lvMc//yuUUhjG1Ex756nF2lgBmaV8ro6GVJPyykn4OMv3LaGsxQhA31lQkr0v 85Hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vpOt4uId; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fs36-20020a170907602400b008b125aca810si1224062ejc.721.2023.02.16.01.41.39; Thu, 16 Feb 2023 01:42:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vpOt4uId; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230178AbjBPJiY (ORCPT <rfc822;hadasmailinglist@gmail.com> + 99 others); Thu, 16 Feb 2023 04:38:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230172AbjBPJhw (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 16 Feb 2023 04:37:52 -0500 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9997C4DE35 for <linux-kernel@vger.kernel.org>; Thu, 16 Feb 2023 01:37:23 -0800 (PST) Received: by mail-lf1-x12e.google.com with SMTP id b3so2052228lfv.2 for <linux-kernel@vger.kernel.org>; Thu, 16 Feb 2023 01:37:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=w5NV/DiggKvJS6hijrypI8dvD8vGEXvscfdW3OAZ7gw=; b=vpOt4uIdS4CejmbNFkjtETdFWC9FSHKvQ24Mu+ZFcoLfxbHaW88ULFuU4G+rZlkDUe zNJ1xbJCTmjJpTEZw3KUcXTKtbTwSaftY/fJ/4f71Zm8xO1pNyi6/rOw7OWtA9QMXnc/ lppLL1EOvafjCqYNHlqCdZL0ronsId+/JAFvK3Z5R09hQVlz4go49yid8vY0lHg03AP1 fzrhd4chP2Rlh2ZGEuHCK8jAiYTf+guPmN6Jnf6RT1RBmqFmG8cTFHbRJ2guhAb0hAel swb0rOA1qCdh189AjisbVRtcDYRZbRfDWAo0c5P3jdsDb57H1DsF0jcVx2v1w9XQos+r 3+ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=w5NV/DiggKvJS6hijrypI8dvD8vGEXvscfdW3OAZ7gw=; b=TpySeRv8pUibBi6ylmt0i+2BkVyxhlfI+j4Uc+X33pNGkxH84O0rQByc9O2YXKYwR1 BqXyv5+IzCEWo48/jIUMfTzpj/4stG69Dwc76VZZbSkpwnuhv5SThwDqwZPJZyWyzEy8 bPYvJAlNzQQ4YlPNjc0fl0JZDRDIIoUQL5qlbLHoNK74O7BsAVgV/1e0nsPzLFpfCcHK dkc9uNeBsGu1V6QU+WmNj5Wi1fHbbKxxEQLKLr+7mACCveNwAzaJHva5n1SHbu+M1GuD kP9fVf6iS4AP+giKOf2sdfMH/15H3TG0rZG4YIyO+EqoOI5Dbql6mP3p/dQubYMPCRaJ yW8Q== X-Gm-Message-State: AO0yUKX/mTGYXxwj3N4CE5xWQqyDFuLZjQeaISS5S0i2HbmqtLDGTxxt t8IfBup8JN5Eob+mGF/lp50S2A== X-Received: by 2002:ac2:5977:0:b0:4d5:ae35:b221 with SMTP id h23-20020ac25977000000b004d5ae35b221mr1395185lfp.34.1676540243189; Thu, 16 Feb 2023 01:37:23 -0800 (PST) Received: from [127.0.1.1] ([85.235.12.219]) by smtp.gmail.com with ESMTPSA id r3-20020a19ac43000000b004d8758a452asm229069lfc.288.2023.02.16.01.37.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Feb 2023 01:37:22 -0800 (PST) From: Linus Walleij <linus.walleij@linaro.org> Date: Thu, 16 Feb 2023 10:37:15 +0100 Subject: [PATCH 14/17] gpio: omap: Drop irq_base MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230215-immutable-chips-v1-14-51a8f224a5d0@linaro.org> References: <20230215-immutable-chips-v1-0-51a8f224a5d0@linaro.org> In-Reply-To: <20230215-immutable-chips-v1-0-51a8f224a5d0@linaro.org> To: Mun Yew Tham <mun.yew.tham@intel.com>, Bartosz Golaszewski <brgl@bgdev.pl>, Joel Stanley <joel@jms.id.au>, Andrew Jeffery <andrew@aj.id.au>, Alban Bedel <albeu@free.fr>, Orson Zhai <orsonzhai@gmail.com>, Baolin Wang <baolin.wang@linux.alibaba.com>, Chunyan Zhang <zhang.lyra@gmail.com>, Jay Fang <f.fangjian@huawei.com>, Daniel Palmer <daniel@thingy.jp>, Romain Perier <romain.perier@gmail.com>, Grygorii Strashko <grygorii.strashko@ti.com>, Santosh Shilimkar <ssantosh@kernel.org>, Kevin Hilman <khilman@kernel.org>, William Breathitt Gray <william.gray@linaro.org> Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-omap@vger.kernel.org, Linus Walleij <linus.walleij@linaro.org>, Janusz Krzysztofik <jmkrzyszt@gmail.com>, Arnd Bergmann <arnd@arndb.de>, Tony Lindgren <tony@atomide.com>, Marc Zyngier <maz@kernel.org> X-Mailer: b4 0.12.1 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757980154342524736?= X-GMAIL-MSGID: =?utf-8?q?1757980154342524736?= |
Series |
Mass convert GPIO IRQ chips to be immutable
|
|
Commit Message
Linus Walleij
Feb. 16, 2023, 9:37 a.m. UTC
The OMAP1 at one point was using static irqs but that time is gone, OMAP1 uses sparse irqs like all other multiplatform targets so this static allocation of descriptors should just go. Cc: Janusz Krzysztofik <jmkrzyszt@gmail.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Tony Lindgren <tony@atomide.com> Acked-by: Marc Zyngier <maz@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> --- drivers/gpio/gpio-omap.c | 15 --------------- 1 file changed, 15 deletions(-)
Comments
* Linus Walleij <linus.walleij@linaro.org> [230216 09:37]: > The OMAP1 at one point was using static irqs but that time is gone, > OMAP1 uses sparse irqs like all other multiplatform targets so this > static allocation of descriptors should just go. Reviewed-by: Tony Lindgren <tony@atomide.com>
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index 80ddc43fd875..292e62c06008 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -992,7 +992,6 @@ static int omap_gpio_chip_init(struct gpio_bank *bank, struct irq_chip *irqc, struct gpio_irq_chip *irq; static int gpio; const char *label; - int irq_base = 0; int ret; /* @@ -1024,19 +1023,6 @@ static int omap_gpio_chip_init(struct gpio_bank *bank, struct irq_chip *irqc, } bank->chip.ngpio = bank->width; -#ifdef CONFIG_ARCH_OMAP1 - /* - * REVISIT: Once we have OMAP1 supporting SPARSE_IRQ, we can drop - * irq_alloc_descs() since a base IRQ offset will no longer be needed. - */ - irq_base = devm_irq_alloc_descs(bank->chip.parent, - -1, 0, bank->width, 0); - if (irq_base < 0) { - dev_err(bank->chip.parent, "Couldn't allocate IRQ numbers\n"); - return -ENODEV; - } -#endif - /* MPUIO is a bit different, reading IRQ status clears it */ if (bank->is_mpuio && !bank->regs->wkup_en) irqc->irq_set_wake = NULL; @@ -1047,7 +1033,6 @@ static int omap_gpio_chip_init(struct gpio_bank *bank, struct irq_chip *irqc, irq->default_type = IRQ_TYPE_NONE; irq->num_parents = 1; irq->parents = &bank->irq; - irq->first = irq_base; ret = gpiochip_add_data(&bank->chip, bank); if (ret)