linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Question] Reading hardware registers
@ 2015-05-30 14:49 Feng Li
  0 siblings, 0 replies; only message in thread
From: Feng Li @ 2015-05-30 14:49 UTC (permalink / raw)
  To: linux-kernel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-05-30 14:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-30 14:49 [Question] Reading hardware registers Feng Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).