mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Harvey Harrison <harvey.harrison@gmail.com>
To: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rtc: rs5c313: Replase from ctrl_* to __raw_*
Date: Fri, 22 Oct 2010 15:09:01 -0700	[thread overview]
Message-ID: <AANLkTinUS9HSDCG4F8o8rrAByNaOpchBd7LBKOF6SW3T@mail.gmail.com> (raw)
In-Reply-To: <1287784914-5714-1-git-send-email-iwamatsu@nigauri.org>

On Fri, Oct 22, 2010 at 3:01 PM, Nobuhiro Iwamatsu <iwamatsu@nigauri.org> wrote:
> ctrl_* is deprecated. We should to use __raw_*.
>

>
>        /* And Initialize SCL for RS5C313 clock */
> -       scsptr1_data = ctrl_inb(SCSPTR1) | SCL; /* SCL:H */
> -       ctrl_outb(scsptr1_data, SCSPTR1);
> -       scsptr1_data = ctrl_inb(SCSPTR1) | SCL_OEN;     /* SCL output enable */
> -       ctrl_outb(scsptr1_data, SCSPTR1);
> +       scsptr1_data = __raw_readb(SCSPTR1) | SCL;      /* SCL:H */
> +       __raw_writeb(scsptr1_data, SCSPTR1);
> +       scsptr1_data = __raw_readb(SCSPTR1) | SCL_OEN;  /* SCL output enable */
> +       __raw_writeb(scsptr1_data, SCSPTR1);
>        RS5C313_CEDISABLE;      /* CE:L */
>  }

I think that you need a barrier between write and the subsequent read
as the __raw helpers do not
imply one.  Otherwise the write isn't guaranteed to be done before the read.

Harvey

      reply	other threads:[~2010-10-22 22:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-22 22:01 Nobuhiro Iwamatsu
2010-10-22 22:09 ` Harvey Harrison [this message]

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=AANLkTinUS9HSDCG4F8o8rrAByNaOpchBd7LBKOF6SW3T@mail.gmail.com \
    --to=harvey.harrison@gmail.com \
    --cc=iwamatsu@nigauri.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rtc-linux@googlegroups.com \
    /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

all inboxes | Powered by JetHome®