回复: RE: A question about the 8250/16550 Driver
旭 罗
luoxu_gun at yahoo.com.cn
Fri Apr 18 02:44:43 EST 2008
Hello Leo:
Follow your advises, i look the source code and find that you are right. In the source code, There are 2 functions can do some work for the serial port initralization. The code is followed.
1. static int __devinit serial8250_probe(struct platform_device *dev)
2. static void __init serial8250_isa_init_ports(void)
In my system i use the function 2 and this function should use the structer old_serial_port.
In fact the function 1 can initralize the serial port too. But i don't known how to call this function.
For the more, i have find some source code in of_serial.c which is in the \drivers\serial directory. In this file, the function
static int __devinit of_platform_serial_probe(struct of_device *ofdev,
const struct of_device_id *id)
call the serial8250_register_port function to initralized the serial port.
This issues makes me puzzlled, Could you help me to analyzed it? and what kind of the function i should used to initralize my serial port.
thanks
best wishs
Li Yang <LeoLi at freescale.com> 写道: > -----Original Message-----
> From: linuxppc-dev-bounces+leoli=freescale.com at ozlabs.org
> [mailto:linuxppc-dev-bounces+leoli=freescale.com at ozlabs.org]
> On Behalf Of 旭 罗
> Sent: Thursday, April 17, 2008 3:32 PM
> To: Linu PPC Mail list
> Cc: Wood Scott
> Subject: A question about the 8250/16550 Driver
>
> Hello:
> I have founded that the serial can't be initialized as
> the bootting process. My platform is MPC8313 and my kernel
> version is linux-2.6.23.9. I look though the source code and
> find that the MPC8313 driver is compatible with 8250/16550.
> The driver is in the \drivers\serial\8250.c
>
> In the function serial8250_isa_init_ports we should use the
> structer old_serial_port but i can't find the definition for
> this struct. I can only find the following senrense in the
> head of this file
If you look into the function carefully enough, you can find that old_serial_port is optional and can be empty. It seems to be some leftover to provide backward compatibility when the port structure changed.
- Leo
---------------------------------
雅虎邮箱,您的终生邮箱!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20080418/0557a392/attachment.htm>
More information about the Linuxppc-dev
mailing list