linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tbogendoerfer@suse.de>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	Paul Burton <paul.burton@mips.com>,
	James Hogan <jhogan@kernel.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Lee Jones <lee.jones@linaro.org>,
	"David S. Miller" <davem@davemloft.net>,
	Alessandro Zummo <a.zummo@towertech.it>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.com>,
	linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-input@vger.kernel.org, netdev@vger.kernel.org,
	linux-rtc@vger.kernel.org, linux-serial@vger.kernel.org
Subject: Re: [PATCH 4/6] MIPS: SGI-IP27: fix readb/writeb addressing
Date: Mon, 8 Apr 2019 20:53:28 +0200	[thread overview]
Message-ID: <20190408205328.062042a4f6e12f750bd4c05e@suse.de> (raw)
In-Reply-To: <20190408145834.GO7480@piout.net>

On Mon, 8 Apr 2019 16:58:34 +0200
Alexandre Belloni <alexandre.belloni@bootlin.com> wrote:

> On 08/04/2019 16:20:56+0200, Thomas Bogendoerfer wrote:
> > diff --git a/drivers/rtc/rtc-m48t35.c b/drivers/rtc/rtc-m48t35.c
> > index 0cf6507de3c7..05f0d91366af 100644
> > --- a/drivers/rtc/rtc-m48t35.c
> > +++ b/drivers/rtc/rtc-m48t35.c
> > @@ -24,6 +24,16 @@
> >  
> >  struct m48t35_rtc {
> >  	u8	pad[0x7ff8];    /* starts at 0x7ff8 */
> > +#ifdef CONFIG_SGI_IP27
> > +	u8	hour;
> > +	u8	min;
> > +	u8	sec;
> > +	u8	control;
> > +	u8	year;
> > +	u8	month;
> > +	u8	date;
> > +	u8	day;
> > +#else
> 
> I'm not sure why the RTC driver has to know about that. Shouldn't your
> accessors be fixing that?

no, because the hardware is weird. RTC is connected to IOC3 byte bus and IOC3 is
connected to PCI. With a correct readb for PCI bus access to RTC behind IOC3 is byte
swapped.

Thomas.

-- 
SUSE Linux GmbH
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah
HRB 21284 (AG Nürnberg)

  reply	other threads:[~2019-04-08 18:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-08 14:20 [PATCH 0/6] Use MFD framework for SGI IOC3 drivers Thomas Bogendoerfer
2019-04-08 14:20 ` [PATCH 1/6] MIPS: SGI-IP27: remove ioc3 ethernet init Thomas Bogendoerfer
2019-04-08 14:20 ` [PATCH 2/6] MIPS: SGI-IP27: remove setup of RTC platform device Thomas Bogendoerfer
2019-04-08 17:05   ` David Miller
2019-04-08 18:48     ` Thomas Bogendoerfer
2019-04-08 18:58     ` Thomas Bogendoerfer
2019-04-08 14:20 ` [PATCH 4/6] MIPS: SGI-IP27: fix readb/writeb addressing Thomas Bogendoerfer
2019-04-08 14:58   ` Alexandre Belloni
2019-04-08 18:53     ` Thomas Bogendoerfer [this message]
2019-04-08 14:20 ` [PATCH 5/6] tty: serial: Add 8250-core base IOC3 driver Thomas Bogendoerfer
2019-04-08 14:20 ` [PATCH 6/6] Input: add IOC3 serio driver Thomas Bogendoerfer
2019-04-08 19:02   ` Dmitry Torokhov
2019-04-08 19:08     ` Alexandre Belloni
2019-04-08 22:32       ` Dmitry Torokhov
2019-04-09 10:14     ` Thomas Bogendoerfer

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=20190408205328.062042a4f6e12f750bd4c05e@suse.de \
    --to=tbogendoerfer@suse.de \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=davem@davemloft.net \
    --cc=dmitry.torokhov@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jhogan@kernel.org \
    --cc=jslaby@suse.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=paul.burton@mips.com \
    --cc=ralf@linux-mips.org \
    /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).