All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: Murali Karicheri <m-karicheri2@ti.com>
Cc: davinci-linux-open-source@linux.davincidsp.com,
	mikedunn@newsguy.com, linux-doc@vger.kernel.org,
	artem.bityutskiy@linux.intel.com,
	devicetree-discuss@lists.ozlabs.org, nsekhar@ti.com,
	linux-kernel@vger.kernel.org, rob.herring@calxeda.com,
	grant.likely@secretlab.ca, linux-mtd@lists.infradead.org,
	rob@landley.net, gregkh@linuxfoundation.org,
	santosh.shilimkar@ti.com, hs@denx.de, dwmw2@infradead.org,
	hdoyu@nvidia.com
Subject: Re: [RFC v2 PATCH 2/2] mtd: davinci - remove DaVinci architecture depedency
Date: Thu, 08 Nov 2012 10:19:22 -0700	[thread overview]
Message-ID: <509BE99A.8060705@wwwdotorg.org> (raw)
In-Reply-To: <509BD67E.2090200@ti.com>

On 11/08/2012 08:57 AM, Murali Karicheri wrote:
> On 11/07/2012 03:08 PM, Stephen Warren wrote:
>> On 11/06/2012 02:47 PM, Murali Karicheri wrote:
>>> DaVinci NAND driver is a controller driver based on the AEMIF hardware
>>> IP found on TI SoCs. It is also used on SoCs that are not DaVinci
>>> based. This
>>> patch removes the driver dependency on DaVinci architecture so that it
>>> can be used on other architectures such as c6x, keystone etc.
>>>
>>> Also migrate the driver to use the new AEMIF platform driver API and
>>> moving Documentation to
>>> Documentation/devicetree/bindings/mtd/davinci-nand.txt
>>> as this is expected to be used outside of arm/davinci.
>>>   delete mode 100644
>>> Documentation/devicetree/bindings/arm/davinci/nand.txt
>>>   create mode 100644
>>> Documentation/devicetree/bindings/mtd/davinci-nand.txt
>>>   create mode 100644 include/linux/platform_data/davinci-nand.h
>> Using "git format-patch -M" might show this as a file move/rename rather
>> than a delete/add, which would be useful to highlight any changes you
>> made at the same time.
>>
>>> diff --git a/Documentation/devicetree/bindings/mtd/davinci-nand.txt
>>> b/Documentation/devicetree/bindings/mtd/davinci-nand.txt
>>> +Example (enbw_cmc board):
>>> +aemif@60000000 {
>>> +    compatible = "ti,davinci-aemif";
>>> +    #address-cells = <2>;
>>> +    #size-cells = <1>;
>>> +    reg = <0x68000000 0x80000>;
>>> +    ranges = <2 0 0x60000000 0x02000000
>>> +          3 0 0x62000000 0x02000000
>>> +          4 0 0x64000000 0x02000000
>>> +          5 0 0x66000000 0x02000000
>>> +          6 0 0x68000000 0x02000000>;
>>> +    nand@3,0 {
>> Here, isn't 3,0 the aemif chip-select ID that is decoding the NAND
>> accesses?
>>
> Yes.
>>> +        compatible = "ti,davinci-nand";
>>> +        reg = <3 0x0 0x807ff
>>> +            6 0x0 0x8000>;
>>> +        #address-cells = <1>;
>>> +        #size-cells = <1>;
>>> +        ti,davinci-chipselect = <1>;
>> So I don't understand why that chipselect property is needed, or has a
>> different value. Is this muxing the AEMIF output chip-selects onto
>> different SoC package pins or something? Seems like a job for pinctrl
>> perhaps?
>
> Actually this was added by somebody else. Do you know what 0 in 3,0
> stands for? Is there a way I can retrieve the chip-select id so that I
> can remove the davinci-chipselect property. The driver uses a cs index
> of 0-3 and the hardware documentation refers CS2-5. Actually cs2 is CE0
> signal. So internally driver
> translates to 2-5 to 0-3. pinmux is currently done in platform specific
> init code and probably need to migrate to use pictrl later.

for a node named "nand@3,0", the "3,0" is the address value from the
first entry in the reg property "reg = <3 0x0 0x807ff ...". Given your
previous email, that means chip-select 3 offset 0, I believe. Presumably
you can read the reg property directly to find these numbers, or perhaps
there are already some helper functions for this. I have no idea why
there's a "3" in the node name and reg property, but
"ti,davinci-chipselect = <1>" not "= <3>".

WARNING: multiple messages have this Message-ID (diff)
From: Stephen Warren <swarren@wwwdotorg.org>
To: Murali Karicheri <m-karicheri2@ti.com>
Cc: grant.likely@secretlab.ca, rob.herring@calxeda.com,
	rob@landley.net, dwmw2@infradead.org,
	artem.bityutskiy@linux.intel.com, hs@denx.de, nsekhar@ti.com,
	mikedunn@newsguy.com, devicetree-discuss@lists.ozlabs.org,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mtd@lists.infradead.org,
	davinci-linux-open-source@linux.davincidsp.com,
	gregkh@linuxfoundation.org, hdoyu@nvidia.com,
	santosh.shilimkar@ti.com
Subject: Re: [RFC v2 PATCH 2/2] mtd: davinci - remove DaVinci architecture depedency
Date: Thu, 08 Nov 2012 10:19:22 -0700	[thread overview]
Message-ID: <509BE99A.8060705@wwwdotorg.org> (raw)
In-Reply-To: <509BD67E.2090200@ti.com>

On 11/08/2012 08:57 AM, Murali Karicheri wrote:
> On 11/07/2012 03:08 PM, Stephen Warren wrote:
>> On 11/06/2012 02:47 PM, Murali Karicheri wrote:
>>> DaVinci NAND driver is a controller driver based on the AEMIF hardware
>>> IP found on TI SoCs. It is also used on SoCs that are not DaVinci
>>> based. This
>>> patch removes the driver dependency on DaVinci architecture so that it
>>> can be used on other architectures such as c6x, keystone etc.
>>>
>>> Also migrate the driver to use the new AEMIF platform driver API and
>>> moving Documentation to
>>> Documentation/devicetree/bindings/mtd/davinci-nand.txt
>>> as this is expected to be used outside of arm/davinci.
>>>   delete mode 100644
>>> Documentation/devicetree/bindings/arm/davinci/nand.txt
>>>   create mode 100644
>>> Documentation/devicetree/bindings/mtd/davinci-nand.txt
>>>   create mode 100644 include/linux/platform_data/davinci-nand.h
>> Using "git format-patch -M" might show this as a file move/rename rather
>> than a delete/add, which would be useful to highlight any changes you
>> made at the same time.
>>
>>> diff --git a/Documentation/devicetree/bindings/mtd/davinci-nand.txt
>>> b/Documentation/devicetree/bindings/mtd/davinci-nand.txt
>>> +Example (enbw_cmc board):
>>> +aemif@60000000 {
>>> +    compatible = "ti,davinci-aemif";
>>> +    #address-cells = <2>;
>>> +    #size-cells = <1>;
>>> +    reg = <0x68000000 0x80000>;
>>> +    ranges = <2 0 0x60000000 0x02000000
>>> +          3 0 0x62000000 0x02000000
>>> +          4 0 0x64000000 0x02000000
>>> +          5 0 0x66000000 0x02000000
>>> +          6 0 0x68000000 0x02000000>;
>>> +    nand@3,0 {
>> Here, isn't 3,0 the aemif chip-select ID that is decoding the NAND
>> accesses?
>>
> Yes.
>>> +        compatible = "ti,davinci-nand";
>>> +        reg = <3 0x0 0x807ff
>>> +            6 0x0 0x8000>;
>>> +        #address-cells = <1>;
>>> +        #size-cells = <1>;
>>> +        ti,davinci-chipselect = <1>;
>> So I don't understand why that chipselect property is needed, or has a
>> different value. Is this muxing the AEMIF output chip-selects onto
>> different SoC package pins or something? Seems like a job for pinctrl
>> perhaps?
>
> Actually this was added by somebody else. Do you know what 0 in 3,0
> stands for? Is there a way I can retrieve the chip-select id so that I
> can remove the davinci-chipselect property. The driver uses a cs index
> of 0-3 and the hardware documentation refers CS2-5. Actually cs2 is CE0
> signal. So internally driver
> translates to 2-5 to 0-3. pinmux is currently done in platform specific
> init code and probably need to migrate to use pictrl later.

for a node named "nand@3,0", the "3,0" is the address value from the
first entry in the reg property "reg = <3 0x0 0x807ff ...". Given your
previous email, that means chip-select 3 offset 0, I believe. Presumably
you can read the reg property directly to find these numbers, or perhaps
there are already some helper functions for this. I have no idea why
there's a "3" in the node name and reg property, but
"ti,davinci-chipselect = <1>" not "= <3>".

  reply	other threads:[~2012-11-08 17:19 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-06 21:47 [RFC v2 PATCH 0/2]Move AEMIF driver out of DaVinci machine to memory subsystem Murali Karicheri
2012-11-06 21:47 ` Murali Karicheri
2012-11-06 21:47 ` [RFC v2 PATCH 1/2] memory: davinci - add aemif controller platform driver Murali Karicheri
2012-11-06 21:47   ` Murali Karicheri
2012-11-07  0:48   ` Santosh Shilimkar
2012-11-07  0:48     ` Santosh Shilimkar
2012-11-07  0:48     ` Santosh Shilimkar
2012-11-07 15:39     ` Murali Karicheri
2012-11-07 15:39       ` Murali Karicheri
2012-11-07 15:39       ` Murali Karicheri
2012-11-07 20:05   ` Stephen Warren
2012-11-07 20:05     ` Stephen Warren
2012-11-08 15:46     ` Murali Karicheri
2012-11-08 15:46       ` Murali Karicheri
2012-11-08 15:46       ` Murali Karicheri
2012-11-06 21:47 ` [RFC v2 PATCH 2/2] mtd: davinci - remove DaVinci architecture depedency Murali Karicheri
2012-11-06 21:47   ` Murali Karicheri
2012-11-07 20:08   ` Stephen Warren
2012-11-07 20:08     ` Stephen Warren
2012-11-08 15:57     ` Murali Karicheri
2012-11-08 15:57       ` Murali Karicheri
2012-11-08 15:57       ` Murali Karicheri
2012-11-08 17:19       ` Stephen Warren [this message]
2012-11-08 17:19         ` Stephen Warren

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=509BE99A.8060705@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=artem.bityutskiy@linux.intel.com \
    --cc=davinci-linux-open-source@linux.davincidsp.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=dwmw2@infradead.org \
    --cc=grant.likely@secretlab.ca \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdoyu@nvidia.com \
    --cc=hs@denx.de \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=m-karicheri2@ti.com \
    --cc=mikedunn@newsguy.com \
    --cc=nsekhar@ti.com \
    --cc=rob.herring@calxeda.com \
    --cc=rob@landley.net \
    --cc=santosh.shilimkar@ti.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.