[PATCH] Add platform driver support to the CS890x driver

Jaccon Bastiaansen jaccon.bastiaansen at gmail.com
Mon Sep 12 06:52:52 EDT 2011


Hello Uwe,

2011/9/11 Uwe Kleine-König <u.kleine-koenig at pengutronix.de>:
> Hello Jaccon,
>
> On Sun, Sep 11, 2011 at 07:34:25PM +0200, Jaccon Bastiaansen wrote:
>> >> > hmm, better switch the complete driver to be a platform driver and
>> >> > instead of the legacy probing let it create the corresponding device.
>> >> >
>> >>
>> >> What exactly do you mean with "switch the complete driver to be a
>> >> platform driver"? That I should remove all the legacy from the driver
>> >> (which would break the driver for users who don't use it as a platform
>> >> driver) or that I should add a new probe() function free of legacy
>> >> (which would duplicate code of the existing cs89x0_probe1() function)?
>> > Of course you should not break it for legacy users. Just instead of the
>> > legacy stuff just add a platform device with the respective values such
>> > that the platform driver is used in all cases.
>> >
>> > For extra points move the adding of the device to platform code.
>> >
>>
>> The platform device you mention is added by another patch that I also
>> sent on the the 7th of September (not directly to you, but to Sascha
>> and kernel at pengutronix.de). This patch was called:
>>
>> [PATCH] Add CS890x0 ethernet controller support to the i.MX21ADS
>>
>> In this patch I add a platform device to the i.MX21ADS evaluation
>> board. All the required settings (memory address and IRQ) that the
>> CS890x platform driver needs to run on the i.MX21ADS board are set in
>> the i.MX21ADS specific code. You find the patch below. It this the
>> approach you mean?
> not really. On some machines (e.g arm/imx/mx31ads) some magic constants
> are defined somewhere in arch/ to fill in netcard_portlist and
> cs8900_irq_map. On these machines the cs8900 driver does drive some
> hardware, but not via the platform bus. This is what i want to have
> changed.
>

Ok, so you would like to see the #ifdefs for the IXDP2351, IXDP2X01,
QQ2440 and MX31ADS in the cs890x driver replaced by platform_device
definitions in the platform specific code of those platforms (in the
same way as I have done for the i.MX21ADS platform)? Is this correct?

> Best regards
> Uwe
>
> --
> Pengutronix e.K.                           | Uwe Kleine-König            |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
>

Regards,
  Jaccon



More information about the linux-arm-kernel mailing list