[<prev] [next>] [day] [month] [year] [list]
Message-Id: <4DED2452-7055-413A-A31C-AA2D617459F2@gmail.com>
Date: Sat, 30 May 2015 22:49:13 +0800
From: Feng Li <lifeng1519@...il.com>
To: linux-kernel@...r.kernel.org
Subject: [Question] Reading hardware registers
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--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists