Skip to contentSkip to conversation

i2c for Alpha

DISCUSSION Jeff Sacksteder 5 participants 21 messages May 19, 2005

lore
Share & tools
lore
#0 lore raw

I am now the proud parent of a Digital Server 5000, based on a 533Mhz Alpha. This is the 'Rawhide' platform and was designed for NT on Alpha installations. It most certainly has an I2C bus of some sort on it. I have a functioning Linux install on it now and would like to experiment with hardware monitoring. I will most likely need some coaching as I work my way through the problems I encounter. Is there a list where I should direct my questions? Alternately, does anyone want to volunteer to work with me on this?

#1 lore raw
Quoted 2 lines

Most (all?) of the code is CPU independant. You'll need to figure out what the I2C/SMBus host is and see if it is supported

I suppose I should start by asking has anyone has built it successfully on any 64-bit platform- Alpha, Itanium or AMD?

My operating assumption is that I will use the i2c package to patch my kernel, replacing the existing i2c code with the current rev. I can then build the sensors package to create the user programs to manipulate the hardware.

This mainboard has an Intel chipset of some sort on it- possibly PIIX4. It says PCIset on it, not AGPset. Not sure what chipset that is. Actually has USB in the chip, though there are no physical bus connections to add devices. Does the I2C controller live in there(Intel chipset)?

#2 lore raw
In reply to Jeff Sacksteder
Quoted 9 lines
Quoted 7 lines

I have worked out my build issues with my distribution(Gentoo) by way of an additional patch. Apparently 'i2c-velleman.c' needs a bit like this...

+#include <asm/param.h>

Can this be included in 2.9?

Reported and fixed back in July, so it's OK in 2.8.1 already.

Moving on to lm-sensors 2.8.0, the build fails with the error-

kernel/busses/i2c-nforce2.c:362: `GFP_KERNEL' undeclared (first use in this function)

Is there a known fix for this?

#3 lore raw
In reply to Jeff Sacksteder
Quoted 11 lines

Apparently Mandrake has I2C packages for the Alpha, so I'm in business.

I have worked out my build issues with my distribution(Gentoo) by way of an additional patch. Apparently 'i2c-velleman.c' needs a bit like this...

+#include <asm/param.h>

Can this be included in 2.9?

Reported and fixed back in July, so it's OK in 2.8.1 already.

Quoted 3 lines

There is some variation within Gentoo regarding where the kernel modules go when done. Canonically, should they be in misc/ or drivers/i2c/ ?

Misc/ was for 2.2 kernels, on recent kernels you want to put them in drivers/i2c/.

Signature · 2 lines
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
#4 lore raw
In reply to Jeff Sacksteder
Quoted 7 lines

Moving on to lm-sensors 2.8.0, the build fails with the error-

kernel/busses/i2c-nforce2.c:362: `GFP_KERNEL' undeclared (first use in this function)

Is there a known fix for this?

I suspect that you tried to update lm_sensors to 2.8.0 but did not update i2c to 2.8.0 preliminarily. Do that and it should work OK. You might want to take a look at our installation guide at
http://www.ensicaen.ismra.fr/~delvare/devel/i2c/ since installing i2c 2.8.0 is somewhat tricky.

Signature · 2 lines
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
#5 lore raw
In reply to Jeff Sacksteder
Quoted 2 lines

I suspect that you tried to update lm_sensors to 2.8.0 but did not update i2c to 2.8.0 preliminarily. Do that and it should work OK. You

I built i2c outside the kernel using a package for my distribution.

Quoted 3 lines

might want to take a look at our installation guide at
http://www.ensicaen.ismra.fr/~delvare/devel/i2c/ since installing i2c 2.8.0 is somewhat tricky.

Is it still the case with 2.8.1, that you have to have the kernel patch applied to build?

#6 lore raw
In reply to Jeff Sacksteder
Quoted 6 lines
Quoted 4 lines

I suspect that you tried to update lm_sensors to 2.8.0 but did not update i2c to 2.8.0 preliminarily. Do that and it should work OK. You

