From: Arnd Bergmann <arnd@arndb.de>
To: linuxppc-dev@ozlabs.org
Cc: openipmi-developer@lists.sourceforge.net,
Christian Krafft <krafft@de.ibm.com>
Subject: Re: [Openipmi-developer] [patch 1/1] ipmi: add autosensing of ipmi device on powerpc using device-tree
Date: Sat, 9 Dec 2006 01:00:08 +0100 [thread overview]
Message-ID: <200612090100.09380.arnd@arndb.de> (raw)
In-Reply-To: <1165618236.1103.87.camel@localhost.localdomain>
On Friday 08 December 2006 23:50, Benjamin Herrenschmidt wrote:
>=20
> >=20
> > +=A0=A0=A0=A0=A0info->io.regsize=A0=A0=A0=A0=A0=A0=A0=A0=3D resource0.e=
nd - resource0.start + 1;
> > +=A0=A0=A0=A0=A0info->io.regspacing=A0=A0=A0=A0=A0=3D resource1.start -=
resource0.start;
> >=20
> > Are you sure this is a reliable way to check the register spacing and
> > register size? =A0Register size means "how big is a register (8, 16, 32
> > bits)". =A0Register spacing means (how many bytes are there between
> > registers. =A0If you had two registers that were 8 bits and 4 bytes
> > apart, for instance, I don't believe the above calculations would work.
>=20
> How many registers do we expect here ? Might be better to have one
> resource represent the whole MMIO area, and have a separate property
> that indicates the stride between 2 registers.
I think the current representation is perfect. AFAICS, there are always
two registers, but depending on the HW implementation, they may be
between 1 and 4 bytes wide, and can have a different spacing.
By having two separate areas in the reg property, the driver can
easily determine both the size and the spacing. It will then do
a single ioremap that spans both anyway.
Arnd <><
next prev parent reply other threads:[~2006-12-09 0:00 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-07 16:22 [patch 0/1] ipmi: add autosensing of ipmi device on powerpc using device-tree Christian Krafft
2006-12-07 16:24 ` [patch 1/1] " Christian Krafft
2006-12-08 10:24 ` Heiko Joerg Schick
2006-12-08 17:19 ` [Openipmi-developer] " Corey Minyard
2006-12-11 12:13 ` Christian Krafft
2006-12-08 18:59 ` Corey Minyard
2006-12-08 19:49 ` Arnd Bergmann
2006-12-08 22:50 ` Benjamin Herrenschmidt
2006-12-09 0:00 ` Arnd Bergmann [this message]
2006-12-09 0:07 ` Corey Minyard
2006-12-09 11:44 ` Arnd Bergmann
2006-12-10 18:42 ` Heiko J Schick
2006-12-11 10:11 ` Arnd Bergmann
2006-12-11 13:01 ` Heiko J Schick
2006-12-11 13:37 ` Segher Boessenkool
2006-12-11 13:18 ` Segher Boessenkool
2006-12-11 14:25 ` Arnd Bergmann
2006-12-11 16:28 ` Heiko J Schick
2006-12-11 16:58 ` Segher Boessenkool
2006-12-11 17:20 ` Christian Krafft
2006-12-11 16:54 ` Segher Boessenkool
2006-12-09 2:14 ` Benjamin Herrenschmidt
2006-12-09 9:46 ` Segher Boessenkool
2006-12-09 11:46 ` Arnd Bergmann
2006-12-08 0:41 ` [patch 0/1] " Paul Mackerras
2006-12-08 14:04 ` Arnd Bergmann
2006-12-08 17:17 ` [Openipmi-developer] " Corey Minyard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200612090100.09380.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=krafft@de.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=openipmi-developer@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).