Re: [ARM11] Question for the ARM 11 GPIO MAPPING

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

On Tue Feb 26, 2013 at 20:10:15 +0800, Jason.han wrote:
>                 Now I  have  GPIO Mapping  problems happened when
> run the L4re in Arm 11 (6410 ).
> 
>                .devs ==> Res.mmio(0x7f008100, 0x7f00813f);
>                .lcd.c ==>l4io_request_iomem(0x7f008100, 0x03f,
> L4IO_MEM_NONCACHED, &lcd_gpio_virt_base);
> 
>                 when
> "l4_mem_write(lcd_gpio_virt_base+0x00,L4_MEM_WIDTH_4BYTE,0xaaaaaaaa);
>                 download in real-hw board : the core will died as it :
> 
> Ned: loading file: 'rom/arm-rv-lcd.cfg'
> 
>        hello   | Hello World!
>        IO      | Dev_factory: register factory for N2Hw6DeviceE
>        IO      | GTF: register factory for 7Pci_dev
>        IO      | GTF: register factory for N2Hw12Msi_resourceE
>        IO      | Dev_factory: register factory for N2Hw11Gpio_deviceE
>        IO      | Io service
>        IO      | Ready. Waiting for request.
>        fbdrv   | Using LCD driver: S3C6410
>        fbdrv   | lcd_control_virt_base is 0x3000
>        fbdrv   | lcd_gpio_virt_base is 0x4000
>        fbdrv   | Video memory is at virtual 0x5000 (size: 0x3fc00 Bytes)
>        fbdrv   | Physical video memory is at 0x50394000   ==>core died
> 
>                 after delete it and only use l4_mem_read , value always is
> 
>                  IO       | Ready. Waiting for request.
> 
>        fbdrv   | Using LCD driver: S3C6410
>        fbdrv   | lcd_control_virt_base is 0x3000
>        fbdrv   | lcd_gpio_virt_base is 0x4000
>        fbdrv   | Video memory is at virtual 0x5000 (size: 0x3fc00 Bytes)
>        fbdrv   | Physical video memory is at 0x50395000
>        fbdrv   | 0 value is 0x220022   ==> core run is ok.
> 
>        In the range of the GPIO  ,whatever I defined , the
>        lcd_gpio_virt_base + offset (value 0) is always 0x220022 ,can't
>        be written  .
>        the lcd_gpio_virt_base + offset (value 0x04) is always 0x23 ,can
>        be written ,but value never be changed .
>         From Offset (value 0x08) is normal . why only GPIO like this ,I
>        write some time and control -register always OK.
> 
>        Do you know Why , Can you give me some advices ? Thank you .
> 
>          I also try to .devs ==> Res.mmio(0x7f008000, 0x7f00813f);
>                             .lcd.c ==>l4io_request_iomem(0x7f008000,
>        0x03f, L4IO_MEM_NONCACHED, &lcd_gpio_virt_base);
>                              when
>        "l4_mem_write(lcd_gpio_virt_base+0x100,L4_MEM_WIDTH_4BYTE,0xaaaaaaaa);
>        The offset 0x00 ,and 0x04 same problem ,but  now I can write
>        0xaaaaaaaa for this IO port,  even though working not well .

What I notice is that you want to have 0x7f008100, however, mappings are
page granular, i.e. lower 3 digits are 0. The output says the virt_base
is 0x4000, so you probably want to access 0x4100. Maybe the device at
offset 0 is behaving like what you're seeing.




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.