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: Using Linux 2.6.19 with Xilinx ML405
Date: Wed, 04 Apr 2007 15:26:04 +0200	[thread overview]
Message-ID: <878xd8qnir.fsf@sleipner.barco.com> (raw)
In-Reply-To: <46139148.1080308@computing.dundee.ac.uk> (Peter Mendham's message of "Wed, 04 Apr 2007 12:51:36 +0100")

>>>>> "PM" == Peter Mendham <petermendham@computing•dundee.ac.uk> writes:

Hi,

PM> Brilliant!  Thanks.  The code your patch produces expects there to
PM> be an 8250 compatible UART around.  What happens if I only have a
PM> UARTlite?  What do I need to fill in to a platform_device
PM> structure for a UARTlite?

Something like:

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

static struct platform_device myboard_uartlite = {
	.name			= "uartlite",
	.id			= 0,
	.num_resources		= ARRAY_SIZE(myboarduartlite_resources),
	.resource		= myboarduartlite_resources,
};

static struct platform_device *myboard_devices[] __initdata = {
	..
	&myboard_uartlite,
        ..
};

static int __init
myboard_platform_add_devices(void)
{
	return platform_add_devices(myboard_devices,
                ARRAY_SIZE(myboard_devices));

}
arch_initcall(myboard_platform_add_devices);

Notice the +3 for the base address as the registers are accessed using
8bit I/O.

PM> I have just moved to 2.6.20 kernel in the hope of using the
PM> mainline uartlite driver - was this a stupid thing to do?

Not if you ask me ;)

PM> Do you know if I can use it for early serial in the same way as an
PM> 8250?

Unfortunately not. I started working on some patches for this some
months ago, but got stalled doing other stuff. I doubt it will get
integrated before the move to arch/powerpc.

-- 
Bye, Peter Korsgaard

  reply	other threads:[~2007-04-04 13:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-03 13:09 Using Linux 2.6.19 with Xilinx ML405 Peter Mendham
2007-04-03 17:27 ` Andrei Konovalov
2007-04-04 11:51   ` Peter Mendham
2007-04-04 13:26     ` Peter Korsgaard [this message]
2007-04-19  6:28       ` David H. Lynch Jr.
2007-04-04 13:55     ` Andrei Konovalov
2007-04-04 14:30       ` Peter Korsgaard
  -- strict thread matches above, loose matches on Subject: below --
2007-04-04 15:15 Leonid

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=878xd8qnir.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