From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 20A78D0D78D for ; Fri, 11 Oct 2024 13:07:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=zCr37LXC8U2CQB6S8iXUVH+w4SrNi18E4HtRCwJJuJ8=; b=NmHu6EKCBzMqzOV0llTXO/CXBQ nYC+5L2Fp0101z/7aq6tE5moKEp5qcvf607162hAg6iQzWXvKWQr/iC/P5Lxd5wtCVyGRcUerleCO E5fXmAQfpu8aDyKaRbKURdcE8pdpa5nA+V4maXckrSu+zmFkLQiEyfUYVNpeh20ETem4hKelGM89H q3KB7GD0tSpfxxR7GukFYZwFCLgr8vX83LP+RcKkhwucL4Os49nV6pshaQgGiDP5mMR9kYCz49ze4 iakjdnKKYyB4BPcNuYjQe1sTUOxhNkHmp3Pyz+GYBs5zieZRLMJTkGuhYUaqZ26P3kMqlysaaNwx6 EPwY616A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1szFMs-0000000GOnM-1Smf; Fri, 11 Oct 2024 13:07:42 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1szFLW-0000000GOT3-36Se for linux-arm-kernel@bombadil.infradead.org; Fri, 11 Oct 2024 13:06:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=zCr37LXC8U2CQB6S8iXUVH+w4SrNi18E4HtRCwJJuJ8=; b=By+ybWRoGLODNd8fXQ0dOjjsTC hqbFtQwKmJ8NrUvPIlc3PCDLscbyAhx8moOhnZyYLtifnHjDQbVhPefaw1pKOSN3YDPNyUpmbMGJP vZkWRw0k9sswYvYP6w1CqKmBkvQN1KTiw0w426pszx2IicP4fpud98A0Uyj4CYMzFu3zBWD7+1tCR ou1ODiASuwt2bPa5WiUxligBAikRvFhUZIVdXaXuTq2oTuwbQKwcuUXIfGwoaaZ8XdUqgZIkevdmk aXzDehf8c1giP3DTWDj++JQS4/KSTRBGRCbexxIwQJPkYQ7316RHvIcb6aQlhSkU+GyKFM9sNcjDs y7NdgT3w==; Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1szFLS-00000005tTo-3wKw for linux-arm-kernel@lists.infradead.org; Fri, 11 Oct 2024 13:06:17 +0000 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4311bb9d4beso9465225e9.3 for ; Fri, 11 Oct 2024 06:06:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728651970; x=1729256770; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=zCr37LXC8U2CQB6S8iXUVH+w4SrNi18E4HtRCwJJuJ8=; b=hT5urmer1Aj9Sau9JHFEPI+St+kBu44dRtwmT8bO+RG8KkqWLtVY0dG7ECENCUoaFS /o3xpNqKISmwN/BRftOI40FsSnVbXGV2EqwgK4vb8E0WqWB1hvrMvp/SlwJTr9ixFH8Z E4L5HRHGzc6zLgdc++UVZY2WDWXZIZ+Hhm3MA1R4ivdHY+9MtQWFMdxD0HsWA8aEZNix o/n7lisPM4xoyg7k9xaJpbtuTCd4mVcwXE4r67JCjHPLSQgQnKeT1lqzepFMzCIahVj2 NqruAJ5DmW+yAhebQxP83RDlNWuzzH/FbkgV+L0Q2XRhyEiT9VnOl59ues0EWrsImOK5 WBWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728651970; x=1729256770; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=zCr37LXC8U2CQB6S8iXUVH+w4SrNi18E4HtRCwJJuJ8=; b=wTVTG00YXWKREX6zXUV98RKjYmWwA2O9Kfy9lM8QVHgefXviFvEj2Z8RQkRRiHmF5J AkRI/DeQSloLXL4izNWmLW4zI4K3oW7/cdzMuQUyhO/l9igOuMxcgwVhjEZWhm9mP7KJ OjQfyK5h5ZTnbaeW9OEgb+StwyEirUkl25UMO++f/Z8d2z2ueZFXAYWIlM2CflIF1s8U 4M9jPaASZRBVSszU6d/COISZ+8aVc5Nr709iWw2nsF26PUtLiA23ID6dlqfEgBm8gPlu U1DrMO2ZB6PSWkHtJVh6La9VTZa1Fv2UiGw4Bj0GZtUAxcpyH4LH7EWG6kTLhkRSZ6MF p04A== X-Forwarded-Encrypted: i=1; AJvYcCWpJHa6p/3Y/sbY08pEk3YBoRiKEfANBIz06WX+jYVBE/bm23KJYKu0MUv1xUX9nTRr/QTD7eLOk4VXN62CNtKX@lists.infradead.org X-Gm-Message-State: AOJu0YywyabVpOjhf9a7UBRq7soiwMWEzz8QCQTZGy0EjzWL5HOpA6QY 0j8yRJ5ly/tNBmjZ9C9/FwO1IO1XlzqRkO4OV3nyS8Op3AAxsKDImzyRQdzrX2w= X-Google-Smtp-Source: AGHT+IGAa0EQAJZF+Lh7FUx2jhBZmgYnqQLqg9c45XbgMirrVdFpJCh5ZEZCWOekRRCzVbWbfunFNQ== X-Received: by 2002:adf:ef11:0:b0:37d:3dfc:949c with SMTP id ffacd0b85a97d-37d552957eemr1640400f8f.41.1728651970538; Fri, 11 Oct 2024 06:06:10 -0700 (PDT) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d4b79fdc2sm3910675f8f.88.2024.10.11.06.06.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2024 06:06:10 -0700 (PDT) Date: Fri, 11 Oct 2024 16:06:06 +0300 From: Dan Carpenter To: Kevin Chen Cc: tglx@linutronix.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, joel@jms.id.au, andrew@codeconstruct.com.au, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org Subject: Re: [PATCH v3 2/2] irqchip/aspeed-intc: Add support for AST27XX INTC Message-ID: <37525238-c9f8-4f0e-b4e5-4e2f05fab775@stanley.mountain> References: <20241009115813.2908803-1-kevin_chen@aspeedtech.com> <20241009115813.2908803-3-kevin_chen@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241009115813.2908803-3-kevin_chen@aspeedtech.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241011_140615_320974_79B7D5B6 X-CRM114-Status: GOOD ( 15.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Oct 09, 2024 at 07:58:13PM +0800, Kevin Chen wrote: > +static int __init aspeed_intc_ic_of_init(struct device_node *node, > + struct device_node *parent) > +{ > + struct aspeed_intc_ic *intc_ic; > + int ret = 0; > + int irq, i; > + > + intc_ic = kzalloc(sizeof(*intc_ic), GFP_KERNEL); > + if (!intc_ic) > + return -ENOMEM; > + > + intc_ic->base = of_iomap(node, 0); > + if (!intc_ic->base) { > + pr_err("Failed to iomap intc_ic base\n"); > + ret = -ENOMEM; > + goto err_free_ic; > + } > + writel(0xffffffff, intc_ic->base + INTC_INT_STATUS_REG); > + writel(0x0, intc_ic->base + INTC_INT_ENABLE_REG); > + > + intc_ic->irq_domain = irq_domain_add_linear(node, 32, > + &aspeed_intc_ic_irq_domain_ops, intc_ic); > + if (!intc_ic->irq_domain) { > + ret = -ENOMEM; > + goto err_iounmap; > + } > + > + raw_spin_lock_init(&intc_ic->gic_lock); > + raw_spin_lock_init(&intc_ic->intc_lock); > + > + /* Check all the irq numbers valid. If not, unmaps all the base and frees the data. */ > + for (i = 0; i < of_irq_count(node); i++) { > + irq = irq_of_parse_and_map(node, i); > + if (!irq) { > + pr_err("Failed to get irq number\n"); > + ret = -EINVAL; > + goto err_iounmap; > + } > + } > + > + for (i = 0; i < of_irq_count(node); i++) { > + irq = irq_of_parse_and_map(node, i); > + irq_set_chained_handler_and_data(irq, aspeed_intc_ic_irq_handler, intc_ic); There is an extra tab on this line. regards, dan carpenter > + } > + > + return 0;