[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141027135917.GA12627@lunn.ch>
Date: Mon, 27 Oct 2014 14:59:17 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Guenter Roeck <linux@...ck-us.net>
Cc: Andrew Lunn <andrew@...n.ch>, netdev@...r.kernel.org,
"David S. Miller" <davem@...emloft.net>,
Florian Fainelli <f.fainelli@...il.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 09/15] net: dsa: Add support for switch EEPROM access
> So lets take a step back: For the Marvell chips, I have to provide both length
> and presence in devicetree or platform data. Presence seemed to be implied by
> length, so I used only a single property and variable to indicate both.
Hi Guenter
What i was thinking, is that you don't need length in device tree. The
datasheet specifies how big the EEPROM needs to be.
However, i read the datasheet for the 6060, the only public datasheet
from Marvell. It does not work as i expected. Rather than being a
fixed list of register values, it is a variable length list of
command/value pairs.
In this situation, yes, you do need the length in DT.
I had a quick look at some other switch chips. e.g. the RTL8100. It
has a fixed layout of its EEPROM, consisting of 0x80 bytes. In this
case, the switch driver could be hard coded with 0x80, and all DT
needs to indicate is if the EEPROM is present or not.
So, what you have proposed will work. It is maybe not optimal in the
case of a well defined in the datasheet fixed size EEPROM, but it
still works.
Acked-by: Andrew Lunn <andrew@...n.ch>
Andrew
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists