linux-mips
[Top] [All Lists]

Re: VINO

To: Linux MIPS <linux-mips@linux-mips.org>
Subject: Re: VINO
From: Ladislav Michl <ladis@linux-mips.org>
Date: Tue, 29 Jun 2004 15:42:14 +0200
Cc: Jorik Jonker <linux-mips@boeventronie.net>
In-reply-to: <20040609122046.GB18364@hydrogen.boeventronie.net>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20040608125437.GC19965@hydrogen.boeventronie.net> <20040608220604.GA2578@umax645sx> <20040609122046.GB18364@hydrogen.boeventronie.net>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.6+20040523i
On Wed, Jun 09, 2004 at 02:20:46PM +0200, Jorik Jonker wrote:
> Well, it seems not that easy for me. As I told, it's very opaque matter to
> me; ie I already figured out that a kernel driver must be built but I really
> have no clue on how to do this. For instance, I don't know what call (if
> there exists any) should access that memory.

PHYS_TO_K1 macro from <sys/mips_addrspace.h> does the trick. Just use
something like:

#define VINO_BASE 0x00080000
unsigned int reg = * (unsigned int *) PHYS_TO_K1(VINO_BASE + ofs);

Note that VINO registers are 64bit, but only lower 32bits are relevant for
us (the only exception is valid bit in descriptor cache register, which
is not important in this case). Please refer to VINO Design
Specification for more details:
ftp://ftp.linux-mips.org/pub/linux/mips/doc/indy/vino/

> My plan was on writing a driver which allows me (through an ioctl to a special
> device) to read/write to the VINO registers. I think I saw a driver example
> in the DevDriver_PG which shows how to communicate through ioctl with
> userspace (or kernelspace, depends on how you look at it), but the part where
> I do the actual 'talking' to the VINO is matter I don't have any clue on how
> to do that.

I hope you'll find time to make your plan reality.

Best regars,
        ladis

<Prev in Thread] Current Thread [Next in Thread>