Skip to contentSkip to conversation

MIPS: Octeon: Register EEPROM device on the I2C bus

PATCH In review Yang Shi 6 participants 6 messages Mar 8, 2010 – Mar 18, 2010 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Yang Shi

author
#0 lore raw

PATCH v2 1/1 MIPS: Octeon: Register EEPROM device on the I2C bus

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

---
 arch/mips/cavium-octeon/octeon-platform.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
arch/mips/cavium-octeon/octeon-platform.c +3 -0
index 62ac30e..3138982 100644
@@ -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)
Signature · 1 line
1.6.3.3

A message that is not in the archive (sent off-list or not yet received): 1268026190-18300-1-git-send-email-yang.shi-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org

#3 lore raw
In reply to a message not in the archive
Quoted 2 lines · Yang Shi

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

#4 lore raw

Hi Ralf,

Quoted 7 lines · Ralf Baechle
Quoted 2 lines · Yang Shi

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.

Quoted 2 lines

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.

Signature · 1 line
Jean Delvare
#5 lore raw
Quoted 11 lines · Jean Delvare

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.

Quoted 2 lines

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

A message that is not in the archive (sent off-list or not yet received): 20100318170030.GJ4554-6z/[email protected]

#7 lore raw

Hi Ralf,

Quoted 10 lines · Ralf Baechle
Quoted 8 lines · Jean Delvare

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.

Quoted 2 lines

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

Quoted 6 lines
Quoted 3 lines

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.

Signature · 1 line
Jean Delvare