All of lore.kernel.org
 help / color / mirror / Atom feed
* MPC8260 I2C Problem
@ 2007-01-25  3:21 jimmy liu
  2007-01-25  3:36 ` Li Yang-r58472
  0 siblings, 1 reply; 7+ messages in thread
From: jimmy liu @ 2007-01-25  3:21 UTC (permalink / raw)
  To: embedded linuxppc

I download the linux kernel 2.6.19 from
ftp://ftp.denx.de/pub/linux/ site.

When I add mpc8260 I2C driver to Linux kernel 2.6.19,
the init function looks like that
static int __init fsl_i2c_init(void)
{
	return driver_register(&fsl_i2c_driver);
}
I set the debug on, and found that the fsl_i2c_probe()
function is never called, so there is not I2C device
enabled, and the user space function
open("/dev/i2c-0",O_RDWR) always return error. I set
something wrong? Could somebody help me?




 
____________________________________________________________________________________
Get your own web address.  
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL

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

* RE: MPC8260 I2C Problem
  2007-01-25  3:21 MPC8260 I2C Problem jimmy liu
@ 2007-01-25  3:36 ` Li Yang-r58472
  2007-01-25  4:11   ` gear
  2007-01-25 17:06   ` jimmy liu
  0 siblings, 2 replies; 7+ messages in thread
From: Li Yang-r58472 @ 2007-01-25  3:36 UTC (permalink / raw)
  To: jimmy liu, embedded linuxppc

> -----Original Message-----
> From: linuxppc-embedded-bounces+leoli=3Dfreescale.com@ozlabs.org
> [mailto:linuxppc-embedded-bounces+leoli=3Dfreescale.com@ozlabs.org] On
Behalf Of
> jimmy liu
> Sent: Thursday, January 25, 2007 11:22 AM
> To: embedded linuxppc
> Subject: MPC8260 I2C Problem
>=20
> I download the linux kernel 2.6.19 from
> ftp://ftp.denx.de/pub/linux/ site.
>=20
> When I add mpc8260 I2C driver to Linux kernel 2.6.19,
> the init function looks like that
> static int __init fsl_i2c_init(void)
> {
> 	return driver_register(&fsl_i2c_driver);
> }
> I set the debug on, and found that the fsl_i2c_probe()
> function is never called, so there is not I2C device
> enabled, and the user space function
> open("/dev/i2c-0",O_RDWR) always return error. I set
> something wrong? Could somebody help me?

Do you have an fsl-i2c node in your device tree?

- Leo

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

