Skip to contentSkip to conversation

Using Linux 2.6.19 with Xilinx ML405

DISCUSSION Leonid 1 participant 1 message Apr 4, 2007

lore
Share & tools
lore

Leonid

author
#0 lore raw

Take a look in 2.6.20 kernel - it's said to be supporting uartlite - u = can port it back to 2.6.19.

-----Original Message-----
From: "Peter Korsgaard" <[email protected]>
To: "[email protected]" <[email protected]>
Sent: 4/4/07 6:33 AM
Subject: Re: Using Linux 2.6.19 with Xilinx ML405

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"PM" =3D=3D Peter Mendham <[email protected]> =

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[] =3D {
	[0] =3D {
		.start  =3D 0xa1000003,
		.end    =3D 0xa1000012,
		.flags  =3D IORESOURCE_MEM,
	},
	[1] =3D {
		.start	=3D 2,
		.end	=3D 2,
		.flags	=3D IORESOURCE_IRQ,
	},
};
static struct platform_device myboard_uartlite =3D {
	.name			=3D "uartlite",
	.id			=3D 0,
	.num_resources		=3D ARRAY_SIZE(myboarduartlite_resources),
	.resource		=3D myboarduartlite_resources,
};
static struct platform_device *myboard_devices[] __initdata =3D {
	..
	&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.

--=20
Bye, Peter Korsgaard
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded