devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.aribaud-iEu9NFBzPZE@public.gmane.org>
To: Cyrille Pitchen
	<cyrille.pitchen-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
Cc: linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	yunhui.cui-3arQi8VN3Tc@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Han Xu <han.xu-3arQi8VN3Tc@public.gmane.org>
Subject: Re: [PATCH 1/2] fsl-quadspi: fix QUAD read, add NORMAL, DUAL and FAST reads
Date: Thu, 20 Oct 2016 09:16:30 +0200	[thread overview]
Message-ID: <20161020091630.3477efab.albert.aribaud@3adev.fr> (raw)
In-Reply-To: <69a5b0d7-6b89-7edc-738d-c9e25802ba31-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>

Hi Cyrille,

Le Wed, 19 Oct 2016 18:42:36 +0200, Cyrille Pitchen
<cyrille.pitchen-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org> a écrit :

> Hi Albert,
> 
> +Yunhui


> It seems that both Yunhui and you work on the same topic, maybe you can
> synchronize?
> https://patchwork.ozlabs.org/patch/660356/

I am already preparing a v2 based over Yunhui's series. :)

> I don't think it is a good thing to select the relevant "READ" LUT entry
> according to the command op code. What if spi-nor.c introduces new op codes?
> 
> Maybe you could index the LUT entries by functions:
> - READ_REG: the LUT op code would be dynamically updated by your
>             .read_reg(nor, opcode, ...) implementation according to opcode.
> - WRITE_REG: the same as above with the .write_reg(nor, opcode, ...) hook.
> - READ_SLAVE1: read memory from the first SPI-NOR memory.
> - WRITE_SLAVE1: write into the first SPI-NOR memory.
> - READ_SLAVE2: read memory form the 2nd SPI-NOR memory.
> ...
> - WRITE_SLAVEN: write into the N-th SPI-NOR memory.

Actually, my needs could be met using Han Xu's dynamic LUT entries
without the need to introduce 'virtual' opcodes (and without having
to 'leak back' those new opcodes into other kernel code portions).

The per-slave differences (in my case, bus width essentially) can be
managed though DT entries and corresponding per-nor flags in the driver.

> Also be aware even for the .read() hook the nor->read_opcode might changes
> between calls!

Noted -- I'll check that the driver always use the current NOR codes.

> I don't know whether those comments fit your actual needs and the Freescale SPI
> controller hardware constraints but I'm always worried about the ease to maintain
> SPI-NOR controller drivers when they are not "op code agnostic".

Understood and agreed.

Thanks for yuor feedback!
 
> Best regards,
> 
> Cyrille

Cordialement,
Albert ARIBAUD
3ADEV
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2016-10-20  7:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-27  5:59 [PATCH 1/2] fsl-quadspi: fix QUAD read, add NORMAL, DUAL and FAST reads Albert ARIBAUD (3ADEV)
     [not found] ` <20160927055957.427-1-albert.aribaud-iEu9NFBzPZE@public.gmane.org>
2016-09-27  5:59   ` [PATCH 2/2] fsl-quadspi: introduce per-bus spi-bus-width property Albert ARIBAUD (3ADEV)
     [not found]     ` <20160927055957.427-2-albert.aribaud-iEu9NFBzPZE@public.gmane.org>
2016-10-03 18:51       ` Rob Herring
2016-10-03 19:57         ` Geert Uytterhoeven
     [not found]           ` <CAMuHMdW6WJBj3TiXU0mmwKJmcwp28HEVUSD17-7RH7-UXFtX1g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-10-18 20:03             ` Albert ARIBAUD
     [not found]               ` <20161018220334.6452fc5b.albert.aribaud-iEu9NFBzPZE@public.gmane.org>
2016-10-19  6:57                 ` Geert Uytterhoeven
     [not found]                   ` <CAMuHMdW-L=Wc7mcs6s_N+joEZ8hX7DLHoY_YU0wuvnM=3DN8ug-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-10-20  7:17                     ` Albert ARIBAUD
2016-09-28 20:06   ` [PATCH 1/2] fsl-quadspi: fix QUAD read, add NORMAL, DUAL and FAST reads Han Xu
2016-09-28 21:45     ` Albert ARIBAUD
     [not found]       ` <20160928234546.6df9c893.albert.aribaud-iEu9NFBzPZE@public.gmane.org>
2016-09-29 22:09         ` Han Xu
2016-10-04 12:30   ` Cyrille Pitchen
2016-10-19 16:42   ` Cyrille Pitchen
     [not found]     ` <69a5b0d7-6b89-7edc-738d-c9e25802ba31-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2016-10-20  7:16       ` Albert ARIBAUD [this message]
2016-10-20 14:54         ` Han Xu

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=20161020091630.3477efab.albert.aribaud@3adev.fr \
    --to=albert.aribaud-ieu9nfbzpze@public.gmane.org \
    --cc=cyrille.pitchen-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=han.xu-3arQi8VN3Tc@public.gmane.org \
    --cc=linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=yunhui.cui-3arQi8VN3Tc@public.gmane.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).