2009/3/31 Wolfram Sang [off-list ref]:
quoted
quoted
quoted
-
- =A0mpc_i2c_setclock(i2c);
+
+ =A0if (set_clock)
+ =A0 =A0 =A0 =A0 =A0mpc_i2c_setclock(i2c);
Can't we drop 'set_clock' with something like this here?
+ =A0 if (!of_get_property(op->node, "fsl,preserve-clocking", NULL)) {
+
+ =A0 =A0 =A0 =A0 =A0 if (of_get_property(op->node, "dfsrr", NULL))
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 i2c->flags |=3D FSL_I2C_DEV_SEPA=
RATE_DFSRR;
quoted
quoted
+
+ =A0 =A0 =A0 =A0 =A0 if (of_device_is_compatible(op->node, "fsl,mpc52=
00-i2c") ||
quoted
quoted
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 of_device_is_compatible(op->node, "mpc52=
00-i2c"))
quoted
quoted
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 i2c->flags |=3D FSL_I2C_DEV_CLOC=
K_5200;
quoted
quoted
+
+ =A0 =A0 =A0 =A0 =A0 mpc_i2c_setclock(i2c);
+ =A0 }
No, because the I2C registers are not yet mapped.
Sorry, I used misleading words :) With 'here' I meant 'at this
position', i.e. insert my above block where mpc_i2c_setclock was used
anyway.
I agree. The extra flag makes the flow more complex. The code block
should be moved down.
g.
--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.