<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/include/miiphy.h, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>net: remove unreachable legacy LED code</title>
<updated>2025-12-05T16:34:52+00:00</updated>
<author>
<name>Quentin Schulz</name>
<email>quentin.schulz@cherry.de</email>
</author>
<published>2025-11-19T16:43:48+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=715107089fb8823a4419f3a3bf2f26816450324c'/>
<id>715107089fb8823a4419f3a3bf2f26816450324c</id>
<content type='text'>
The code is guarded by a condition none of the defconfigs meet (that is
CONFIG_SYS_FAULT_ECHO_LINK_DOWN and CONFIG_LED_STATUS_RED both enabled),
so we can remove the unreachable code sections.

When doing that, there's no caller for miiphy_link anymore, so it can be
removed.

This in turns makes CONFIG_SYS_FAULT_ECHO_LINK_DOWN and
CONFIG_SYS_FAULT_MII_ADDR unused so they are removed as well.

Signed-off-by: Quentin Schulz &lt;quentin.schulz@cherry.de&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The code is guarded by a condition none of the defconfigs meet (that is
CONFIG_SYS_FAULT_ECHO_LINK_DOWN and CONFIG_LED_STATUS_RED both enabled),
so we can remove the unreachable code sections.

When doing that, there's no caller for miiphy_link anymore, so it can be
removed.

This in turns makes CONFIG_SYS_FAULT_ECHO_LINK_DOWN and
CONFIG_SYS_FAULT_MII_ADDR unused so they are removed as well.

Signed-off-by: Quentin Schulz &lt;quentin.schulz@cherry.de&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: mdio-uclass: introduce dm_eth_phy_connect_interface()</title>
<updated>2025-10-10T17:07:44+00:00</updated>
<author>
<name>Matthias Schiffer</name>
<email>matthias.schiffer@ew.tq-group.com</email>
</author>
<published>2025-09-30T08:05:10+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8db554dcbb2374a2dea130af56d781732070beb7'/>
<id>8db554dcbb2374a2dea130af56d781732070beb7</id>
<content type='text'>
dm_eth_phy_connect_interface() is a variant of dm_eth_phy_connect() that
allows to set the used PHY mode, in case the MAC driver needs to fix it
up. The previously static dm_eth_connect_phy_handle() is renamed and
extended for this purpose.

Signed-off-by: Matthias Schiffer &lt;matthias.schiffer@ew.tq-group.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
dm_eth_phy_connect_interface() is a variant of dm_eth_phy_connect() that
allows to set the used PHY mode, in case the MAC driver needs to fix it
up. The previously static dm_eth_connect_phy_handle() is renamed and
extended for this purpose.

