public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Peter Korsgaard <jacmet@sunsite•dk>
To: Jens Gehrlein <sew_s@tqs•de>
Cc: linuxppc-embedded Mailinglist <linuxppc-embedded@ozlabs•org>
Subject: Re: smc911x: how to call the driver?
Date: Wed, 14 May 2008 09:07:24 +0200	[thread overview]
Message-ID: <87hcd1749f.fsf@macbook.be.48ers.dk> (raw)
In-Reply-To: <4829BC19.5000909@tqs.de> (Jens Gehrlein's message of "Tue\, 13 May 2008 18\:04\:41 +0200")

>>>>> "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

  reply	other threads:[~2008-05-14  7:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-13 16:04 smc911x: how to call the driver? Jens Gehrlein
2008-05-14  7:07 ` Peter Korsgaard [this message]
2008-05-14  8:04   ` Jens Gehrlein
2008-05-14  8:19     ` Peter Korsgaard

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=87hcd1749f.fsf@macbook.be.48ers.dk \
    --to=jacmet@sunsite$(echo .)dk \
    --cc=linuxppc-embedded@ozlabs$(echo .)org \
    --cc=sew_s@tqs$(echo .)de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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