Received: by 10.213.65.68 with SMTP id h4csp1316351imn; Mon, 19 Mar 2018 00:10:21 -0700 (PDT) X-Google-Smtp-Source: AG47ELtnvXgRoxUR8qdeO4gMuUO3d6dUQSErPvmGOpU8EjmkwCwQdasC0YgiIEtEZotaWDDQl5v7 X-Received: by 10.98.72.205 with SMTP id q74mr8866039pfi.70.1521443421837; Mon, 19 Mar 2018 00:10:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521443421; cv=none; d=google.com; s=arc-20160816; b=xRP7/wLpJaNUIZtAZVrHTlygIew4fxkDk53YmB6H6ZkAbHukEwLk5IZGVmvFWhNIC1 1EONgB+UsRjutYzAV9JYWx9257P+WuCoEo4pYN5o/yglm+F8R61lmXkdzJUSc+DFFuys jMYC8ed7JLcyFpJaJYaO/rIa33yH8LDvqiOsAhY6pg2rtme0QYrUp1RzfTj+lSu0O/4k Igak2WmJypVyp0/VrB2pvVEOFNEyUvfXlW0nBGD0M3DS5vAZQBoC/0E33eLccSYw1G9e bce0tltCV22sgW0AHbXvVeBHXuby7OIxgIY9U+CZmHySw/R96dsJMJ6asjOlJw1mIw8N h7/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=b1sbP9+sbpMK2sD1Khdf8vBVF1k1q+o6+Ft+6L+bLgA=; b=ylp9i49fu5g6m2la06BDEdmZt9t3EVk+QP6Na+E+I3vcrjhPVTVP6EIpz/r0IHFogq nEP9oVUMeHqXeIzrSobiR7u9KUiqEp3022Kzcp7TjKgWhn4FcmRXx0sHubo3INPInNMF Ix8q3hxdjHzl4zymdbFCjRMmUF4j0n63N2fvyKDeUQuV6jLNatSz4ZhWYM8vjowlBjv3 cdzfVI+TBcfzJxcuvbMtDtG4DdOfcl39R2aDaFOoBJkQwP9Bs7uiZUZI7O++FOJ2S+1t TGTNRLXOBTttZfXKkQiyykgD5r4kebL2vUT3RjmsACqv3grHdfbZiRSLcYFgu9MiNVxM IL/Q== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v7-v6si2483967plo.642.2018.03.19.00.10.06; Mon, 19 Mar 2018 00:10:21 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755285AbeCSHJI (ORCPT + 99 others); Mon, 19 Mar 2018 03:09:08 -0400 Received: from smtp2200-217.mail.aliyun.com ([121.197.200.217]:43714 "EHLO smtp2200-217.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754531AbeCSHJH (ORCPT ); Mon, 19 Mar 2018 03:09:07 -0400 X-Alimail-AntiSpam: AC=CONTINUE;BC=0.03135664|-1;CH=blue;FP=0|0|0|0|0|-1|-1|-1;HT=e02c03305;MF=ren_guo@c-sky.com;NM=1;PH=DS;RN=11;RT=11;SR=0;TI=SMTPD_---.BMabT1I_1521443339; Received: from localhost(mailfrom:ren_guo@c-sky.com fp:223.93.147.148) by smtp.aliyun-inc.com(10.147.44.145); Mon, 19 Mar 2018 15:08:59 +0800 Date: Mon, 19 Mar 2018 15:08:59 +0800 From: Guo Ren To: Mark Rutland Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, daniel.lezcano@linaro.org, jason@lakedaemon.net, arnd@arndb.de, c-sky_gcc_upstream@c-sky.com, gnu-csky@mentor.com, thomas.petazzoni@bootlin.com, wbx@uclibc-ng.org Subject: Re: [PATCH 19/19] irqchip: add irq-nationalchip.c and irq-csky.c Message-ID: <20180319070859.GC21923@guoren> References: <62e687d3eb67505aa6f4d4d01ce268fd432bf58e.1521399976.git.ren_guo@c-sky.com> <20180319042535.fzssdiu4ot7nyhwe@salmiak> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180319042535.fzssdiu4ot7nyhwe@salmiak> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 19, 2018 at 04:26:00AM +0000, Mark Rutland wrote: > On Mon, Mar 19, 2018 at 03:51:41AM +0800, Guo Ren wrote: > > +static unsigned int intc_reg; > > This should be a void __iomem *ptr; > OK > > +#define CK_VA_INTC_ICR (void *)(intc_reg + 0x00) /* Interrupt control register(High 16bits) */ > > +#define CK_VA_INTC_ISR (void *)(intc_reg + 0x00) /* Interrupt status register(Low 16bits) */ > > +#define CK_VA_INTC_NEN31_00 (void *)(intc_reg + 0x10) /* Normal interrupt enable register Low */ > > +#define CK_VA_INTC_NEN63_32 (void *)(intc_reg + 0x28) /* Normal interrupt enable register High */ > > +#define CK_VA_INTC_IFR31_00 (void *)(intc_reg + 0x08) /* Normal interrupt force register Low */ > > +#define CK_VA_INTC_IFR63_32 (void *)(intc_reg + 0x20) /* Normal interrupt force register High */ > > +#define CK_VA_INTC_SOURCE (void *)(intc_reg + 0x40) /* Proiority Level Select Registers 0 */ > > Please use mnemonics for the offsets, and add the base address in the IO > accessors. > OK > > + temp = __raw_readl(CK_VA_INTC_NEN31_00); > > Please use readl_relaxed() rather than __raw_readl(). > OK > > + __raw_writel(temp, CK_VA_INTC_NEN31_00); > > Likewise, please use writel_relaxed() rather than __raw_writel(). > OK > These need devicetree bindings. Please see > Documentation/devicetree/bindings/submitting-patches.txt. > OK > Please avoid assembly in generic driver code. Here you cna use __ffs64() after > combining the two halves into a 64-bit quantity, or you could use ffs() on each > half. > OK > > +IRQCHIP_DECLARE(nationalchip_intc_v1_ave, "nationalchip,intc-v1,ave", intc_init); > > This needs a devicetree binding document. OK Best Regards Guo Ren