All of lore.kernel.org
 help / color / mirror / Atom feed
* smc911x: how to call the driver?
@ 2008-05-13 16:04 Jens Gehrlein
  2008-05-14  7:07 ` Peter Korsgaard
  0 siblings, 1 reply; 4+ messages in thread
From: Jens Gehrlein @ 2008-05-13 16:04 UTC (permalink / raw)
  To: linuxppc-embedded Mailinglist

Hi,

on our board a SMSC LAN9215i is connected to an i.MX31 ARM processor. My 
hope is to get the smc911x driver run on this chip. The LAN921x data 
sheets say that existing 911x drivers should work.

The first I had to patch was the Kconfig file, in which the smc911x 
driver is only available on PXA architecture:
- depends on NET_ETHERNET && ARCH_PXA
+ depends on NET_ETHERNET && (ARCH_PXA || ARCH_MXC)
So the driver got at least compiled.

My next problem is:
Where and when get the functions smc911x_drv_probe() and smc911x_init() 
called? Any hints?

Thank you in advance.

Best Regards,
Jens

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: smc911x: how to call the driver?
  2008-05-13 16:04 smc911x: how to call the driver? Jens Gehrlein
@ 2008-05-14  7:07 ` Peter Korsgaard
  2008-05-14  8:04   ` Jens Gehrlein
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2008-05-14  7:07 UTC (permalink / raw)
  To: Jens Gehrlein; +Cc: linuxppc-embedded Mailinglist

>>>>> "Jens" == Jens Gehrlein <sew_s@tqs.de> writes:

 Jens> Hi,
 Jens> on our board a SMSC LAN9215i is connected to an i.MX31 ARM
 Jens> processor. My hope is to get the smc911x driver run on this chip. The
 Jens> LAN921x data sheets say that existing 911x drivers should work.

Why are you asking this in a powerpc list?

 Jens> My next problem is:
 Jens> Where and when get the functions smc911x_drv_probe() and
 Jens> smc911x_init() called? Any hints?

You need to register a struct platform_device in your platform code,
E.G. something like:

static struct resource smc911x_resources[] = {
        [0] = {
                .start  = 0x8e000000,
                .end    = 0x8e0000ff,
                .flags  = IORESOURCE_MEM,
        },
        [1] = {
                .start  = 4,
                .end    = 4,
                .flags  = IORESOURCE_IRQ,
        },
};

static struct platform_device thinlite_eth = {
        .name                   = "smc911x",
        .id                     = 0,
        .num_resources          = ARRAY_SIZE(smc911x_resources),
        .resource               = smc911x_resources,
};

And then do a platform_add_devices with it.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: smc911x: how to call the driver?
  2008-05-14  7:07 ` Peter Korsgaard
@ 2008-05-14  8:04   ` Jens Gehrlein
  2008-05-14  8:19     ` Peter Korsgaard
  0 siblings, 1 reply; 4+ messages in thread
From: Jens Gehrlein @ 2008-05-14  8:04 UTC (permalink / raw)
  To: Peter Korsgaard; +Cc: linuxppc-embedded Mailinglist

Hi Peter,

thank you for responding.

Peter Korsgaard schrieb:
>>>>>> "Jens" == Jens Gehrlein <sew_s@tqs.de> writes:
> 
>  Jens> Hi,
>  Jens> on our board a SMSC LAN9215i is connected to an i.MX31 ARM
>  Jens> processor. My hope is to get the smc911x driver run on this chip. The
>  Jens> LAN921x data sheets say that existing 911x drivers should work.
> 
> Why are you asking this in a powerpc list?

Uuh, sorry. In the haste I just read "embedded". Actually, my question 
isn't processor related. Rather it's (network) device driver related.
Could you recommend a mailing list for this?

>  Jens> My next problem is:
>  Jens> Where and when get the functions smc911x_drv_probe() and
>  Jens> smc911x_init() called? Any hints?
> 
> You need to register a struct platform_device in your platform code,
> E.G. something like:
> 
> static struct resource smc911x_resources[] = {
>         [0] = {
>                 .start  = 0x8e000000,
>                 .end    = 0x8e0000ff,
>                 .flags  = IORESOURCE_MEM,
>         },
>         [1] = {
>                 .start  = 4,
>                 .end    = 4,
>                 .flags  = IORESOURCE_IRQ,
>         },
> };
> 
> static struct platform_device thinlite_eth = {
>         .name                   = "smc911x",
>         .id                     = 0,
>         .num_resources          = ARRAY_SIZE(smc911x_resources),
>         .resource               = smc911x_resources,
> };
> 
> And then do a platform_add_devices with it.

Mmmh, this is all new to me. I'll try to get through it and perhaps 
we'll meet on the other mailinglist again.

Thank you very much so far.

Best Regards,
Jens

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: smc911x: how to call the driver?
  2008-05-14  8:04   ` Jens Gehrlein
@ 2008-05-14  8:19     ` Peter Korsgaard
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2008-05-14  8:19 UTC (permalink / raw)
  To: Jens Gehrlein; +Cc: linuxppc-embedded Mailinglist

>>>>> "Jens" == Jens Gehrlein <sew_s@tqs.de> writes:

Hi,

 Jens> on our board a SMSC LAN9215i is connected to an i.MX31 ARM
 Jens> processor. My hope is to get the smc911x driver run on this chip. The
 Jens> LAN921x data sheets say that existing 911x drivers should work.
 >> 
 >> Why are you asking this in a powerpc list?

 Jens> Uuh, sorry. In the haste I just read "embedded". Actually, my question
 Jens> isn't processor related. Rather it's (network) device driver related.
 Jens> Could you recommend a mailing list for this?

netdev@vger.kernel.org (see http://vger.kernel.org/vger-lists.html).

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-05-14  8:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-13 16:04 smc911x: how to call the driver? Jens Gehrlein
2008-05-14  7:07 ` Peter Korsgaard
2008-05-14  8:04   ` Jens Gehrlein
2008-05-14  8:19     ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.