From: maxime.ripard@free-electrons.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/4] reset: Add Allwinner SoCs Reset Controller Driver
Date: Mon, 11 Nov 2013 19:55:45 +0100 [thread overview]
Message-ID: <20131111185545.GW26440@lukather> (raw)
In-Reply-To: <1384165135.5191.5.camel@pizza.hi.pengutronix.de>
Hi Philipp,
On Mon, Nov 11, 2013 at 11:18:55AM +0100, Philipp Zabel wrote:
> > +static int sunxi_reset_assert(struct reset_controller_dev *rcdev,
> > + unsigned long id)
> > +{
> > + struct sunxi_reset_data *data = container_of(rcdev,
> > + struct sunxi_reset_data,
> > + rcdev);
> > + int bank = id / BITS_PER_LONG;
> > + int offset = id % BITS_PER_LONG;
> > + u32 reg = readl(data->membase + (bank * 4));
> > +
> > + writel(reg & ~BIT(offset), data->membase + (bank * 4));
>
> the reset core just passes through calls to reset_controller_assert
> directly, ...
>
> > +
> > + return 0;
> > +}
> > +
> > +static int sunxi_reset_deassert(struct reset_controller_dev *rcdev,
> > + unsigned long id)
> > +{
> > + struct sunxi_reset_data *data = container_of(rcdev,
> > + struct sunxi_reset_data,
> > + rcdev);
> > + int bank = id / BITS_PER_LONG;
> > + int offset = id % BITS_PER_LONG;
> > + u32 reg = readl(data->membase + (bank * 4));
> > +
> > + writel(reg | BIT(offset), data->membase + (bank * 4));
>
> ... so those read-modify-write cycles in sunxi_reset_assert and here
> should be protected with a lock.
Right, I'll fix this in the v3.
Thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131111/971e9f19/attachment.sig>
next prev parent reply other threads:[~2013-11-11 18:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-25 13:22 [PATCH v3 0/4] Add support for the Allwinner A31 Reset Controllers Maxime Ripard
2013-10-25 13:22 ` [PATCH v3 1/4] reset: Add Allwinner SoCs Reset Controller Driver Maxime Ripard
2013-11-11 10:18 ` Philipp Zabel
2013-11-11 18:55 ` Maxime Ripard [this message]
2013-10-25 13:22 ` [PATCH v3 2/4] ARM: sunxi: Select ARCH_HAS_RESET_CONTROLLER Maxime Ripard
2013-10-25 13:22 ` [PATCH v3 3/4] ARM: sunxi: Register the A31 reset IP in init_time Maxime Ripard
2013-10-25 13:22 ` [PATCH v3 4/4] ARM: sun6i: Add the reset controller to the DTSI Maxime Ripard
2013-11-10 10:58 ` [PATCH v3 0/4] Add support for the Allwinner A31 Reset Controllers Maxime Ripard
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=20131111185545.GW26440@lukather \
--to=maxime.ripard@free-electrons.com \
--cc=linux-arm-kernel@lists.infradead.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 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.