I built i2c outside the kernel using a package for my distribution.

Still it needs to be a version equal to or greater than the version of lm_sensors you are trying to install. Also, make sure that lm_sensors picks the right header files. If you have old i2c header files lying around in /usr/local/include or /use/include, you might want to wipe them out to make sure the newer ones are used.

Quoted 6 lines
Quoted 3 lines

might want to take a look at our installation guide at
http://www.ensicaen.ismra.fr/~delvare/devel/i2c/ since installing i2c 2.8.0 is somewhat tricky.

Is it still the case with 2.8.1, that you have to have the kernel patch applied to build?

Yes, you have.
I'm currently working on an i2c patch for submission into Linux 2.4.23 so that lm_sensors will be easier to install, but for now you are advised to stick to the installation guide says.

That said, Philip Edelbrock's remark is absolutely right. Some, if not most, drivers of our package are useless on Alpha, so if a particular driver doesn't compile for some reason, and you know you won't need it, just remove it from Module.mk so that it isn't compiled at all.

Signature · 2 lines
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
#7 lore raw
In reply to Jeff Sacksteder

Apparently Mandrake has I2C packages for the Alpha, so I'm in business.

I have worked out my build issues with my distribution(Gentoo) by way of an additional patch. Apparently 'i2c-velleman.c' needs a bit like this...

+#include <asm/param.h>

Can this be included in 2.9?

There is some variation within Gentoo regarding where the kernel modules go when done. Canonically, should they be in misc/ or drivers/i2c/ ?

I have seen both.

#8 lore raw
In reply to Jeff Sacksteder

this is the list. let us know how it goes.
good luck.

Quoted 9 lines · Jeff Sacksteder

I am now the proud parent of a Digital Server 5000, based on a 533Mhz Alpha. This is the 'Rawhide' platform and was designed for NT on Alpha installations. It most certainly has an I2C bus of some sort on it. I have a functioning Linux install on it now and would like to experiment with hardware monitoring. I will most likely need some coaching as I work my way through the problems I encounter. Is there a list where I should direct my questions? Alternately, does anyone want to volunteer to work with me on this?

#9 lore raw
In reply to Jeff Sacksteder

Most (all?) of the code is CPU independant. You'll need to figure out what the I2C/SMBus host is and see if it is supported
(http://secure.netroedge.com/~lm78/supported.html). If not, then you could try to get a datasheet and try to hack up a new driver. The nice thing is that once you have a working bus, all the chip drivers should automaticly work on it.

Phil

Quoted 11 lines · Jeff Sacksteder

I am now the proud parent of a Digital Server 5000, based on a 533Mhz Alpha. This is the 'Rawhide' platform and was designed for NT on Alpha installations. It most certainly has an I2C bus of some sort on it. I have a functioning Linux install on it now and would like to experiment with hardware monitoring. I will most likely need some coaching as I work my way through the problems I encounter. Is there a list where I should direct my questions? Alternately, does anyone want to volunteer to work with me on this?

#10 lore raw
In reply to Jeff Sacksteder

The I2C controller usually lives on the south bridge (the chip which has the slower I/O, like IDE, ISA, etc.).

Usually there are people maintaining kernels used for 'unusual' architectures (like PPC), you might see if there is someone who is patching and maintaining a stable 64-bit Alpha kernel for your application. They'd be a good place to ask more general questions. Here's a good canidate I found with a quick Google search:

http://www.alphalinux.org/

Phil

Quoted 19 lines · Jeff Sacksteder
Quoted 4 lines

Most (all?) of the code is CPU independant. You'll need to figure out what the I2C/SMBus host is and see if it is supported

I suppose I should start by asking has anyone has built it successfully on any 64-bit platform- Alpha, Itanium or AMD?

My operating assumption is that I will use the i2c package to patch my kernel, replacing the existing i2c code with the current rev. I can then build the sensors package to create the user programs to manipulate the hardware.

This mainboard has an Intel chipset of some sort on it- possibly PIIX4. It says PCIset on it, not AGPset. Not sure what chipset that is. Actually has USB in the chip, though there are no physical bus connections to add devices. Does the I2C controller live in there(Intel chipset)?

#11 lore raw
In reply to Jeff Sacksteder

In a pinch, you could try to remove modules you know you won't need (or won't build) by editing kernel/busses/Module.mk and probably also kernel/chips/Module.mk. In the past, I had to do this to build on a PPC.

