How to port linux driver code??

Hi All,
I need to port linux driver code to QNX driver for the serial port, which uses the pci interface. Please find linux code available with me.
As per the code, a serial core driver was used and in low level tty driver is used.
My queries are as follows,

  1. How to port following stuctures uart_port, uart_info, etc??

  2. How to port struct uart_ops pointer, which defines a list of functions that the serial core uses to call back into the port-specific serial driver. This structure is defined as:
    struct uart_ops {
    unsigned int (*tx_empty)(struct uart_port *);
    void (*set_mctrl)(struct uart_port *,
    unsigned int mctrl);
    unsigned int (*get_mctrl)(struct uart_port *);
    void (*stop_tx)(struct uart_port *,
    unsigned int tty_stop);
    void (*start_tx)(struct uart_port *,
    int (*startup)(struct uart_port *);
    void (*shutdown)(struct uart_port *);


  3. As per my observation, function serial_serocco_start_tx() is writing data on the port and function serial_serocco_handle_irq() is reading data from serial port. Please correct me, if i am wrong ???

  4. Can the QNX structure TTYDEV, TTYCTRL will help me out???

QNX serial driver are TOTALLY different then the Linux driver. You need to understand what the Linux driver does and the architecture of the QNX devc-* drivers and write it pretty much from scratch.

Hello Mario,
I have started to port the serocco code and initiliazation of pci was done using the standard resource manager. But now i have to port the write and read functionality. As per my observation on linux code ,

  1. serial_serocco_start_tx function would be used for write call of Resoure Manager.

  2. serial_serocco_handle_irq function would be used for read call of Resoure Manager.

    Please correct me if i am wrong ???