* Re: MPC8260 I2C Problem
  2007-01-25  3:36 ` Li Yang-r58472
@ 2007-01-25  4:11   ` gear
  2007-01-25 17:06   ` jimmy liu
  1 sibling, 0 replies; 7+ messages in thread
From: gear @ 2007-01-25  4:11 UTC (permalink / raw)
  To: Li Yang-r58472; +Cc: jimmy liu, embedded linuxppc

hi Leo

You must check the platform bus.
My MPC8270 board's tree is follow.

MPC8270:/sys/bus/platform# tree .
=2E
|-- devices
|   |-- fsl-cpm-fcc.1 -> ../../../devices/platform/fsl-cpm-fcc.1
|   |-- fsl-cpm-fcc.2 -> ../../../devices/platform/fsl-cpm-fcc.2
|   |-- fsl-cpm-fcc.3 -> ../../../devices/platform/fsl-cpm-fcc.3
|   |-- fsl-cpm-i2c.1 -> ../../../devices/platform/fsl-cpm-i2c.1
|   |-- fsl-cpm-mcc.1 -> ../../../devices/platform/fsl-cpm-mcc.1
|   |-- fsl-cpm-scc.1 -> ../../../devices/platform/fsl-cpm-scc.1
|   |-- fsl-cpm-scc.2 -> ../../../devices/platform/fsl-cpm-scc.2
|   |-- fsl-cpm-scc.3 -> ../../../devices/platform/fsl-cpm-scc.3
|   |-- fsl-cpm-scc.4 -> ../../../devices/platform/fsl-cpm-scc.4
|   |-- fsl-cpm-smc.1 -> ../../../devices/platform/fsl-cpm-smc.1
|   |-- fsl-cpm-smc.2 -> ../../../devices/platform/fsl-cpm-smc.2
|   |-- fsl-cpm-spi.1 -> ../../../devices/platform/fsl-cpm-spi.1

- hirohata

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

* RE: MPC8260 I2C Problem
  2007-01-25  3:36 ` Li Yang-r58472
  2007-01-25  4:11   ` gear
@ 2007-01-25 17:06   ` jimmy liu
  2007-01-26  5:50     ` Li Yang-r58472
  1 sibling, 1 reply; 7+ messages in thread
From: jimmy liu @ 2007-01-25 17:06 UTC (permalink / raw)
  To: embedded linuxppc

In the arch\ppc\syslib\pq2_devices.c, there has the
device descriptions.
Do I still need manually create the plateform bus
tree?

--- Li Yang-r58472 <LeoLi@freescale.com> wrote:

> > -----Original Message-----
> > From:
>
linuxppc-embedded-bounces+leoli=freescale.com@ozlabs.org
> >
>
[mailto:linuxppc-embedded-bounces+leoli=freescale.com@ozlabs.org]
> On
> Behalf Of
> > jimmy liu
> > Sent: Thursday, January 25, 2007 11:22 AM
> > To: embedded linuxppc
> > Subject: MPC8260 I2C Problem
> > 
> > I download the linux kernel 2.6.19 from
> > ftp://ftp.denx.de/pub/linux/ site.
> > 
> > When I add mpc8260 I2C driver to Linux kernel
> 2.6.19,
> > the init function looks like that
> > static int __init fsl_i2c_init(void)
> > {
> > 	return driver_register(&fsl_i2c_driver);
> > }
> > I set the debug on, and found that the
> fsl_i2c_probe()
> > function is never called, so there is not I2C
> device
> > enabled, and the user space function
> > open("/dev/i2c-0",O_RDWR) always return error. I
> set
> > something wrong? Could somebody help me?
> 
> Do you have an fsl-i2c node in your device tree?
> 
> - Leo
> 



 
____________________________________________________________________________________
Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html 

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

* RE: MPC8260 I2C Problem
  2007-01-25 17:06   ` jimmy liu
@ 2007-01-26  5:50     ` Li Yang-r58472
  2007-01-26 14:53       ` jimmy liu
  2007-01-27  4:31       ` jimmy liu
  0 siblings, 2 replies; 7+ messages in thread
From: Li Yang-r58472 @ 2007-01-26  5:50 UTC (permalink / raw)
  To: jimmy liu, embedded linuxppc

You are talking about the wrong i2c driver.  For 8260, you need a cpm
i2c driver, not the i2c-mpc driver.

- Leo

> -----Original Message-----
> From: linuxppc-embedded-bounces+leoli=3Dfreescale.com@ozlabs.org
> [mailto:linuxppc-embedded-bounces+leoli=3Dfreescale.com@ozlabs.org] On
Behalf Of
> jimmy liu
> Sent: Friday, January 26, 2007 1:06 AM
> To: embedded linuxppc
> Subject: RE: MPC8260 I2C Problem
>=20
> In the arch\ppc\syslib\pq2_devices.c, there has the
> device descriptions.
> Do I still need manually create the plateform bus
> tree?
>=20
> --- Li Yang-r58472 <LeoLi@freescale.com> wrote:
>=20
> > > -----Original Message-----
> > > From:
> >
> linuxppc-embedded-bounces+leoli=3Dfreescale.com@ozlabs.org
> > >
> >
> [mailto:linuxppc-embedded-bounces+leoli=3Dfreescale.com@ozlabs.org]
> > On
> > Behalf Of
> > > jimmy liu
> > > Sent: Thursday, January 25, 2007 11:22 AM
> > > To: embedded linuxppc
> > > Subject: MPC8260 I2C Problem
> > >
> > > I download the linux kernel 2.6.19 from
> > > ftp://ftp.denx.de/pub/linux/ site.
> > >
> > > When I add mpc8260 I2C driver to Linux kernel
> > 2.6.19,
> > > the init function looks like that
> > > static int __init fsl_i2c_init(void)
> > > {
> > > 	return driver_register(&fsl_i2c_driver);
> > > }
> > > I set the debug on, and found that the
> > fsl_i2c_probe()
> > > function is never called, so there is not I2C
> > device
> > > enabled, and the user space function
> > > open("/dev/i2c-0",O_RDWR) always return error. I
> > set
> > > something wrong? Could somebody help me?
> >
> > Do you have an fsl-i2c node in your device tree?
> >
> > - Leo
> >
>=20
>=20
>=20
>=20
>
________________________________________________________________________
______
> ______
> Don't pick lemons.
> See all the new 2007 cars at Yahoo! Autos.
> http://autos.yahoo.com/new_cars.html
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded

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

* RE: MPC8260 I2C Problem
  2007-01-26  5:50     ` Li Yang-r58472
