All of lore.kernel.org
 help / color / mirror / Atom feed
From: Neil Armstrong <narmstrong@baylibre.com>
To: Josh Cartwright <joshc@ni.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>,
	"David S. Miller" <davem@davemloft.net>,
	Harini Katakam <harini.katakam@xilinx.com>,
	Boris BREZILLON <boris.brezillon@free-electrons.com>,
	Alexandre Belloni <alexandre.belloni@free-electrons.com>,
	linux-kernel@vger.kernel.org, netdev <netdev@vger.kernel.org>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH net 1/2] net: cadence: macb: Disable USRIO register on some platforms
Date: Tue, 8 Dec 2015 10:21:35 +0100	[thread overview]
Message-ID: <CAA3gFWtDiza1V3_eM84JxseHRDJMH_NF4Rx=-dOPD-Usp=pVNA@mail.gmail.com> (raw)
In-Reply-To: <20151207193215.GI29051@jcartwri.amer.corp.natinst.com>

Hi Josh,

2015-12-07 20:32 GMT+01:00 Josh Cartwright <joshc@ni.com>:
> 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 ?

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.

Neil

  reply	other threads:[~2015-12-08  9:21 UTC|newest]

Thread overview: 52+ 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
2015-12-07 19:09   ` David Miller
2015-12-07 19:09     ` David Miller
2015-12-07 19:32   ` Josh Cartwright
2015-12-08  9:21     ` Neil Armstrong [this message]
2015-12-08  9:38       ` Nicolas Ferre
2015-12-08  9:38         ` Nicolas Ferre
2015-12-08  9:38         ` Nicolas Ferre
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 1/3] net: ethernet: cadence-macb: Add disabled usrio caps Neil Armstrong
2015-12-08 13:52     ` 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
2015-12-08 16:22         ` Nicolas Ferre
2015-12-08 13:52   ` [PATCH v2 net-next 3/3] bindings: ethernet: macb: Add optional caps properties Neil Armstrong
2015-12-08 13:52     ` Neil Armstrong
2015-12-09  3:49     ` Rob Herring
2016-01-04  9:01   ` [PATCH v3 net-next] net: ethernet: cadence-macb: Add disabled usrio caps Neil Armstrong
2016-01-04  9:25     ` Nicolas Ferre
2016-01-04  9:42     ` [PATCH v4 net-next 0/3] Add new capability and macb DT variant Neil Armstrong
2016-01-04  9:42       ` [PATCH v4 net-next 1/3] net: ethernet: cadence-macb: Add disabled usrio caps Neil Armstrong
2016-01-04  9:42         ` Neil Armstrong
2016-01-04  9:42       ` [PATCH v4 net-next 2/3] net: macb: Add NPx macb config using USRIO_DISABLED cap Neil Armstrong
2016-01-04 10:38         ` Nicolas Ferre
2016-01-04 10:38           ` Nicolas Ferre
2016-01-04 10:38           ` Nicolas Ferre
2016-01-05 12:20           ` Neil Armstrong
2016-01-05 13:27             ` Nicolas Ferre
2016-01-05 13:27               ` Nicolas Ferre
2016-01-05 13:27               ` Nicolas Ferre
2016-01-04  9:42       ` [PATCH v4 net-next 3/3] dt-bindings: net: macb: Add NPx macb variant Neil Armstrong
2016-01-04  9:42         ` Neil Armstrong
2016-01-05 13:39       ` [PATCH v5 net-next 0/3] Add new capability and macb DT variant Neil Armstrong
2016-01-05 13:39         ` Neil Armstrong
2016-01-05 13:39         ` [PATCH v5 net-next 1/3] net: ethernet: cadence-macb: Add disabled usrio caps Neil Armstrong
2016-01-05 13:45           ` Nicolas Ferre
2016-01-05 13:45             ` Nicolas Ferre
2016-01-05 13:39         ` [PATCH v5 net-next 2/3] net: macb: Add NP4 macb config using USRIO_DISABLED Neil Armstrong
2016-01-05 13:39           ` Neil Armstrong
2016-01-05 13:45           ` Nicolas Ferre
2016-01-05 13:45             ` Nicolas Ferre
2016-01-05 13:39         ` [PATCH v5 net-next 3/3] dt-bindings: net: macb: Add NP4 macb variant Neil Armstrong
2016-01-05 13:39           ` Neil Armstrong
2016-01-05 13:46           ` Nicolas Ferre
2016-01-05 13:46             ` Nicolas Ferre
2016-01-05 13:46             ` Nicolas Ferre
2016-01-06 14:52           ` Rob Herring
2016-01-07 21:26         ` [PATCH v5 net-next 0/3] Add new capability and macb DT variant David Miller

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='CAA3gFWtDiza1V3_eM84JxseHRDJMH_NF4Rx=-dOPD-Usp=pVNA@mail.gmail.com' \
    --to=narmstrong@baylibre.com \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=harini.katakam@xilinx.com \
    --cc=joshc@ni.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.ferre@atmel.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.