From: Zhou Wang <wangzhou.bry@gmail.com>
To: Caizhiyong <caizhiyong@hisilicon.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
Jussi Kivilinna <jussi.kivilinna@iki.fi>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
Artem Bityutskiy <artem.bityutskiy@linux.intel.com>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
Russell King <linux@arm.linux.org.uk>,
Pawel Moll <pawel.moll@arm.com>,
Alexander Shiyan <shc_work@mail.ru>,
Ezequiel Garcia <ezequiel.garcia@free-electrons.com>,
Quyaxin <quyaxin@hisilicon.com>,
Grant Likely <grant.likely@linaro.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Arnd Bergmann <arnd@arndb.de>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Joern Engel <joern@logfs.org>, Rob Herring <robh+dt@kernel.org>,
Pekon Gupta <pekon@ti.com>,
"Wanli \(welly\)" <welly.wan@hisilicon.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Randy Dunlap <rdunlap@infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Wangzhou \(B\)" <wangzhou1@hisilicon.com>,
Kumar Gala <galak@codeaurora.org>,
Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>,
Brian Norris <computersforpeace@gmail.com>,
David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH 2/3] mtd: hisilicon: add a new nand controller driver for hisilicon hip04 Soc
Date: Wed, 02 Jul 2014 10:12:21 +0800 [thread overview]
Message-ID: <53B36A85.2010104@gmail.com> (raw)
In-Reply-To: <C3050A4DBA34F345975765E43127F10F2C15561F@SZXEMA512-MBX.china.huawei.com>
On 2014年06月30日 17:59, Caizhiyong wrote:
>> -----Original Message-----
>> From: Arnd Bergmann [mailto:arnd@arndb.de]
>> Sent: Monday, June 30, 2014 5:01 PM
>> To: linux-arm-kernel@lists.infradead.org
>> Cc: Zhou Wang; Rob Herring; Pawel Moll; Mark Rutland; Ian Campbell; Kumar
>> Gala; Russell King; David Woodhouse; Brian Norris; Grant Likely; Ezequiel
>> Garcia; Pekon Gupta; Artem Bityutskiy; Alexander Shiyan; Ivan Khoronzhuk;
>> Jussi Kivilinna; Joern Engel; Randy Dunlap; devicetree@vger.kernel.org;
>> linux-mtd@lists.infradead.org; linux-doc@vger.kernel.org;
>> linux-kernel@vger.kernel.org; Caizhiyong; Wangzhou (B)
>> Subject: Re: [PATCH 2/3] mtd: hisilicon: add a new nand controller driver for
>> hisilicon hip04 Soc
>>
>>
>>> + struct device *dev;
>>> + void __iomem *iobase;
>>> + struct completion cmd_complete;
>>> + unsigned int offset;
>>> + unsigned int command;
>>> + int chipselect;
>>> + unsigned int addr_cycle;
>>> + unsigned int addr_value[2];
>>> + unsigned int cache_addr_value[2];
>>> + char *buffer;
>>> + dma_addr_t dma_buffer;
>>> + dma_addr_t dma_oob;
>>> + int version;
>>> + unsigned int ecc_bits;
>>> + unsigned int irq_status; /* interrupt status */
>>> +
>>> + int (*send_cmd_pageprog)(struct hinfc_host *host);
>>> + int (*send_cmd_status)(struct hinfc_host *host);
>>> + int (*send_cmd_readstart)(struct hinfc_host *host);
>>> + int (*send_cmd_erase)(struct hinfc_host *host);
>>> + int (*send_cmd_readid)(struct hinfc_host *host);
>>> + int (*send_cmd_reset)(struct hinfc_host *host, int chipselect);
>>> +};
>>
>> Why do you need function pointers here? The current version of the
>> driver you posted always assigns these to the same functions, so
>> it would be more efficient to just call those directly.
>>
>
> I agree with you.
> This feature was originally designed to support a variety version of NAND controllers.
> But in fact, this feature is not used now.
>
I will move them out the host, thanks for your opinion!
WARNING: multiple messages have this Message-ID (diff)
From: wangzhou.bry@gmail.com (Zhou Wang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] mtd: hisilicon: add a new nand controller driver for hisilicon hip04 Soc
Date: Wed, 02 Jul 2014 10:12:21 +0800 [thread overview]
Message-ID: <53B36A85.2010104@gmail.com> (raw)
In-Reply-To: <C3050A4DBA34F345975765E43127F10F2C15561F@SZXEMA512-MBX.china.huawei.com>
On 2014?06?30? 17:59, Caizhiyong wrote:
>> -----Original Message-----
>> From: Arnd Bergmann [mailto:arnd at arndb.de]
>> Sent: Monday, June 30, 2014 5:01 PM
>> To: linux-arm-kernel at lists.infradead.org
>> Cc: Zhou Wang; Rob Herring; Pawel Moll; Mark Rutland; Ian Campbell; Kumar
>> Gala; Russell King; David Woodhouse; Brian Norris; Grant Likely; Ezequiel
>> Garcia; Pekon Gupta; Artem Bityutskiy; Alexander Shiyan; Ivan Khoronzhuk;
>> Jussi Kivilinna; Joern Engel; Randy Dunlap; devicetree at vger.kernel.org;
>> linux-mtd at lists.infradead.org; linux-doc at vger.kernel.org;
>> linux-kernel at vger.kernel.org; Caizhiyong; Wangzhou (B)
>> Subject: Re: [PATCH 2/3] mtd: hisilicon: add a new nand controller driver for
>> hisilicon hip04 Soc
>>
>>
>>> + struct device *dev;
>>> + void __iomem *iobase;
>>> + struct completion cmd_complete;
>>> + unsigned int offset;
>>> + unsigned int command;
>>> + int chipselect;
>>> + unsigned int addr_cycle;
>>> + unsigned int addr_value[2];
>>> + unsigned int cache_addr_value[2];
>>> + char *buffer;
>>> + dma_addr_t dma_buffer;
>>> + dma_addr_t dma_oob;
>>> + int version;
>>> + unsigned int ecc_bits;
>>> + unsigned int irq_status; /* interrupt status */
>>> +
>>> + int (*send_cmd_pageprog)(struct hinfc_host *host);
>>> + int (*send_cmd_status)(struct hinfc_host *host);
>>> + int (*send_cmd_readstart)(struct hinfc_host *host);
>>> + int (*send_cmd_erase)(struct hinfc_host *host);
>>> + int (*send_cmd_readid)(struct hinfc_host *host);
>>> + int (*send_cmd_reset)(struct hinfc_host *host, int chipselect);
>>> +};
>>
>> Why do you need function pointers here? The current version of the
>> driver you posted always assigns these to the same functions, so
>> it would be more efficient to just call those directly.
>>
>
> I agree with you.
> This feature was originally designed to support a variety version of NAND controllers.
> But in fact, this feature is not used now.
>
I will move them out the host, thanks for your opinion!
WARNING: multiple messages have this Message-ID (diff)
From: Zhou Wang <wangzhou.bry@gmail.com>
To: Caizhiyong <caizhiyong@hisilicon.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
Jussi Kivilinna <jussi.kivilinna@iki.fi>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
Artem Bityutskiy <artem.bityutskiy@linux.intel.com>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
Russell King <linux@arm.linux.org.uk>,
Pawel Moll <pawel.moll@arm.com>,
Alexander Shiyan <shc_work@mail.ru>,
Ezequiel Garcia <ezequiel.garcia@free-electrons.com>,
Quyaxin <quyaxin@hisilicon.com>,
Grant Likely <grant.likely@linaro.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Arnd Bergmann <arnd@arndb.de>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Joern Engel <joern@logfs.org>, Rob Herring <robh+dt@kernel.org>,
Pekon Gupta <pekon@ti.com>,
"Wanli (welly)" <welly.wan@hisilicon.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Randy Dunlap <rdunlap@infradead.org>
Subject: Re: [PATCH 2/3] mtd: hisilicon: add a new nand controller driver for hisilicon hip04 Soc
Date: Wed, 02 Jul 2014 10:12:21 +0800 [thread overview]
Message-ID: <53B36A85.2010104@gmail.com> (raw)
In-Reply-To: <C3050A4DBA34F345975765E43127F10F2C15561F@SZXEMA512-MBX.china.huawei.com>
On 2014年06月30日 17:59, Caizhiyong wrote:
>> -----Original Message-----
>> From: Arnd Bergmann [mailto:arnd@arndb.de]
>> Sent: Monday, June 30, 2014 5:01 PM
>> To: linux-arm-kernel@lists.infradead.org
>> Cc: Zhou Wang; Rob Herring; Pawel Moll; Mark Rutland; Ian Campbell; Kumar
>> Gala; Russell King; David Woodhouse; Brian Norris; Grant Likely; Ezequiel
>> Garcia; Pekon Gupta; Artem Bityutskiy; Alexander Shiyan; Ivan Khoronzhuk;
>> Jussi Kivilinna; Joern Engel; Randy Dunlap; devicetree@vger.kernel.org;
>> linux-mtd@lists.infradead.org; linux-doc@vger.kernel.org;
>> linux-kernel@vger.kernel.org; Caizhiyong; Wangzhou (B)
>> Subject: Re: [PATCH 2/3] mtd: hisilicon: add a new nand controller driver for
>> hisilicon hip04 Soc
>>
>>
>>> + struct device *dev;
>>> + void __iomem *iobase;
>>> + struct completion cmd_complete;
>>> + unsigned int offset;
>>> + unsigned int command;
>>> + int chipselect;
>>> + unsigned int addr_cycle;
>>> + unsigned int addr_value[2];
>>> + unsigned int cache_addr_value[2];
>>> + char *buffer;
>>> + dma_addr_t dma_buffer;
>>> + dma_addr_t dma_oob;
>>> + int version;
>>> + unsigned int ecc_bits;
>>> + unsigned int irq_status; /* interrupt status */
>>> +
>>> + int (*send_cmd_pageprog)(struct hinfc_host *host);
>>> + int (*send_cmd_status)(struct hinfc_host *host);
>>> + int (*send_cmd_readstart)(struct hinfc_host *host);
>>> + int (*send_cmd_erase)(struct hinfc_host *host);
>>> + int (*send_cmd_readid)(struct hinfc_host *host);
>>> + int (*send_cmd_reset)(struct hinfc_host *host, int chipselect);
>>> +};
>>
>> Why do you need function pointers here? The current version of the
>> driver you posted always assigns these to the same functions, so
>> it would be more efficient to just call those directly.
>>
>
> I agree with you.
> This feature was originally designed to support a variety version of NAND controllers.
> But in fact, this feature is not used now.
>
I will move them out the host, thanks for your opinion!
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2014-07-02 2:12 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-30 8:03 [PATCH 0/3] mtd: hisilicon: add a new driver for NAND controller of hisilicon hip04 Soc Zhou Wang
2014-06-30 8:03 ` Zhou Wang
2014-06-30 8:03 ` Zhou Wang
2014-06-30 8:03 ` [PATCH 1/3] mtd: hisilicon: add device tree node for nand controller Zhou Wang
2014-06-30 8:03 ` Zhou Wang
2014-06-30 8:03 ` Zhou Wang
2014-07-09 7:08 ` Jerome FORISSIER
2014-07-09 7:08 ` Jerome FORISSIER
2014-07-09 7:08 ` Jerome FORISSIER
2014-07-09 7:08 ` Jerome FORISSIER
2014-07-11 2:40 ` Zhou Wang
2014-07-11 2:40 ` Zhou Wang
2014-07-11 2:40 ` Zhou Wang
2014-06-30 8:03 ` [PATCH 2/3] mtd: hisilicon: add a new nand controller driver for hisilicon hip04 Soc Zhou Wang
2014-06-30 8:03 ` Zhou Wang
2014-06-30 8:03 ` Zhou Wang
2014-06-30 9:00 ` Arnd Bergmann
2014-06-30 9:00 ` Arnd Bergmann
2014-06-30 9:00 ` Arnd Bergmann
2014-06-30 9:59 ` Caizhiyong
2014-06-30 9:59 ` Caizhiyong
2014-06-30 9:59 ` Caizhiyong
2014-07-02 2:12 ` Zhou Wang [this message]
2014-07-02 2:12 ` Zhou Wang
2014-07-02 2:12 ` Zhou Wang
2014-07-02 2:07 ` Zhou Wang
2014-07-02 2:07 ` Zhou Wang
2014-07-02 2:07 ` Zhou Wang
2014-07-02 2:07 ` Zhou Wang
2014-06-30 9:45 ` Ivan Khoronzhuk
2014-06-30 9:45 ` Ivan Khoronzhuk
2014-06-30 9:45 ` Ivan Khoronzhuk
2014-06-30 9:45 ` Ivan Khoronzhuk
2014-07-02 2:09 ` Zhou Wang
2014-07-02 2:09 ` Zhou Wang
2014-07-02 2:09 ` Zhou Wang
2014-06-30 10:00 ` Mark Rutland
2014-06-30 10:00 ` Mark Rutland
2014-06-30 10:00 ` Mark Rutland
2014-07-02 2:15 ` Zhou Wang
2014-07-02 2:15 ` Zhou Wang
2014-07-02 2:15 ` Zhou Wang
2014-06-30 8:03 ` [PATCH 3/3] mtd: hisilicon: add device tree binding documentation Zhou Wang
2014-06-30 8:03 ` Zhou Wang
2014-06-30 8:03 ` Zhou Wang
2014-06-30 9:52 ` Mark Rutland
2014-06-30 9:52 ` Mark Rutland
2014-06-30 9:52 ` Mark Rutland
2014-07-02 2:46 ` Zhou Wang
2014-07-02 2:46 ` Zhou Wang
2014-07-02 2:46 ` Zhou Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53B36A85.2010104@gmail.com \
--to=wangzhou.bry@gmail.com \
--cc=arnd@arndb.de \
--cc=artem.bityutskiy@linux.intel.com \
--cc=caizhiyong@hisilicon.com \
--cc=computersforpeace@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=dwmw2@infradead.org \
--cc=ezequiel.garcia@free-electrons.com \
--cc=galak@codeaurora.org \
--cc=grant.likely@linaro.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=ivan.khoronzhuk@ti.com \
--cc=joern@logfs.org \
--cc=jussi.kivilinna@iki.fi \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux@arm.linux.org.uk \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=pekon@ti.com \
--cc=quyaxin@hisilicon.com \
--cc=rdunlap@infradead.org \
--cc=robh+dt@kernel.org \
--cc=shc_work@mail.ru \
--cc=wangzhou1@hisilicon.com \
--cc=welly.wan@hisilicon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.