Signed-off-by: Matthias Schiffer &lt;matthias.schiffer@ew.tq-group.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: miiphybb: Drop mdio_init()</title>
<updated>2025-03-11T22:06:18+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marek.vasut+renesas@mailbox.org</email>
</author>
<published>2025-03-02T01:24:52+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=33ccfae85372285690d8bd8256d994d7cb917cbf'/>
<id>33ccfae85372285690d8bd8256d994d7cb917cbf</id>
<content type='text'>
Inline mdio_init() back into mdio_alloc(), separate
access to mdio_init() is no longer necessary.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Reviewed-by: Paul Barker &lt;paul.barker.ct@bp.renesas.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Inline mdio_init() back into mdio_alloc(), separate
access to mdio_init() is no longer necessary.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Reviewed-by: Paul Barker &lt;paul.barker.ct@bp.renesas.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: miiphybb: Drop bb_miiphy_alloc()/bb_miiphy_free() and struct bb_miiphy_bus</title>
<updated>2025-03-11T22:05:57+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marek.vasut+renesas@mailbox.org</email>
</author>
<published>2025-03-02T01:24:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=256306593ecdde5fe01ecc5108d564e76ea8ba65'/>
<id>256306593ecdde5fe01ecc5108d564e76ea8ba65</id>
<content type='text'>
These functions are no longer necessary, remove them.
The struct bb_miiphy_bus is no longer necessary either,
remove it as well.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Reviewed-by: Paul Barker &lt;paul.barker.ct@bp.renesas.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These functions are no longer necessary, remove them.
The struct bb_miiphy_bus is no longer necessary either,
remove it as well.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Reviewed-by: Paul Barker &lt;paul.barker.ct@bp.renesas.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: miiphybb: Drop priv from struct bb_miiphy_bus</title>
<updated>2025-03-11T22:05:57+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marek.vasut+renesas@mailbox.org</email>
</author>
<published>2025-03-02T01:24:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=596d67e5163834893e9b59d7a5cb9e9a1cd8bc24'/>
<id>596d67e5163834893e9b59d7a5cb9e9a1cd8bc24</id>
<content type='text'>
Remove the priv member from struct bb_miiphy_bus and its assignment
from drivers. This turns struct bb_miiphy_bus int struct mii_dev
wrapper, to be cleaned up next.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Reviewed-by: Paul Barker &lt;paul.barker.ct@bp.renesas.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove the priv member from struct bb_miiphy_bus and its assignment
from drivers. This turns struct bb_miiphy_bus int struct mii_dev
wrapper, to be cleaned up next.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Reviewed-by: Paul Barker &lt;paul.barker.ct@bp.renesas.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: miiphybb: Pass struct mii_dev directly to bb_miiphy_read/write()</title>
<updated>2025-03-11T22:05:57+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marek.vasut+renesas@mailbox.org</email>
</author>
<published>2025-03-02T01:24:45+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7cded10da35730ff27062d19b8ad72242be8038f'/>
<id>7cded10da35730ff27062d19b8ad72242be8038f</id>
<content type='text'>
Access to MDIO bus private data can be provided by both
struct mii_dev .priv member and struct bb_miiphy_bus .priv
member, use the former directly and remove .priv from the
later. Drop unused bb_miiphy_getbus(). This removes any
dependency on struct bb_miiphy_bus from the miiphybb code,
except for helper functions which will be removed later.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Reviewed-by: Paul Barker &lt;paul.barker.ct@bp.renesas.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Access to MDIO bus private data can be provided by both
struct mii_dev .priv member and struct bb_miiphy_bus .priv
member, use the former directly and remove .priv from the
later. Drop unused bb_miiphy_getbus(). This removes any
dependency on struct bb_miiphy_bus from the miiphybb code,
except for helper functions which will be removed later.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Reviewed-by: Paul Barker &lt;paul.barker.ct@bp.renesas.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: miiphybb: Pass struct bb_miiphy_bus_ops directly to bb_miiphy_read/write()</title>
<updated>2025-03-11T22:05:57+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marek.vasut+renesas@mailbox.org</email>
</author>
<published>2025-03-02T01:24:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c5318bdcf80965fddccf68146c7838816aedb154'/>
<id>c5318bdcf80965fddccf68146c7838816aedb154</id>
<content type='text'>
The access to struct bb_miiphy_bus_ops via ops pointer in
struct bb_miiphy_bus is not necessary with wrappers added
in previous patch. Pass the ops pointer directly to both
bb_miiphy_read() and bb_miiphy_write() functions.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Reviewed-by: Paul Barker &lt;paul.barker.ct@bp.renesas.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The access to struct bb_miiphy_bus_ops via ops pointer in
struct bb_miiphy_bus is not necessary with wrappers added
in previous patch. Pass the ops pointer directly to both
bb_miiphy_read() and bb_miiphy_write() functions.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Reviewed-by: Paul Barker &lt;paul.barker.ct@bp.renesas.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: miiphybb: Split off struct bb_miiphy_bus_ops</title>
<updated>2025-03-11T22:05:57+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marek.vasut+renesas@mailbox.org</email>
</author>
<published>2025-03-02T01:24:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c9671c9036d465e0681d947b0b7a76019a096758'/>
<id>c9671c9036d465e0681d947b0b7a76019a096758</id>
<content type='text'>
Move miiphybb operations into separate struct bb_miiphy_bus_ops
structure, add pointer to struct bb_miiphy_bus_ops into the base
struct bb_miiphy_bus and access the ops through this pointer in
miiphybb generic code. The variable reshuffling in miiphybb.c
cannot be easily avoided.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Reviewed-by: Paul Barker &lt;paul.barker.ct@bp.renesas.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move miiphybb operations into separate struct bb_miiphy_bus_ops
structure, add pointer to struct bb_miiphy_bus_ops into the base
struct bb_miiphy_bus and access the ops through this pointer in
miiphybb generic code. The variable reshuffling in miiphybb.c
cannot be easily avoided.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Reviewed-by: Paul Barker &lt;paul.barker.ct@bp.renesas.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'v2025.04-rc4' into next</title>
<updated>2025-03-11T02:18:51+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2025-03-11T00:12:27+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1b42f57ec82ceba4d5f08cfb359717232301cfa5'/>
<id>1b42f57ec82ceba4d5f08cfb359717232301cfa5</id>
<content type='text'>
This uses Heinrich's merge of lib/efi_loader/efi_net.c which results in
no changes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This uses Heinrich's merge of lib/efi_loader/efi_net.c which results in
no changes.
</pre>
</div>
</content>
</entry>
<entry>
<title>miiphy: define mii_devs with LIST_HEAD()</title>
<updated>2025-03-04T14:03:47+00:00</updated>
<author>
<name>Weijie Gao</name>
<email>hackpascal@gmail.com</email>
</author>
<published>2025-01-25T15:26:32+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7e0370f37d242f45d2fcfa3ab727d48f88ccace9'/>
<id>7e0370f37d242f45d2fcfa3ab727d48f88ccace9</id>
<content type='text'>
When enabling net console and console multiplexing, a boot crash was
observed using mtk_eth driver with stdin/stdout set to "serial,nc"
in persistent environment:

