Serial Driver of openmoko

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Serial Driver of openmoko

r3wDy
Hi Folkz!
Im Rudi i am a 28 yrs old software engineer from germany :)
Im writing to this list because i need some information on the openmoko
kernel. Its not that im involved in this project, but a similar one. Im
porting andoird to the Meizu m8 (www.meizu.com).
This phone has a samsung 6410 cpu which is very similar to the 2410/2440
samsung cpus u use..
The problem i have is that meizu isnt really interesting in helping out
in any way.
We have a running linux kernel (2.6.27) and we had android running on
that device. Now we come to the part where the hardware components must
be enabled. Im right now fighting with the base-band chipset (an
infineon SGold2).
I think its connected to the UARt1 of the main cpu.
But i cant get any answer from that port. if i send AT using minicom to
uart1 nothing happens. So i hope to find some advice herer, where people
(hopefully) have done something similar before.
What i thougt:
The baseband must be enabled before i can use it. So i  reversed the
wince kernel (its a wince phone) to get all of the gpio inits out,
converted them to c code and executed this at the end of machine init.
First, would this be the right place to init gpios?
But still... no answer from the uart1. Then i managed to get the
datasheet of the cpu and read my way through the uart chapter. There is
a feature called afc (auto flow control) in the cpu.its stated there
that i should disable this when using a modem, and control the rts line
by software. This must be made from the serial driver, and so i looked
into the serial driver. The driver used is the one from 2410, and this
is based on common samsung code.
As far as i know, your baseband is also connected to the uart. The thing
i want to know: should i modify the serial driver in any way? Disable
the afc feature? do you use the std. samsung driver from Ben Dooks? Did
you changed something? Can you provide infos/patches on
changes/base-band initializations?
Can you prove any information on enabling / using the baseband chipset
from the openmoko project which can help us out?
Any hep would be appreciated
greets from the meizu forums
Rudi

Reply | Threaded
Open this post in threaded view
|

Re: Serial Driver of openmoko

Michael Trimarchi-3
Hi,

r3wDy wrote:
>
> As far as i know, your baseband is also connected to the uart. The
> thing i want to know: should i modify the serial driver in any way?
> Disable the afc feature? do you use the std. samsung driver from Ben
> Dooks? Did you changed something? Can you provide
static void s3c24xx_serial_set_mctrl(struct uart_port *port, unsigned
int mctrl)
{
        /* todo - possibly remove AFC and do manual CTS */
}

Yes you can but you need to implement this call. Then you can use this code:

/int cmstatus;
//
//ioctl(ttyS, TIOCMGET, &cmstatus);
////cmstatus &= ~TIOCM_RTS;
///cmstatus |= TIOCM_RTS;//
/ioctl(ttyS, TIOCMSET, &cmstatus);

you need to flush the buffer in the middle using tcdrain and wait the the internal serial buffer is empty

unsigned int lsr = 0;

do {
        ioctl(fd, TIOCSERGETLSR, &lsr);
} while (!(lsr & TIOCSER_TEMT));

Or use the RTS/CTS part like gpio pin

Michael



/


> infos/patches on changes/base-band initializations?
> Can you prove any information on enabling / using the baseband chipset
> from the openmoko project which can help us out?
> Any hep would be appreciated
> greets from the meizu forums
> Rudi
>
>