<feed xmlns='http://www.w3.org/2005/Atom'>
<title>opensbi.git/lib/utils, branch v1.0</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/opensbi.git/atom/lib/utils?h=v1.0</id>
<link rel='self' href='http://cgit.235523.xyz/opensbi.git/atom/lib/utils?h=v1.0'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/'/>
<updated>2021-12-03T04:07:03Z</updated>
<entry>
<title>lib: pmu: support the event ID encoded by a bitmap.</title>
<updated>2021-12-03T04:07:03Z</updated>
<author>
<name>Vincent Chen</name>
<email>vincent.chen@sifive.com</email>
</author>
<published>2021-12-02T01:45:42Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=2428987cc06310f0e54abd4ce2efe3ed60f52245'/>
<id>urn:sha1:2428987cc06310f0e54abd4ce2efe3ed60f52245</id>
<content type='text'>
RISC-V privilege specification does not specify how to encode the event ID.
Therefore, each platform is allowed to customize its own encoding rule.
The common encoding methods are as follow, directly assigning a number to an
event, or every bit in the mphmevent CSR controls one specified event or
mixes the above two methods.

To enable OpenSBI to support the above three encoding methods simultaneously,
this patch repurpose the dt property "riscv,raw-event-to-mhpmcounters". The
"riscv,raw-event-to-mhpmcounters" will describes the one or multiple raw
events that could be counted by a set of counters. But, the column number
of "riscv,raw-event-to-mhpmcounters" is extended from 2 to 3. The 1st column
(64bit) is the ID of the raw events. The 2nd column (64bit) represents a
select_mask now to represent the bits used for event ID encoding.
If a platform directly encodes each raw PMU event as a unique ID,
the value of select_mask will be 0xffffffff_ffffffff.

