[ELDK] I2C device node on 440EPx

Detlev Zundel dzu at denx.de
Wed Mar 12 11:34:56 CET 2008


Hi Marko,

> I am using an AMCC 440EPx processor on "Sequoia" board with Linux 2.6.21rc4. I
> am trying to use the i2c in the user-space

What kernel exactly are you using?  As you do not mention what tag or
what repository you used, I assume the kernel.org tree - but there is no
sequoia configuration in v2.6.21-rc4 ...

Why do you work with such an old kernel?  I would suggest you try the
latest from our DENX-v2.6.24-stable branch.

> In my Linux config file (Sequoia default) i have:
> CONFIG_I2C=y
> CONFIG_I2C_CHARDEV=y

What about

drivers/i2c/busses/Kconfig:242
 "General setup"
    --->  "Device Drivers"
        --->  "I2C Hardware Bus support"
config I2C_IBM_IIC
       tristate "IBM PPC 4xx on-chip I2C interface"
       depends on !PPC_MERGE
       help
         Say Y here if you want to use IIC peripheral found on 
         embedded IBM PPC 4xx based systems. 

         This driver can also be built as a module.  If so, the
         module will be called i2c-ibm_iic.

If this is set, you should see the following

bash-3.00# cat /proc/devices | grep i2c
 89 i2c

If this is the case, plus the options you mentioned above, everything
should be working.

> I than added the "i2c-0" device in /dev (# mknod i2c-0 c 89 0)
> When I run a simple program to open the device (provided by the
> "dev-interface" file of i2c kernel documentation) it returns errno
> message: "No such device".

Check /proc/devices as shown above to see if there is a driver "behind"
this major number.

Cheers
  Detlev

-- 
The fact is, volatile on data structures is a bug. It's a wart in the C 
language. It shouldn't be used.
                                   -- Linus Torvalds 
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de


More information about the eldk mailing list