[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with lp0




----- Original Message -----
From: "Jonathan Wilkinson" <jonathan@xxxxxxx.uk>
To: <johana@xxxxxxx.com>; "Dev-etrax mailing list (E-mail)"
<dev-etrax@xxxxxxx.com>
Sent: den 6 november 2002 14:15
Subject: RE: Problems with lp0


>
> >What value has errno after this?
> >What does perror("open"); say?
>
> perror says : Invalid Argument

Can you verify that the kernel is properly patched and built?
(gpio_open() returns EINVAL if the minor number is to high)
The revision of os/linux/arch/cris/drivers/gpio.c should be at
least 1.13 and os/linux/include/asm-cris/etraxgpio.h should have
#define GPIO_MINOR_G 3
#define GPIO_MINOR_LAST 3
in it.

Try adding a
printk("gpio_open minor %i\n", p);
in gpio_open()

> >It looks like the /dev/gpiog is still not there.
> >Can you veryify it with "ls -l /dev/gpio*" on the devboard?
>
> yes it is there:
>   crw-rw-rw 1 root root 120, 0 Jan 1 1970   /dev/gpioa
>   crw-rw-rw 1 root root 120, 1 Jan 1 1970   /dev/gpiob
>   crw-rw-rw 1 root root 120,  3 Sep 18 22:36 /dev/gpiog
>
>
> >Have you made 'make install' in the packages/devices/axis-2.4 as well as
> >on the top level?
> >I don't know if you have to do 'make images' as well or if I'm just
> >confusing build systems here...
>
> Yes i've tried 'make install', 'make files', 'make kernel', 'make images'
etc etc..
>
> Do you think i would better off writing a device driver??

Not really - it should work, we just have to figure out whats wrong..
(I guess the next real devboard_lx release will simplify things a lot)

> I can't beleive this is causing me so much trouble.. it's pretty easy to
> write to lp0 on my redhat box.

How do you do it on the redhat box?
Is it using the Linux framework or accessing the port directly?
Try compiling and using the same tool on the devboard.

> Any other ideas?  Thanks for your help!!
>
> Jonathan

/Johan

> >
> > -----Original Message-----
> > From: Mikael Starvik [mailto:mikael.starvik@xxxxxxx.com]
> > Sent: 06 November 2002 09:39
> > To: Jonathan Wilkinson; Johan Adolfsson; dev-etrax
> > Subject: RE: Problems with lp0
> >
> >
> > Have you run make install after you added the line in the Makefile?
> >
> > -----Original Message-----
> > From: owner-dev-etrax@xxxxxxx.com]On">mailto:owner-dev-etrax@xxxxxxx.com]On
> > Behalf Of Jonathan Wilkinson
> > Sent: Wednesday, November 06, 2002 10:33 AM
> > To: Johan Adolfsson; dev-etrax
> > Subject: RE: Problems with lp0
> >
> >
> > Hi Johan, Would just like to say thanks for all your help.
> >
> > I'm still having one problem though.  gpiog is not in my /dev directory.
> I just have gpioa and gpiob
> >
> > I have GPIO support enabled in menuconfig (parallel support disabled)
and
> I've added the following line to
> ~/axis/devboard_lx/packages/devices/axis2.4/Makefile:
> > @$(MKNOD) -m 0666 $(DEV)/gpiog c 120  3
> >
> > but still to no avail....
> >
> > Does anyone know how to get the gpiog device driver installed?
> >
> > Thanks - Jonathan
> >
> >
> > >You must use 2.4.19 and the patch from developer.axis.com for
/dev/gpiog
> to
> > >work.
> >
> >
>