One place to find binding between OF devices and non OF devices is in arch/powerpc/sysdev/fsl_soc.c The typical pattern is: if of_find_compatible_node "of-device-name" platform_device_register_simple ""platform-device-name" platform_device_add_data ...
On 7/3/07, Kári Davíðsson <[EMAIL PROTECTED]> wrote:
Hi, I am attempting to get some non OF devices working for an mpc 5200 board, in particular PCF8563 RTC. This device has an non OF device interface which I believe is correct. After all it should work on non OF platforms. I have managed to get the board to run the i2c initialization (and probe) for the fsl-mpc i2c driver by converting the fsl-mpc i2c driver to OF driver (I found some patch here that I based this work on).
fsl-i2c is one of the devices handled by fsl_soc.c so you shouldn't need to change anything to make it work in the latest kernel. CONFIG_FSL_SOC was only added to lite5200_defconfig recently so that may explain why it's not on in your kernel. Since the PCF8563 driver is not OF driver only its initaliziation code is
run but the .probe function of the driver is never run. Basically (as far as I can understand) the .probe is never run because the driver is not an OF driver. I could convert the PCF8563 driver to OF driver and make it work for our puposes but I feel this is 1) Wrong 2) therefore wasted work.
Since the driver must run on non OF platforms then it should not be converted. You just need to add a platform_device_register somewhere. I don't think fsl_soc.c is the right place since it is not part of an freescale SOC. You could probably put it in a board specific startup routine. What seems to elude me is some glue that glues together the OF part of the
driver space to the non OF part of the driver space. Any hints or pointers on where to find this glue? Regards, kd P.S. Kernel is post 2.6.20. -- Kári Davíðsson | [EMAIL PROTECTED] Hugbúnaðargerð | www.marel.com Tel: 563-8156 Fax: +354 563 8001 Iceland _______________________________________________ Linuxppc-embedded mailing list Linuxppc-embedded@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-embedded
_______________________________________________ Linuxppc-embedded mailing list Linuxppc-embedded@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-embedded