linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2] MIPS: Octeon: Register EEPROM device on the I2C bus
@ 2010-03-08  5:29 Yang Shi
       [not found] ` <1268026190-18300-1-git-send-email-yang.shi-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Yang Shi @ 2010-03-08  5:29 UTC (permalink / raw)
  To: ddaney-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8,
	ben-linux-elnMNo+KYs3YtjvyW6yDsg, khali-PUYAD+kWke1g9hUCZPvPmw,
	ralf-6z/3iImG2C8G8FEW9MqTrA
  Cc: linux-mips-6z/3iImG2C8G8FEW9MqTrA,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA

An SPD resides on 0x50 of the I2C bus on CN56xx/57xx board,
register this device.

Signed-off-by: Yang Shi <yang.shi-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>
---
 arch/mips/cavium-octeon/octeon-platform.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/mips/cavium-octeon/octeon-platform.c b/arch/mips/cavium-octeon/octeon-platform.c
index 62ac30e..3138982 100644
--- a/arch/mips/cavium-octeon/octeon-platform.c
+++ b/arch/mips/cavium-octeon/octeon-platform.c
@@ -164,6 +164,9 @@ static struct i2c_board_info __initdata octeon_i2c_devices[] = {
 	{
 		I2C_BOARD_INFO("ds1337", 0x68),
 	},
+	{
+		I2C_BOARD_INFO("spd", 0x50),
+	},
 };
 
 static int __init octeon_i2c_devices_init(void)
-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH V2] MIPS: Octeon: Register EEPROM device on the I2C bus
       [not found] ` <1268026190-18300-1-git-send-email-yang.shi-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>
@ 2010-03-08  6:01   ` Wolfram Sang
  2010-03-16 18:09   ` Ralf Baechle
  1 sibling, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2010-03-08  6:01 UTC (permalink / raw)
  To: Yang Shi
  Cc: ddaney-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8,
	ben-linux-elnMNo+KYs3YtjvyW6yDsg, khali-PUYAD+kWke1g9hUCZPvPmw,
	ralf-6z/3iImG2C8G8FEW9MqTrA, linux-mips-6z/3iImG2C8G8FEW9MqTrA,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 503 bytes --]

On Mon, Mar 08, 2010 at 01:29:50PM +0800, Yang Shi wrote:
> An SPD resides on 0x50 of the I2C bus on CN56xx/57xx board,
> register this device.
> 
> Signed-off-by: Yang Shi <yang.shi-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>

Glad it worked with at24, after all.

Acked-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH V2] MIPS: Octeon: Register EEPROM device on the I2C bus
       [not found] ` <1268026190-18300-1-git-send-email-yang.shi-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>
  2010-03-08  6:01   ` Wolfram Sang
@ 2010-03-16 18:09   ` Ralf Baechle
  2010-03-16 19:06     ` Jean Delvare
  1 sibling, 1 reply; 6+ messages in thread
From: Ralf Baechle @ 2010-03-16 18:09 UTC (permalink / raw)
  To: Yang Shi
  Cc: ddaney-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8,
	ben-linux-elnMNo+KYs3YtjvyW6yDsg, khali-PUYAD+kWke1g9hUCZPvPmw,
	linux-mips-6z/3iImG2C8G8FEW9MqTrA,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA

On Mon, Mar 08, 2010 at 01:29:50PM +0800, Yang Shi wrote:

> An SPD resides on 0x50 of the I2C bus on CN56xx/57xx board,
> register this device.

I wonder what the use case for this patch is?  Normally Linux doesn't care
about SPD.

