Commit Graph

66009 Commits

Author SHA1 Message Date
Tom Rini
2b8692bac1 Pull request for UEFI sub-system for efi-2020-07-rc5 (2)
Fix memory reservations: do not use random bytes from the stack.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAl7s/CIACgkQxIHbvCwF
 GsQkGQ/+KU1BZ4ul3LJhOFI9Un6JyEaooKo1YzvwW4ae81FQbw74C+xDNCPDAa0n
 ovsGIBegjZWERb2q9NPIxfX1SWy2tspjENvIC5odXyhuTvyyYUttXlOrOSOrJUbv
 w0uJbqkO6ZhsPVc7i1Xqw7aKd0Mvzt/i/v1nRFnuaNjwFIW/eKrEsQpoze1EVbQv
 WHKVa+k/gLI3LtcbJLY1cF0bchHmLLu1GalaxpZCviUz2jw88vit2ovH6Ng842gW
 uJorr9bF1jYSpD8UA6fYqrFm956gys/5NCKEncbJbO729i34BcqYzlVoe+vOdKrF
 xcYCa+ZZwHPSsuaAmE3+vjX9dmtrzWWLljAyL9X4werB9zPuQMIPjKXjDbPuh5aL
 MODXCI1llDaA7ZVSLZULZPqgtLBCbsNKBtRGmeiclS9kuK1FVgHcwkmJuBbMvU1W
 8Spf/DS8OABzrDMyfIAmB2RAbpxUSKHC4TJHlW2zu7u0tUd81igMM1JsnL2CiIh8
 3yZHAiFTm2QL6sO46KixbzNnueq3G3QRx4pE55Dr3Elgn0rsKrTURhqNL0csORkX
 Pg0Xg7wxRx7bgYuUmAYeEsP4F+0SeZFJgMGcPh5bPtCXhhMCT+GEOw8mze/gG6PA
 tMnhFuKKcp9wAkxZtm2I3OJZDBrZ3js2iaYaV1M6Mlpdxc7mRwE=
 =j2MV
 -----END PGP SIGNATURE-----

Merge tag 'efi-2020-07-rc5-2' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for UEFI sub-system for efi-2020-07-rc5 (2)

Fix memory reservations: do not use random bytes from the stack.
2020-06-19 14:22:23 -04:00
Tom Rini
1e389a434a - fix SD card cart detect on DHCOM and ST boards
-----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEE56Yx6b9SnloYCWtD4rK92eCqk3UFAl7srSQACgkQ4rK92eCq
 k3XpwQf9HMLY4XImTMrRnvlnEBLVqb2CoA5vNqebnOcwLiIKqmkvT+5lGoQPxbjk
 9pwAJ+Em8KqqyPWbzW6IRzd2oR2bKBmEjvUBqLLP8MhPOqY5xhMfKmzDw6n7/mrF
 iiZ28itft3n47qUBakBf/hoGyX82gBebnIXL1Au19plqgYHqV5hAJjlZWkCWk8Ku
 ZsSvk/LBmvufgyp+uQS/OI46O1Q26sjuopumtYn5cz+wHv3VwwGCjBQ1tqAGlpwJ
 ggqbCeEM7xIKU9ZOGdI5HYSUKJR6HGgK3w7x4Qe3yl2xEQ4qQIJGq2rZufqvJbIg
 vmN+NNmjIO5dxO+YolPcRwBtK4fiqg==
 =Auvp
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-stm32-20200619' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm

- fix SD card cart detect on DHCOM and ST boards
2020-06-19 12:41:24 -04:00
Tom Rini
d0cc022820 Merge https://gitlab.denx.de/u-boot/custodians/u-boot-tegra 2020-06-19 12:41:05 -04:00
Patrick Delaunay
792919241b ARM: dts: stm32: Reinstate card detect behavior on ST boards
The cd-gpios with (GPIO_ACTIVE_LOW | GPIO_PULL_UP) gpio is thus far
unsupported, reinstate the old cd-gpios behavior until this handling
is fully implemented. This avoid potential issue for SDCard boot:
the card detect fails with floating gpio.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-06-19 14:18:36 +02:00
Marek Vasut
3c2e2a1a79 ARM: dts: stm32: Reinstate card detect behavior on DHSOM
The cd-gpios with (GPIO_ACTIVE_LOW | GPIO_PULL_UP) gpio is thus far
unsupported, reinstate the old cd-gpios behavior until this handling
is fully implemented. This permits the DHSOM to boot from SD again,
without this patch the card detect fails.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
2020-06-19 09:43:59 +02:00
Atish Patra
0d7c2913fd cmd: bootefi: Honor the address & size cells properties correctly
fdtdec_get_addr_size reads the uses a fixed value for address & size
cell properties which may not be correct always.

Use the auto variant of the function which automatically reads
 #address-cells & #size-cells from parent and uses to read the "reg"
property.

Signed-off-by: Atish Patra <atish.patra@wdc.com>

On 32 bit systems fdt_addr_t may be 4 bytes long but size is defined as
u64. Avoid filling the upper 4 bytes of the sizep parameter of
fdtdec_get_addr_size_auto_parent() with random bytes from the stack by
defining a separate variable fdt_size.

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-06-19 09:00:38 +02:00
Tom Warren
7b4f42b6cd t210: Nano: Add NVME support
This allows Nano to use the key M.2 on the CVB to connect and use a M.2
NVMe SSD stick. Works on my Nano B00, WD SN750 NVMe SSD shows up
w/'nvme' commands. Will add booting from NVMe via distro cmds in a future
patch.

Signed-off-by: Tom Warren <twarren@nvidia.com>
2020-06-18 15:12:34 -07:00
Tom Rini
5c3cd8e2e1 - fix stdout in default environment for apalis_imx6, colibri_imx6
and cm_fx6 boards
 -----BEGIN PGP SIGNATURE-----
 
 iGwEABECACwWIQSC4hxrSoIUVfFO0kRM6ATMmsalXAUCXuvX2Q4cYWd1c3RAZGVu
 eC5kZQAKCRBM6ATMmsalXKQ9AJ4tL6uvQ0owuKlt5lkf3us6Dp7xwACfSJQrpmvj
 fv4v4CCCv44oBkqwHtc=
 =k6d2
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-v2020.07-rc4' of https://gitlab.denx.de/u-boot/custodians/u-boot-video

- fix stdout in default environment for apalis_imx6, colibri_imx6
  and cm_fx6 boards
2020-06-18 18:00:05 -04:00
Tom Rini
04909251fd - migrate remaining imx5/imx6qd boards to DM_VIDEO
- use 'vidconsole' stdout in nitrogen6x upgrade script
 - add option for selection of the vidconsole commands
   lcdputs and setcurs
 - allow building ipuv3 driver with disabled CONFIG_PANEL
 - make backlight and panel drivers optional
 - remove useless code from ipuv3 driver
 - extend existing DM_VIDEO work-around for console name
   to support 'vga'
 - remove non-DM code in ipuv3
 -----BEGIN PGP SIGNATURE-----
 
 iGwEABECACwWIQSC4hxrSoIUVfFO0kRM6ATMmsalXAUCXuvRkA4cYWd1c3RAZGVu
 eC5kZQAKCRBM6ATMmsalXMpeAJkB/FzsJ3O7putHrbLKOrLRF3zZYwCfQxa9jKuh
 DXNTYVrHS/43T8ijGYo=
 =7G75
 -----END PGP SIGNATURE-----

Merge tag 'video-next' of https://gitlab.denx.de/u-boot/custodians/u-boot-video into next

- migrate remaining imx5/imx6qd boards to DM_VIDEO
- use 'vidconsole' stdout in nitrogen6x upgrade script
- add option for selection of the vidconsole commands
  lcdputs and setcurs
- allow building ipuv3 driver with disabled CONFIG_PANEL
- make backlight and panel drivers optional
- remove useless code from ipuv3 driver
- extend existing DM_VIDEO work-around for console name
  to support 'vga'
