trying to use custom made char driver as a serial port
Hello:
I created a char driver for interfacing the UART attached to a PC/104 in my ARM embedded computer. I was able to create the driver and it get registered on the system when selecting the IRQ,reserving the iomem, etc.
Using the ioctl() system call and the ioctl in the driver I suspect that I can set up the device serial parameters. However I can not read from the device I created, It appears that the writes to the device are not answered!!!
Using printk in the driver I can see from user space the buffers that are written, however when seeing the buffers read I just see the same buffers that I wrote from user space.
I suspect 2 conditions
1- If I am using the char device as a serial port how can I set the I/O port for it(setserial returns Unknown IOCTL command for this driver: 541e. Cannot get serial info: Invalid argument)using c code in the user space or in the kernel space?
2- How to i determine exactly to what address my char driver should look in order to comunicate with the pc/104 board?
Thanks in advance
Damian
|