Skip to contentSkip to conversation

A question about the 8250/16550 Driver

DISCUSSION 旭 罗 2 participants 3 messages Apr 17, 2008

lore
Share & tools
lore

旭 罗

author
#0 lore raw

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

#ifndef SERIAL_PORT_DFNS
#define SERIAL_PORT_DFNS
#endif

static const struct old_serial_port old_serial_port[] = {
SERIAL_PORT_DFNS /* defined in asm/serial.h */
};

i think this is a bug for this driver. Could any one can told me how to define the SERIAL_PORT_DFNS for the MPC8313 system? Hi Scott, Have you ever find this problem and how do you solve it.

Thanks
Best Wishs

---------------------------------
雅虎邮箱,您的终生邮箱!

#1 lore raw
Quoted 12 lines

-----Original Message-----
From: [email protected]=20 [mailto:[email protected]]=20 On Behalf Of =D0=F1 =C2=DE
Sent: Thursday, April 17, 2008 3:32 PM
To: Linu PPC Mail list
Cc: Wood Scott
Subject: A question about the 8250/16550 Driver
=20
Hello:
I have founded that the serial can't be initialized as=20
the bootting process. My platform is MPC8313 and my kernel=20

Quoted 8 lines

version is linux-2.6.23.9. I look though the source code and=20 find that the MPC8313 driver is compatible with 8250/16550.=20 The driver is in the \drivers\serial\8250.c
=20
In the function serial8250_isa_init_ports we should use the=20 structer old_serial_port but i can't find the definition for=20 this struct. I can only find the following senrense in the=20 head of this file=20

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

author
#2 lore raw

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 <[email protected]> 写道: > -----Original Message-----

Quoted 15 lines

From: [email protected] [mailto:[email protected]] 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

Quoted 4 lines

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

---------------------------------
雅虎邮箱,您的终生邮箱!