lkml.org 
[lkml]   [2018]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] mailbox: sunxi-msgbox: Add a new mailbox driver
On Tue, Feb 27, 2018 at 08:27:14PM -0600, Samuel Holland wrote:
> + /*
> + * The failure path should not disable the clock or assert the reset,
> + * because the PSCI implementation in firmware relies on this device
> + * being functional. Claiming the clock in this driver is required to
> + * prevent Linux from turning it off.
> + */
> + ret = clk_prepare_enable(clk);
> + if (ret) {
> + dev_err(dev, "Failed to enable bus clock: %d\n", ret);
> + return ret;
> + }

You don't need it to be always on though. You only need it to be
enabled when you access the registers (on both sides I guess?). So you
could very well enable the clock in your registers accessors in Linux,
and do the same in the ARISC firmware. That should work.

Maxime

--
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2018-02-28 09:33    [W:0.197 / U:0.856 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site