lkml.org 
[lkml]   [2015]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[Question] Reading hardware registers
Date
Hi experts,

I need your help. I have written a simple driver on S3C6410 arm board. I define my resource.

static struct resource inkprinter_resources[] = {
[0] = {
.start = S3C64XX_PA_INKPRINTER,
.end = S3C64XX_PA_INKPRINTER + S3C64XX_SZ_INKPRINTER,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_EINT(1),
.end = IRQ_EINT(1),
.flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW,
}
};

I want to keep trigger the interrupt when it’s low level. But it doesn’t keep trigger when it’s low. It only calls interrupt routine once.
So I need print out interrupt hardware registers values for debugging.

EINT0CON0 0x7F008900 R/W External Interrupt configuration Register 0 0x0
EINT0CON1 0x7F008904 R/W External Interrupt configuration Register 1 0x0
EINT0FLTCON0 0x7F008910 R/W External Interrupt Filter Control Register 0 0x0
EINT0FLTCON1 0x7F008914 R/W External Interrupt Filter Control Register 1 0x0
EINT0FLTCON2 0x7F008918 R/W External Interrupt Filter Control Register 2 0x0
EINTF0LTCON3 0x7F00891C R/W External Interrupt Filter Control Register 3 0x0

I know I’m wrong with using `readl(0x7F008900)`, it reads virtual address. Maybe I need map it to kernel virtual address firstly.

How could I read hardware address, instead of virtual address? If I need map, which kernel function should I choose, ioremap/vmap...?

Millions of thanks.

Regards,
Alex Feng

\
 
 \ /
  Last update: 2015-05-30 17:21    [W:0.046 / U:2.368 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site