- remove non-DM code in ipuv3
2020-06-18 16:59:16 -04:00
Igor Opaniuk
c46443dd85 colibri_t20: change maintainer
Take over maintainership for Colibri T20 module.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Acked-by: Lucas Stach <dev@lynxeye.de>
2020-06-18 13:15:02 -07:00
Jon Hunter
1ec7453384 ARM: tegra: Enable PSCI support for Tegra210 and Tegra186
The PSCI nodes are currently not populated for the Tegra210 and Tegra186
devices. This prevents the PSCI driver from being able to identify the
PSCI method used by these devices and causes the probe of the PSCI
driver to fail.

Since commit 81ea00838c ("efi_loader: PSCI reset and shutdown") was
added, which moves the PSCI EFI system reset handler into the PSCI
driver, this has prevented the EFI system reset from working for
Tegra210 and Tegra186. Therefore, populating these nodes is necessary
to fix the EFI system reset for Tegra210 and Tegra186.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
2020-06-18 13:14:50 -07:00
Jon Hunter
fb264efbd2 firmware: PSCI: Fix PSCI support for OF live trees
When CONFIG_OF_LIVE is enabled, dev_of_offset() cannot be used and
if used returns an invalid offset. This causes the call to
fdt_stringlist_get() in the psci_probe() to fail to read the 'method'
property from the PSCI node for the device and hence prevents PSCI
from working. Fix this by using the ofnode_read_string() API instead
of the fdt_stringlist_get() because this will handle reading the
property both when CONFIG_OF_LIVE is enabled or disabled.