Signed-off-by: Vincent Chen &lt;vincent.chen@sifive.com&gt;
Signed-off-by: Atish Patra&lt;atishp@rivosinc.com&gt;
Reviewed-by: Anup Patel &lt;anup.patel@wdc.com&gt;
</content>
</entry>
<entry>
<title>lib: utils: Add LiteX UART support</title>
<updated>2021-11-18T07:52:02Z</updated>
<author>
<name>Gabriel Somlo</name>
<email>gsomlo@gmail.com</email>
</author>
<published>2021-11-16T19:17:04Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=52af6e4b52d0ea1d687121bfba0954c2621d2629'/>
<id>urn:sha1:52af6e4b52d0ea1d687121bfba0954c2621d2629</id>
<content type='text'>
Add support for the UART provided by the LiteX SoC
framework (https://github.com/enjoy-digital/litex),
based on its FDT info (described in the Linux tree at
Documentation/devicetree/bindings/serial/litex,liteuart.yaml).

Signed-off-by: Gabriel Somlo &lt;gsomlo@gmail.com&gt;
Reviewed-by: Xiang W &lt;wxjstz@126.com&gt;
Reviewed-by: Anup Patel &lt;anup.patel@wdc.com&gt;
</content>
</entry>
<entry>
<title>lib: utils/i2c: Add minimal SiFive I2C driver</title>
<updated>2021-11-12T04:59:08Z</updated>
<author>
<name>Nikita Shubin</name>
<email>n.shubin@yadro.com</email>
</author>
<published>2021-11-10T09:42:29Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=13a1158d24f6462ecf17d63e0c2325994180deac'/>
<id>urn:sha1:13a1158d24f6462ecf17d63e0c2325994180deac</id>
<content type='text'>
Minimum SiFive I2C driver to read/send bytes over I2C bus.

This allows querying information and perform operation of onboard PMIC,
as well as power-off and reset.

Tested-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Reviewed-by: Alexandre Ghiti &lt;alexandre.ghiti@canonical.com&gt;
Tested-by: Alexandre Ghiti &lt;alexandre.ghiti@canonical.com&gt;
Signed-off-by: Nikita Shubin &lt;n.shubin@yadro.com&gt;
</content>
</entry>
<entry>
<title>lib: utils/i2c: Add simple FDT based I2C framework</title>
<updated>2021-11-12T04:49:45Z</updated>
<author>
<name>Nikita Shubin</name>
<email>n.shubin@yadro.com</email>
</author>
<published>2021-11-10T09:42:28Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=6ca6bcafb74d2dc43a5082c1b7caf6b2aa453c2d'/>
<id>urn:sha1:6ca6bcafb74d2dc43a5082c1b7caf6b2aa453c2d</id>
<content type='text'>
FDT based I2C framework on the top of I2C library.

The drivers are probed on demand by fdt_i2c_adapter_get
function.

Tested-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Reviewed-by: Alexandre Ghiti &lt;alexandre.ghiti@canonical.com&gt;
Tested-by: Alexandre Ghiti &lt;alexandre.ghiti@canonical.com&gt;
Signed-off-by: Nikita Shubin &lt;n.shubin@yadro.com&gt;
</content>
</entry>
<entry>
<title>lib: utils/i2c: Add generic I2C configuration library</title>
<updated>2021-11-12T04:47:50Z</updated>
<author>
<name>Nikita Shubin</name>
<email>n.shubin@yadro.com</email>
</author>
<published>2021-11-10T09:42:27Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=2c964a2e159880c921a33f51f493a3a257d4bfce'/>
<id>urn:sha1:2c964a2e159880c921a33f51f493a3a257d4bfce</id>
<content type='text'>
Helper library to keep track of registered I2C adapters,
identified by dts offset, basic send/read functions and
adapter configuration (enable, set dividers, etc...).

Tested-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Reviewed-by: Alexandre Ghiti &lt;alexandre.ghiti@canonical.com&gt;
Tested-by: Alexandre Ghiti &lt;alexandre.ghiti@canonical.com&gt;
Signed-off-by: Nikita Shubin &lt;n.shubin@yadro.com&gt;
</content>
</entry>
<entry>
<title>lib: utils/reset: separate driver init func</title>
<updated>2021-11-12T04:46:23Z</updated>
<author>
<name>Nikita Shubin</name>
<email>n.shubin@yadro.com</email>
</author>
<published>2021-11-10T09:42:26Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=1d462e039782e49d2a96a776e50b7478d87b228d'/>
<id>urn:sha1:1d462e039782e49d2a96a776e50b7478d87b228d</id>
<content type='text'>
Move driver init code to separate function, so it can be reused
elsewhere.

Tested-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Reviewed-by: Alexandre Ghiti &lt;alexandre.ghiti@canonical.com&gt;
Tested-by: Alexandre Ghiti &lt;alexandre.ghiti@canonical.com&gt;
Signed-off-by: Nikita Shubin &lt;n.shubin@yadro.com&gt;
</content>
</entry>
<entry>
<title>lib: utils/reset: add priority to gpio reset</title>
<updated>2021-11-12T04:45:54Z</updated>
<author>
<name>Nikita Shubin</name>
<email>n.shubin@yadro.com</email>
</author>
<published>2021-11-10T09:42:25Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=94eba23376b5324f012e8e035a341d6d2d625b27'/>
<id>urn:sha1:94eba23376b5324f012e8e035a341d6d2d625b27</id>
<content type='text'>
Make gpio_system_reset_check return priority instead of just true/false.

Make default 128 priority for reset/shutdown.

Tested-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Reviewed-by: Alexandre Ghiti &lt;alexandre.ghiti@canonical.com&gt;
Tested-by: Alexandre Ghiti &lt;alexandre.ghiti@canonical.com&gt;
Signed-off-by: Nikita Shubin &lt;n.shubin@yadro.com&gt;
</content>
</entry>
<entry>
<title>lib: utils: Rename the prefix in PMU DT properties</title>
<updated>2021-11-11T12:24:46Z</updated>
<author>
<name>Atish Patra</name>
<email>atish.patra@wdc.com</email>
</author>
<published>2021-11-08T18:53:06Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=15906a3984f7c22b81802bcadaa4e517f4f685c8'/>
<id>urn:sha1:15906a3984f7c22b81802bcadaa4e517f4f685c8</id>
<content type='text'>
As per the DT schema rules, the prefix should be vendor. As the PMU
properties are generic for all vendors, change the prefix to riscv
instead of pmu.

Reviewed-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Signed-off-by: Atish Patra &lt;atish.patra@wdc.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Enable PMU extension for platforms without mcountinhibit</title>
<updated>2021-11-11T12:24:01Z</updated>
<author>
<name>Atish Patra</name>
<email>atish.patra@wdc.com</email>
</author>
<published>2021-11-08T18:53:05Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=b28f07005cef03d5eea43a8a7954154b391871fe'/>
<id>urn:sha1:b28f07005cef03d5eea43a8a7954154b391871fe</id>
<content type='text'>
Some platforms such as hifive unmatched doesn't implement mcountinhibit
csr. However, it has hardware events that can be monitored using 2
hpmcounter it has (i.e. mhpmcounter3 &amp; mhpmcounter4).

Currently, PMU extension disabled if mcountinhibit is absent. That's not
really necessary as long as the supervisor OS keeps track of the delta
value of the counters. Without mcountinhibit, the delta value won't be
entirely accurate because the counters are freely running. However, that
should be fine to produce an approximate counter value which can help
performance analysis. Perf sampling won't work though as sscof extension
is not present in hifive unmatched.

Reviewed-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Signed-off-by: Atish Patra &lt;atish.patra@wdc.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi: error handling in fdt_reset_init()</title>
<updated>2021-11-08T05:20:48Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2021-11-06T09:54:51Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=be245acfffa297b5ed4e0c7bb473a6bd55231bf8'/>
<id>urn:sha1:be245acfffa297b5ed4e0c7bb473a6bd55231bf8</id>
<content type='text'>
The initialization of a reset driver may fail for various reasons, like
a PMIC based reset driver not finding the required I2C driver. The return
code of the init routine may take other error values than -ENODEV.

If the initialization of a reset driver fails, this should not lead to the
board hanging. It is enough that the reset driver does not call
sbi_system_reset_add_device() to avoid invoking the driver for a device
that could not be initialized.

Change the return type of fdt_reset_init() to void.
Print a message if an error occurs.

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Reviewed-by: Dong Du &lt;Dd_nirvana@sjtu.edu.cn&gt;
Reviewed-by: Anup Patel &lt;anup.patel@wdc.com&gt;
</content>
</entry>
</feed>