Phil

Quoted 17 lines · Jean Delvare
Quoted 8 lines

Moving on to lm-sensors 2.8.0, the build fails with the error-

kernel/busses/i2c-nforce2.c:362: `GFP_KERNEL' undeclared (first use in this function)

Is there a known fix for this?

I suspect that you tried to update lm_sensors to 2.8.0 but did not update i2c to 2.8.0 preliminarily. Do that and it should work OK. You might want to take a look at our installation guide at
http://www.ensicaen.ismra.fr/~delvare/devel/i2c/ since installing i2c 2.8.0 is somewhat tricky.

#12 lore raw
In reply to Jeff Sacksteder

'make -k' lets you keep building after an error which is easier than editing Module.mk.

Quoted 33 lines · Jean Delvare
Quoted 6 lines
Quoted 4 lines

I suspect that you tried to update lm_sensors to 2.8.0 but did not update i2c to 2.8.0 preliminarily. Do that and it should work OK. You

I built i2c outside the kernel using a package for my distribution.

Still it needs to be a version equal to or greater than the version of lm_sensors you are trying to install. Also, make sure that lm_sensors picks the right header files. If you have old i2c header files lying around in /usr/local/include or /use/include, you might want to wipe them out to make sure the newer ones are used.

Quoted 6 lines
Quoted 3 lines

might want to take a look at our installation guide at
http://www.ensicaen.ismra.fr/~delvare/devel/i2c/ since installing i2c 2.8.0 is somewhat tricky.

Is it still the case with 2.8.1, that you have to have the kernel patch applied to build?

Yes, you have.
I'm currently working on an i2c patch for submission into Linux 2.4.23 so that lm_sensors will be easier to install, but for now you are advised to stick to the installation guide says.

That said, Philip Edelbrock's remark is absolutely right. Some, if not most, drivers of our package are useless on Alpha, so if a particular driver doesn't compile for some reason, and you know you won't need it, just remove it from Module.mk so that it isn't compiled at all.

--
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/

#13 lore raw
In reply to Jeff Sacksteder
Quoted 7 lines

The nice
thing is that once you have a working bus, all the chip drivers should
automaticly work on it.

Phil

That was certainly my experience, on a strongARM based embedded system - about
as different to a regular PC as you can get. Once I had the bus interface in

place and updated to the latest in CVS, everything else just worked. Impressive.

J.

#14 lore raw
In reply to Jeff Sacksteder
Quoted 5 lines

Yes, that would explain why you don't detect anything useful. Unless you are able to get a driver (or at least specs) for that XBUS thing, I fear you won't be able to use our drivers at all on your system. And even then, I wonder what kind of bus master you might have and how we'll make it work through that XBUS.

XBUS appears to an ISA bus, so that should be straightforward. It's just finding the on-ramp to the thing...

#15 lore raw
In reply to Jeff Sacksteder

I have successfully built i2c and lm_sensors on my alpha. Sensors-detect reports successfully identified the following-

i2c-velleman.o: i2c Velleman K8000 adapter module version 2.6.5 (20020915) i2c-velleman.o: found device at 0x378.
i2c-dev.o: i2c /dev entries driver module version 2.6.5 (20020915) i2c-dev.o: Registered 'Velleman K8000' as minor 0

No devices appear to be attached to the bus, though. Is there any other information I should make note of before trying to build 2.8 for this device?

#16 lore raw
In reply to Jeff Sacksteder
Quoted 4 lines

I have successfully built i2c and lm_sensors on my alpha. Sensors-detect reports successfully identified the following-

Quoted 8 lines

i2c-velleman.o: i2c Velleman K8000 adapter module version 2.6.5 (20020915) i2c-velleman.o: found device at 0x378. i2c-dev.o: i2c /dev entries driver module version 2.6.5 (20020915) i2c-dev.o: Registered 'Velleman K8000' as minor 0

No devices appear to be attached to the bus, though. Is there any other information I should make note of before trying to build 2.8 for this device?

Two things I'd try:
1* Get sensors-detect from CVS and give it a try. It knows much more than the one in 2.6.5. Of course it will make reference to drivers that you don't have, but just don't care. Feel free to send us the complete output of sensors-detect, it might help us helping you.
2* If the above doesn't give any result, please run "i2cdetect 0" and send us the output of that command.

Signature · 2 lines
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
#17 lore raw
In reply to Jeff Sacksteder
Quoted 5 lines

Two things I'd try:
1* Get sensors-detect from CVS and give it a try. It knows much more than the one in 2.6.5. Of course it will make reference to drivers that you don't have, but just don't care. Feel free to send us the complete output of sensors-detect, it might help us helping you.

Still nothing detected. I am currently trying to work this out from the other end- finding documentation of what chips are on the mainboard.

Quoted 2 lines

2* If the above doesn't give any result, please run "i2cdetect 0" and send us the output of that command.

Strike 2.

www root # i2cdetect 0
WARNING! This program can confuse your I2C bus, cause data loss and worse! I will probe file /dev/i2c-0
You have five seconds to reconsider and press CTRL-C!

0 1 2 3 4 5 6 7 8 9 a b c d e f
00: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 10: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 20: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 30: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 40: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 50: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 60: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 70: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX

#18 lore raw
In reply to Jeff Sacksteder

I have located a block diagram for my server. It appears that the I2C bus hangs off the XBUS(?), whatever that is. Perhaps this is why I can't detect anything?

From a description of the Alpha 2100- I don't know if this is the same as mine.

"Electrical and architectural restrictions prohibited the interrupt control logic from being directly accessed by either the system bus or the PCI bus. As a result, the interrupt control logic is physically located on a utility bus called the XBUS. The XBUS is an 8-bit slave ISA bus placed nearby the PCI-to-EISA bridge chips."

The two pages from the docs are at

http://www.jdfiles.org/a.pdf and
http://www.jdfiles.org/b.pdf

#19 lore raw
In reply to Jeff Sacksteder
Quoted 20 lines
Quoted 5 lines

1* Get sensors-detect from CVS and give it a try. It knows much more than the one in 2.6.5. Of course it will make reference to drivers that you don't have, but just don't care. Feel free to send us the complete output of sensors-detect, it might help us helping you.

Still nothing detected. I am currently trying to work this out from the other end- finding documentation of what chips are on the mainboard.

Quoted 2 lines

2* If the above doesn't give any result, please run "i2cdetect 0" and send us the output of that command.

Strike 2.

www root # i2cdetect 0
WARNING! This program can confuse your I2C bus, cause data loss and worse! I will probe file /dev/i2c-0
You have five seconds to reconsider and press CTRL-C!

Quoted 9 lines

0 1 2 3 4 5 6 7 8 9 a b c d e f
00: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 10: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 20: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 30: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 40: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 50: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 60: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 70: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX

Well...Your bus looks damn empty. Either your bus driver is broken, or there really isn't any chipset connected to it. Maybe there is another I2C bus on your system?

Signature · 2 lines
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
#20 lore raw
In reply to Jeff Sacksteder
Quoted 5 lines

I have located a block diagram for my server. It appears that the I2C bus hangs off the XBUS(?), whatever that is. Perhaps this is why I can't detect anything?
(...)

Yes, that would explain why you don't detect anything useful. Unless you are able to get a driver (or at least specs) for that XBUS thing, I fear you won't be able to use our drivers at all on your system. And even then, I wonder what kind of bus master you might have and how we'll make it work through that XBUS.

Signature · 2 lines
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/