All of lore.kernel.org
 help / color / mirror / Atom feed
* sunhme: incorrect global register offsets?
@ 2017-07-26 22:52 Mark Cave-Ayland
  2017-07-26 23:10 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Cave-Ayland @ 2017-07-26 22:52 UTC (permalink / raw)
  To: sparclinux

Hi all,

I've been playing around with trying to emulate a sunhme card in QEMU
and AFAICT there is a discrepancy between the GREG_STAT	and GREG_IMASK
register offsets as listed in sunhme.h and the STP2002QFP datasheet.

According to the datasheet the global status register (GREG_STAT) is
located at offset 0x100 and the global interrupt mask register
(GREG_IMASK) is located at offset 0x104 - however according to sunhme.h
GREG_STAT is set to 0x108 and GREG_IMASK is set to 0x10c.

I've checked against the NetBSD sources and they also agree with the
datasheet that the global status register is located at offset 0x100 and
the global interrupt mask register is located at offset 0x104.

So some obvious questions:

1) Is this an error in the STP2002QFP datasheet or in sunhme.h?

2) Has anyone ever experienced any lockups with the sunhme driver?

3) If the GREG_STAT and GREG_IMASK constants were altered to match the
datasheet, does anyone have any real hardware left to actually test with?


ATB,

Mark.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: sunhme: incorrect global register offsets?
  2017-07-26 22:52 sunhme: incorrect global register offsets? Mark Cave-Ayland
@ 2017-07-26 23:10 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-07-26 23:10 UTC (permalink / raw)
  To: sparclinux

From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Date: Wed, 26 Jul 2017 23:52:14 +0100

> I've been playing around with trying to emulate a sunhme card in
> QEMU and AFAICT there is a discrepancy between the GREG_STAT and
> GREG_IMASK register offsets as listed in sunhme.h and the STP2002QFP
> datasheet.
> 
> According to the datasheet the global status register (GREG_STAT) is
> located at offset 0x100 and the global interrupt mask register
> (GREG_IMASK) is located at offset 0x104 - however according to sunhme.h
> GREG_STAT is set to 0x108 and GREG_IMASK is set to 0x10c.
> 
> I've checked against the NetBSD sources and they also agree with the
> datasheet that the global status register is located at offset 0x100 and
> the global interrupt mask register is located at offset 0x104.
> 
> So some obvious questions:
> 
> 1) Is this an error in the STP2002QFP datasheet or in sunhme.h?
> 
> 2) Has anyone ever experienced any lockups with the sunhme driver?
> 
> 3) If the GREG_STAT and GREG_IMASK constants were altered to match the
> datasheet, does anyone have any real hardware left to actually test with?

It's pretty amazing the driver ever worked at all if those register
offsets are wrong.  It means we're not even programming the interrupt
mask.

Indeed looking at my STP2002QFP manual, the offsets are wrong.  I wonder
where I got those values from :-)

No matter where I check the Linux values are wrong.

Please just submit a patch to fix this, and I'll apply it.

Thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-07-26 23:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-26 22:52 sunhme: incorrect global register offsets? Mark Cave-Ayland
2017-07-26 23:10 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.