public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Bean Huo <beanhuo@outlook.com>
Cc: "dwmw2@infradead.org" <dwmw2@infradead.org>,
	"computersforpeace@gmail.com" <computersforpeace@gmail.com>,
	"marek.vasut@gmail.com" <marek.vasut@gmail.com>,
	"richard@nod.at" <richard@nod.at>,
	"cyrille.pitchen@wedev4u.fr" <cyrille.pitchen@wedev4u.fr>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"mark.rutland@arm.com" <mark.rutland@arm.com>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	beanhuo <beanhuo@micron.com>,
	"boris.brezillon@free-electrons.com"
	<boris.brezillon@free-electrons.com>
Subject: Re: [PATCH v1 3/3] drivers: mtd: chips: add support for the dual die stacked PNOR
Date: Fri, 23 Feb 2018 16:49:53 +0100	[thread overview]
Message-ID: <20180223164953.3dee49b0@bbrezillon> (raw)
In-Reply-To: <DM2PR12MB001437E51CB54D86406D2550A6CC0@DM2PR12MB0014.namprd12.prod.outlook.com>

On Fri, 23 Feb 2018 11:43:21 +0000
Bean Huo <beanhuo@outlook.com> wrote:

> Boris,
> >>
> >> +/*
> >> + * The dual die stacked device comprises two identical dies which connected  
> >                                                                   ^are  
> fixed in next patch.
> 
> >> + * in parallel.But there is only one die being selected each time according  
> 
>    >               ^ missing space after the period  
> fixed in next patch.
> 
> >> + * to maximum address line A[max]. When A[max] == 0, the lower die is selected,
> >> + * when A[max] == 1, the upper die is selected. This function will reture the  
> >
>  >                                                               ^return  
> >> + * CFI unlock-command base address according to accessing address.  
> >Is it really just about unlock commands?  
> 
> Except unlock commands, other commands also need but don't need to add
> 0x555/0x2AA. And current parallel nor driver already does this way.
> so we don't need to change.

Sorry, I don't understand, probably because I lack some background on
CFI. I'll try to document myself if I find some time.

> 
> >> + */
> >> +static loff_t get_cmd_base_address(struct map_info *map, struct flchip *chip,
> >> +             loff_t offset)
> >> +{
> >> +     struct cfi_private *cfi = map->fldrv_priv;
> >>
> >>+     unsigned long cmd_base_addr = chip->start;
> >>+
> >> +     if (cfi->device_stack == CFI_DEVICESTACK_2DIE) {
> >>+             if (offset >= (1 << (cfi->cfiq->DevSize - 1)))
> >>+                     cmd_base_addr += (1 << (cfi->cfiq->DevSize - 1));
> >> +     }  
> 
> >Could be done in a more generic way:  
> 
>  >    unsigned long die = offset >> (cfi->cfiq->DevSize - 1);  
> 
> >        if (cfi->device_stack == 1) {
>  >               WARN_ON(die);
>   >              return cmd_base_addr;
>   >      }  
> 
>    >     cmd_base_addr += die << (cfi->cfiq->DevSize - 1);  
> 
> it will be included in next patch, thanks.
> 
> ...
> >> -     cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi,
> >> +     /* For the dual die device, rebase the command base address according  
> 
> >Please do not use net-style comments.  
> 
> To be honest, I don't know what is net-style comments.

Net-style comment:

/* blablabla
 * blablabla
 */

Kernel-style comment:

/*
 * blablabla
 * blablabla
 */

-- 
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

      reply	other threads:[~2018-02-23 15:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1519241514-6466-1-git-send-email-beanhuo@outlook.com>
2018-02-21 19:32 ` [PATCH v1 1/3] mtd: physmap: add dual die entry in devicetree binding Bean Huo
2018-02-22 13:05   ` Boris Brezillon
2018-02-23 11:07     ` Bean Huo
2018-02-23 15:53       ` Boris Brezillon
2018-02-21 19:32 ` [PATCH v1 2/3] mtd: probe: probe dual die entry from " Bean Huo
2018-02-22 13:02   ` Boris Brezillon
2018-02-23 11:14     ` Bean Huo
2018-02-21 19:32 ` [PATCH v1 3/3] drivers: mtd: chips: add support for the dual die stacked PNOR Bean Huo
2018-02-22 13:33   ` Boris Brezillon
2018-02-23 11:43     ` Bean Huo
2018-02-23 15:49       ` Boris Brezillon [this message]

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=20180223164953.3dee49b0@bbrezillon \
    --to=boris.brezillon@bootlin.com \
    --cc=beanhuo@micron.com \
    --cc=beanhuo@outlook.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=computersforpeace@gmail.com \
    --cc=cyrille.pitchen@wedev4u.fr \
    --cc=dwmw2@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=mark.rutland@arm.com \
    --cc=richard@nod.at \
    --cc=robh+dt@kernel.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