I also wonder how this will work for configurations with multiple memory
modules thus multiple SPD EEPROMS.

  Ralf

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH V2] MIPS: Octeon: Register EEPROM device on the I2C bus
  2010-03-16 18:09   ` Ralf Baechle
@ 2010-03-16 19:06     ` Jean Delvare
  2010-03-18 17:00       ` Ralf Baechle
  0 siblings, 1 reply; 6+ messages in thread
From: Jean Delvare @ 2010-03-16 19:06 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: Yang Shi, ddaney, ben-linux, linux-mips, linux-i2c

Hi Ralf,

On Tue, 16 Mar 2010 19:09:46 +0100, Ralf Baechle wrote:
> On Mon, Mar 08, 2010 at 01:29:50PM +0800, Yang Shi wrote:
> 
> > An SPD resides on 0x50 of the I2C bus on CN56xx/57xx board,
> > register this device.
> 
> I wonder what the use case for this patch is?  Normally Linux doesn't care
> about SPD.

The Linux kernel doesn't care, but user-space may. As a matter of fact,
there is a script out there (decode-dimms, in the i2c-tools package)
decoding the SPD data and presenting it to the user. Some people want
to know the details about their memory modules.

> I also wonder how this will work for configurations with multiple memory
> modules thus multiple SPD EEPROMS.

The kernel code should instantiate one spd device per memory module
(assuming they are all reachable.) Obviously this can't be done in a
static way.

-- 
Jean Delvare

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH V2] MIPS: Octeon: Register EEPROM device on the I2C bus
  2010-03-16 19:06     ` Jean Delvare
@ 2010-03-18 17:00       ` Ralf Baechle
       [not found]         ` <20100318170030.GJ4554-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Ralf Baechle @ 2010-03-18 17:00 UTC (permalink / raw)
  To: Jean Delvare; +Cc: Yang Shi, ddaney, ben-linux, linux-mips, linux-i2c

On Tue, Mar 16, 2010 at 08:06:47PM +0100, Jean Delvare wrote:

> The Linux kernel doesn't care, but user-space may. As a matter of fact,
> there is a script out there (decode-dimms, in the i2c-tools package)
> decoding the SPD data and presenting it to the user. Some people want
> to know the details about their memory modules.
> 
> > I also wonder how this will work for configurations with multiple memory
> > modules thus multiple SPD EEPROMS.
> 
> The kernel code should instantiate one spd device per memory module
> (assuming they are all reachable.) Obviously this can't be done in a
> static way.

SPD is virtually omnipresent these days so I wonder if maybe there already
is some probing functionality already available?

  Ralf

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH V2] MIPS: Octeon: Register EEPROM device on the I2C bus
       [not found]         ` <20100318170030.GJ4554-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org>
@ 2010-03-18 17:48           ` Jean Delvare
  0 siblings, 0 replies; 6+ messages in thread
From: Jean Delvare @ 2010-03-18 17:48 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: Yang Shi, ddaney-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8,
	ben-linux-elnMNo+KYs3YtjvyW6yDsg,
	linux-mips-6z/3iImG2C8G8FEW9MqTrA,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA

Hi Ralf,

On Thu, 18 Mar 2010 18:00:30 +0100, Ralf Baechle wrote:
> On Tue, Mar 16, 2010 at 08:06:47PM +0100, Jean Delvare wrote:
> 
> > The Linux kernel doesn't care, but user-space may. As a matter of fact,
> > there is a script out there (decode-dimms, in the i2c-tools package)
> > decoding the SPD data and presenting it to the user. Some people want
> > to know the details about their memory modules.
> > 
> > > I also wonder how this will work for configurations with multiple memory
> > > modules thus multiple SPD EEPROMS.
> > 
> > The kernel code should instantiate one spd device per memory module
> > (assuming they are all reachable.) Obviously this can't be done in a
> > static way.
> 
> SPD is virtually omnipresent these days so I wonder if maybe there already
> is some probing functionality already available?

Not that I aware of, except for the fact that the "eeprom" driver will
probe all i2c adapters with class bit I2C_CLASS_SPD set for chips at
addresses 0x50-0x57, and it will instantiate a device for each of them.
This will instantiate devices for non-SPD EEPROM, and even non-EEPROMs
living at these addresses, so this can't really be considered a generic
solution.

A generic solution would let the platform (not the eeprom driver) probe
for devices at selected I2C addresses (the ones where SPD EEPROMs can
live of the specific platform) and instantiate spd devices (possibly
after integrity checking). This would avoid false positives.

-- 
Jean Delvare

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-03-18 17:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-08  5:29 [PATCH V2] MIPS: Octeon: Register EEPROM device on the I2C bus Yang Shi
     [not found] ` <1268026190-18300-1-git-send-email-yang.shi-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>
2010-03-08  6:01   ` Wolfram Sang
2010-03-16 18:09   ` Ralf Baechle
2010-03-16 19:06     ` Jean Delvare
2010-03-18 17:00       ` Ralf Baechle
     [not found]         ` <20100318170030.GJ4554-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org>
2010-03-18 17:48           ` Jean Delvare

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).