<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/clk/at91, branch linux-5.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-05-25T07:14:36Z</updated>
<entry>
<title>clk: at91: generated: consider range when calculating best rate</title>
<updated>2022-05-25T07:14:36Z</updated>
<author>
<name>Codrin Ciubotariu</name>
</author>
<published>2022-04-13T07:13:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d672eee9e404805e1c2aeb8b16ba43c9cdffff46'/>
<id>urn:sha1:d672eee9e404805e1c2aeb8b16ba43c9cdffff46</id>
<content type='text'>
[ Upstream commit d0031e6fbed955ff8d5f5bbc8fe7382482559cec ]

clk_generated_best_diff() helps in finding the parent and the divisor to
compute a rate closest to the required one. However, it doesn't take into
account the request's range for the new rate. Make sure the new rate
is within the required range.

Fixes: 8a8f4bf0c480 ("clk: at91: clk-generated: create function to find best_diff")
Signed-off-by: Codrin Ciubotariu &lt;codrin.ciubotariu@microchip.com&gt;
Link: https://lore.kernel.org/r/20220413071318.244912-1-codrin.ciubotariu@microchip.com
Reviewed-by: Claudiu Beznea &lt;claudiu.beznea@microchip.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: at91: check pmc node status before registering syscore ops</title>
<updated>2021-11-17T08:48:42Z</updated>
<author>
<name>Clément Léger</name>
</author>
<published>2021-09-13T08:26:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e7df004eb14e1f22c47e1d7b7bd739278c22c59b'/>
<id>urn:sha1:e7df004eb14e1f22c47e1d7b7bd739278c22c59b</id>
<content type='text'>
[ Upstream commit c405f5c15e9f6094f2fa1658e73e56f3058e2122 ]

Currently, at91 pmc driver always register the syscore_ops whatever
the status of the pmc node that has been found. When set as secure
and disabled, the pmc should not be accessed or this will generate
abort exceptions.
To avoid this, add a check on node availability before registering
the syscore operations.

Signed-off-by: Clément Léger &lt;clement.leger@bootlin.com&gt;
Link: https://lore.kernel.org/r/20210913082633.110168-1-clement.leger@bootlin.com
Acked-by: Nicolas Ferre &lt;nicolas.ferre@microchip.com&gt;
Reviewed-by: Claudiu Beznea &lt;claudiu.beznea@microchip.com&gt;
Fixes: b3b02eac33ed ("clk: at91: Add sama5d2 suspend/resume")
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: at91: clk-generated: Limit the requested rate to our range</title>
<updated>2021-09-22T10:26:25Z</updated>
<author>
<name>Codrin Ciubotariu</name>
</author>
<published>2021-07-07T13:12:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e46ce5a8aba5e14e71934ceebefa958027eda77c'/>
<id>urn:sha1:e46ce5a8aba5e14e71934ceebefa958027eda77c</id>
<content type='text'>
[ Upstream commit af7651e67b9d5f7e63ea23b118e3672ac662244a ]

On clk_generated_determine_rate(), the requested rate could be outside
of clk's range. Limit the rate to the clock's range to not return an
error.

Fixes: df70aeef6083 ("clk: at91: add generated clock driver")
Signed-off-by: Codrin Ciubotariu &lt;codrin.ciubotariu@microchip.com&gt;
Link: https://lore.kernel.org/r/20210707131213.3283509-1-codrin.ciubotariu@microchip.com
Acked-by: Nicolas Ferre &lt;nicolas.ferre@microchip.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: at91: clk-generated: pass the id of changeable parent at registration</title>
<updated>2021-09-22T10:26:25Z</updated>
<author>
<name>Claudiu Beznea</name>
</author>
<published>2020-07-22T07:38:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=557f6445e37fc13840d0360c2ef4cd6748f6f0b3'/>
<id>urn:sha1:557f6445e37fc13840d0360c2ef4cd6748f6f0b3</id>
<content type='text'>
[ Upstream commit 64c9247b9e87e96e41cea545eb64727cee10c55c ]

Pass the ID of changeable parent at registration. This will allow
the scalability of this clock driver with regards to the changeable
parent ID for versions of this IP where changeable parent is not the
last one in the parents list (e.g. SAMA7G5). With this the clock flags
are set to zero in case we have no changeable parent. Also in
clk_generated_best_diff() the *best_diff variable is check against
tmp_diff variable using "&gt;=" operator instead of "&gt;" so that in case
the requested frequency could be obtained using fix parents + gck
dividers but the clock also supports changeable parent to be able
to force the usage of the changeable parent.

Signed-off-by: Claudiu Beznea &lt;claudiu.beznea@microchip.com&gt;
Link: https://lore.kernel.org/r/1595403506-8209-11-git-send-email-claudiu.beznea@microchip.com
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: at91: sam9x60: Don't use audio PLL</title>
<updated>2021-09-22T10:26:25Z</updated>
<author>
<name>Codrin Ciubotariu</name>
</author>
<published>2020-01-31T11:58:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d93a37889e3a3920dc69ba3036a870cd9396a53c'/>
<id>urn:sha1:d93a37889e3a3920dc69ba3036a870cd9396a53c</id>
<content type='text'>
[ Upstream commit 5bf7f4a249387a6062b9a14c8a77e7ba2fd6a53b ]

On sam9x60, there is not audio PLL and so I2S and classD have to use one
of the best matching parents for their generated clock.