Due to the above problem and since commit 81ea00838c ("efi_loader:
PSCI reset and shutdown") was added, the EFI system reset has been
broken for Tegra210 and Tegra196 platforms. This also fixes the EFI
system reset for these Tegra platforms.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
2020-06-18 13:14:50 -07:00
Tom Rini
717e779f6e Azure/GitLab: Move to latest Docker image
- Add guestfstools, efitools
- Latest Ubuntu/bionic snapshot

Signed-off-by: Tom Rini <trini@konsulko.com>
2020-06-18 13:51:39 -04:00
Anatolij Gustschin
fb3dd9c005 video: ipuv3: remove non-DM code
All ipuv3 users have been converted, drop obsolete code.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2020-06-18 19:38:50 +02:00
Anatolij Gustschin
3715791e8a imx: convert mx53loco board to DM_VIDEO
Migration to DM_VIDEO driver is long overdue. Update defconfig
to enable usage of converted ipuv3 driver DM configuration.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Jason Liu <jason.hui.liu@nxp.com>
Acked-by: Jason Liu<jason.hui.liu@nxp.com>
2020-06-18 19:38:37 +02:00
Anatolij Gustschin
ff4e52e2f1 imx: convert mx51evk board to DM_VIDEO
Migration to DM_VIDEO driver is long overdue. Update defconfig
to enable usage of converted ipuv3 driver DM configuration.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
2020-06-18 19:38:18 +02:00
Anatolij Gustschin
d37618d18d imx: convert gwventana board to DM_VIDEO
Migration to DM_VIDEO driver is long overdue. Update defconfigs
to enable usage of converted ipuv3 driver DM configuration.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Tim Harvey <tharvey@gateworks.com>
2020-06-18 19:38:07 +02:00
Anatolij Gustschin
c0d5117289 imx: convert mx6cuboxi board to DM_VIDEO
Migration to DM_VIDEO driver is long overdue. Update defconfig
to enable usage of converted ipuv3 driver DM configuration.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Baruch Siach <baruch@tkos.co.il>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
2020-06-18 19:37:58 +02:00
Anatolij Gustschin
1e916aa021 imx: convert cgtqmx6eval board to DM_VIDEO
Migration to DM_VIDEO driver is long overdue. Update defconfig
to enable usage of converted ipuv3 driver DM configuration.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Otavio Salvador <otavio@ossystems.com.br>
2020-06-18 19:37:49 +02:00
Anatolij Gustschin
bf4d323817 imx: convert dms-ba16 boards to DM_VIDEO
Migration to DM_VIDEO driver is long overdue. Update defconfigs
to enable usage of converted ipuv3 driver DM configuration.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Akshay Bhat <akshaybhat@timesys.com>
Cc: Ken Lin <Ken.Lin@advantech.com.tw>
2020-06-18 19:37:41 +02:00
Anatolij Gustschin
ddfda8ec76 imx: convert pico-imx6 to DM_VIDEO
Update defconfig to enable usage of converted ipuv3
driver DM configuration.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
2020-06-18 19:37:29 +02:00
Anatolij Gustschin
3f15df3c0b imx: convert embest boards to DM_VIDEO
Migration to DM_VIDEO driver is long overdue. Update defconfigs
to enable usage of converted ipuv3 driver DM configuration.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Eric Bénard <eric@eukrea.com>
2020-06-18 19:36:51 +02:00
Marek Vasut
10fa7ec9f6 ARM: rmobile: Increase PHY auto-negotiation timeout to 20s
The ethernet PHY on all known Gen3 boards takes a while to come out
of reset, increase the auto-negotiation timeout to prevent it from
timing out in case the ethernet is used right after the board was
reset.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2020-06-18 19:35:03 +02:00
Marek Vasut
d789a8259e net: pcnet: Add Kconfig entries
Add Kconfig entries for the pcnet driver and convert MIPS malta
to use those.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
2020-06-18 19:34:41 +02:00
Marek Vasut
59edb2668e net: pcnet: Add DM support
With all the changes in place, add support for DM into the
pcnet driver.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
2020-06-18 19:34:41 +02:00
Marek Vasut
dea9b6014b net: pcnet: Split common and non-DM functions
Pull the common parts of functions out so they can be reused by both
DM and non-DM code paths. The recv() function had to be reworked to
fit into this scheme and this means it now only receives one packet
at a time instead of spinning in an endless loop.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
2020-06-18 19:34:41 +02:00
Marek Vasut
1023a1e6a9 net: pcnet: Wrap name and enetaddr into private data
Instead of using the non-DM-only name and enetaddr in struct eth_device,
add pointers into the private data which can either point to that non-DM
name or a DM one later on.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
2020-06-18 19:34:41 +02:00
Marek Vasut
3b2d63a739 net: pcnet: Wrap iobase into private data
Instead of using the non-DM-only iobase in struct eth_device, add
one into the private data to make DM and non-DM operation possible.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
2020-06-18 19:34:40 +02:00
Marek Vasut
fdf6cbe54d net: pcnet: Pass private data through dev->priv
Get rid of the global point to private data, and rather pass it
thought dev->priv. Also remove the unnecessary check for lp being
non-NULL, since it is always NULL at this point.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
2020-06-18 19:34:40 +02:00
Marek Vasut
60074d9d3e net: pcnet: Wrap devbusfn into private data
Instead of using eth_device priv for this PCI devbusfn, free it
so it could be used for driver private data, and wrap devbusfn
into those driver private data.

Note that using the name dev for the variable is a trick left for
later, when DM support is in place, so dm_pci_virt_to_mem() can be
used with minimal ifdeffery.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
2020-06-18 19:34:40 +02:00
Marek Vasut
d20e857e6b net: pcnet: Drop useless forward declarations
Remove those as they are not needed anymore.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
2020-06-18 19:34:40 +02:00
Marek Vasut
69e08bd735 net: pcnet: Move initialize function at the end
Move the function at the end of the driver, so we could drop
various forward declarations later. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
2020-06-18 19:34:40 +02:00
Marek Vasut
246d2bfcf2 net: pcnet: Move private data allocation to initialize
The private data allocation does not have to be done every time the
NIC is initialized at run time, move the allocation to initialize
function, which means it will be done only once when the driver
starts.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
2020-06-18 19:34:40 +02:00
Marek Vasut
ae38e96c23 net: pcnet: Replace memset+malloc with calloc
This combination of functions can be replaced with calloc(),
make it so.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
2020-06-18 19:34:40 +02:00
Marek Vasut
1c38c36eb9 net: pcnet: Simplify private data allocation
The current code is horribly complex. Both the RX and TX buffer
descriptors are 16 bytes in size, the init block is 32 bytes in
size, so simplify the code such that the entire private data of
the driver are allocated cache aligned and the RX and TX buffer
descriptors are part of the private data.

This removes multiple malloc calls and cache flushes.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
2020-06-18 19:34:40 +02:00
Marek Vasut
e4797c3161 net: pcnet: Use PCI_DEVICE() to define PCI device compat list
Use this macro to fully fill the PCI device ID table. This is mandatory
for the DM PCI support, which checks all the fields.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
2020-06-18 19:34:40 +02:00
Marek Vasut
1524e409ef net: pcnet: Drop PCNET_HAS_PROM
All of one PCNET users has this option set, make this default
and drop this config option.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
2020-06-18 19:34:40 +02:00
Marek Vasut
97d5c14559 net: pcnet: Drop typedef struct pcnet_priv_t
Use struct pcnet_priv all over the place instead.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
2020-06-18 19:34:40 +02:00
Marek Vasut
6463b73e0b net: eepro100: Add Kconfig entries
Add Kconfig entries for the eepro100 driver and convert various boards.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18 19:34:40 +02:00
Marek Vasut
af8ecdf7e5 net: eepro100: Add DM support
Add support for driver model to the driver.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18 19:34:40 +02:00
Marek Vasut
8835103e24 net: eepro100: Split common parts of non-DM functions out
Split the common code from the non-DM code, so it can be reused by
the DM code later. As always, the recv() function had to be split
into the actual receiving part and free_pkt part to fit with the
DM.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18 19:34:40 +02:00
Marek Vasut
43b738350c net: eepro100: Drop bd_t pointer from read_hw_addr()
The pointer is unused, so drop it. Rename the function to start
with the eepro100_ prefix.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18 19:34:40 +02:00
Marek Vasut
fb8307e52a net: eepro100: Add RX/TX rings into the private data
The RX/TX DMA descriptor rings are per-device-instance private data,
so move them into the private data.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18 19:34:40 +02:00
Marek Vasut
39daab2376 net: eepro100: Pass device private data into mdiobus
Instead of doing ethernet device lookup by name every time there
is an MDIO access, pass the driver private data via mdiobus priv
to the MDIO bus accessors.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18 19:34:40 +02:00
Marek Vasut
389da9743c net: eepro100: Pass device private data around
This patch replaces the various uses of struct eth_device for accessing
device private data with struct eepro100_priv, which is compatible both
with DM and non-DM operation.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18 19:34:40 +02:00
Marek Vasut
bd159c6185 net: eepro100: Introduce device private data
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18 19:34:40 +02:00
Marek Vasut
fa9e12102d net: eepro100: Pass PCI BDF into bus_to_phys()/phys_to_bus()
This is a trick in preparation for adding DM support. By passing in
the PCI BDF into the bus_to_phys()/phys_to_bus() macros and calling
that dev, we can substitute dev with udevice when DM support lands
and do minor adjustment to the macros to support both DM and non-DM
operation. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18 19:34:40 +02:00
Marek Vasut
acdf5d8882 net: eepro100: Drop inline keyword
Drop the inline keyword from the static functions, the compiler has a
much better overview and can decide how to inline those functions much
better.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18 19:34:40 +02:00
Marek Vasut
a6c06ec8f6 net: eepro100: Fix EE_*_CMD macros
Those macros depended on specific variable names to be declared
at their usage sites, fix this by adding an argument to those
macros and also protect the argument with braces.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18 19:34:40 +02:00
Marek Vasut
66fed7300d net: eepro100: Factor out MII registration
Pull the MII registration code into a separate function. Moreover,
properly free memory in case any of the registration or allocation
functions fail, so this fixes an existing memleak.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18 19:34:40 +02:00