@ 2007-01-26 14:53       ` jimmy liu
  2007-01-27  4:31       ` jimmy liu
  1 sibling, 0 replies; 7+ messages in thread
From: jimmy liu @ 2007-01-26 14:53 UTC (permalink / raw)
  To: Li Yang-r58472, embedded linuxppc

I am sure that I used i2c-mpc8260.c in the
drivers\i2c\busses folder, it is for mpc8260.

--- Li Yang-r58472 <LeoLi@freescale.com> wrote:

> You are talking about the wrong i2c driver.  For
> 8260, you need a cpm
> i2c driver, not the i2c-mpc driver.
> 
> - Leo
> 
> > -----Original Message-----
> > From:
>
linuxppc-embedded-bounces+leoli=freescale.com@ozlabs.org
> >
>
[mailto:linuxppc-embedded-bounces+leoli=freescale.com@ozlabs.org]
> On
> Behalf Of
> > jimmy liu
> > Sent: Friday, January 26, 2007 1:06 AM
> > To: embedded linuxppc
> > Subject: RE: MPC8260 I2C Problem
> > 
> > In the arch\ppc\syslib\pq2_devices.c, there has
> the
> > device descriptions.
> > Do I still need manually create the plateform bus
> > tree?
> > 
> > --- Li Yang-r58472 <LeoLi@freescale.com> wrote:
> > 
> > > > -----Original Message-----
> > > > From:
> > >
> >
>
linuxppc-embedded-bounces+leoli=freescale.com@ozlabs.org
> > > >
> > >
> >
>
[mailto:linuxppc-embedded-bounces+leoli=freescale.com@ozlabs.org]
> > > On
> > > Behalf Of
> > > > jimmy liu
> > > > Sent: Thursday, January 25, 2007 11:22 AM
> > > > To: embedded linuxppc
> > > > Subject: MPC8260 I2C Problem
> > > >
> > > > I download the linux kernel 2.6.19 from
> > > > ftp://ftp.denx.de/pub/linux/ site.
> > > >
> > > > When I add mpc8260 I2C driver to Linux kernel
> > > 2.6.19,
> > > > the init function looks like that
> > > > static int __init fsl_i2c_init(void)
> > > > {
> > > > 	return driver_register(&fsl_i2c_driver);
> > > > }
> > > > I set the debug on, and found that the
> > > fsl_i2c_probe()
> > > > function is never called, so there is not I2C
> > > device
> > > > enabled, and the user space function
> > > > open("/dev/i2c-0",O_RDWR) always return error.
> I
> > > set
> > > > something wrong? Could somebody help me?
> > >
> > > Do you have an fsl-i2c node in your device tree?
> > >
> > > - Leo
> > >
> > 
> > 
> > 
> > 
> >
>
________________________________________________________________________
> ______
> > ______
> > Don't pick lemons.
> > See all the new 2007 cars at Yahoo! Autos.
> > http://autos.yahoo.com/new_cars.html
> > _______________________________________________
> > Linuxppc-embedded mailing list
> > Linuxppc-embedded@ozlabs.org
> >
>
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
> 




 
____________________________________________________________________________________
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.
http://answers.yahoo.com/dir/?link=list&sid=396546091

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

