public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ben Warren <biggerbadderben@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Micrel Controller KSZ8841-16MBL
Date: Tue, 22 Jun 2010 17:26:09 -0700	[thread overview]
Message-ID: <4C2154A1.2070201@gmail.com> (raw)
In-Reply-To: <AANLkTilgP7tNnVDkK77y5rx0eygD0Ahs-F0FFOIByOba@mail.gmail.com>

Hi Steve,

On 6/22/2010 4:44 PM, Steve Sakoman wrote:
> 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 at 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?
>
>    
A few years ago I wrote a driver for KS8841 and got it working (16-bit 
memory-mapped on PowerPC).  I started with the Micrel driver, but as you 
know it's pretty ugly.  Last week I dusted off that old driver and got 
it to compile with the latest U-boot, but wasn't able to test it because 
the company that I worked for is long gone.  It's hopefully close to 
functional, but still has too many style issues to post publicly.  I 
sent the driver to Douglas off-line, and am awaiting feedback.  If you'd 
like, I can send it to you too.  It'd be nice to have a single driver 
that handles different chips, but with configurable accessors.
> Steve
>    
regards,
Ben

  reply	other threads:[~2010-06-23  0:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-10 19:02 [U-Boot] Micrel Controller KSZ8841-16MBL Douglas Lopes Pereira
2010-06-10 19:18 ` Ben Warren
2010-06-10 19:56   ` Douglas Lopes Pereira
2010-06-13  2:35   ` Mike Frysinger
2010-06-13  4:18     ` Ben Warren
2010-06-15 14:24       ` Douglas Lopes Pereira
2010-06-15 16:14         ` Ben Warren
2010-06-22 23:44           ` Steve Sakoman
2010-06-23  0:26             ` Ben Warren [this message]
2010-06-23  1:39               ` Douglas Lopes Pereira
2010-06-23  2:25               ` Steve Sakoman
2010-06-29 15:08                 ` Douglas Lopes Pereira
2010-07-01 17:25                   ` Steve Sakoman
2010-07-02  1:00                     ` Ben Warren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C2154A1.2070201@gmail.com \
    --to=biggerbadderben@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox