RE: Driver on Linux

2 messages, 2 authors, 2003-06-27 · open the first message on its own page

RE: Driver on Linux

From: Jean-Denis Boyer <hidden>
Date: 2003-06-27 17:18:06

I thought I could make fd=open("/dev/visu", 0) in init of the
driver 2 but I
get ooops.
To open a device from kernel mode, you need to:

  /* Bypass argument validity check in FS calls. See <asm/uaccess.h> */
  mm_segment_t oldfs = get_fs();
  set_fs(KERNEL_DS);
  fd=open("/dev/visu", 0)

  /* Restore argument validity check */
  set_fs(oldfs);

I also need to make something like ioctl(fd, IO_Special...
)but the function
ioctl is unknown in the kernel.
To have the ioctl, you should add to the beginning of your source file:

#include <linux/unistd.h>
/* Declare "ioctl" system call */
static inline _syscall3(int,ioctl,int,fd,int,request,void*,arg1)


Regards,
--------------------------------------------
 Jean-Denis Boyer, Software Designer
 M5T Centre d'Excellence en Télécom Inc.
 4283 Garlock Street
 Sherbrooke (Québec)
 J1L 2C8  CANADA
 (819)829-3972 x241
--------------------------------------------

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Cheap FBDev for LinuxPPC

From: James Dougherty <hidden>
Date: 2003-06-27 19:26:57

Hello,

I am working on a project with MPC8245 and have
the need for a VGA device which I can use to map
the frame-buffer ram directly.

A colleague of mine is recommending the SiliconMotion
chipset.. could anyone comment on this?

If so, what cards could I purchase at Frye's or some
store..

Finally, does anyone have any code for this baby?

Many thanks in advance.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help