From: Nicolas Ferre <nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
To: Neil Armstrong
<narmstrong-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>,
Josh Cartwright <joshc-acOepvfBmUk@public.gmane.org>
Cc: "David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
Harini Katakam
<harini.katakam-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>,
Boris BREZILLON
<boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
Alexandre Belloni
<alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev <netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Michal Simek
<michal.simek-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH net 1/2] net: cadence: macb: Disable USRIO register on some platforms
Date: Tue, 8 Dec 2015 10:38:36 +0100 [thread overview]
Message-ID: <5666A51C.5060309@atmel.com> (raw)
In-Reply-To: <CAA3gFWtDiza1V3_eM84JxseHRDJMH_NF4Rx=-dOPD-Usp=pVNA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Le 08/12/2015 10:21, Neil Armstrong a écrit :
> Hi Josh,
>
> 2015-12-07 20:32 GMT+01:00 Josh Cartwright <joshc-acOepvfBmUk@public.gmane.org>:
>> On Mon, Dec 07, 2015 at 11:58:33AM +0100, Neil Armstrong wrote:
>>> On some platforms, the macb integration does not use the USRIO
>>> register to configure the (R)MII port and clocks.
>>> When the register is not implemented and the MACB error signal
>>> is connected to the bus error, reading or writing to the USRIO
>>> register can trigger some Imprecise External Aborts on ARM platforms.
>>> ---
>>
>> Does this make sense to even be a separate bool device tree property?
>>
>> This sort of configuration is typically done by:
>> 1. Creating a new 'caps' bit; relevant codepaths check that bit
>> 2. Creating a new "compatible" string for your platform's macb
>> instance
>> 3. Creating a new 'struct macb_config' instance for your platform,
>> setting any relevant caps bits when it is selected.
>>
>> Josh
>
> I see the point, but according to the User Guide :
>> User I/O Register
>> The MACB design provides up to 16 inputs and 16 outputs,
>> for which the state of the I/O may
>> be read or set under the control of the processor interface.
>> If the user I/O is disabled as a configuration option, this address space is defined
>> as reserved, and hence will be a read-only register of value 0x0.
>
> On the design I worked on, the macb_user_* signals were commented,
> thus disabling this register.
>
> The implementation is not mandatory, and the "generic" macb compatible
> "cdns,macb" should disable
> usage of USRIO register by default and be only used for platform
> specific macb instances...
>
> Is it OK if I add a new 'caps' bit and use it for the "generic" macb instance ?
I would say no as some platform may already use this compatibility
string. So If you need a different capability set, please create a new
compatible string and use this one.
> For the device tree property, it should be safe to have the generic
> instances of macb and gem to
> rely on these properties instead of hardcoded instances.
> (it's the biggest aim of device tree, no ? no more hardcoded 'caps' bit ?)
> The "no-usrio" and other should eventually map 'caps' bits along the
> generic instances.
It has been decided a log time ago to use these capabilities and to have
mixed approach to the actual configuration of the IP:
- from the compatibility string
- from the configuration registers.
I may be sometimes challenging to figure out where the final property
comes from but it has proven to be pretty well adapted to any kind of
situation.
So let's continue with this and not insert additional properties to this
binding.
Best regards,
--
Nicolas Ferre
--
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
next prev parent reply other threads:[~2015-12-08 9:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-07 10:58 [PATCH net 0/2] Add a property to disable MACB USRIO register Neil Armstrong
2015-12-07 10:58 ` [PATCH net 1/2] net: cadence: macb: Disable USRIO register on some platforms Neil Armstrong
[not found] ` <1449485914-12883-2-git-send-email-narmstrong-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
2015-12-07 19:09 ` David Miller
2015-12-07 19:32 ` Josh Cartwright
2015-12-08 9:21 ` Neil Armstrong
[not found] ` <CAA3gFWtDiza1V3_eM84JxseHRDJMH_NF4Rx=-dOPD-Usp=pVNA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-12-08 9:38 ` Nicolas Ferre [this message]
2015-12-07 10:58 ` [PATCH net 2/2] bindings: net: macb: add no-usrio optional property Neil Armstrong
2015-12-08 15:26 ` Rob Herring
2015-12-08 13:52 ` [PATCH v2 net-next 0/3] Add new capability and parse from DT Neil Armstrong
2015-12-08 13:52 ` [PATCH v2 net-next 2/3] net: ethernet: cadence-macb: Add fallback to read DT provided caps Neil Armstrong
2015-12-08 15:00 ` Arnd Bergmann
2015-12-08 16:22 ` Nicolas Ferre
[not found] ` <1449582726-6148-1-git-send-email-narmstrong-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
2015-12-08 13:52 ` [PATCH v2 net-next 1/3] net: ethernet: cadence-macb: Add disabled usrio caps Neil Armstrong
2015-12-08 13:52 ` [PATCH v2 net-next 3/3] bindings: ethernet: macb: Add optional caps properties Neil Armstrong
2015-12-09 3:49 ` Rob Herring
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=5666A51C.5060309@atmel.com \
--to=nicolas.ferre-aife0yeh4naavxtiumwx3w@public.gmane.org \
--cc=alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
--cc=boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=harini.katakam-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org \
--cc=joshc-acOepvfBmUk@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=michal.simek-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org \
--cc=narmstrong-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@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).