&gt; CPU:   MediaTek MT7981
&gt; Model: OpenWrt One
&gt; DRAM:  1 GiB
&gt; Core:  35 devices, 15 uclasses, devicetree: separate
&gt; spi-nand: spi_nand spi_nand@0: Winbond SPI NAND was found.
&gt; spi-nand: spi_nand spi_nand@0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
&gt; Loading Environment from UBI... SF: Detected w25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
&gt; mtd: partition "ubi" extends beyond the end of device "spi-nand0" -- size truncated to 0x7f00000
&gt; Read 126976 bytes from volume ubootenv to 000000007f7bf0c0
&gt; Read 126976 bytes from volume ubootenv2 to 000000007f7de100
&gt; OK
&gt; "Synchronous Abort" handler, esr 0x96000004, far 0xeafffffeea000018
&gt; elr: 0000000041e63cd4 lr : 0000000041e1b844 (reloc)
&gt; elr: 000000007ff9ecd4 lr : 000000007ff56844
&gt; x0 : eafffffeea000018 x1 : 000000007fb552e0
&gt; x2 : 00000000000000fe x3 : 0000000000000000

The cause is that "serial,nc" forced the console subsystem to
initialize the ethernet driver before ethernet subsystem
initialization (console_init_r() is called before initr_net()).

During the mtk_eth driver initialization, mdio_register() will be
called, and miiphy_get_dev_by_name() will then be called.

The miiphy_get_dev_by_name() will check the list "mii_devs" to see
if the passed device name exists. However the mii_devs is defined
without initialization:
&gt; static struct list_head mii_devs;
and the actual initialization is done in the following chain:
initr_net -&gt; eth_initialize -&gt; eth_common_init -&gt; miiphy_init
Since initr_net() hasn't be called, iterating over the mii_devs
will access to physical address 0 (mii_devs.next == NULL) and will
cause the crash.

The fix is to define mii_devs using:
&gt; static LIST_HEAD(mii_devs);

As the "current_mii" is defined as a static variable, it will
always be NULL in board_r stage and initializing it will NULL is
unnecessary. So the entire miiphy_init() can be remove.

Signed-off-by: Weijie Gao &lt;hackpascal@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When enabling net console and console multiplexing, a boot crash was
observed using mtk_eth driver with stdin/stdout set to "serial,nc"
in persistent environment:

&gt; CPU:   MediaTek MT7981
&gt; Model: OpenWrt One
&gt; DRAM:  1 GiB
&gt; Core:  35 devices, 15 uclasses, devicetree: separate
&gt; spi-nand: spi_nand spi_nand@0: Winbond SPI NAND was found.
&gt; spi-nand: spi_nand spi_nand@0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
&gt; Loading Environment from UBI... SF: Detected w25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
&gt; mtd: partition "ubi" extends beyond the end of device "spi-nand0" -- size truncated to 0x7f00000
&gt; Read 126976 bytes from volume ubootenv to 000000007f7bf0c0
&gt; Read 126976 bytes from volume ubootenv2 to 000000007f7de100
&gt; OK
&gt; "Synchronous Abort" handler, esr 0x96000004, far 0xeafffffeea000018
&gt; elr: 0000000041e63cd4 lr : 0000000041e1b844 (reloc)
&gt; elr: 000000007ff9ecd4 lr : 000000007ff56844
&gt; x0 : eafffffeea000018 x1 : 000000007fb552e0
&gt; x2 : 00000000000000fe x3 : 0000000000000000

The cause is that "serial,nc" forced the console subsystem to
initialize the ethernet driver before ethernet subsystem
initialization (console_init_r() is called before initr_net()).

During the mtk_eth driver initialization, mdio_register() will be
called, and miiphy_get_dev_by_name() will then be called.

The miiphy_get_dev_by_name() will check the list "mii_devs" to see
if the passed device name exists. However the mii_devs is defined
without initialization:
&gt; static struct list_head mii_devs;
and the actual initialization is done in the following chain:
initr_net -&gt; eth_initialize -&gt; eth_common_init -&gt; miiphy_init
Since initr_net() hasn't be called, iterating over the mii_devs
will access to physical address 0 (mii_devs.next == NULL) and will
cause the crash.

The fix is to define mii_devs using:
&gt; static LIST_HEAD(mii_devs);

As the "current_mii" is defined as a static variable, it will
always be NULL in board_r stage and initializing it will NULL is
unnecessary. So the entire miiphy_init() can be remove.

Signed-off-by: Weijie Gao &lt;hackpascal@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
