Skip to contentSkip to conversation

adding entry for mpc8360

i2c-mpc.c Richard Retanubun 2 participants 3 messages Jan 12, 2012 – Jan 13, 2012 2 messages not in the archive I2C subsystem host drivers

lore
Share & tools
lore
#0 lore raw

Hello,

I am wondering if it is okay to add .compatible entries for mpc8360 and declare its data structure to mpc-i2c.c

something like this:

{.compatible = "fsl,mpc8360-i2c", .data = &mpc_i2c_data_8360, },

static struct mpc_i2c_data mpc_i2c_data_8360 __devinitdata = {
	.setup = mpc_i2c_setup_8xxx,
};

or is the intended approach to match the closest thing to your CPU (in this case mpc8313) ?

Signature · 1 line
Richard Retanubun

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

Hello,

I added the "devicetree-discuss" ml.

Quoted 8 lines · Richard Retanubun

Hello,

I am wondering if it is okay to add .compatible entries for mpc8360 and declare its data structure
to mpc-i2c.c

something like this:

Quoted 8 lines

{.compatible = "fsl,mpc8360-i2c", .data = &mpc_i2c_data_8360, },

static struct mpc_i2c_data mpc_i2c_data_8360 __devinitdata = {
    .setup = mpc_i2c_setup_8xxx,
};

or is the intended approach to match the closest thing to your CPU (in this case mpc8313) ?

Yes, it is intended to use the name of the compatible device, see:

http://lxr.linux.no/#linux+v3.2.1/arch/powerpc/boot/dts/kmeter1.dts#L69

Wolfgang

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 19 lines · Wolfgang Grandegger

Hello,

I added the "devicetree-discuss" ml.

Quoted 14 lines · Richard Retanubun

Hello,

I am wondering if it is okay to add .compatible entries for mpc8360 and declare its data structure
to mpc-i2c.c

something like this:

{.compatible = "fsl,mpc8360-i2c", .data =&mpc_i2c_data_8360, },

static struct mpc_i2c_data mpc_i2c_data_8360 __devinitdata = {
     .setup = mpc_i2c_setup_8xxx,
};
Quoted 8 lines
Quoted 2 lines

or is the intended approach to match the closest thing to your CPU (in this case mpc8313) ?

Yes, it is intended to use the name of the compatible device, see:

http://lxr.linux.no/#linux+v3.2.1/arch/powerpc/boot/dts/kmeter1.dts#L69

Wolfgang

Thanks for the speedy response!

Two observations based on recent experiments to share with the ml:

1. The i2c-mpc does not take into account freescale APP note AN2919 and for boards where the default dfsr setting violates condition #1. the i2c_transfer will exit with a -EIO due to timeout once in a while.

2. For boards that uses u-boot as bootloader, its fsl-i2c driver implements condition #1 checking. Thus using fsl,preserve-clocking is the way to go for now.

Richard