mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-04 12:04:17 +00:00
Pull request efi-2025-04-rc5
UEFI: * Export _start symbol from crt0_*_efi stubs * Move .dynamic out of .text in EFI * scripts/Makefile.lib: Preserve the .dynstr section as well Documentation: * net: miiphybb: Convert documentation to rst -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEK7wKXt3/btL6/yA+hO4vgnE3U0sFAmfX39kACgkQhO4vgnE3 U0vo6xAAgr67Fq0wnNAllOa0UnL92pPWqJ/pCiTsG2aqs764KRTj0YPqruhZGCCR NnC83CFMK4SI2MEJ+/BlR+b42798gS8mKRsaKKFTIDW/VBmuqmNVH7BXA4IhhVc9 /msBqFYRNjhWM4M8gkyn98nEfUKC0jtnmJJDzCf2KnlCD9jqgV7/IqsvzhfOxSfY Xwf0ceZ5LbutGG0wF/8pc50sQw6Q6W+cPiBWN0GN1Ld9m8KyJbbpHwtT1U97SQmq 18zwDgQe/asRdVml22gcvU3X4KJhnUbKmcMHukVtzSpg5ZtTMsBc0M7BIjAfr81+ pzyAqYVyQgxaru9SGFUK33X+ah2azYb9NOQOAoIp31WY8kAfHF+3FM80jB6lae/x sUD0B6hVnVi5qZaIi3vr0yBM21a0irIxJiJ2MkaOSE8YcBOP+QX5wlsgwWaXrj5d F5rQ3pp8dBxMw5NBnmKwOJIUxcDXq/rW1PBoy3w3phhZp0Ob+DPz6pxSYqDeREHU bmS4hc/KAG/6Ai5wmGq6mnumfG0HkGWmvQTaA+FywLWrh41pTwdztL4Z4/yRFqfv caeGZaG78W2ObNb9jVRpZyNu6fufpAehh43aBqW77IfkT/nmhJC4+GSwP1E8EeZ9 v2OMer0Kf1meH+4JADV6p77SErKSxEclX7PrXn/jp74yPffxvVM= =33pH -----END PGP SIGNATURE----- Merge tag 'efi-2025-04-rc5' of https://source.denx.de/u-boot/custodians/u-boot-efi Pull request efi-2025-04-rc5 CI: * https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/25196 UEFI: * Export _start symbol from crt0_*_efi stubs * Move .dynamic out of .text in EFI * scripts/Makefile.lib: Preserve the .dynstr section as well Documentation: * net: miiphybb: Convert documentation to rst
This commit is contained in:
commit
3e806c41aa
8 changed files with 84 additions and 44 deletions
|
@ -144,6 +144,7 @@ section_table:
|
|||
IMAGE_SCN_CNT_INITIALIZED_DATA)
|
||||
|
||||
.align 12
|
||||
.globl _start
|
||||
_start:
|
||||
stp x29, x30, [sp, #-32]!
|
||||
mov x29, sp
|
||||
|
|
|
@ -143,6 +143,7 @@ section_table:
|
|||
IMAGE_SCN_CNT_INITIALIZED_DATA)
|
||||
|
||||
.align 12
|
||||
.globl _start
|
||||
_start:
|
||||
stmfd sp!, {r0-r2, lr}
|
||||
|
||||
|
|
|
@ -179,6 +179,7 @@ section_table:
|
|||
IMAGE_SCN_CNT_INITIALIZED_DATA)
|
||||
|
||||
.align 12
|
||||
.globl _start
|
||||
_start:
|
||||
addi sp, sp, -(SIZE_LONG * 3)
|
||||
SAVE_LONG(a0, 0)
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
This patch rewrites the miiphybb ( Bit-banged MII bus driver ) in order to
|
||||
support an arbitrary number of mii buses. This feature is useful when your
|
||||
board uses different mii buses for different phys and all (or a part) of these
|
||||
buses are implemented via bit-banging mode.
|
||||
|
||||
The driver requires that the following macros should be defined into the board
|
||||
configuration file:
|
||||
|
||||
CONFIG_BITBANGMII - Enable the miiphybb driver
|
||||
|
||||
The board code needs to fill the bb_miiphy_buses[] array with a record for
|
||||
each required bus and declare the bb_miiphy_buses_num variable with the
|
||||
number of mii buses. The record (struct bb_miiphy_bus) has the following
|
||||
fields/callbacks (see miiphy.h for details):
|
||||
|
||||
char name[] - The symbolic name that must be equal to the MII bus
|
||||
registered name
|
||||
int (*init)() - Initialization function called at startup time (just
|
||||
before the Ethernet initialization)
|
||||
int (*mdio_active)() - Activate the MDIO pin as output
|
||||
int (*mdio_tristate)() - Activate the MDIO pin as input/tristate pin
|
||||
int (*set_mdio)() - Write the MDIO pin
|
||||
int (*get_mdio)() - Read the MDIO pin
|
||||
int (*set_mdc)() - Write the MDC pin
|
||||
int (*delay)() - Delay function
|
||||
void *priv - Private data used by board specific code
|
||||
|
||||
The board code will look like:
|
||||
|
||||
struct bb_miiphy_bus bb_miiphy_buses[] = {
|
||||
{ .name = "miibus#1", .init = b1_init, .mdio_active = b1_mdio_active, ... },
|
||||
{ .name = "miibus#2", .init = b2_init, .mdio_active = b2_mdio_active, ... },
|
||||
...
|
||||
};
|
||||
int bb_miiphy_buses_num = sizeof(bb_miiphy_buses) /
|
||||
sizeof(bb_miiphy_buses[0]);
|
||||
|
||||
2009 Industrie Dial Face S.p.A.
|
||||
Luigi 'Comio' Mantellini <luigi.mantellini@idf-hit.com>
|
75
doc/develop/bitbangmii.rst
Normal file
75
doc/develop/bitbangmii.rst
Normal file
|
@ -0,0 +1,75 @@
|
|||
.. SPDX-License-Identifier: GPL-2.0-or-later
|
||||
.. Luigi 'Comio' Mantellini <luigi.mantellini@idf-hit.com>, Industrie Dial Face S.p.A., 2009
|
||||
|
||||
Bit-banged MII bus support
|
||||
==========================
|
||||
|
||||
The miiphybb ( Bit-banged MII bus driver ) supports an arbitrary number of
|
||||
MII buses. This feature is useful when a driver uses different MII buses for
|
||||
different PHYs and all (or a part) of these buses are implemented via
|
||||
bit-banging mode.
|
||||
|
||||
The driver requires that the following macro is defined in the board
|
||||
configuration file:
|
||||
|
||||
* CONFIG_BITBANGMII - Enable the miiphybb driver
|
||||
|
||||
The driver code needs to allocate a regular MDIO device using mdio_alloc()
|
||||
and assign .read and .write accessors which wrap bb_miiphy_read() and
|
||||
bb_miiphy_write() functions respectively. The bb_miiphy_read() and
|
||||
bb_miiphy_write() functions take a pointer to a callback structure,
|
||||
struct bb_miiphy_bus_ops. The struct bb_miiphy_bus_ops has the following
|
||||
fields/callbacks (see miiphy.h for details):
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
int (*mdio_active)() // Activate the MDIO pin as output
|
||||
int (*mdio_tristate)() // Activate the MDIO pin as input/tristate pin
|
||||
int (*set_mdio)() // Write the MDIO pin
|
||||
int (*get_mdio)() // Read the MDIO pin
|
||||
int (*set_mdc)() // Write the MDC pin
|
||||
int (*delay)() // Delay function
|
||||
|
||||
The driver code will look like:
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
static const struct bb_miiphy_bus_ops ravb_bb_miiphy_bus_ops = {
|
||||
.mdio_active = ravb_bb_mdio_active,
|
||||
.mdio_tristate = ravb_bb_mdio_tristate,
|
||||
.set_mdio = ravb_bb_set_mdio,
|
||||
.get_mdio = ravb_bb_get_mdio,
|
||||
.set_mdc = ravb_bb_set_mdc,
|
||||
.delay = ravb_bb_delay,
|
||||
};
|
||||
|
||||
static int ravb_bb_miiphy_read(struct mii_dev *miidev, int addr,
|
||||
int devad, int reg)
|
||||
{
|
||||
return bb_miiphy_read(miidev, &ravb_bb_miiphy_bus_ops,
|
||||
addr, devad, reg);
|
||||
}
|
||||
|
||||
static int ravb_bb_miiphy_write(struct mii_dev *miidev, int addr,
|
||||
int devad, int reg, u16 value)
|
||||
{
|
||||
return bb_miiphy_write(miidev, &ravb_bb_miiphy_bus_ops,
|
||||
addr, devad, reg, value);
|
||||
}
|
||||
|
||||
static int ravb_probe(struct udevice *dev)
|
||||
{
|
||||
struct mii_dev *mdiodev;
|
||||
...
|
||||
mdiodev = mdio_alloc();
|
||||
if (!mdiodev)
|
||||
return -ENOMEM;
|
||||
|
||||
mdiodev->read = ravb_bb_miiphy_read;
|
||||
mdiodev->write = ravb_bb_miiphy_write;
|
||||
mdiodev->priv = eth;
|
||||
snprintf(mdiodev->name, sizeof(mdiodev->name), dev->name);
|
||||
|
||||
ret = mdio_register(mdiodev);
|
||||
...
|
||||
}
|
|
@ -9,6 +9,7 @@ General
|
|||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
bitbangmii
|
||||
board_best_practices
|
||||
codingstyle
|
||||
designprinciples
|
||||
|
|
|
@ -21,10 +21,10 @@ SECTIONS
|
|||
*(.gnu.linkonce.t.*)
|
||||
*(.srodata)
|
||||
*(.rodata*)
|
||||
. = ALIGN(16);
|
||||
*(.dynamic);
|
||||
. = ALIGN(512);
|
||||
}
|
||||
. = ALIGN(16);
|
||||
.dynamic : { *(.dynamic) }
|
||||
. = ALIGN(512);
|
||||
.rela.dyn : { *(.rela.dyn) }
|
||||
.rela.plt : { *(.rela.plt) }
|
||||
.rela.got : { *(.rela.got) }
|
||||
|
|
|
@ -513,8 +513,8 @@ $(obj)/%_efi.S: $(obj)/%.efi
|
|||
$(call cmd,S_efi)
|
||||
|
||||
quiet_cmd_efi_objcopy = OBJCOPY $@
|
||||
cmd_efi_objcopy = $(OBJCOPY) -j .header -j .text -j .sdata -j .data -j \
|
||||
.dynamic -j .dynsym -j .rel* -j .rela* -j .reloc \
|
||||
cmd_efi_objcopy = $(OBJCOPY) -j .header -j .text -j .sdata -j .data \
|
||||
-j .dynamic -j .dynstr -j .dynsym -j .rel* -j .reloc \
|
||||
$(if $(EFI_TARGET),$(EFI_TARGET),-O binary) $^ $@
|
||||
|
||||
$(obj)/%.efi: $(obj)/%_efi.so
|
||||
|
|
Loading…
Add table
Reference in a new issue