From: khilman@kernel.org (Kevin Hilman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 4/7] ARM: rockchip: add suspend and resume for RK3288
Date: Wed, 29 Oct 2014 13:00:14 -0700 [thread overview]
Message-ID: <7hy4ry7ik1.fsf@deeprootsystems.com> (raw)
In-Reply-To: <CAD=FV=Vabh6xJOYxkuGiG_AFr2qm26iqL87LJ_CBzK1w+dC9XA@mail.gmail.com> (Doug Anderson's message of "Wed, 29 Oct 2014 12:26:32 -0700")
Doug Anderson <dianders@chromium.org> writes:
> Kevin,
>
> On Wed, Oct 29, 2014 at 12:01 PM, Kevin Hilman <khilman@kernel.org> wrote:
>>> + /* set bit 8 so that system will resume to FAST_BOOT_ADDR */
>>> + regmap_write(sgrf_regmap, RK3288_SGRF_SOC_CON0,
>>> + BIT(SGRF_FAST_BOOT_EN) | BIT(SGRF_FAST_BOOT_EN + 16));
>>
>> Comment says "bit 8", but code says bit 8 and bit 24, and if bit 24 is
>> needed, it should probably get its own #define in the header.
>
> This is Rockchip's "write enable" feature hitting us again. The upper
> 16-bits are "write enables" for the lower 16-bits. So to set bit 8
> you set bit 8 to whatever value you want and then 'write enable' by
> setting (1 << 8 << 16). It allows you to avoid read-modify-write.
> See this in Rockchip's clk.h:
>
> #define HIWORD_UPDATE(val, mask, shift) \
> ((val) << (shift) | (mask) << ((shift) + 16))
OK, sounds like a macro is needed in the core code as well (with a
comment for those of us who will forget why it's needed)
Kevin
next prev parent reply other threads:[~2014-10-29 20:00 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-29 11:51 [PATCH v6 0/7] This is the 1st version of suspend for RK3288 Chris Zhong
2014-10-29 11:51 ` [PATCH v6 1/7] pinctrl: rockchip: add suspend/resume functions Chris Zhong
2014-10-31 20:54 ` Linus Walleij
2014-11-02 20:47 ` Heiko Stübner
2014-10-29 11:52 ` [PATCH v6 2/7] pinctrl: rockchip: save and restore gpio6_c6 pinmux in suspend/resume Chris Zhong
2014-10-29 11:52 ` [PATCH v6 3/7] clk: rockchip: RK3288: add suspend and resume Chris Zhong
2014-10-29 11:52 ` [PATCH v6 4/7] ARM: rockchip: add suspend and resume for RK3288 Chris Zhong
2014-10-29 19:01 ` Kevin Hilman
2014-10-29 19:26 ` Doug Anderson
2014-10-29 20:00 ` Kevin Hilman [this message]
2014-11-11 7:33 ` Chris Zhong
2014-10-29 11:52 ` [PATCH v6 6/7] ARM: dts: add RK3288 suspend support Chris Zhong
2014-10-29 11:52 ` [PATCH v6 7/7] ARM: dts: add suspend voltage setting for RK808 Chris Zhong
2014-10-29 15:40 ` Doug Anderson
2014-10-29 16:29 ` Javier Martinez Canillas
2014-10-29 16:51 ` Doug Anderson
2014-10-30 0:32 ` Javier Martinez Canillas
2014-10-29 20:06 ` [PATCH v6 0/7] This is the 1st version of suspend for RK3288 Kevin Hilman
2014-10-29 21:50 ` Heiko Stübner
2014-10-29 22:26 ` Doug Anderson
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=7hy4ry7ik1.fsf@deeprootsystems.com \
--to=khilman@kernel.org \
--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 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).