Fixes: 01e2113de9a5 ("clk: at91: add sam9x60 pmc driver")
Signed-off-by: Codrin Ciubotariu &lt;codrin.ciubotariu@microchip.com&gt;
Link: https://lkml.kernel.org/r/20200131115816.12483-1-codrin.ciubotariu@microchip.com
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: at91: sam9x60: remove atmel,osc-bypass support</title>
<updated>2020-12-30T10:51:29Z</updated>
<author>
<name>Alexandre Belloni</name>
</author>
<published>2020-12-02T12:58:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ef56621a579a705459be5c60fdd17b87d4e80a3c'/>
<id>urn:sha1:ef56621a579a705459be5c60fdd17b87d4e80a3c</id>
<content type='text'>
[ Upstream commit 01324f9e88b5cfc1f4c26eef66bdcb52596c9af8 ]

The sam9x60 doesn't have the MOSCXTBY bit to enable the crystal oscillator
bypass.

Fixes: 01e2113de9a5 ("clk: at91: add sam9x60 pmc driver")
Reported-by: Claudiu Beznea &lt;claudiu.beznea@microchip.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20201202125816.168618-1-alexandre.belloni@bootlin.com
Reviewed-by: Claudiu Beznea &lt;claudiu.beznea@microchip.com&gt;
Tested-by: Claudiu Beznea &lt;claudiu.beznea@microchip.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: at91: clk-main: update key before writing AT91_CKGR_MOR</title>
<updated>2020-10-29T08:57:55Z</updated>
<author>
<name>Claudiu Beznea</name>
</author>
<published>2020-08-25T06:59:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c10e3c919a6901f1693a83c867724ce03510a4a8'/>
<id>urn:sha1:c10e3c919a6901f1693a83c867724ce03510a4a8</id>
<content type='text'>
[ Upstream commit 85d071e7f19a6a9abf30476b90b3819642568756 ]

SAMA5D2 datasheet specifies on chapter 33.22.8 (PMC Clock Generator
Main Oscillator Register) that writing any value other than
0x37 on KEY field aborts the write operation. Use the key when
selecting main clock parent.

Fixes: 27cb1c2083373 ("clk: at91: rework main clk implementation")
Signed-off-by: Claudiu Beznea &lt;claudiu.beznea@microchip.com&gt;
Reviewed-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/1598338751-20607-3-git-send-email-claudiu.beznea@microchip.com
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: at91: usb: continue if clk_hw_round_rate() return zero</title>
<updated>2020-04-23T08:36:28Z</updated>
<author>
<name>Claudiu Beznea</name>
</author>
<published>2020-01-17T11:36:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0d03cbfdf3641763c9f79b6dab380f89672e6852'/>
<id>urn:sha1:0d03cbfdf3641763c9f79b6dab380f89672e6852</id>
<content type='text'>
[ Upstream commit b0ecf1c6c6e82da4847900fad0272abfd014666d ]

clk_hw_round_rate() may call round rate function of its parents. In case
of SAM9X60 two of USB parrents are PLLA and UPLL. These clocks are
controlled by clk-sam9x60-pll.c driver. The round rate function for this
driver is sam9x60_pll_round_rate() which call in turn
sam9x60_pll_get_best_div_mul(). In case the requested rate is not in the
proper range (rate &lt; characteristics-&gt;output[0].min &amp;&amp;
rate &gt; characteristics-&gt;output[0].max) the sam9x60_pll_round_rate() will
return a negative number to its caller (called by
clk_core_round_rate_nolock()). clk_hw_round_rate() will return zero in
case a negative number is returned by clk_core_round_rate_nolock(). With
this, the USB clock will continue its rate computation even caller of
clk_hw_round_rate() returned an error. With this, the USB clock on SAM9X60
may not chose the best parent. I detected this after a suspend/resume
cycle on SAM9X60.

Signed-off-by: Claudiu Beznea &lt;claudiu.beznea@microchip.com&gt;
Link: https://lkml.kernel.org/r/1579261009-4573-2-git-send-email-claudiu.beznea@microchip.com
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: at91: usb: use proper usbs_mask</title>
<updated>2020-04-21T07:04:54Z</updated>
<author>
<name>Claudiu Beznea</name>
</author>
<published>2020-01-17T11:36:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c2c5d07090d4f41d992a792000353fb80c70cc41'/>
<id>urn:sha1:c2c5d07090d4f41d992a792000353fb80c70cc41</id>
<content type='text'>
commit d7a83d67a1694c42cc95fc0755d823f7ca3bfcfb upstream.

Use usbs_mask passed as argument. The usbs_mask is different for
SAM9X60.

Fixes: 2423eeaead6f8 ("clk: at91: usb: Add sam9x60 support")
Signed-off-by: Claudiu Beznea &lt;claudiu.beznea@microchip.com&gt;
Link: https://lkml.kernel.org/r/1579261009-4573-4-git-send-email-claudiu.beznea@microchip.com
Acked-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>clk: at91: sam9x60: fix usb clock parents</title>
<updated>2020-04-21T07:04:53Z</updated>
<author>
<name>Claudiu Beznea</name>
</author>
<published>2020-01-17T11:36:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=90c1f740ddf87893430c0c764c437f482737e1e9'/>
<id>urn:sha1:90c1f740ddf87893430c0c764c437f482737e1e9</id>
<content type='text'>
commit 43b203d32b77d1b1b2209e22837f49767020553e upstream.

SAM9X60's USB clock has 3 parents: plla, upll and main_osc.

Fixes: 01e2113de9a5 ("clk: at91: add sam9x60 pmc driver")
Signed-off-by: Claudiu Beznea &lt;claudiu.beznea@microchip.com&gt;
Link: https://lkml.kernel.org/r/1579261009-4573-3-git-send-email-claudiu.beznea@microchip.com
Acked-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
