
On Tue, Jun 15, 2010 at 9:14 AM, Ben Warren biggerbadderben@gmail.com wrote:
Hi Douglas,
On Tue, Jun 15, 2010 at 7:24 AM, Douglas Lopes Pereira < douglaslopespereira@gmail.com> wrote:
Hi all,
I managed to get KS8841 driver recognized by u-boot. But I'm certain that it was not in the correct way.
The driver I've found on BlackFin forum was written for a 2008 u-boot version and we are working on a 1.3.1 (very old) version. So I just modify some function calls.
The problem is that the KS8841 driver does not have a ks884x_initialize function. So we created it. All it does is create and fill an eth_device structure. Register it using eth_register function and them it should initialize the PHY (that is what I suppose it should do).
Since I am not sure on how to do that, I just called the ks884x_init function.
It ends in a TRAP message just after the Micrel device being printed at the console.
Could anyone point me out some directions to get my driver correctly initialized?
Looks like that driver's using the old API. I have my new one almost
finished and will send it to you today. Hopefully debugging it will be trivial.
I've just started looking at doing a KS8851 driver (on SPI) for one of the OMAP4 boards.
Did you start from scratch with the KS8841 driver or did you begin with Micrel sample code?
The Micrel sample u-boot driver clearly can't be used as is since it doesn't even come close to following the coding style guidelines (CamelCase, etc) and is for an older u-boot revision.
I'm debating whether it makes more sense to correct the coding style on the vendor code, or just start from scratch. Any advice based on your experience?
Steve