Re: L4Re GPIO

Adam Lackorzynski <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.devel
Message-ID <[email protected]>
Hi,

On Thu Dec 04, 2014 at 14:57:14 +0700, Erry Pradana Darajati wrote:
> I have some follow up question from my last email.
> 
> 1. About GPIO. So IOs defined on LUA script. So in OMAP4460, is gonna be
> like this, isn't it ?

Principally yes.

>     I have a question in line of this code.
> 
> GPIO = Hw.Device(function()
>     GPIO1 = Hw.Gpio_omap46x_chip(function(
> )
>       hid = "gpio-omap46x-GPIO1";
>       compatible = {"ti,omap4-gpio"};
>       regs = Res.mmio(0x4A310000, 0x4A310194); // This one is range of
> Address GPIO1 used

Yes.

>       irq = Res.irq(29); //This one is IRQ of GPIO1 ? What is the meaning
> of irq(29) ?

This is the IRQ number for the GPIO chip. The driver in IO will then
generate IRQs for the specific pins by reading hardware registers of the
GPIO chip.

>       scm_table = 0; // I still don't understand about this line

This selects the specific GPIO block. It is a driver-internal selection.

>     end);
> end);
> 
> And where can i read the reference about another parameters of this ? (Like
> there pins parameter in raspi b. And there are mems instead of regs)

The specific ones are driver specific so you should check the driver in
io (pkg/io/server/src/drivers/gpio/*).

I guess a driver for the 4460 won't be so different from the omap3 one
so maybe it can be modified.

> 2. I try the L4Re with x86 build run in QEMU. And want it to accept my
> keyboard input. So i need to include x86-legacy.devs module in modules.list
> and define REQUIRES_LIBS=libc_be_file_stdin isn't it ?
> But after i've done it, it still doesn't accept keyboard input. what did i
> miss ?

For what purpose do you want it to accept input? Maybe just a missing
-serial_esc option on Fiasco's command line?




Adam
-- 
Adam                 [email protected]
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.