* RE: MPC8260 I2C Problem
  2007-01-26  5:50     ` Li Yang-r58472
  2007-01-26 14:53       ` jimmy liu
@ 2007-01-27  4:31       ` jimmy liu
  1 sibling, 0 replies; 7+ messages in thread
From: jimmy liu @ 2007-01-27  4:31 UTC (permalink / raw)
  To: Li Yang-r58472, embedded linuxppc

I got it.

In the board environment, we have to define the
BOARD_CHIP_NAME. It looks like:
#define BOARD_CHIP_NAME "8260"

--- Li Yang-r58472 <LeoLi@freescale.com> wrote:

> You are talking about the wrong i2c driver.  For
> 8260, you need a cpm
> i2c driver, not the i2c-mpc driver.
> 
> - Leo
> 
> > -----Original Message-----
> > From:
>
linuxppc-embedded-bounces+leoli=freescale.com@ozlabs.org
> >
>
[mailto:linuxppc-embedded-bounces+leoli=freescale.com@ozlabs.org]
> On
> Behalf Of
> > jimmy liu
> > Sent: Friday, January 26, 2007 1:06 AM
> > To: embedded linuxppc
> > Subject: RE: MPC8260 I2C Problem
> > 
> > In the arch\ppc\syslib\pq2_devices.c, there has
> the
> > device descriptions.
> > Do I still need manually create the plateform bus
> > tree?
> > 
> > --- Li Yang-r58472 <LeoLi@freescale.com> wrote:
> > 
> > > > -----Original Message-----
> > > > From:
> > >
> >
>
linuxppc-embedded-bounces+leoli=freescale.com@ozlabs.org
> > > >
> > >
> >
>
[mailto:linuxppc-embedded-bounces+leoli=freescale.com@ozlabs.org]
> > > On
> > > Behalf Of
> > > > jimmy liu
> > > > Sent: Thursday, January 25, 2007 11:22 AM
> > > > To: embedded linuxppc
> > > > Subject: MPC8260 I2C Problem
> > > >
> > > > I download the linux kernel 2.6.19 from
> > > > ftp://ftp.denx.de/pub/linux/ site.
> > > >
> > > > When I add mpc8260 I2C driver to Linux kernel
> > > 2.6.19,
> > > > the init function looks like that
> > > > static int __init fsl_i2c_init(void)
> > > > {
> > > > 	return driver_register(&fsl_i2c_driver);
> > > > }
> > > > I set the debug on, and found that the
> > > fsl_i2c_probe()
> > > > function is never called, so there is not I2C
> > > device
> > > > enabled, and the user space function
> > > > open("/dev/i2c-0",O_RDWR) always return error.
> I
> > > set
> > > > something wrong? Could somebody help me?
> > >
> > > Do you have an fsl-i2c node in your device tree?
> > >
> > > - Leo
> > >
> > 
> > 
> > 
> > 
> >
>
________________________________________________________________________
> ______
> > ______
> > Don't pick lemons.
> > See all the new 2007 cars at Yahoo! Autos.
> > http://autos.yahoo.com/new_cars.html
> > _______________________________________________
> > Linuxppc-embedded mailing list
> > Linuxppc-embedded@ozlabs.org
> >
>
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
> 



 
____________________________________________________________________________________
Looking for earth-friendly autos? 
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
http://autos.yahoo.com/green_center/

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

end of thread, other threads:[~2007-01-27  4:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-25  3:21 MPC8260 I2C Problem jimmy liu
2007-01-25  3:36 ` Li Yang-r58472
2007-01-25  4:11   ` gear
2007-01-25 17:06   ` jimmy liu
2007-01-26  5:50     ` Li Yang-r58472
2007-01-26 14:53       ` jimmy liu
2007-01-27  4:31       ` jimmy liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.