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!
next prev parent reply other threads:[~2014-07-02 2:12 UTC|newest]
Thread overview: 16+ 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 ` [PATCH 1/3] mtd: hisilicon: add device tree node for nand controller Zhou Wang
2014-07-09 7:08 ` Jerome FORISSIER
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 9:00 ` Arnd Bergmann
2014-06-30 9:59 ` Caizhiyong
2014-07-02 2:12 ` Zhou Wang [this message]
2014-07-02 2:07 ` Zhou Wang
2014-06-30 9:45 ` Ivan Khoronzhuk
2014-07-02 2:09 ` Zhou Wang
2014-06-30 10:00 ` Mark Rutland
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 9:52 ` Mark Rutland
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=linux-arm-kernel@lists.infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).