public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Peter Korsgaard <jacmet@sunsite•dk>
To: linuxppc-embedded@ozlabs•org
Subject: Re: [PATCH] Xilinx UART Lite 2.6.18 driver
Date: Fri, 13 Oct 2006 09:08:34 +0200	[thread overview]
Message-ID: <87ejtcvgjx.fsf@sleipner.barco.com> (raw)
In-Reply-To: <609d5c8e0610121412o1288ef6i667b908597bf3d76@mail.gmail.com> (David Bolcsfoldi's message of "Thu, 12 Oct 2006 14:12:24 -0700")

>>>>> "David" == David Bolcsfoldi <dbolcsfoldi@gmail•com> writes:

Hi,

David> No I did not know that unfortunately, it could have saved me
David> some work.  You are of course right and I'd much prefer to make
David> changes to your driver instead of writing another one.

It unfortunately happens all the time - Googling a bit around before
writing code often pays off ;)

David> I've noticed that in the probe function it tries to get some
David> resources from the platform_device structure but it looks like
David> that this operation will always fail unless I add a 'uartlite'
David> platform device or have I completely misunderstood how platform
David> devices work?

Yes, you need a platform device with the info, E.G. something like:


#include <linux/platform_device.h>

static struct resource myuartlite_resources[] = {
       [0] = {
                 .start  = 0xa1000003,
                 .end    = 0xa1000012,
                 .flags  = IORESOURCE_MEM,
              },
       [1] = {
                 .start  = 2,
                 .end    = 2,
                 .flags  = IORESOURCE_IRQ,
       },
};

static struct platform_device my_uartlite = {
       .name                    = "uartlite",
       .id                      = 0,
       .num_resources           = ARRAY_SIZE(myuartlite_resources),
       .resource                = myuartlite_resources,
       .dev.platform_data       = 0,
};

Which you then add to the platform bus (platform_add_devices).

David> But yes, I will try to add support for the things I need to
David> this driver instead, most importantly early console support and
David> move the #defines for register offsets and such into a separate
David> header file per Grants comment.

Great!

-- 
Bye, Peter Korsgaard

      parent reply	other threads:[~2006-10-13  7:08 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-10 20:49 [PATCH] Xilinx UART Lite 2.6.18 driver David Bolcsfoldi
2006-10-10 22:04 ` Grant Likely
2006-10-11 22:06 ` David H. Lynch Jr.
2006-10-12 10:34 ` Peter Korsgaard
2006-10-12 21:12   ` David Bolcsfoldi
2006-10-13  5:21     ` David Bolcsfoldi
2006-10-13  7:04       ` David H. Lynch Jr.
2006-10-13  7:22         ` Peter Korsgaard
     [not found]           ` <45329C42.3030000@dlasys.net>
2006-10-16 19:42             ` Peter Korsgaard
2006-10-13  7:11       ` Peter Korsgaard
2006-10-15 23:48         ` David Bolcsfoldi
2006-10-20 19:41           ` Peter Korsgaard
2006-10-27 15:03             ` Peter Korsgaard
2006-10-28  3:29               ` David H. Lynch Jr.
2006-10-30  8:23                 ` Peter Korsgaard
2006-10-31 17:26                   ` David H. Lynch Jr.
2006-10-30 19:45               ` David Bolcsfoldi
2006-11-06 15:44                 ` Peter Korsgaard
2006-10-13  6:48     ` David H. Lynch Jr.
2006-10-13  7:15       ` Peter Korsgaard
2006-10-15 21:02         ` David H. Lynch Jr.
2006-10-16 19:49           ` Peter Korsgaard
2006-10-16 19:52           ` Peter Korsgaard
2006-10-13  7:08     ` Peter Korsgaard [this message]

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=87ejtcvgjx.fsf@sleipner.barco.com \
    --to=jacmet@sunsite$(echo .)dk \
    --cc=linuxppc-embedded@ozlabs$(echo .)org \
    /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